@stakekit/widget 0.0.292 → 0.0.294

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/bundle/{DateTime-BBRIKkPv.js → DateTime-CMMZj2i-.js} +54 -54
  2. package/dist/bundle/{assets-vw12jo1v.js → assets-Bc9gJ-IT.js} +6 -6
  3. package/dist/bundle/{cardano-connector-DCWdS4Lt.js → cardano-connector-4FH7sm5s.js} +2 -2
  4. package/dist/bundle/{configured-chains-Bc6_pgMo.js → configured-chains-DF5IpaPp.js} +1 -1
  5. package/dist/bundle/{cosmos-connector-meta-Br67nymZ.js → cosmos-connector-meta-BKRBGzAs.js} +1 -1
  6. package/dist/bundle/index.bundle.css +1 -1
  7. package/dist/bundle/index.bundle.js +15768 -15242
  8. package/dist/bundle/{ledger-connector-wZ-AWITi.js → ledger-connector-Em3Ex6Ns.js} +5 -5
  9. package/dist/bundle/{network-D8-Flo2u.js → network-D2ajkWp0.js} +1 -1
  10. package/dist/bundle/{reward-rate-chart-B41r4AU4.js → reward-rate-chart-6q6gJawR.js} +4 -4
  11. package/dist/bundle/{solana-connector-CXe_nU4I.js → solana-connector-DHrdMGZC.js} +3 -3
  12. package/dist/bundle/{stellar-connector-Cdl9Hnba.js → stellar-connector-DkR_jg41.js} +2 -2
  13. package/dist/bundle/{styles.css-BJ7-ORZP.js → styles.css-DQG3ba8V.js} +6 -6
  14. package/dist/bundle/{substrate-connector-DFeFqV_q.js → substrate-connector-CzewVoQ6.js} +1 -1
  15. package/dist/bundle/{ton-connector-CWmOukzn.js → ton-connector-CcahoFeW.js} +3 -3
  16. package/dist/bundle/{transaction-BwhgjU0e.js → transaction-BGiGADTK.js} +1 -1
  17. package/dist/bundle/{transaction-CUoDE6CU.js → transaction-BvpQWKqm.js} +1 -1
  18. package/dist/bundle/{transaction-B8S7Vgaq.js → transaction-CD_QhA6u.js} +2 -2
  19. package/dist/bundle/{transaction-DxrR2BHC.js → transaction-CiEShf7a.js} +1 -1
  20. package/dist/bundle/{tron-connector--M_0_Iy7.js → tron-connector-Dy_36o_J.js} +3 -3
  21. package/dist/bundle/{utils-CoW929-6.js → utils-BMTuLksW.js} +1 -1
  22. package/dist/bundle/{wallet-manager-C3rmOq7t.js → wallet-manager-BLaLHs2U.js} +11 -11
  23. package/dist/package/{DateTime-DJZXpaqx.js → DateTime-CGVpQQm9.js} +24 -2
  24. package/dist/package/{assets-BuIo5TOF.js → assets-CEn8BPdT.js} +1 -1
  25. package/dist/package/{cardano-connector-DIZuipB7.js → cardano-connector-BDWTBXaS.js} +2 -2
  26. package/dist/package/{configured-chains-B6PD9hvx.js → configured-chains-CRuy8tse.js} +1 -1
  27. package/dist/package/{cosmos-connector-meta-CgvZWkLV.js → cosmos-connector-meta-B-ke1Dvw.js} +1 -1
  28. package/dist/package/index.package.css +162 -162
  29. package/dist/package/index.package.js +4126 -3050
  30. package/dist/package/{ledger-connector-B3kEcKjM.js → ledger-connector-BQDRUjOJ.js} +5 -5
  31. package/dist/package/{network-B4Qs3uRl.js → network-K03Uj00V.js} +1 -1
  32. package/dist/package/{reward-rate-chart-B42ZCby7.js → reward-rate-chart-DBx39GdL.js} +2 -2
  33. package/dist/package/{solana-connector-VG2pC1EJ.js → solana-connector-fL70NOkD.js} +3 -3
  34. package/dist/package/{stellar-connector-DO9tJUOg.js → stellar-connector-C_33sqO5.js} +2 -2
  35. package/dist/package/{styles.css-DwJjrmLr.js → styles.css-BOghDWGq.js} +1 -1
  36. package/dist/package/{substrate-connector-P80MVt5T.js → substrate-connector-Cr7LEt2o.js} +1 -1
  37. package/dist/package/{ton-connector-3rqiqNZO.js → ton-connector-81-rUhzX.js} +3 -3
  38. package/dist/package/{transaction-DTbU7sxm.js → transaction-BHIZ9rKF.js} +1 -1
  39. package/dist/package/{transaction-CuMGfUeE.js → transaction-C5e_gCK6.js} +1 -1
  40. package/dist/package/{transaction-V39s0qKU.js → transaction-DMMfLvk1.js} +2 -2
  41. package/dist/package/{transaction-Do_oUKxl.js → transaction-DgdU5pHH.js} +1 -1
  42. package/dist/package/{tron-connector-CKUZFHDh.js → tron-connector-Cuez3U16.js} +3 -3
  43. package/dist/package/{wallet-manager-CioQJQ5H.js → wallet-manager-DWFwmdLb.js} +2 -2
  44. package/dist/types/domain/earn/contract.d.ts +1 -0
  45. package/dist/types/generated/yield-provider-ids.d.ts +86 -0
  46. package/dist/types/index.bundle.d.ts +2 -2
  47. package/dist/types/index.package.d.ts +2 -2
  48. package/dist/types/public-api/types.d.ts +21 -3
  49. package/dist/website/assets/AlertController-Dd3t1FDe.js +1 -0
  50. package/dist/website/assets/{CaipNetworkUtil-CIgzbD6k.js → CaipNetworkUtil-CyIDQhS0.js} +1 -1
  51. package/dist/website/assets/DateTime-ByC3zr_K.js +1 -0
  52. package/dist/website/assets/{HelpersUtil-BokHy7la.js → HelpersUtil-Bpil3MMz.js} +1 -1
  53. package/dist/website/assets/ModalController-BhWRBcfd.js +5 -0
  54. package/dist/website/assets/{albedo.module-Dn9vkw3f.js → albedo.module-DkOe0Unb.js} +1 -1
  55. package/dist/website/assets/assets-DXO6qW6R.js +2 -0
  56. package/dist/website/assets/{axios-Dl6BaS8Y.js → axios-rFNl7rAx.js} +2 -2
  57. package/dist/website/assets/{base-signer-b1ff2VPI-DF_m1Hx-.js → base-signer-b1ff2VPI-DEykpag5.js} +1 -1
  58. package/dist/website/assets/{basic-Bt_YnOIC.js → basic-By5_muQ4.js} +1 -1
  59. package/dist/website/assets/bignumber-FohbSRh0.js +1 -0
  60. package/dist/website/assets/blakejs-x6iaQxOd.js +3 -0
  61. package/dist/website/assets/bn-Ck4DeaX2.js +1 -0
  62. package/dist/website/assets/{browser-ponyfill-_v4sZCld.js → browser-ponyfill-lHyeX8iJ.js} +1 -1
  63. package/dist/website/assets/{bs58-CiFyCgrv.js → bs58-gzsgdke5.js} +1 -1
  64. package/dist/website/assets/{build-DM4Sawu1.js → build-ClRxYQRR.js} +1 -1
  65. package/dist/website/assets/{build-Butjcagw.js → build-TBrHU398.js} +1 -1
  66. package/dist/website/assets/{build-B5AnTSOq.js → build-Tl3I8dhV.js} +1 -1
  67. package/dist/website/assets/{cardano-connector-BC5bF4Y2.js → cardano-connector-8El4Ztf_.js} +9 -9
  68. package/dist/website/assets/{configured-chains-Bp7rWkOZ.js → configured-chains-DQ_M8-li.js} +1 -1
  69. package/dist/website/assets/core-BiDQVY37.js +2 -0
  70. package/dist/website/assets/{cosmos-connector-meta-CZFaunIB.js → cosmos-connector-meta-DRTieEt0.js} +1 -1
  71. package/dist/website/assets/dist-BVuLBvyS.js +7 -0
  72. package/dist/website/assets/{dist-BKdXTi2f.js → dist-Bo7ZdXT8.js} +3 -3
  73. package/dist/website/assets/{dist-7PipG_eL.js → dist-DlLKQSrv.js} +3 -3
  74. package/dist/website/assets/dist-ZKTSEBXW.js +1 -0
  75. package/dist/website/assets/{elliptic-j9CClrcl.js → elliptic-BdE4gFqn.js} +2 -2
  76. package/dist/website/assets/{esm-DVfwo40P.js → esm-BjyHrLEJ.js} +1 -1
  77. package/dist/website/assets/events-CMzhc0tf.js +1 -0
  78. package/dist/website/assets/{extrinsic-encoding-B3zynq2U.js → extrinsic-encoding-BIj1XBpl.js} +1 -1
  79. package/dist/website/assets/{features-LE43LGiF.js → features-Cy1CFK9a.js} +1 -1
  80. package/dist/website/assets/{fhevm-relayer-DXLb4mIw-bVmGMiQn.js → fhevm-relayer-DXLb4mIw-Bbrz0cha.js} +5 -3
  81. package/dist/website/assets/freighter.module-DsmrpiWT.js +1 -0
  82. package/dist/website/assets/index-7hHJ2eI5.js +558 -0
  83. package/dist/website/assets/index-zFAIWvcU.css +1 -0
  84. package/dist/website/assets/{index.es-D6B6PG3M.js → index.es-BGzDKZr_.js} +1 -1
  85. package/dist/website/assets/index.es-BHs2-Pa6.js +1 -0
  86. package/dist/website/assets/{index.es-wqX1ruQA.js → index.es-Bpga9r91.js} +5 -5
  87. package/dist/website/assets/{kms_lib-mPebVu09.js → kms_lib-BgnOy0xU.js} +1 -1
  88. package/dist/website/assets/{kms_lib-Bh_Z1nH6.js → kms_lib-w0jRi8cP.js} +1 -1
  89. package/dist/website/assets/{ledger-connector-BOOoTKx_.js → ledger-connector-CNNjVgC1.js} +3 -3
  90. package/dist/website/assets/{lib-es-5LFNYQ9J.js → lib-es-DmH9FYVZ.js} +1 -1
  91. package/dist/website/assets/lobstr.module-BUAItZUt.js +1 -0
  92. package/dist/website/assets/{nacl-fast-BI97gFtf.js → nacl-fast-B5R4wpqG.js} +1 -1
  93. package/dist/website/assets/{nacl-util-DCWJejqG.js → nacl-util-6167mj42.js} +1 -1
  94. package/dist/website/assets/{network-CEcIzsgc.js → network-BVzpe0Ii.js} +1 -1
  95. package/dist/website/assets/{polkadot-ledger-transaction-DaDP252u.js → polkadot-ledger-transaction-Dp6EFfyV.js} +1 -1
  96. package/dist/website/assets/registry-BgQw-qJW.js +1 -0
  97. package/dist/website/assets/{reward-rate-chart-COP_M115.js → reward-rate-chart-CO_yI4og.js} +4 -4
  98. package/dist/website/assets/{safe-buffer-Dz6e-rwu.js → safe-buffer-BUgQmBOp.js} +1 -1
  99. package/dist/website/assets/{safe-connector-DG2cXEO5.js → safe-connector-BObu9WgG.js} +2 -2
  100. package/dist/website/assets/{solana-connector-DSpWnxwA.js → solana-connector-CVuV_EKp.js} +1 -1
  101. package/dist/website/assets/{src-Zq1Jw-Sn.js → src-DbdC_Alu.js} +1 -1
  102. package/dist/website/assets/{src-hSPfFTzN.js → src-Dl7INWvU.js} +1 -1
  103. package/dist/website/assets/state-D5Nw1L4F.js +1 -0
  104. package/dist/website/assets/{stellar-connector-BAbbdkSK.js → stellar-connector-Ba7Jcrbg.js} +1 -1
  105. package/dist/website/assets/styles.css-NtRiu07M.js +1 -0
  106. package/dist/website/assets/substrate-connector-hQ3vc47X.js +2 -0
  107. package/dist/website/assets/tfhe-BACovsAk.js +1 -0
  108. package/dist/website/assets/{tfhe-DuWT_ao1.js → tfhe-BSAXrnM6.js} +1 -1
  109. package/dist/website/assets/ton-connector-CU1xiP2u.js +2264 -0
  110. package/dist/website/assets/tracking-variants-CtfEiKNR.js +93 -0
  111. package/dist/website/assets/{transaction-BH4ssPh3.js → transaction-B5hUD0AE.js} +1 -1
  112. package/dist/website/assets/{transaction-BVuftLt1.js → transaction-BWEzzOww.js} +1 -1
  113. package/dist/website/assets/transaction-BmFUkzQv.js +2 -0
  114. package/dist/website/assets/{transaction-1KdJeqcp.js → transaction-C_iyacpP.js} +1 -1
  115. package/dist/website/assets/{tron-connector-CJURHEQe.js → tron-connector-gXtlAAuG.js} +7 -7
  116. package/dist/website/assets/{tx-Bkou_ALe.js → tx-Cosvp39i.js} +1 -1
  117. package/dist/website/assets/{utils-CH0e59XB.js → utils-meUBO1X1.js} +1 -1
  118. package/dist/website/assets/{viem-BQ_7aeKB.js → viem-8-EtcU49.js} +1 -1
  119. package/dist/website/assets/{w3m-modal-BLY--NNS.js → w3m-modal-HS9RLkN8.js} +2 -2
  120. package/dist/website/assets/wallet-manager-BQrZx180.js +5 -0
  121. package/dist/website/assets/{web-4qAQ-Ymk.js → web-azgm2Psf.js} +1 -1
  122. package/dist/website/assets/{wui-list-item-1gzb5UQJ.js → wui-list-item-CfZ1WQql.js} +1 -1
  123. package/dist/website/assets/{xbull.module-B4N1LGQD.js → xbull.module-DQx6rh7x.js} +1 -1
  124. package/dist/website/index.html +19 -19
  125. package/package.json +3 -2
  126. package/dist/website/assets/AlertController-CH5fpr36.js +0 -1
  127. package/dist/website/assets/DateTime-DR7XeJxF.js +0 -1
  128. package/dist/website/assets/ModalController-CWwEAkfw.js +0 -5
  129. package/dist/website/assets/assets-Dk5ppLtc.js +0 -2
  130. package/dist/website/assets/bignumber-CziKLYjt.js +0 -1
  131. package/dist/website/assets/blakejs-Dx-Zt5zT.js +0 -3
  132. package/dist/website/assets/bn-CJG5j3KW.js +0 -1
  133. package/dist/website/assets/core-uatW2d6Y.js +0 -2
  134. package/dist/website/assets/dist-CELdgNh9.js +0 -1
  135. package/dist/website/assets/dist-omv2KNC4.js +0 -5
  136. package/dist/website/assets/events-D2w4OsQJ.js +0 -1
  137. package/dist/website/assets/freighter.module-CaBNS6Y-.js +0 -1
  138. package/dist/website/assets/index-3l3n0-cX.js +0 -540
  139. package/dist/website/assets/index-Dpi1HuAK.css +0 -1
  140. package/dist/website/assets/index.es-DCi2xZ1b.js +0 -1
  141. package/dist/website/assets/lobstr.module-GQjJAf8P.js +0 -1
  142. package/dist/website/assets/registry-DVfYVrCY.js +0 -1
  143. package/dist/website/assets/state-B8Vu3fYx.js +0 -1
  144. package/dist/website/assets/styles.css-BK5OO2Hh.js +0 -1
  145. package/dist/website/assets/substrate-connector-CwnGlD2K.js +0 -2
  146. package/dist/website/assets/tfhe-PDJAG8Bv.js +0 -1
  147. package/dist/website/assets/ton-connector-DMNOeieX.js +0 -2264
  148. package/dist/website/assets/tracking-variants-CuRpr0B_.js +0 -85
  149. package/dist/website/assets/transaction-CbxrIerN.js +0 -2
  150. package/dist/website/assets/wallet-manager-D8tOJ1jy.js +0 -5
  151. package/dist/website/mockServiceWorker.js +0 -460
@@ -1,2 +0,0 @@
1
- import{At as e,Ct as t,Dt as n,Ft as r,Gt as i,Ht as a,Lt as o,Mt as s,Nt as c,Ot as l,Pt as u,St as d,T as f,Tt as p,Ut as m,Vt as ee,Wt as te,_t as ne,an as h,at as g,b as re,bt as ie,cn as ae,d as oe,et as _,ft as se,gt as ce,h as le,in as ue,it as de,jt as v,l as fe,ln as pe,mt as me,nn as y,on as he,pt as ge,qt as _e,rt as ve,st as ye,t as be,un as xe,ut as b,vt as Se,wt as Ce,xt as we,zt as Te}from"./Result-DQM8aaFz.js";import{Bi as Ee,Di as De,Ei as Oe,Fi as ke,Ft as Ae,Gr as je,Ii as Me,Jr as Ne,Lr as Pe,Mi as Fe,Mr as Ie,Ni as Le,Or as Re,Pi as ze,Pt as Be,Ri as Ve,Si as He,Ti as Ue,W as x,Wr as We,_ as Ge,ei as Ke,ii as qe,ji as Je,m as Ye,qr as Xe,r as Ze,ri as Qe,sn as $e,xr as et,zi as tt}from"./Cause-1VWVIQY3.js";import{Kt as nt}from"./wagmi-connect-result-ChkXAqK2.js";import{C as rt,Dn as it,E as at,En as ot,G as st,Gt as ct,I as lt,It as S,M as C,On as ut,Sn as dt,et as ft,f as pt,j as mt,kt as ht,m as gt,rt as _t,tt as vt,w,x as yt,xn as bt,zt as xt}from"./Effect-Cu_VlOsF.js";import{a as St,c as Ct,i as wt,l as Tt,u as Et,y as Dt}from"./DateTime-DR7XeJxF.js";var Ot=Ve,kt=()=>({}),At=e=>Object.keys(e).length===0,jt=y(2,(e,t)=>{let n=[];for(let r of Ft(e))n.push(t(r,e[r]));return n})((e,t)=>[e,t]),Mt=y(2,(e,t)=>Object.hasOwn(e,t)),Nt=y(2,(e,t)=>{let n={...e};for(let r of Ft(e))_(n,r,t(e[r],r));return n}),Pt=y(2,(e,t)=>{let n=kt();for(let r of Ft(e))t(e[r],r)&&_(n,r,e[r]);return n}),Ft=e=>Object.keys(e),It=e=>y(2,(t,n)=>{for(let r of Ft(t))if(!Mt(n,r)||!e(t[r],n[r]))return!1;return!0}),Lt=y(3,(e,t,n)=>{if(At(e))return{...t};if(At(t))return{...e};let r=kt();for(let i of Ft(e))Mt(t,i)?_(r,i,n(e[i],t[i])):_(r,i,e[i]);for(let e of Ft(t))Mt(r,e)||_(r,e,t[e]);return r}),Rt=e=>{let t=It(e);return(e,n)=>t(e,n)&&t(n,e)},zt=`~effect/encoding/EncodingError`,Bt=class extends nt(`EncodingError`){[zt]=zt};globalThis.String;var Vt=e=>e.toUpperCase(),Ht=e=>e.toLowerCase(),Ut=e=>e.length===0?e:Vt(e[0])+e.slice(1),Wt=e=>e.trim(),Gt=(e,t)=>n=>n.startsWith(e,t),Kt=e=>Jt(typeof e==`string`?Yt.encode(e):e),qt=e=>{let t=Xt(e),n=t.length;if(n%4!=0)return be(new Bt({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return be(new Bt({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=Qt(t.charCodeAt(e))<<18|Qt(t.charCodeAt(e+1))<<12|Qt(t.charCodeAt(e+2))<<6|Qt(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return oe(r)}catch(e){return be(new Bt({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},Jt=e=>{let t=e.length,n=``,r=2;for(;r<t;r+=3)n+=T[e[r-2]>>2],n+=T[(e[r-2]&3)<<4|e[r-1]>>4],n+=T[(e[r-1]&15)<<2|e[r]>>6],n+=T[e[r]&63];return r===t+1&&(n+=T[e[r-2]>>2],n+=T[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=T[e[r-2]>>2],n+=T[(e[r-2]&3)<<4|e[r-1]>>4],n+=T[(e[r-1]&15)<<2],n+=`=`),n},Yt=new TextEncoder,Xt=e=>e.replace(/[\n\r]/g,``),T=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Zt=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)Zt[T.charCodeAt(e)]=e;Zt[61]=0;var Qt=e=>{if(e>=Zt.length||Zt[e]===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return Zt[e]},$t=`~effect/BigDecimal`,en={[$t]:$t,[e](){let e=cn(this);return t(n(String(e.value)),p(e.scale))},[we](e){return tn(e)&&pn(this,e)===0},toString(){return`BigDecimal(${hn(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[ye](){return this.toJSON()},pipe(){return xe(this,arguments)}},tn=e=>v(e,$t),nn=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(en);return n.value=e,n.scale=t,n},rn=(e,t)=>{let n=nn(e,t);return n.normalized=n,n},E=BigInt(0),an=BigInt(1),on=BigInt(10),sn=rn(E,0),cn=e=>{if(e.normalized===void 0){if(e.value===E)e.normalized=sn;else{let t=`${e.value}`,n=t.length;for(;t[n-1]===`0`;)n--;e.normalized=rn(BigInt(t.slice(0,n)),e.scale-(t.length-n))}}return e.normalized},ln=100,un=[an],dn=(e,t)=>e===t?0:e<t?-1:1,fn=(e,t)=>{let n=`${e.value<E?-e.value:e.value}`,r=`${t.value<E?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==E)return i<E?-1:1;let a=Math.max(n.length,r.length);return Fe(n.padEnd(a,`0`),r.padEnd(a,`0`))},pn=(e,t)=>{if(e.scale===t.scale)return dn(e.value,t.value);let n=mn(e),r=mn(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>ln)return n===-1?fn(t,e):fn(e,t);let o=un[a]??=on**BigInt(a);return i>0?dn(e.value,t.value*o):dn(e.value*o,t.value)},mn=e=>e.value===E?0:e.value<E?-1:1,hn=e=>{let t=cn(e);if(Math.abs(t.scale)>=16)return gn(t);let n=t.value<E,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},gn=e=>{if(_n(e))return`0e+0`;let t=cn(e),n=`${t.value}`,r=t.value<E?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},_n=e=>e.value===E,vn=`~effect/http/Cookies`,yn=`~effect/http/Cookies/Cookie`,bn={[vn]:vn,...g,toJSON(){return{_id:`effect/Cookies`,cookies:Nt(this.cookies,e=>e.toJSON())}},pipe(){return xe(this,arguments)}},xn=e=>{let t=Object.create(bn);return t.cookies=e,t},Sn=e=>{let t={};for(let n of e)_(t,n.name,n);return xn(t)},Cn=e=>{let t=typeof e==`string`?[e]:e,n=[];for(let e of t){let t=wn(e.trim());t&&n.push(t)}return Sn(n)};function wn(e){let t=e.split(`;`).map(e=>e.trim()).filter(e=>e!==``);if(t.length===0)return;let n=t[0].indexOf(`=`);if(n===-1)return;let r=t[0].slice(0,n);if(!Tn.test(r))return;let i=t[0].slice(n+1),a=Dn(i);if(t.length===1)return Object.assign(Object.create(En),{name:r,value:a,valueEncoded:i});let o={};for(let e=1;e<t.length;e++){let n=t[e],r=n.indexOf(`=`),i=r===-1?n:n.slice(0,r).trim(),a=r===-1?void 0:n.slice(r+1).trim();switch(i.toLowerCase()){case`domain`:{if(a===void 0)break;let e=a.trim().replace(/^\./,``);e&&(o.domain=e);break}case`expires`:{if(a===void 0)break;let e=new Date(a);isNaN(e.getTime())||(o.expires=e);break}case`max-age`:{if(a===void 0)break;let e=parseInt(a,10);isNaN(e)||(o.maxAge=et(e));break}case`path`:if(a===void 0)break;a[0]===`/`&&(o.path=a);break;case`priority`:if(a===void 0)break;switch(a.toLowerCase()){case`low`:o.priority=`low`;break;case`medium`:o.priority=`medium`;break;case`high`:o.priority=`high`}break;case`httponly`:o.httpOnly=!0;break;case`secure`:o.secure=!0;break;case`partitioned`:o.partitioned=!0;break;case`samesite`:if(a===void 0)break;switch(a.toLowerCase()){case`lax`:o.sameSite=`lax`;break;case`strict`:o.sameSite=`strict`;break;case`none`:o.sameSite=`none`}}}return Object.assign(Object.create(En),{name:r,value:a,valueEncoded:i,options:Object.keys(o).length>0?o:void 0})}var Tn=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,En={[yn]:yn,...g,toJSON(){return{_id:`effect/Cookies/Cookie`,name:this.name,value:this.value,options:this.options}}},Dn=e=>{try{return decodeURIComponent(e)}catch{return e}},On=new WeakMap,kn=e=>{if(On.has(e))return On.get(e);throw Error(`Unable to get redacted value`+(e.label?` with label: "${e.label}"`:``))},An=`~effect/Redacted`,jn=e=>v(e,An),Mn=(e,t)=>{let n=Object.create(Nn);return t?.label&&(n.label=t.label),On.set(n,e),n},Nn={[An]:{_A:e=>e},label:void 0,...re,toJSON(){return this.toString()},toString(){return`<redacted${i(this.label)?`:`+this.label:``}>`},[e](){return Ce(On.get(this))},[we](e){return jn(e)&&ie(On.get(this),On.get(e))}},Pn=kn,Fn=Symbol.for(`~effect/http/Headers`),In=Object.defineProperties(Object.create(null),{[Fn]:{value:Fn},[ne]:{value(e){return Kn(this,qe(e,Jn))}},toJSON:{value(){return ce(this)}},[we]:{value(e){return Rn(this,e)}},[e]:{value(){return l(this)}},toString:{value:g.toString},[ye]:{value:g[ye]}}),Ln=e=>Object.assign(Object.create(In),e),Rn=Rt(Ee()),zn=Object.create(In),Bn=e=>{if(e===void 0)return zn;if(Symbol.iterator in e){let t=Object.create(In);for(let[n,r]of e)t[n.toLowerCase()]=r;return t}let t=Object.create(In);for(let[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(`, `):r!==void 0&&(t[n.toLowerCase()]=r);return t},Vn=e=>Object.setPrototypeOf(e,In),Hn=y(3,(e,t,n)=>{let r=Ln(e);return r[t.toLowerCase()]=n,r}),Un=y(2,(e,t)=>Ln({...e,...Bn(t)})),Wn=y(2,(e,t)=>{let n=Ln(e);return Object.assign(n,t),n}),Gn=y(2,(e,t)=>{let n=Ln(e);return delete n[t.toLowerCase()],n}),Kn=y(2,(e,t)=>{let n={...e},r=t=>{if(typeof t==`string`){let r=t.toLowerCase();r in e&&(n[r]=Mn(e[r]))}else for(let r in e)r.search(t)!==-1&&(n[r]=Mn(e[r]))};if(Array.isArray(t))for(let e=0;e<t.length;e++)r(t[e]);else r(t);return n}),qn=(e,t)=>{let n=e.toLowerCase();for(let r=0;r<t.length;r++){let i=t[r];if(typeof i==`string`){if(i.toLowerCase()===n)return!0}else if(e.search(i)!==-1)return!0}return!1},Jn=Ke(`effect/Headers/CurrentRedactedNames`,{defaultValue:()=>[`authorization`,`cookie`,`set-cookie`,`x-api-key`]}),Yn=e=>typeof e==`string`?e:Pn(e),Xn=`~effect/http/UrlParams`,Zn=e=>v(e,Xn),Qn={...re,[Xn]:Xn,[Symbol.iterator](){return this.params[Symbol.iterator]()},[ne](e){return{_id:`UrlParams`,params:Object.fromEntries(sr(this,qe(e,_r)))}},toJSON(){return ce(this)},[we](e){return rr(this,e)},[e](){return d(this.params.flat())}},$n=e=>{let t=Object.create(Qn);return t.params=e,t},er=e=>{if(Zn(e))return e;let t=tr(e),n=[];for(let e=0;e<t.length;e++)if(Array.isArray(t[e][0])){let[r,i]=t[e];n.push([`${r[0]}[${r.slice(1).join(`][`)}]`,i])}else n.push(t[e]);return $n(n)},tr=e=>{let t=typeof e[Symbol.iterator]==`function`?Pe(e):Object.entries(e),n=[];for(let[e,r]of t)if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]!==void 0&&n.push([e,nr(r[t])]);else if(typeof r==`object`&&r&&!jn(r)){let t=tr(r);for(let[r,i]of t)n.push([[e,...typeof r==`string`?[r]:r],i])}else r!==void 0&&n.push([e,nr(r)]);return n},nr=e=>jn(e)?e:String(e),rr=tt((e,t)=>ir(e.params,t.params)),ir=Xe(Ot([Ee(),Se()])),ar=$n([]),or=y(2,(e,t)=>{let n=er(t).params.slice(),r=new Set;for(let e=0;e<n.length;e++)r.add(n[e][0]);for(let t=0;t<e.params.length;t++)r.has(e.params[t][0])||n.push(e.params[t]);return $n(n)}),sr=y(2,(e,t)=>{let n=Array.isArray(t)?t:[t];return e.params.map(([e,t])=>[e,typeof t==`string`&&cr(e,n)?Mn(t):t])}),cr=qn,lr=(e,t=gr())=>{e.includes(`@`)&&(e=pr(e));let n=e.indexOf(`?`);if(n===-1||t.length===0)return e;let r=e.indexOf(`#`);if(r!==-1&&r<n)return e;let i=r===-1?e.length:r;return e.slice(0,n+1)+mr(e.slice(n+1,i),t)+e.slice(i)},ur=/^(?:(https?|ftp|wss?):[/\\]*|[a-z][a-z\d+.-]*:\/\/|[/\\]{2,})/i,dr=/[/\\?#]/,fr=/[/?#]/,pr=e=>{let t=``,n=[];for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i===9||i===10||i===13||t===``&&i<=32||(t+=e[r],n.push(r))}let r=ur.exec(t);if(r===null)return e;let i=r[0].length,a=r[1]!==void 0||!r[0].includes(`:`),o=t.slice(i),s=o.search(a?dr:fr),c=(s===-1?o:o.slice(0,s)).lastIndexOf(`@`);return c===-1?e:e.slice(0,n[i])+`REDACTED:REDACTED`+e.slice(n[i+c])},mr=(e,t)=>e.split(`&`).map(e=>{let n=e.indexOf(`=`);return n!==-1&&cr(hr(e.slice(0,n)),t)?e.slice(0,n+1)+`REDACTED`:e}).join(`&`),hr=e=>{if(!e.includes(`%`)&&!e.includes(`+`))return e;try{return decodeURIComponent(e.replace(/\+/g,` `))}catch{return e}},gr=()=>qe(globalThis[`~effect/Fiber/currentFiber`]?.context??Qe(),_r),_r=Ke(`effect/http/UrlParams/CurrentRedactedNames`,{defaultValue:()=>[`AWSAccessKeyId`,`Signature`,`sig`,`X-Goog-Signature`]});function vr(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}var yr=`~structural`,br=`~sentinels`,xr=`~constructor`,Sr=h(e=>{let t=vr(e)?.identifier;return typeof t==`string`?t:e.getExpected(Sr)}),D=Symbol(),O=it,k=O(D),A=O(D),Cr=e=>e===D?Oe():De(e),wr=e=>e._tag===`None`?k:O(e.value),Tr=`~effect/SchemaIssue/Issue`;function Er(e){return v(e,Tr)&&e[Tr]===Tr}function Dr(e){return Object.hasOwn(e,`input`)}var j=class{[Tr]=Tr;constructor(e,t){t?.reportInput===!0&&e!==D&&(this.input=e)}},Or=class extends j{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},kr=class extends j{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},M=class extends j{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Ar=class extends j{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},jr=class extends j{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},N=class extends j{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},P=class extends j{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},F=class extends j{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}};function Mr(e,t,n,r,i){return new N(e,[new M([t],n)],r,i)}var Nr=class extends j{_tag=`Forbidden`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Pr=class extends j{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Fr=class extends j{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function Ir(e,t,n){if(Er(e))return e;if(typeof e==`string`)return new F({message:e},t,n);let r=typeof e.issue==`string`?new F({message:e.issue},t,n):e.issue;return new M(e.path,r)}function Lr(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new F(void 0,t,n):Ir(e,t,n)}function Rr(e,t,n,r){return Array.isArray(t)?je(t)?t.length===1?Ir(t[0],n,r):new N(e,Ne(t,e=>Ir(e,n,r)),n,r):void 0:Lr(t,n,r)}var zr=e=>{let t=Yr(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return I(Sr(e.ast),e);case`InvalidValue`:{let t=Ur(e);if(t!==void 0)return I(t,e);let n=Hr(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Hr(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Hr(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Br=e=>Yr(e.issue)??Yr(e);function Vr(e){return t=>({issues:Wr(t,[],e?.leafHook??zr,e?.checkHook??Br)})}function Hr(e){return Dr(e)?b(e.input):void 0}function Ur(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function I(e,t){let n=Hr(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function Wr(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];if(e.issue._tag!==`InvalidValue`)return Wr(e.issue,t,n,r);let a=Ur(e.issue);return[{path:t,message:a===void 0?I(Gr(e.filter),e):I(a,e.issue)}]}case`Encoding`:return Wr(e.issue,t,n,r);case`Pointer`:return Wr(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>Wr(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:Yr(e)??I(Sr(e.ast),e)}]:e.issues.flatMap(e=>Wr(e,t,n,r));default:return[{path:t,message:n(e)}]}}function Gr(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>Gr(e)).join(` & `)}}function Kr(){return e=>Jr(e,``)}var qr=Kr();function Jr(e,t){let n;switch(e._tag){case`Filter`:{let r=Br(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return Jr(e.issue,t);let r=Ur(e.issue);n=r===void 0?I(Gr(e.filter),e):I(r,e.issue)}break}case`Encoding`:return Jr(e.issue,t);case`Pointer`:return Jr(e.issue,t+ge(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Jr(e,t)).join(`
2
- `);n=Yr(e)??I(Sr(e.ast),e);break;default:n=zr(e)}return t?`${n}\n at ${t}`:n}function Yr(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Yr(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function Xr(e){let t;for(let n of e.reasons){if(!Ye(n)||!Er(n.error))return;t??=n.error}return t}function Zr(e,t){let n=Xr(e);if(n===void 0)throw Error(t,{cause:e});return n}var Qr=e=>Object.assign(Object.create(pe),e);function $r(e){return oi((t,n)=>w(e(t,n)))}function ei(e){return $r((t,n)=>{let r={message:e(t)};return He(t)?new Nr(r,t.value,n):new Nr(r)})}var ti=ei(()=>`Encoding is not supported`),ni=Qr({_tag:`Passthrough`});function ri(){return ni}function ii(){return ni}function L(e){return Qr({_tag:`Transform`,transform:e})}function R(e){return Qr({_tag:`TransformEffect`,transform:e})}function ai(e){return Qr({_tag:`TransformOptional`,transform:e})}function oi(e){return Qr({_tag:`TransformOptionalEffect`,transform:e})}function si(){return L(globalThis.String)}function ci(){return L(globalThis.Number)}function li(){return L(globalThis.BigInt)}function ui(){return L(Wt)}function di(){return L(Ht)}function fi(e){return R((t,n)=>ct({try:()=>JSON.parse(t,e?.reviver),catch:()=>new F({expected:`a valid JSON string`},t,n)}))}function pi(e){return R((t,n)=>ct({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new F({expected:`a JSON-serializable value`},t,n)}))}function mi(){return L(Kt)}function hi(){return R((e,t)=>_t(st(qt(e)),()=>new F({expected:`a valid Base64 string`},e,t)))}function gi(){return L(encodeURIComponent)}function _i(){return R((e,t)=>{try{return S(globalThis.decodeURIComponent(e))}catch{return w(new F({expected:`a valid URI component`},e,t))}})}var vi=class extends ae{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new vi(this.encode,this.decode)}},yi=`~effect/SchemaTransformation/Transformation`,z=class extends ae{[yi]=yi;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new z(this.encode,this.decode)}};function bi(e){return v(e,yi)&&e[yi]===yi}var xi=e=>bi(e)?e:new z(e.decode,e.encode);function Si(e){return new z(R(e.decode),R(e.encode))}function Ci(e){return new z(L(e.decode),L(e.encode))}function wi(e){return new z(ai(e.decode),ai(e.encode))}function Ti(){return new z(ui(),ri())}function Ei(){return new z(di(),ri())}var Di=new z(ri(),ri());function Oi(){return Di}var ki=new z(ci(),si()),Ai=new z(li(),si()),ji=e=>a(e)&&typeof e.message==`string`,Mi=e=>{let t=Object.hasOwn(e,`cause`)?Error(e.message,{cause:Ii(e.cause)}):Error(e.message);return typeof e.name==`string`&&e.name!==`Error`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t},Ni=e=>{try{let t=se(e);return t===void 0?b(e):JSON.parse(t)}catch{return b(e)}},Pi=(e,t,n)=>{let r={name:e.name,message:typeof e.message==`string`?e.message:``};return t?.includeStack&&typeof e.stack==`string`&&(r.stack=e.stack),!t?.excludeCause&&e.cause!==void 0&&(r.cause=n(e.cause)),r},Fi=e=>{let t=new WeakSet,n=r=>{if(u(r)){if(t.has(r))return`[Circular]`;t.add(r);let i=Pi(r,e,n);return t.delete(r),i}return Ni(r)};return n},Ii=e=>ji(e)?Mi(e):e,Li=e=>Ci({decode:Ii,encode:Fi(e)}),Ri=new z(hi(),mi());function zi(e){return new z(fi(e??{}),pi(e))}function B(e){return t=>t._tag===e}var Bi=B(`Declaration`),Vi=B(`Never`),Hi=B(`Literal`),Ui=B(`UniqueSymbol`),Wi=B(`Arrays`),Gi=B(`Objects`),Ki=B(`Union`),qi=B(`Suspend`),V=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},Ji={},Yi=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},Xi=`~effect/Schema`,H=class{[Xi]=Xi;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},Zi=class extends H{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===D?k:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(e,t,n,r,i){let a=To(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new Zi(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},Qi=new class extends H{_tag=`Null`;getParser(){return Vo(this,null)}getExpected(){return`null`}},$i=class extends H{_tag=`Undefined`;getParser(){return Vo(this,void 0)}toCodecJson(){return G(this,[ea])}getExpected(){return`undefined`}},ea=new V(Qi,new z(L(()=>void 0),L(()=>null))),ta=new $i,na=new class extends H{_tag=`Never`;getParser(){return J(this,o)}getExpected(){return`never`}},ra=new class extends H{_tag=`Unknown`;getParser(){return J(this,_e)}getExpected(){return`unknown`}},ia=new class extends H{_tag=`ObjectKeyword`;getParser(){return J(this,m)}getExpected(){return`object | array | function`}};function aa(e){return typeof e==`number`?`parts[${e}]`:e}function oa(e,t,n){if(n.has(e))return!0;if(e.encoding)throw Error(`TemplateLiteral parts cannot have an encoding at ${aa(t)}`);let r;switch(e._tag){case`String`:case`Number`:case`BigInt`:r=!0;break;case`Literal`:r=!e.checks;break;case`TemplateLiteral`:{let i=aa(t);r=!e.checks&&e.parts.every((e,t)=>oa(e,`${i}.parts[${t}]`,n));break}case`Union`:{let i=aa(t);r=!e.checks&&e.types.every((e,t)=>oa(e,`${i}.types[${t}]`,n));break}default:return!1}return r&&n.add(e),r}var sa=class extends H{_tag=`TemplateLiteral`;parts;encodedParts;literals;suffixLengths;constructor(e,t,n,r,i){super(t,n,r,i);let a=[],o=[],s=new Set;for(let t=0;t<e.length;t++){let n=e[t];if(!oa(n,t,s))throw Error(`Invalid TemplateLiteral part ${n._tag}`);a.push(n),o.push(n._tag===`Literal`?globalThis.String(n.literal):void 0)}let c=Array(a.length+1);c[a.length]=0;for(let e=a.length-1;e>=0;e--)c[e]=c[e+1]+(o[e]?.length??0);this.parts=e,this.encodedParts=a,this.literals=o,this.suffixLengths=c}getParser(e){let t=e(jo(U,new ga(!1,this.parts.map(Go),[]),ca(this)));return(e,n)=>{if(e===D)return k;let r=t(e,n);return r._tag===`Success`?A:ft(r,{onSuccess:()=>e,onFailure:t=>new N(this,[t],e,n)})}}getExpected(){return`string`}matchPart(e,t){return Ho(this,e,t)===void 0?void 0:e}};function ca(e){return new z(R((t,n)=>{let r=Ho(e,t,n);return r?S(r):w(new F({expected:`a string matching template literal parts`},t,n))}),L(e=>e.join(``)))}var la=class extends H{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${b(e)}`);this.literal=e}getParser(){return Vo(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?ua(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:ua(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function ua(e){let t=globalThis.String(e.literal);return G(e,[new V(new la(t),new z(L(()=>e.literal),L(()=>t)))])}var U=new class extends H{_tag=`String`;getParser(){return J(this,i)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&Y(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},da=class extends H{_tag=`Number`;getParser(){return J(this,ee)}matchKey(e,t){return this._match(qo,e,t)}matchPart(e,t){return this._match(Ko,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:Y(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(fa(this.checks,`effect/schema/isFinite`)||fa(this.checks,`effect/schema/isInt`))?this:G(this,[so])}toCodecStringTree(){return this.toCodecJson()===this?G(this,[Xo]):G(this,[Zo])}getExpected(){return`number`}};function fa(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&fa(e.checks,t))}var pa=new da,ma=new class extends H{_tag=`Boolean`;getParser(){return J(this,c)}getExpected(){return`boolean`}},ha=new class extends H{_tag=`BigInt`;getParser(){return J(this,s)}matchPart(e,t){if(!Qo.test(e))return;let n=globalThis.BigInt(e);return t.disableChecks||!this.checks?n:Y(this.checks,n,void 0,this,t)?void 0:n}toCodecStringTree(){return G(this,[ts])}getExpected(){return`bigint`}},ga=class extends H{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(Po(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(Po(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new jr(n,t[o],i),a=new M([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return w(new N(n,[a],t,i))}return e.issues?w(new N(n,e.issues,t,i)):O(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:new globalThis.Array(r),issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:$e(t.concurrency),f=d===1?ya(i,e,0,u):ba(i,e,{concurrency:d,end:u});if(!f)return c(i);if(x(f))return C(f,()=>c(i));let p=!0;return xt(()=>p?(p=!1,mt(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===D)return k;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):w(new P(n,e,a))}catch(e){return yt(e)}}}_rebuild(e,t,n){let r=To(this.elements,e),i=To(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new ga(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function _a(e,t,n,r){if(n._tag===`Failure`)return xa(e,e.ast,r,n);let i=n===A?t:n[f];if(i!==D)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(Po(t.ast))return;let n=new M([r],new Ar(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return bt(new N(e.ast,[n],e.input,e.options))}}var va={onItem(e,t,n){let r=n<e.len?t:D;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:_a},ya=Ae()(va),ba=Be()(va),xa=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Xr(r.cause);if(i===void 0)return dt(Ge(r.cause,r=>new N(t,[new M([n],r)],e.input,e.options)));let a=new M([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return bt(new N(t,[a],e.input,e.options))},Sa=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Ca(e,t,n=Ji){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Uo(Ro(t)))}var wa=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Ta(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Ta);default:return!1}}function Ea(e){let t=mo(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(Ea);default:return!1}}function Da(e){return Ta(e)&&Ea(e)}var Oa=class{parameter;type;constructor(e,t){if(!Da(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,Po(t)&&!Bo(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},ka=class extends H{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return J(n,Te);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(Uo(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return xa(t,n,i,s)??ut;let c=s===A?o:s[f];if(a!==D&&c!==D){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return ut;_(t.out,a,c)}return ut},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!x(t))return mt(rt(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return xa(e,n,r,a)??ut;let o=a===A?r:a[f],s=e.input[r],l=i.parserValue(s,e.options);return x(l)?t(e,r,o,s,l):mt(rt(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return x(a)?t(e,n,n,i,a):mt(rt(a),r=>t(e,n,n,i,r))},u=i?Be()({onItem:(e,[t,n])=>n.is.parameter===U?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return lt(function*(t,d){if(t===D)return D;if(typeof t!=`object`||!t||Array.isArray(t))return yield*w(new P(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},ee=d.errors===`all`,te=d.onExcessProperty===`error`,ne=d.concurrency===void 0?1:$e(d.concurrency),h=i&&te?n.indexSignatures.map(e=>Ca(f,e.parameter,d)):void 0;if(te){let r=h?new Set(e):e;if(h)for(let e of h)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new jr(n,f[a],d),r=new M([a],e);if(ee){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*w(new N(n,[r],t,d))}}}if(r){let e=ne===1?Ma(m,a):Na(m,a,{concurrency:ne});e&&(yield*e)}if(i&&ne===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===U?l:c,r=h?.[e]??(t.is.parameter===U?Object.keys(f):Ca(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!x(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Ie();for(let t=0;t<i;t++){let n=o[t],r=h?.[t]??(n.is.parameter===U?Object.keys(f):Ca(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:ne});t&&(yield*t)}return m.issues?yield*w(new N(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return mt(rt(n),n=>{let i=Aa(e,r,n);if(i)return i;let o=()=>O(e.out),s=Ma(e,a.slice(t+1));return s?C(s,o):o()})};return(e,t)=>{if(e===D)return k;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&$e(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return w(new P(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=Ga(i,s),l=c?i[s]:D,d=n.parser(l,t);if(!x(d))return u(o,e,d);if(d===A){c&&_(a,s,l);continue}let f=Aa(o,n,d);if(f)return f}}catch(e){return yt(e)}return O(a)}}_rebuild(e,t,n,r){let i=To(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new wa(t.name,n)}),a=To(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new Oa(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new ka(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function Aa(e,t,n){if(n._tag===`Failure`)return xa(e,e.ast,t.name,n);if(n===A)return;let r=n[f];if(r!==D){_(e.out,t.name,r);return}if(delete e.out[t.name],!Po(t.type)){let n=new M([t.name],new Ar(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return bt(new N(e.ast,[n],e.input,e.options))}}var ja={onItem(e,t){if(!Ga(e.input,t.name))return t.parser(D,e.options);let n=e.input[t.name];return _(e.out,t.name,n),t.parser(n,e.options)},step:Aa},Ma=Ae()(ja),Na=Be()(ja);function Pa(e,t){return e?t?[...e,...t]:e:t}function Fa(e,t,n){return new ka(Reflect.ownKeys(e).map(t=>new wa(t,e[t].ast)),[],n,t)}function Ia(e){return e.ast}function La(e,t,n){return new W(e.map(Ia),t,void 0,n)}function Ra(e,t){if(e.encoding||t.some(e=>e.encoding))throw Error(`StructWithRest does not support encodings`);let n=e.propertySignatures,r=e.indexSignatures,i=e.checks;for(let e of t){for(let t of e.propertySignatures)if(n.some(e=>e.name===t.name))throw Error(`Duplicate identifier: ${JSON.stringify(t.name)}. ts(2300)`);n=n.concat(e.propertySignatures),r=r.concat(e.indexSignatures),i=Pa(i,e.checks)}return new ka(n,r,void 0,i)}var za=he(e=>{for(;;){if(qi(e))return ra;let t=e.encoding;if(!t)return e.recur?.(za,ue)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==ue))return ra;e=t[t.length-1].to}});function Ba(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(Ba)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Va(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[br];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!Po(t)){if(Hi(t))return[{key:e.name,literal:t.literal}];if(Ui(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!Po(e)){if(Hi(e))return[{key:t,literal:e.literal}];if(Ui(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Va(za(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Va(e.thunk())}}var Ha=new WeakMap,Ua=Object.freeze([]),Wa=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,Ga=(e,t)=>t===`__proto__`?Object.hasOwn(e,t):t in e;function Ka(e){let t=Ha.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=za(c);if(Vi(l))continue;if(Hi(l)||Ui(l)){a??=new Map;let e=Hi(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=Va(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=Ba(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??Ua);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??Ua;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(m(e)){let n=Ga(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??Ua;if(t)return o}return Ua}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=Wa(t);if(!m(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=Ga(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=Ga(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=Ga(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(Wa(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return Ha.set(e,t),t}var W=class extends H{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===D)return k;let i=(o??=Ka(n.types))(e,r);if(i.length===0)return w(new Pr(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:x(r)?qa(n,r.cause,e,t):Ja(n,r,e,t)}return Ya(n,a,i,e,t)}}_rebuild(e,t,n){let r=To(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new W(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=Ro(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(Hi);if(t.length>0)return`${$a(n.isMutable)}[ ${t.map(t=>e(t)+eo(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>Hi(e.type));if(t.length>0)return`{ ${t.map(t=>`${$a(t.type.context?.isMutable)}${me(t.name)}${eo(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function qa(e,t,n,r){let i=Xr(t);return i?bt(new Pr(e,[i],n,r)):dt(t)}function Ja(e,t,n,r){return pt(t,t=>qa(e,t,n,r))}function Ya(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Za(a,n);if(!o)return a.out?a.out:w(new Pr(e,a.issues??[],r,i));if(x(o))return Xa(o,a);let s=!0;return xt(()=>s?(s=!1,Xa(o,a)):Ya(e,t,n,r,i))}function Xa(e,t){return C(e,e=>t.out===A?S(t.input):t.out?t.out:w(new Pr(t.ast,t.issues??[],t.input,t.options)))}var Za=Ae()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Xr(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),bt(new Fr(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return ut}}}),Qa=new W([new la(`Infinity`),new la(`-Infinity`),new la(`NaN`)]);function $a(e){return e?``:`readonly `}function eo(e){return e?`?`:``}var to=class extends H{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i);let a;this.thunk=()=>a??=e()}getParser(e){let t;return(n,r)=>(t??=e(this.thunk()))(n,r)}recur(e){return new to(()=>e(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},no=class extends ae{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new no(this.run,{...this.annotations,...e},this.aborted)}abort(){return new no(this.run,this.annotations,!0)}and(e,t){return new ro([this,e],t)}},ro=class extends ae{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new ro(this.checks,{...this.annotations,...e})}and(e,t){return new ro([this,e],t)}};function io(e,t,n=!1){return new no((t,n,r)=>Rr(n,e(t,n,r),t,r),t,n)}function ao(e){return io(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var oo=_o(pa,[ao()]),so=new V(new W([oo,Qa]),new z(ci(),L(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function co(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return io(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var lo=new WeakMap;function uo(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&lo.set(n,fo(e)),n}function fo(e){let t=lo.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return lo.set(e,n),n}function G(e,t){return e.encoding===t?e:uo(e,{encoding:t})}function po(e,t){if(e.context===t)return e;let n=fo(e);return n.context===t&&n.encoding===e.encoding?n:uo(e,{context:t})}function mo(e){return e.encoding?mo(e.encoding[e.encoding.length-1].to):e}function ho(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return go(e,Re(e.checks.slice(0,-1),n.annotate(t)))}return uo(e,{annotations:{...e.annotations,...t}})}function go(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:uo(e,{checks:t})}function _o(e,t){return go(e,Pa(e.checks,t))}function vo(e,t){let n=t(e.to);return n===e.to?e:new V(n,e.transformation)}function yo(e,t){let n=e,r=n[n.length-1],i=vo(r,t);return i===r?e:Re(e.slice(0,e.length-1),i)}function bo(e){return t=>t.encoding?G(t,yo(t.encoding,e)):t}function xo(e,t){return bo(e=>po(e,t))(e)}function So(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:G(r,yo(r.encoding,n))}return e(r)}return he(n)}function Co(e,t){return wo(e,t,K(e))}function wo(e,t,n){let r=new V(e,t);return G(n,n.encoding?[...n.encoding,r]:[r])}function To(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function Eo(e,t){return po(e,e.context?new Yi(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new Yi(!1,!1,void 0,t))}var Do=he(e=>Oo(po(e,e.context?e.context.isOptional===!1?new Yi(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new Yi(!0,!1)))),Oo=bo(Do),ko=h(e=>Do(new W([e,ta])));function Ao(e,t){return po(e,e.context?new Yi(e.context.isOptional,e.context.isMutable,t,e.context.annotations):new Yi(!1,!1,t))}function jo(e,t,n){return wo(e,n,t)}function Mo(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:te(e.literal)&&!t.includes(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.includes(e.symbol)||t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function No(e,t){let{literals:n,parameters:r}=Mo(e);return new ka(n.map(e=>new wa(e,t)),r.map(e=>new Oa(e,t)))}function Po(e){return e.context?.isOptional??!1}function Fo(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(Fo)}function Io(e){function t(e){return Fo(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return We(n)?n:void 0}function Lo(e){let t=!0;function n(e){return t=t&&!e.encoding&&!qi(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var K=he(e=>{let t=fo(e);if(t!==e){let n=K(t);return n===t&&e.encoding===void 0?e:po(n,e.context)}let n=`recur`in e?e.recur(K):e;if(`encodingChecks`in n&&n.encodingChecks){let t=Lo(e)?n.encodingChecks:Wi(n)||Gi(n)||Bi(n)&&n.typeParameters.length>0?Io(n.encodingChecks):void 0;return uo(n,{encodingChecks:void 0,checks:Pa(n.checks,t)})}return n}),Ro=he(e=>K(q(e)));function zo(e,t){let n=t,r=n.length,i=n[r-1],a=[new V(q(G(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new V(q(n[e-1].to),n[e].transformation.flip()));let o=q(i.to);return o.encoding?G(o,[...o.encoding,...a]):G(o,a)}var q=h(e=>{if(e.encoding)return zo(e,e.encoding);let t=fo(e);if(t!==e){let n=q(t);return n===t?e:po(n,e.context)}return`flip`in e?e.flip(q):`recur`in e?e.recur(q):e});function Bo(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(Bo);default:return!1}}function Vo(e,t){let n=t===0?A:O(t);return(r,i)=>r===D?k:r===t?n:w(new P(e,r,i))}function J(e,t){return(n,r)=>n===D?k:t(n)?A:w(new P(e,n,r))}function Ho(e,t,n){let r=e.encodedParts,i=e.literals,a=t.length;for(let e=0;e<i.length;e++){let n=i[e];if(n&&!t.includes(n))return}if(e.suffixLengths[0]>a)return;let o=Array(r.length),s;function c(l,u){if(l===r.length)return u===a;if(s?.has(l*(a+1)+u))return!1;let d=r[l];if(l===r.length-1){let e=t.slice(u);if(d.matchPart(e,n)!==void 0)return o[l]=e,!0}else if(d._tag===`Literal`){let e=i[l];if(t.startsWith(e,u)&&c(l+1,u+e.length))return o[l]=e,!0}else{let r=a-e.suffixLengths[l+1],s=i[l+1],f=s===void 0?r:t.lastIndexOf(s,r);for(;f>=u;){let e=t.slice(u,f);if(d.matchPart(e,n)!==void 0&&c(l+1,f))return o[l]=e,!0;if(f===0)break;f=s===void 0?f-1:t.lastIndexOf(s,f-1)}}return s??=new Set,s.add(l*(a+1)+u),!1}return c(0,0)?o:void 0}var Uo=So(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Uo)}}),Wo=So(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(Wo)}}),Go=So(e=>{switch(e._tag){default:return e;case`Number`:case`Literal`:case`BigInt`:return e.toCodecStringTree();case`Union`:return e.recur(Go)}}),Ko=new globalThis.RegExp(`^${Sa}$`),qo=new globalThis.RegExp(`^(?:${Sa}|Infinity|-Infinity|NaN)$`);function Jo(e){return co(Ko,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Ko.source}),...e})}var Yo=_o(U,[Jo()]),Xo=new V(Yo,ki),Zo=new V(new W([Yo,Qa]),ki),Qo=new globalThis.RegExp(`^-?\\d+$`);function $o(e){return co(Qo,{expected:`a string representing a bigint`,representation:{id:`effect/schema/isStringBigInt`,payload:null},toJsonSchema:()=>({pattern:Qo.source}),...e})}var es=_o(U,[$o({expected:`a string representing a bigint`})]),ts=new V(es,Ai);function Y(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=Y(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Or(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function ns(e){if(!Bi(e))return;let t=e.annotations?.[xr];return r(t)?t(e.typeParameters):void 0}function rs(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function is(e){return e===void 0||typeof e==`string`}function as(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function os(e){return as(e,rs)}var ss=new Zi([],()=>(e,t,n)=>os(e)?A:w(new P(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>ds}),cs=new V(ss,Oi()),ls=new V(new W([new ga(!1,[],[ss]),new ka([],[new Oa(U,ss)])]),Oi());function us(e){return as(e,is)}var ds=new V(new Zi([],()=>(e,t,n)=>us(e)?A:w(new P(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),Oi()),fs=(e,t,n)=>e===A?n(t):C(e,n);function ps(e){if(e._tag===`Middleware`)return(t,n,r)=>ms(t===A?e.decode(O(Cr(n)),r):e.decode(vt(t,Cr),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>e===A?O(t):e;case`Transform`:{let e=e=>e===D?k:O(t.transform(e));return(t,n)=>fs(t,n,e)}case`TransformOptional`:{let e=e=>wr(t.transform(Cr(e)));return(t,n)=>fs(t,n,e)}case`TransformEffect`:return(e,n,r)=>fs(e,n,e=>e===D?k:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>fs(e,n,e=>ms(t.transform(Cr(e),r)))}}var ms=e=>C(e,wr),hs=(e,t,n,r)=>pt(r,r=>at(()=>Ge(r,r=>new kr(e,r,t,n))));function gs(e,t){let n=ps(e.link.transformation),r;return(i,a)=>{if(i===D)return k;if(e.isConstructed(i))return A;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function _s(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==D&&r!==void 0)return t(r,i);let a=n;if(x(a)&&a._tag===`Success`){let e=t(a[f],i);return e===A?a:e}return C(hs(e,r,i,a),e=>{let n=t(e,i);return n===A?O(e):n})}}function vs(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:_s(e,n)}function ys(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?ns(e):void 0,o=a?gs(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>ps(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,p=(t,n)=>{let r=o(t,n);if(u&&!n.disableChecks){if(x(r)){if(r._tag===`Success`){let i=r===A?t:r[f];if(t!==D&&i!==D){let i=Y(u,t,void 0,e,n);i&&(r=w(new N(e,i,t,n)))}}}else r=mt(r,r=>{if(t!==D&&r!==D){let r=Y(u,t,void 0,e,n);if(r)return w(new N(e,r,t,n))}return S(r)})}if(s&&!n.disableChecks){if(x(r)){if(r._tag===`Success`){let i=r===A?t:r[f];if(i===D)return r;let a=Y(s,i,void 0,e,n);a&&(r=w(new N(e,a,i,n)))}}else r=mt(r,t=>{if(t!==D){let r=Y(s,t,void 0,e,n);if(r)return w(new N(e,r,t,n))}return S(t)})}return r},m=i===void 0?p:i(p);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[f],o=t(a,r)):o=C(o,e=>{let n=t(e,r);return n===A?O(e):n})}if(o._tag===`Success`){let e=o[f],t=m(e,r);return t===A?o:t}return o=hs(e,n,r,o),C(o,e=>{let t=m(e,r);return t===A?O(e):t})}:m}var bs=Symbol(),xs=new WeakMap,Ss=e=>Es(e).parser,Cs=e=>Es(e).makeEffect,ws=e=>vs(e,Cs),Ts=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=ys(this.ast,Ss)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=ys(this.ast,Cs,ws)}};function Es(e){let t=xs.get(e);if(t!==void 0)return t;let n=new Ts(e);return xs.set(e,n),n}function Ds(e){let t=e.ast,n;return(e,r)=>(n??=Hs(Ys,K(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function Os(e){let t=Ds(e);return(e,n)=>{let r=ht(t(e,n));return ot(r)?De(r.value):(Zr(r.cause,`Option adapter can only return none for schema issues`),Oe())}}function ks(e){return qs(K(e.ast))}function As(e){return Ms(e.ast)}function js(e){{let t=Us(Bs(e));return e=>{let n=t(e,Ji);return ot(n)?!0:(Zr(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function Ms(e){let t=K(e),n=e=>(n=js(t),n(e));return e=>n(e)}function Ns(e,t){let n=Bs(e.ast);return t===void 0?n:(e,r)=>n(e,Rs(t,r))}function Ps(e,t){return Ws(Ns(e,t))}var Fs=Ps;function Is(e,t){return Gs(Ns(e,t))}function Ls(e,t){let n=Bs(q(e.ast));return t===void 0?n:(e,r)=>n(e,Rs(t,r))}var Rs=(e,t)=>t?{...e,...t}:e,zs=e=>e===D?w(new F):S(e);function Bs(e){return Hs(Js,e)}function Vs(e,t){return e===A?S(t):x(e)?e[f]===D?zs(D):e:C(e,zs)}function Hs(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??Ji);return a===A?S(r):x(a)?a[f]===D?zs(D):a:C(a,zs)}}function Us(e){return(t,n)=>ht(e(t,n))}function Ws(e){let t=Us(e);return(e,n)=>{let r=t(e,n);return ot(r)?De(r.value):(Zr(r.cause,`Option adapter can only return none for schema issues`),Oe())}}function Gs(e){let t=Us(e);return(e,n)=>{let r=t(e,n);return ot(r)?oe(r.value):be(Zr(r.cause,`Result adapter can only return schema issues`))}}function Ks(e,t){let n=ht(e);if(ot(n))return n.value;let r=Zr(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}function qs(e){let t,n;return(r,i)=>{t??=Es(e);let a=i?.disableChecks?i.parseOptions?{...i.parseOptions,disableChecks:!0}:{disableChecks:!0}:i?.parseOptions??Ji,o=t.make;if(o!==void 0&&r!==D){let e;try{e=o(r,a)}catch(e){throw Zr(Ze(e),`Constructor adapter can only throw schema issues`),e}if(e!==bs&&e!==D)return e}return Ks(Vs((n??=t.makeEffect)(r,a),r),`Constructor adapter can only throw schema issues`)}}var Js=e=>Es(e).parser,Ys=e=>Es(e).makeEffect,Xs=`~effect/Schema/Schema`,Zs=Symbol(),Qs={[Xs]:Xs,get make(){let e=ks(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=Ds(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=Os(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return xe(this,arguments)},annotate(e){return this.rebuild(ho(this.ast,e))},annotateKey(e){return this.rebuild(Eo(this.ast,e))},check(...e){return this.rebuild(_o(this.ast,e))},rebuild(e){return $s(e,this[Zs])}};function $s(e,t){function n(){}let r=Object.setPrototypeOf(n,Qs);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Zs]=t,r.ast=e,r}function ec(e){return $s(tc(e.ast),{schema:e})}var tc=So(e=>{let t=oc(e,tc),n=e.context;return t===e||n===void 0?t:xo(t,nc(n))});function nc(e){return e.constructorDefault===void 0?e:new Yi(e.isOptional,e.isMutable,void 0,e.annotations)}function rc(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function ic(e){return t=>{let n=[...t].sort((t,n)=>e(Ro(t))-e(Ro(n)));return n.some((e,n)=>e!==t[n])?n:t}}var ac=ic(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function oc(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!r(n))return G(e,[cs]);let i=n(e.typeParameters.map(e=>$s(Ro(e))));return i===void 0?e:G(e,[vo(i,t)])}case`Unknown`:return G(e,[cs]);case`ObjectKeyword`:return G(e,[ls]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return rc(e),e.recur(t,Wo);case`Union`:{let n=ac(e.types);return n===e.types?e.recur(t):new W(n,e.options,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}var sc=y(2,(e,t)=>dc(e,(e,n)=>uc(t,e)?[e,n]:void 0)),cc=y(2,(e,t)=>dc(e,(e,n)=>uc(t,e)?void 0:[e,n])),lc=e=>e;function uc(e,t){return e.some(e=>e===t||typeof e==`number`&&String(e)===t)}function dc(e,t){let n={};for(let r of Reflect.ownKeys(e)){if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;let i=t(r,e[r]);if(i){let[e,t]=i;_(n,e,t)}}return n}var fc=`~effect/Schema/SchemaError`;function pc(e){return v(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}({...g}),{...g},{...g},{...g},{...g},{...g},{...g},{...g};var mc=Xs;function hc(){return(e,t,n)=>X(new Zi(e.map(Ia),e=>t(e.map(e=>X(e))),n))}function gc(e,t){return hc()([],()=>(t,n,r)=>e(t)?S(t):w(new P(n,t,r)),t)}var _c=class extends nt(`SchemaError`){[fc]=fc;constructor(e){let t=ve();de(0);try{super({issue:e})}finally{de(t)}}get message(){return qr(this.issue)}toJSON(){return{_tag:this._tag,message:this.message}}[ye](){return this.toJSON()}toString(){return`SchemaError(${this.message})`}};function vc(e){return pc(e)}function yc(e){return x(e)?bc(e):pt(e,e=>at(()=>Ge(e,e=>new _c(e))))}function bc(e){return ot(e)?e:dt(Ge(e.cause,e=>new _c(e)))}function xc(e,t){let n;for(let r of e.reasons){if(!Ye(r)||!vc(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Sc(e){let t=ht(e);if(ot(t))return t.value;throw xc(t.cause,`Sync adapter can only throw schema errors`)}var Cc=As;function wc(e,t){let n=Ns(e,t);return(e,t)=>yc(n(e,t))}var Tc=wc,Ec=Ps,Dc=Fs;function Oc(e,t){let n=Is(e,t);return(e,t)=>fe(n(e,t),e=>new _c(e))}var kc=Oc;function Ac(e,t){let n=wc(e,t);return(e,t)=>Sc(n(e,t))}var jc=Ac;function Mc(e,t){let n=Ls(e,t);return(e,t)=>yc(n(e,t))}var Nc=Mc,X=$s;function Pc(e){return v(e,mc)&&e[mc]===mc}var Fc=lc(e=>X(Do(e.ast),{schema:e})),Ic=lc(e=>{let t=al(e);return X(ko(e.ast),{schema:t})}),Lc=lc(e=>X(K(e.ast),{schema:e}));function Rc(e){let t=X(new la(e),{literal:e,transform(n){return t.pipe(Q(Rc(n),{decode:L(()=>n),encode:L(()=>e)}))}});return t}function zc(e){return e.map(e=>Pc(e)?e.ast:new la(e))}function Bc(e){return X(new sa(zc(e)),{parts:e})}var Vc=X(na),Hc=X(ra),Uc=X(Qi),Wc=X(ta),Z=X(U),Gc=X(pa),Kc=X(ma),qc=X(ha),Jc=X(ia);function Yc(e,t){return X(e,{fields:t,mapFields(e,t){let n=e(this.fields);return Yc(Fa(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function Xc(e){return Yc(Fa(e,void 0),e)}function Zc(e,t){return n=>{let r=Xc({...Nt(n.fields,Lc),...e});return n.pipe(Q(r,Ci({decode:n=>{let r={...n};for(let i in e){let e=t[i],a=e(n);He(a)&&_(r,i,a.value)}return r},encode:t=>{let n={...t};for(let t in e)delete n[t];return n}})))}}function Qc(e,t){return X(No(e.ast,t.ast),{key:e,value:t})}function $c(e,t){return X(Ra(e.ast,t.map(Ia)),{schema:e,records:t})}var el=lc(e=>X(new ga(!1,[],[e.ast]),{value:e}));function tl(e,t){return X(e,{members:t,mapMembers(e,t){let n=e(this.members);return tl(La(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function nl(e,t){return tl(La(e,t,void 0),e)}function rl(e){let t=e.map(Rc);return X(La(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return nl(e(this.members))},pick(e){return rl(e)},transform(e){return nl(t.map((t,n)=>t.transform(e[n])))}})}var il=lc(e=>nl([e,Uc])),al=lc(e=>nl([e,Wc]));function ol(e){return X(new to(()=>e().ast))}function sl(...e){return t=>t.check(...e)}function cl(e){return t=>X(t.ast,{schema:t,identifier:e})}function ll(e){return t=>X(Co(t.ast,new vi(e,ue)),{schema:t})}function ul(e){return dl(e)}function dl(e){return t=>ll(gt(e))(t)}function Q(e,t){return n=>X(jo(n.ast,e.ast,t?xi(t):Oi()),{from:n,to:e})}function fl(){return(e,t)=>bl()(e,{decode:t,encode:ti})}function pl(e){return t=>Q(Lc(t),e)(t)}function ml(e){return t=>X(Ao(t.ast,e),{schema:t})}function hl(e){return Rc(e).pipe(ml(S(e)))}function gl(e,t){return Xc({_tag:hl(e),...t})}function _l(e){return t=>{let n={},r=[],i=new Set,a={};return o(t),Object.assign(t,{tag:e,cases:n,discriminants:r,isAnyOf:t=>n=>t.includes(n[e]),guards:a,match:s,matchOrElse:c});function o(t){let s=t.ast;if(Ki(s)&&`members`in t&&globalThis.Array.isArray(t.members)&&t.members.every(Pc))return t.members.forEach(o);let c=Va(s);if(c.length>0){let o=c.find(t=>t.key===e)?.literal;if(te(o)){let e=typeof o==`number`?globalThis.String(o):o;if(i.has(e))throw new globalThis.Error(`Duplicate discriminant: ${globalThis.String(o)}`);i.add(e),r.push(o),_(n,o,t),_(a,o,As(Lc(t)));return}}throw new globalThis.Error(`No literal or unique symbol found`)}function s(){if(arguments.length===1){let t=arguments[0];return function(n){let r=n[e];return(Object.hasOwn(t,r)?t[r]:void 0)(n)}}let t=arguments[0],n=arguments[1],r=t[e];return(Object.hasOwn(n,r)?n[r]:void 0)(t)}function c(){if(arguments.length===2){let t=arguments[0],n=arguments[1];return function(r){let i=r[e];return(Object.hasOwn(t,i)?t[i]??n:n)(r)}}let t=arguments[0],n=arguments[1],r=arguments[2],i=t[e];return(Object.hasOwn(n,i)?n[i]??r:r)(t)}}}function vl(e){let t={},n=[];for(let r of Object.keys(e)){let i=gl(r,e[r]);_(t,r,i),n.push(i)}let r=nl(n),{tag:i,guards:a,isAnyOf:o,match:s,matchOrElse:c}=_l(`_tag`)(r);return X(r.ast,{tag:i,cases:t,isAnyOf:o,guards:a,match:s,matchOrElse:c})}function yl(e,t){return gc(t=>t instanceof e,t)}function bl(){return(e,t)=>new V(e.ast,xi(t))}var $=io,xl=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function Sl(e){let t=new globalThis.RegExp(xl);return $(e=>e.trim()===e,{expected:`a string with no leading or trailing whitespace`,representation:{id:`effect/schema/isTrimmed`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isTrimmed()`}),arbitraryConstraint:{patterns:[{source:xl,flags:``}]},...e})}function Cl(e,t){let n=e.source,r=e.flags,i=/^[dg]*uy?$/.test(r),a=r===``?`new RegExp(${b(n)})`:`new RegExp(${b(n)}, ${b(r)})`;return co(e,{toJsonSchema:()=>i?{pattern:r.endsWith(`y`)?`^(?:${n})`:n}:[{},!0],toCode:()=>({runtime:`Schema.isPattern(${a})`}),...t})}function wl(e){return Jo({toCode:()=>({runtime:`Schema.isStringFinite()`}),...e})}var Tl=X(oo),El=ao;function Dl(e){let t=ze(e.order),n=e.formatter??b;return(r,i)=>$(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r},...e.annotate?.(r),...i})}function Ol(e){let t=ke(e.order),n=e.formatter??b;return(r,i)=>$(e=>t(e,r),{expected:`a value less than ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r,exclusiveMaximum:!0},...e.annotate?.(r),...i})}function kl(e){let t=Me(e.order),n=e.formatter??b;return(r,i)=>$(e=>t(e,r),{expected:`a value less than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r},...e.annotate?.(r),...i})}function Al(e){let t=ze(e.order),n=Le(e.order),r=Me(e.order),i=ke(e.order),a=e.formatter??b;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return $(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitraryConstraint:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}},...e.annotate?.(o),...s})}}function jl(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${b(e)}`);return e}var Ml=Dl({order:Je,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:jl(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${b(e)})`})})}),Nl=Ol({order:Je,annotate:e=>({representation:{id:`effect/schema/isLessThan`,payload:{exclusiveMaximum:jl(e)}},toJsonSchema:()=>({exclusiveMaximum:e}),toCode:()=>({runtime:`Schema.isLessThan(${b(e)})`})})}),Pl=kl({order:Je,annotate:e=>({representation:{id:`effect/schema/isLessThanOrEqualTo`,payload:{maximum:jl(e)}},toJsonSchema:()=>({maximum:e}),toCode:()=>({runtime:`Schema.isLessThanOrEqualTo(${b(e)})`})})}),Fl=Al({order:Je,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:jl(e.minimum),maximum:jl(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${b(e.minimum)}, maximum: ${b(e.maximum)}, exclusiveMinimum: ${b(t)}, exclusiveMaximum: ${b(n)} })`})}}});function Il(e){return $(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`,minimum:globalThis.Number.MIN_SAFE_INTEGER,maximum:globalThis.Number.MAX_SAFE_INTEGER}),toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var Ll=Gc.check(Il()),Rl=Ll.check(Ml(0));function zl(e,t){return e=Kl(e),Bl(e,Math.ceil(e/2),t)}function Bl(e,t,n){return $(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[yr]:!0,arbitraryConstraint:{minLength:e},...n})}function Vl(e){return Bl(1,1,e)}function Hl(e,t){return e=Kl(e),$(t=>t.length<=e,{expected:`a value with a length of at most ${e}`,representation:{id:`effect/schema/isMaxLength`,payload:{maxLength:e}},toJsonSchema:({type:t})=>t===`string`?e===0?{maxLength:e}:[{maxLength:e},!0]:t===`array`?{maxItems:e}:t===void 0?[{maxLength:e,maxItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMaxLength(${e})`}),[yr]:!0,arbitraryConstraint:{maxLength:e},...t})}function Ul(e,t){return e=Kl(e),$(t=>Gl(t,e)>=e,{expected:`a string with at least ${e} code points`,representation:{id:`effect/schema/isMinCodePoints`,payload:{minCodePoints:e}},toJsonSchema:()=>({minLength:e}),toCode:()=>({runtime:`Schema.isMinCodePoints(${e})`}),arbitraryConstraint:{minCodePoints:e},...t})}function Wl(e,t){return e=Kl(e),$(t=>Gl(t,e+1)<=e,{expected:`a string with at most ${e} code points`,representation:{id:`effect/schema/isMaxCodePoints`,payload:{maxCodePoints:e}},toJsonSchema:()=>({maxLength:e}),toCode:()=>({runtime:`Schema.isMaxCodePoints(${e})`}),arbitraryConstraint:{maxCodePoints:e},...t})}function Gl(e,t){if(t===0)return 0;let n=0;for(let r of e)if(++n>=t)break;return n}function Kl(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${e}`);return Math.max(0,Math.floor(e))}var ql=Z.check(Vl()),Jl=e=>+(e?.includeStack===!0)|(e?.excludeCause===!0?2:0),Yl=e=>{switch(e){case 0:return;case 1:return{includeStack:!0};case 2:return{excludeCause:!0};case 3:return{includeStack:!0,excludeCause:!0}}},Xl=[];function Zl(e){let t=Jl(e),n=Xl[t];if(n!==void 0)return n;let r=Tu.pipe(Q(Hc,Li(Yl(t))));return Xl[t]=r,r}function Ql(e){return X(hc()([e],([e])=>{let t=el(e);return(e,n,r)=>e instanceof globalThis.Set?ft(Ns(t)([...e],r),{onSuccess:e=>new globalThis.Set(e),onFailure:t=>Mr(n,`values`,t,e,r)}):w(new P(n,e,r))},{representation:{id:`effect/schema/ReadonlySet`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.ReadonlySet(${e[0].runtime})`,Type:`globalThis.ReadonlySet<${e[0].Type}>`}),expected:`ReadonlySet`,toCodec:([e])=>bl()(el(e),Ci({decode:e=>new globalThis.Set(e),encode:e=>[...e.values()]}))}).ast,{value:e})}globalThis.RegExp,globalThis.URL;var $l=Z.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function eu(e,t){return $l.pipe(Q(e,zi(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var tu=Z.annotate({expected:`a string that will be decoded as a finite number`}).pipe(Q(Tl,ki)),nu=X(es).pipe(Q(qc,Ai)),ru=Z.check(Sl()),iu=Z.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(Q(ru,Ti())),au=Z.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),ou=yl(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>bl()(au,Ri)}),su=au.pipe(Q(ou,Ri)),cu=Si({decode:(e,t)=>Ue(Tt(e),{onNone:()=>w(new F({expected:`a valid UTC DateTime string`},e,t)),onSome:e=>S(Dt(e))}),encode:e=>S(wt(e))}),lu=-864e13,uu=864e13;function du(e,t,n){let r=Math.max(t,e?.minimum===void 0?t:e.minimum.epochMilliseconds+ +(e.exclusiveMinimum===!0)),i=Math.min(n,e?.maximum===void 0?n:e.maximum.epochMilliseconds-+(e.exclusiveMaximum===!0));return r<=i?[r,i]:[t,n]}function fu(e,t){return Ll.check(Fl({minimum:e,maximum:t}))}var pu=gc(e=>St(e)&&Ct(e),{representation:{id:`effect/schema/DateTimeUtc`,payload:null},toCode:()=>({runtime:`Schema.DateTimeUtc`,Type:`DateTime.Utc`,importDeclarations:[`import * as DateTime from "effect/DateTime"`]}),expected:`DateTime.Utc`,toCodecArbitrary:({constraint:e})=>{let[t,n]=du(e,lu,uu);return fl()(fu(t,n),L(Et))},toCodecJson:()=>bl()(Z,cu),toFormatter:()=>e=>e.toString()}),mu=Z.annotate({expected:`a string that will be decoded as a DateTime.Utc`}).pipe(Q(pu,cu)),hu=globalThis.Symbol.for(`immer-draftable`),gu={};function _u(e,t,n,r,i){let a=bu(n,t,r),o=yu(t),s=class extends e{constructor(...[e,t]){let r=t?.[`~payload`],i=r?.token===gu?r.value:n.make(e??{},t);super(i,{...t,disableChecks:!0,"~payload":{token:gu,value:i}})}static[mc]=mc;get[o](){return o}static[hu]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return xe(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return ks(a(this))(e??{},t)}static makeOption(e,t){return Os(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(ho(this.ast,e))}static annotateKey(e){return this.rebuild(Eo(this.ast,e))}static check(...e){return this.rebuild(_o(this.ast,e))}static extend(e){return(t,r)=>{let a=xu(t)?t:Xc(t),o={...n.fields,...a.fields},s=Fa(o,n.ast.checks,{identifier:e});return _u(this,e,Yc(_o(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function vu(e){return new z(L(t=>new e(t,{"~payload":{token:gu,value:t}})),ri())}function yu(e){return`~effect/Schema/Class/${e}`}function bu(e,t,n){let r;return i=>{if(r!==void 0)return r;let a=yu(t),o=e=>e instanceof i||v(e,a),s=vu(i);return r=Q(X(new Zi([e.ast],()=>(e,t,n)=>o(e)?S(e):w(new P(t,e,n)),{identifier:t,[xr]:([e])=>({isConstructed:o,link:new V(e,s)}),toCodec:([e])=>new V(e.ast,s),toEquivalence:([e])=>e,toFormatter:([e])=>t=>`${i.identifier}(${e(t)})`,[br]:Va(e.ast),...n})),s)(e)}}function xu(e){return Pc(e)}var Su=e=>(t,n)=>{let r=xu(t)?t:Xc(t);return _u(le,e,r,n,e=>({name:e}))},Cu=e=>(t,n,r)=>{let i=xu(n)?n.mapFields(e=>({_tag:hl(t),...e}),{unsafePreserveChecks:!0}):gl(t,n);return Su(e??t)(i,r)},wu=ec,Tu=X(ho(ss,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),Eu=`https://assets.stakek.it`,Du={appName:`Yield.xyz`,appIcon:`${Eu}/stakekit/sk-icon_320x320.png`,appUrl:`https://yield.xyz`,currency:`USD`,walletConnectV2:{projectId:`10a5257c04d1d3097ff768a139c95f50`},appPrefix:`sk-widget`,env:{apiUrl:`https://api.stakek.it/`,borrowApiUrl:`https://borrow.yield.xyz`,yieldsApiUrl:`https://api.yield.xyz`,isTestMode:!1,isDevMode:!1,forceAddress:void 0},assetsUrl:Eu,zerion:{tracking:`2cbed59baa70c46f7cadef7b05eb1bc3`,iconsByAddress:`https://token-icons.s3.amazonaws.com/`,iconsByNetwork:`https://chain-icons.s3.amazonaws.com/`}},Ou=e=>`${Du.assetsUrl}/networks/${e}.svg`,ku=e=>Ou(e),Au=e=>`${Du.assetsUrl}/tokens/${e}.svg`,ju={bitget:`${Du.assetsUrl}/widget/bitget.png`,ledgerLogo:`${Du.assetsUrl}/widget/ledger-logo.svg`,wcLogo:`${Du.assetsUrl}/widget/wc-logo.svg`};export{Oc as $,Cn as $t,Xc as A,gi as At,Hc as B,er as Bt,il as C,cc as Ct,Qc as D,Ci as Dt,Ql as E,Ei as Et,Bc as F,ai as Ft,pl as G,zn as Gt,ul as H,or as Ht,iu as I,Ar as It,kc as J,qn as Jt,Tc as K,Bn as Kt,su as L,Vr as Lt,Cu as M,ii as Mt,gl as N,L as Nt,_c as O,wi as Ot,vl as P,R as Pt,Ec as Q,Un as Qt,al as R,_r as Rt,Uc as S,Lc as St,Jc as T,Ns as Tt,sl as U,Yn as Ut,cl as V,lr as Vt,gc as W,Jn as Wt,Q as X,Gn as Xt,jc as Y,Wn as Yt,wc as Z,Hn as Zt,Rc as _,$ as _t,Du as a,kt as an,Cc as at,Vc as b,ol as bt,nu as c,Lt as cn,Il as ct,mu as d,Wl as dt,qt as en,Ac as et,Zl as f,Hl as ft,Tu as g,wl as gt,Ll as h,Cl as ht,Ou as i,Ht as in,yl as it,$c as j,ei as jt,Z as k,_i as kt,Kc as l,Nl as lt,tu as m,zl as mt,Au as n,Ut as nn,Zc as nt,el as o,Pt as on,El as ot,Tl as p,Ul as pt,Dc as q,Vn as qt,ju as r,Gt as rn,eu as rt,qc as s,jt as sn,Ml as st,ku as t,Kt as tn,Nc as tt,pu as u,Pl as ut,rl as v,Ic as vt,Gc as w,sc as wt,ql as x,wu as xt,Rl as y,Fc as yt,nl as z,ar as zt};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-BcKkbAw3.js";import{n as t,t as n}from"./dist-Cuadm9-o.js";var r=e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),i=e(((e,r)=>{n(),r.exports=typeof t==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>void 0:()=>{}})),a=e(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=r(),s=i();e=t.exports={};var c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.safeSrc=[],f=e.t={},p=0,m=`[a-zA-Z0-9-]`,h=[[`\\s`,1],[`\\d`,o],[m,a]],g=e=>{for(let[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=g(t),i=p++;s(e,i,t),f[e]=i,u[i]=t,d[i]=r,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${m}*`),_(`MAINVERSION`,`(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${u[f.PRERELEASEIDENTIFIER]}(?:\\.${u[f.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${u[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[f.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${m}+`),_(`BUILD`,`(?:\\+(${u[f.BUILDIDENTIFIER]}(?:\\.${u[f.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${u[f.MAINVERSION]}${u[f.PRERELEASE]}?${u[f.BUILD]}?`),_(`FULL`,`^${u[f.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${u[f.MAINVERSIONLOOSE]}${u[f.PRERELEASELOOSE]}?${u[f.BUILD]}?`),_(`LOOSE`,`^${u[f.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${u[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${u[f.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:${u[f.PRERELEASE]})?${u[f.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:${u[f.PRERELEASELOOSE]})?${u[f.BUILD]}?)?)?`),_(`XRANGE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),_(`COERCE`,`${u[f.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,u[f.COERCEPLAIN]+`(?:${u[f.PRERELEASE]})?(?:${u[f.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,u[f.COERCE],!0),_(`COERCERTLFULL`,u[f.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${u[f.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${u[f.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${u[f.LONECARET]}${u[f.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${u[f.LONECARET]}${u[f.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${u[f.GTLT]}\\s*(${u[f.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]}|${u[f.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${u[f.XRANGEPLAIN]})\\s+-\\s+(${u[f.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${u[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[f.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),o=e(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),s=e(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),c=e(((e,t)=>{var n=i(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=r(),{safeRe:u,t:d}=a(),f=o(),{compareIdentifiers:p}=s(),m=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(p(e[t],n[t])!==0)return!1;return!0};t.exports=class e{constructor(t,r){if(r=f(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);n(`SemVer`,t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let i=t.trim().match(r.loose?u[d.LOOSE]:u[d.FULL]);if(!i)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);this.prerelease=i[4]?i[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):[],this.build=i[5]?i[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(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e!==i)return p(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e!==i)return p(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?u[d.PRERELEASELOOSE]:u[d.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,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),m(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),l=e(((e,t)=>{var n=c();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),u=e(((e,t)=>{var n=l();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),d=e(((e,t)=>{var n=l();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),f=e(((e,t)=>{var n=c();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),p=e(((e,t)=>{var n=l();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),m=e(((e,t)=>{var n=c();t.exports=(e,t)=>new n(e,t).major})),h=e(((e,t)=>{var n=c();t.exports=(e,t)=>new n(e,t).minor})),g=e(((e,t)=>{var n=c();t.exports=(e,t)=>new n(e,t).patch})),_=e(((e,t)=>{var n=l();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),v=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),y=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>n(t,e,r)})),b=e(((e,t)=>{var n=v();t.exports=(e,t)=>n(e,t,!0)})),x=e(((e,t)=>{var n=c();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),S=e(((e,t)=>{var n=x();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),C=e(((e,t)=>{var n=x();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),w=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>n(e,t,r)>0})),T=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>n(e,t,r)<0})),E=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>n(e,t,r)===0})),D=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>n(e,t,r)!==0})),O=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>n(e,t,r)>=0})),k=e(((e,t)=>{var n=v();t.exports=(e,t,r)=>n(e,t,r)<=0})),A=e(((e,t)=>{var n=E(),r=D(),i=w(),a=O(),o=T(),s=k();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),j=e(((e,t)=>{var n=c(),r=l(),{safeRe:i,t:o}=a();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let a=null;if(!t.rtl)a=e.match(t.includePrerelease?i[o.COERCEFULL]:i[o.COERCE]);else{let n=t.includePrerelease?i[o.COERCERTLFULL]:i[o.COERCERTL],r;for(;(r=n.exec(e))&&(!a||a.index+a[0].length!==e.length);)(!a||r.index+r[0].length!==a.index+a[0].length)&&(a=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(a===null)return null;let s=a[2];return r(`${s}.${a[3]||`0`}.${a[4]||`0`}${t.includePrerelease&&a[5]?`-${a[5]}`:``}${t.includePrerelease&&a[6]?`+${a[6]}`:``}`,t)}})),ee=e(((e,t)=>{var n=l(),i=r(),a=c(),o=(e,t,n)=>{if(!i.RELEASE_TYPES.includes(t))return null;let r=s(e,n);return r&&u(r,t)},s=(e,t)=>n(e instanceof a?e.version:e,t),u=(e,t)=>{if(d(t))return e.version;switch(e.prerelease=[],t){case`major`:e.minor=0,e.patch=0;break;case`minor`:e.patch=0}return e.format()},d=e=>e.startsWith(`pre`);t.exports=o})),M=e(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)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)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),N=e(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=l(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof u)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.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=>!S(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&C(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){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){e=e.replace(x,``);let t=((this.options.includePrerelease&&y)|(this.options.loose&&b))+`:`+e,n=s.get(t);if(n)return n;let r=this.options.loose,i=r?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(i,ne(this.options.includePrerelease)),d(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],g),d(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],_),d(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],v),d(`caret trim`,e);let a=e.split(` `).map(e=>T(e,this.options)).join(` `).split(/\s+/).map(e=>te(e,this.options));r&&(a=a.filter(e=>(d(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),d(`range list`,a);let o=new Map,c=a.map(e=>new u(e,this.options));for(let e of c){if(S(e))return[e];o.set(e.value,e)}o.size>1&&o.has(``)&&o.delete(``);let l=[...o.values()];return s.set(t,l),l}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>w(e,n)&&t.set.some(t=>w(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(re(this.set[t],e,this.options))return!0;return!1}};var s=new(M()),l=o(),u=P(),d=i(),f=c(),{safeRe:p,src:m,t:h,comparatorTrimReplace:g,tildeTrimReplace:_,caretTrimReplace:v}=a(),{FLAG_INCLUDE_PRERELEASE:y,FLAG_LOOSE:b}=r(),x=new RegExp(m[h.BUILD],`g`),S=e=>e.value===`<0.0.0-0`,C=e=>e.value===``,w=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},T=(e,t)=>(e=e.replace(p[h.BUILD],``),d(`comp`,e,t),e=A(e,t),d(`caret`,e),e=O(e,t),d(`tildes`,e),e=ee(e,t),d(`xrange`,e),e=F(e,t),d(`stars`,e),e),E=e=>!e||e.toLowerCase()===`x`||e===`*`,D=(e,t,n)=>E(e)&&!E(t)||E(t)&&n&&!E(n),O=(e,t)=>e.trim().split(/\s+/).map(e=>k(e,t)).join(` `),k=(e,t)=>{let n=t.loose?p[h.TILDELOOSE]:p[h.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{d(`tilde`,e,t,n,i,a,o);let s;return E(n)?s=``:E(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?s=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:o?(d(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,d(`tilde return`,s),s})},A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{d(`caret`,e,t);let n=t.loose?p[h.CARETLOOSE]:p[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{d(`caret`,e,t,n,i,a,o);let s;return E(n)?s=``:E(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(d(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(d(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),d(`caret return`,s),s})},ee=(e,t)=>(d(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>N(e,t)).join(` `)),N=(e,t)=>{e=e.trim();let n=t.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{if(d(`xRange`,e,n,r,i,a,o,s),D(i,a,o))return e;let c=E(i),l=c||E(a),u=l||E(o),f=u;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),d(`xRange return`,n),n})},F=(e,t)=>(d(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),te=(e,t)=>(d(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),ne=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=E(r)?``:E(i)?`>=${r}.0.0${e?`-0`:``}`:E(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=E(l)?``:E(u)?`<${+l+1}.0.0-0`:E(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),re=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(d(e[n].semver),e[n].semver!==u.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),P=e(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),d(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?s[l.COMPARATORLOOSE]:s[l.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new f(r[2],this.options.loose):n}toString(){return this.value}test(e){if(d(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return u(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new p(t.value,n).test(this.value):t.operator===``?t.value===``||new p(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||u(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||u(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=o(),{safeRe:s,t:l}=a(),u=A(),d=i(),f=c(),p=N()})),F=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),te=e(((e,t)=>{var n=N();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),ne=e(((e,t)=>{var n=c(),r=N();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),re=e(((e,t)=>{var n=c(),r=N();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),ie=e(((e,t)=>{var n=c(),r=N(),i=w();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),ae=e(((e,t)=>{var n=N();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),I=e(((e,t)=>{var n=c(),r=P(),{ANY:i}=r,a=N(),o=F(),s=w(),l=T(),u=k(),d=O();t.exports=(e,t,c,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(c){case`>`:p=s,m=u,h=l,g=`>`,_=`>=`;break;case`<`:p=l,m=d,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),oe=e(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,`>`,r)})),se=e(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,`<`,r)})),ce=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),le=e(((e,t)=>{var n=F(),r=v();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),ue=e(((e,t)=>{var n=N(),r=P(),{ANY:i}=r,a=F(),o=v(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!e.test(s.semver))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!e.test(u.semver))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),de=e(((e,t)=>{var n=a(),i=r(),o=c(),M=s();t.exports={parse:l(),valid:u(),clean:d(),inc:f(),diff:p(),major:m(),minor:h(),patch:g(),prerelease:_(),compare:v(),rcompare:y(),compareLoose:b(),compareBuild:x(),sort:S(),rsort:C(),gt:w(),lt:T(),eq:E(),neq:D(),gte:O(),lte:k(),cmp:A(),coerce:j(),truncate:ee(),Comparator:P(),Range:N(),satisfies:F(),toComparators:te(),maxSatisfying:ne(),minSatisfying:re(),minVersion:ie(),validRange:ae(),outside:I(),gtr:oe(),ltr:se(),intersects:ce(),simplifyRange:le(),subset:ue(),SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:M.compareIdentifiers,rcompareIdentifiers:M.rcompareIdentifiers}})),fe=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,L=Math.ceil,R=Math.floor,z=`[BigNumber Error] `,B=z+`Number primitive has more than 15 significant digits: `,V=0x5af3107a4000,H=14,U=9007199254740991,W=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],G=1e7,K=1e9;function pe(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!fe.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(X(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(B+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>U||e!==R(e)))throw Error(B+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%H,l<0&&(f+=H),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=H;f<m;)y.c.push(+h.slice(f,f+=H));f=H-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=pe,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null){if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],X(n,0,K,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],X(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(X(n[0],-K,0,t),X(n[1],0,K,t),c=n[0],l=n[1]):(X(n,-K,K,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`)){if(n=e[t],n&&n.pop)X(n[0],-K,-1,t),X(n[1],1,K,t),u=n[0],d=n[1];else if(X(n,-K,K,t),n)u=-(d=n<0?-n:n);else throw Error(z+t+` cannot be zero: `+n)}if(e.hasOwnProperty(t=`CRYPTO`)){if(n=e[t],n===!!n){if(n){if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(z+`crypto unavailable`)}else f=n}else throw Error(z+t+` not true or false: `+n)}if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],X(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],X(n,0,K,t),m=n),e.hasOwnProperty(t=`FORMAT`)){if(n=e[t],typeof n==`object`)h=n;else throw Error(z+t+` not an object: `+n)}if(e.hasOwnProperty(t=`ALPHABET`)){if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(z+t+` invalid: `+n)}}else throw Error(z+`Object expected: `+e)}return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-K&&i<=K&&i===R(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%H,t<1&&(t+=H),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=V||n!==R(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(z+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return R(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:X(e,0,K),s=L(e/H),f){if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(z+`crypto unavailable`)}if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=H,s&&e&&(c=W[H-e],u[l]=R(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=H);for(l=1,c=u[0];c>=10;c/=10,l++);l<H&&(i-=H-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n($(J(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?$(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=$(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%G,u=t/G|0;for(e=e.slice();c--;)a=e[c]%G,o=e[c]/G|0,r=u*a+o*l,i=l*a+r%G*G+s,s=(i/n|0)+(r/G|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,w,T,E,D=r.s==i.s?1:-1,O=r.c,k=i.c;if(!O||!O[0]||!k||!k[0])return new v(!r.s||!i.s||(O?k&&O[0]==k[0]:!k)?NaN:O&&O[0]==0||!k?D*0:D/0);for(h=new v(D),g=h.c=[],l=r.e-i.e,D=a+l+1,s||(s=V,l=q(r.e/H)-q(i.e/H),D=D/H|0),u=0;k[u]==(O[u]||0);u++);if(k[u]>(O[u]||0)&&l--,D<0)g.push(1),d=!0;else{for(C=O.length,T=k.length,u=0,D+=2,f=R(s/(k[0]+1)),f>1&&(k=e(k,f,s),O=e(O,f,s),T=k.length,C=O.length),x=T,_=O.slice(0,T),y=_.length;y<T;_[y++]=0);E=k.slice(),E=[0].concat(E),w=k[0],k[1]>=s/2&&w++;do{if(f=0,c=t(k,_,T,y),c<0){if(b=_[0],T!=y&&(b=b*s+(_[1]||0)),f=R(b/w),f>1)for(f>=s&&(f=s-1),p=e(k,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,T<m?E:k,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=k.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(k,_,T,y)<1;)f++,n(_,T<y?E:k,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=O[x]||0:(_=[O[x]],y=1)}while((x++<C||_[0]!=null)&&D--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==V){for(u=1,D=g[0];D>=10;D/=10,u++);S(h,a+(h.e=u+l*H-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:X(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=J(e.c),d=r==1||r==2&&(o<=c||o>=l)?Q(d,o):$(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=J(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=Q(d,a)}else if(t-=o,d=$(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=Y(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*H-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(z+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=W;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=H,o=t,c=p[l=0],f=R(c/m[i-o-1]%10);else if(l=L((a+1)/H),l>=p.length){if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=H,o=a-H+1}else break out}else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=H,o=a-H+i,f=o<0?0:R(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(H-t%H)%H],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[H-a],p[l]=o>0?R(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==V&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=V)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=J(e.c),t=n<=c||n>=l?Q(t,n):$(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return Y(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return X(e,0,K),t==null?t=s:X(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-q(this.e/H))*H,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(z+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v((+C(p))**(l?e.s*(2-Z(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&Z(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=L(m/H+2));for(l?(n=new v(.5),u&&(e.s=1),d=Z(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=R(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=Z(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:X(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return Y(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return Y(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=Y(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&q(this.e/H)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return Y(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=Y(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/H,u=e.e/H,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=q(l),u=q(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=V-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=V}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=q(_.e/H)+q(e.e/H),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=V,g=G,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/H,o=e.e/H,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=q(a),o=q(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/V|0,s[t]=V===s[t]?0:s[t]%V;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return X(e,1,K),t==null?t=s:X(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*H+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return X(e,-U,U),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=J(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=q((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),J(a.c).slice(0,u)===(n=J(r.c)).slice(0,u)){if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(X(e,0,K),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(X(e,0,K),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(z+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(z+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=J(y),c=n.e=g.length-_.e-1,n.c[0]=W[(l=c%H)<0?H+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&X(e,1,K),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?Q(J(r.c),a):$(J(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=$(J(r.c),r.e,`0`)):(X(e,2,g.length,`Base`),t=n($(J(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function q(e){var t=e|0;return e>0||e===t?t:t-1}function J(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=H-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function Y(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function X(e,t,n,r){if(e<t||e>n||e!==R(e))throw Error(z+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function Z(e){var t=e.c.length-1;return q(e.e/H)==t&&e.c[t]%2!=0}function Q(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function $(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var me=pe();export{de as n,me as t};
@@ -1,3 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-BcKkbAw3.js";var t=e(((e,t)=>{function n(e){let t;if(e instanceof Uint8Array)t=e;else if(typeof e==`string`)t=new TextEncoder().encode(e);else throw Error(`Input must be an string, Buffer or Uint8Array`);return t}function r(e){return Array.prototype.map.call(e,function(e){return(e<16?`0`:``)+e.toString(16)}).join(``)}function i(e){return(4294967296+e).toString(16).substring(1)}function a(e,t,n){let r=`
2
- `+e+` = `;for(let a=0;a<t.length;a+=2){if(n===32)r+=i(t[a]).toUpperCase(),r+=` `,r+=i(t[a+1]).toUpperCase();else if(n===64)r+=i(t[a+1]).toUpperCase(),r+=i(t[a]).toUpperCase();else throw Error(`Invalid size `+n);a%6==4?r+=`
3
- `+Array(e.length+4).join(` `):a<t.length-2&&(r+=` `)}}function o(e,t,n){let r=new Date().getTime(),i=new Uint8Array(t);for(let e=0;e<t;e++)i[e]=e%256;r=new Date().getTime();for(let t=0;t<n;t++){e(i);let t=new Date().getTime();t-r,r=t}}t.exports={normalizeInput:n,toHex:r,debugPrint:a,testSpeed:o}})),n=e(((e,n)=>{var r=t();function i(e,t,n){let r=e[t]+e[n],i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function a(e,t,n,r){let i=e[t]+n;n<0&&(i+=4294967296);let a=e[t+1]+r;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function o(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,n,r,o,s){let c=d[o],l=d[o+1],f=d[s],p=d[s+1];i(u,e,t),a(u,e,c,l);let m=u[r]^u[e],h=u[r+1]^u[e+1];u[r]=h,u[r+1]=m,i(u,n,r),m=u[t]^u[n],h=u[t+1]^u[n+1],u[t]=m>>>24^h<<8,u[t+1]=h>>>24^m<<8,i(u,e,t),a(u,e,f,p),m=u[r]^u[e],h=u[r+1]^u[e+1],u[r]=m>>>16^h<<16,u[r+1]=h>>>16^m<<16,i(u,n,r),m=u[t]^u[n],h=u[t+1]^u[n+1],u[t]=h>>>31^m<<1,u[t+1]=m>>>31^h<<1}var c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),l=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return e*2})),u=new Uint32Array(32),d=new Uint32Array(32);function f(e,t){let n=0;for(n=0;n<16;n++)u[n]=e.h[n],u[n+16]=c[n];for(u[24]^=e.t,u[25]^=e.t/4294967296,t&&(u[28]=~u[28],u[29]=~u[29]),n=0;n<32;n++)d[n]=o(e.b,4*n);for(n=0;n<12;n++)s(0,8,16,24,l[n*16+0],l[n*16+1]),s(2,10,18,26,l[n*16+2],l[n*16+3]),s(4,12,20,28,l[n*16+4],l[n*16+5]),s(6,14,22,30,l[n*16+6],l[n*16+7]),s(0,10,20,30,l[n*16+8],l[n*16+9]),s(2,12,22,24,l[n*16+10],l[n*16+11]),s(4,14,16,26,l[n*16+12],l[n*16+13]),s(6,8,18,28,l[n*16+14],l[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^u[n]^u[n+16]}var p=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function m(e,t,n,r){if(e===0||e>64)throw Error(`Illegal output length, expected 0 < length <= 64`);if(t&&t.length>64)throw Error(`Illegal key, expected Uint8Array with 0 < length <= 64`);if(n&&n.length!==16)throw Error(`Illegal salt, expected Uint8Array with length is 16`);if(r&&r.length!==16)throw Error(`Illegal personal, expected Uint8Array with length is 16`);let i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,n&&p.set(n,32),r&&p.set(r,48);for(let e=0;e<16;e++)i.h[e]=c[e]^o(p,e*4);return t&&(h(i,t),i.c=128),i}function h(e,t){for(let n=0;n<t.length;n++)e.c===128&&(e.t+=e.c,f(e,!1),e.c=0),e.b[e.c++]=t[n]}function g(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;f(e,!0);let t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(n&3);return t}function _(e,t,n,i,a){n||=64,e=r.normalizeInput(e),i&&=r.normalizeInput(i),a&&=r.normalizeInput(a);let o=m(n,t,i,a);return h(o,e),g(o)}function v(e,t,n,i,a){let o=_(e,t,n,i,a);return r.toHex(o)}n.exports={blake2b:_,blake2bHex:v,blake2bInit:m,blake2bUpdate:h,blake2bFinal:g}})),r=e(((e,n)=>{var r=t();function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,n,r,i,a){l[e]=l[e]+l[t]+i,l[r]=o(l[r]^l[e],16),l[n]=l[n]+l[r],l[t]=o(l[t]^l[n],12),l[e]=l[e]+l[t]+a,l[r]=o(l[r]^l[e],8),l[n]=l[n]+l[r],l[t]=o(l[t]^l[n],7)}function o(e,t){return e>>>t^e<<32-t}var s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),l=new Uint32Array(16),u=new Uint32Array(16);function d(e,t){let n=0;for(n=0;n<8;n++)l[n]=e.h[n],l[n+8]=s[n];for(l[12]^=e.t,l[13]^=e.t/4294967296,t&&(l[14]=~l[14]),n=0;n<16;n++)u[n]=i(e.b,4*n);for(n=0;n<10;n++)a(0,4,8,12,u[c[n*16+0]],u[c[n*16+1]]),a(1,5,9,13,u[c[n*16+2]],u[c[n*16+3]]),a(2,6,10,14,u[c[n*16+4]],u[c[n*16+5]]),a(3,7,11,15,u[c[n*16+6]],u[c[n*16+7]]),a(0,5,10,15,u[c[n*16+8]],u[c[n*16+9]]),a(1,6,11,12,u[c[n*16+10]],u[c[n*16+11]]),a(2,7,8,13,u[c[n*16+12]],u[c[n*16+13]]),a(3,4,9,14,u[c[n*16+14]],u[c[n*16+15]]);for(n=0;n<8;n++)e.h[n]^=l[n]^l[n+8]}function f(e,t){if(!(e>0&&e<=32))throw Error(`Incorrect output length, should be in [1, 32]`);let n=t?t.length:0;if(t&&!(n>0&&n<=32))throw Error(`Incorrect key length, should be in [1, 32]`);let r={h:new Uint32Array(s),b:new Uint8Array(64),c:0,t:0,outlen:e};return r.h[0]^=16842752^n<<8^e,n>0&&(p(r,t),r.c=64),r}function p(e,t){for(let n=0;n<t.length;n++)e.c===64&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function m(e){for(e.t+=e.c;e.c<64;)e.b[e.c++]=0;d(e,!0);let t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(n&3)&255;return t}function h(e,t,n){n||=32,e=r.normalizeInput(e);let i=f(n,t);return p(i,e),m(i)}function g(e,t,n){let i=h(e,t,n);return r.toHex(i)}n.exports={blake2s:h,blake2sHex:g,blake2sInit:f,blake2sUpdate:p,blake2sFinal:m}})),i=e(((e,t)=>{var i=n(),a=r();t.exports={blake2b:i.blake2b,blake2bHex:i.blake2bHex,blake2bInit:i.blake2bInit,blake2bUpdate:i.blake2bUpdate,blake2bFinal:i.blake2bFinal,blake2s:a.blake2s,blake2sHex:a.blake2sHex,blake2sInit:a.blake2sInit,blake2sUpdate:a.blake2sUpdate,blake2sFinal:a.blake2sFinal}}));export{i as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-BcKkbAw3.js";var t=e((e=>{Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t={},n={};n.byteLength=u,n.toByteArray=f,n.fromByteArray=h;for(var r=[],i=[],a=typeof Uint8Array<`u`?Uint8Array:Array,o=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,s=0,c=o.length;s<c;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;i[45]=62,i[95]=63;function l(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function u(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r}function d(e,t,n){return(t+n)*3/4-n}function f(e){for(var t,n=l(e),r=n[0],o=n[1],s=new a(d(e,r,o)),c=0,u=o>0?r-4:r,f=0;f<u;f+=4)t=i[e.charCodeAt(f)]<<18|i[e.charCodeAt(f+1)]<<12|i[e.charCodeAt(f+2)]<<6|i[e.charCodeAt(f+3)],s[c++]=t>>16&255,s[c++]=t>>8&255,s[c++]=t&255;return o===2&&(t=i[e.charCodeAt(f)]<<2|i[e.charCodeAt(f+1)]>>4,s[c++]=t&255),o===1&&(t=i[e.charCodeAt(f)]<<10|i[e.charCodeAt(f+1)]<<4|i[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=t&255),s}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[e&63]}function m(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(p(r));return i.join(``)}function h(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,c=n-i;s<c;s+=o)a.push(m(e,s,s+o>c?c:s+o));return i===1?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+`==`)):i===2&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+`=`)),a.join(``)}var ee={};ee.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},ee.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128},(function(e){let t=n,r=ee,i=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=d,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;let a=2147483647;e.kMaxLength=a;let{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:c}=globalThis;d.TYPED_ARRAY_SUPPORT=l(),d.TYPED_ARRAY_SUPPORT;function l(){try{let e=new o(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,o.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function u(e){if(e>a)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new o(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return h(e)}return f(e,t,n)}d.poolSize=8192;function f(e,t,n){if(typeof e==`string`)return g(e,t);if(s.isView(e))return te(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(Y(e,s)||e&&Y(e.buffer,s)||c!==void 0&&(Y(e,c)||e&&Y(e.buffer,c)))return v(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return d.from(r,t,n);let i=y(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return d.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}d.from=function(e,t,n){return f(e,t,n)},Object.setPrototypeOf(d.prototype,o.prototype),Object.setPrototypeOf(d,o);function p(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function m(e,t,n){return p(e),e<=0||t===void 0?u(e):typeof n==`string`?u(e).fill(t,n):u(e).fill(t)}d.alloc=function(e,t,n){return m(e,t,n)};function h(e){return p(e),u(e<0?0:ne(e)|0)}d.allocUnsafe=function(e){return h(e)},d.allocUnsafeSlow=function(e){return h(e)};function g(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!d.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=x(e,t)|0,r=u(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function _(e){let t=e.length<0?0:ne(e.length)|0,n=u(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function te(e){if(Y(e,o)){let t=new o(e);return v(t.buffer,t.byteOffset,t.byteLength)}return _(e)}function v(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new o(e):n===void 0?new o(e,t):new o(e,t,n),Object.setPrototypeOf(r,d.prototype),r}function y(e){if(d.isBuffer(e)){let t=ne(e.length)|0,n=u(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||me(e.length)?u(0):_(e);if(e.type===`Buffer`&&Array.isArray(e.data))return _(e.data)}function ne(e){if(e>=a)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+a.toString(16)+` bytes`);return e|0}function b(e){return+e!=e&&(e=0),d.alloc(+e)}d.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==d.prototype},d.compare=function(e,t){if(Y(e,o)&&(e=d.from(e,e.offset,e.byteLength)),Y(t,o)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(e)||!d.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},d.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},d.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return d.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=d.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(Y(t,o))i+t.length>r.length?(d.isBuffer(t)||(t=d.from(t)),t.copy(r,i)):o.prototype.set.call(r,t,i);else if(d.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function x(e,t){if(d.isBuffer(e))return e.length;if(s.isView(e)||Y(e,s))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return fe(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return pe(e).length;default:if(i)return r?-1:fe(e).length;t=(``+t).toLowerCase(),i=!0}}d.byteLength=x;function re(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return se(this,t,n);case`utf8`:case`utf-8`:return k(this,t,n);case`ascii`:return j(this,t,n);case`latin1`:case`binary`:return M(this,t,n);case`base64`:return ae(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return N(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}d.prototype._isBuffer=!0;function S(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}d.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)S(this,t,t+1);return this},d.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},d.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},d.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?k(this,0,e):re.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(e){if(!d.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||d.compare(this,e)===0},d.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},i&&(d.prototype[i]=d.prototype.inspect),d.prototype.compare=function(e,t,n,r,i){if(Y(e,o)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,s=n-t,c=Math.min(a,s),l=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<c;++e)if(l[e]!==u[e]){a=l[e],s=u[e];break}return a<s?-1:+(s<a)};function C(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,me(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=d.from(t,r)),d.isBuffer(t))return t.length===0?-1:w(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof o.prototype.indexOf==`function`?i?o.prototype.indexOf.call(e,t,n):o.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function w(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}d.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},d.prototype.indexOf=function(e,t,n){return C(this,e,t,n,!0)},d.prototype.lastIndexOf=function(e,t,n){return C(this,e,t,n,!1)};function T(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o=0;for(;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(me(r))return o;e[n+o]=r}return o}function E(e,t,n,r){return J(fe(t,e.length-n),e,n,r)}function ie(e,t,n,r){return J(K(t),e,n,r)}function D(e,t,n,r){return J(pe(t),e,n,r)}function O(e,t,n,r){return J(q(t,e.length-n),e,n,r)}d.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return T(this,e,t,n);case`utf8`:case`utf-8`:return E(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return ie(this,e,t,n);case`base64`:return D(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return O(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},d.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function ae(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function k(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return oe(r)}let A=4096;function oe(e){let t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}function j(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function M(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function se(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=X[e[r]];return i}function N(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}d.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,d.prototype),r};function P(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}d.prototype.readUintLE=d.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},d.prototype.readUintBE=d.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},d.prototype.readUint8=d.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readBigUInt64LE=Z(function(e){e>>>=0,U(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&de(e,this.length-8);let r=t+this[++e]*256+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*256+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),d.prototype.readBigUInt64BE=Z(function(e){e>>>=0,U(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&de(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*256+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*256+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),d.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},d.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},d.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},d.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readBigInt64LE=Z(function(e){e>>>=0,U(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&de(e,this.length-8);let r=this[e+4]+this[e+5]*256+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*256+this[++e]*2**16+this[++e]*2**24)}),d.prototype.readBigInt64BE=Z(function(e){e>>>=0,U(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&de(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*256+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*256+n)}),d.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),r.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),r.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),r.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),r.read(this,e,!1,52,8)};function F(e,t,n,r,i,a){if(!d.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;F(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;F(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},d.prototype.writeUint8=d.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,255,0),this[t]=e&255,t+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function I(e,t,n,r,i){H(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function L(e,t,n,r,i){H(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}d.prototype.writeBigUInt64LE=Z(function(e,t=0){return I(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),d.prototype.writeBigUInt64BE=Z(function(e,t=0){return L(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),d.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);F(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},d.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);F(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},d.prototype.writeBigInt64LE=Z(function(e,t=0){return I(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),d.prototype.writeBigInt64BE=Z(function(e,t=0){return L(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function ce(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function R(e,t,n,i,a){return t=+t,n>>>=0,a||ce(e,t,n,4),r.write(e,t,n,i,23,4),n+4}d.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)};function z(e,t,n,i,a){return t=+t,n>>>=0,a||ce(e,t,n,8),r.write(e,t,n,i,52,8),n+8}d.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,r){if(!d.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof o.prototype.copyWithin==`function`?this.copyWithin(t,n,r):o.prototype.set.call(e,this.subarray(n,r),t),i},d.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!d.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=d.isBuffer(e)?e:d.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};let le={};function B(e,t,n){le[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}B(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),B(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),B(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=V(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=V(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function V(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function ue(e,t,n){U(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&de(t,e.length-(n+1))}function H(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new le.ERR_OUT_OF_RANGE(`value`,i,e)}ue(r,i,a)}function U(e,t){if(typeof e!=`number`)throw new le.ERR_INVALID_ARG_TYPE(t,`number`,e)}function de(e,t,n){throw Math.floor(e)===e?t<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(U(e,n),new le.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}let W=/[^+/0-9A-Za-z-_]/g;function G(e){if(e=e.split(`=`)[0],e=e.trim().replace(W,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function fe(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function K(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function q(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function pe(e){return t.toByteArray(G(e))}function J(e,t,n,r){let i=0;for(;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function me(e){return e!==e}let X=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function Z(e){return typeof BigInt>`u`?he:e}function he(){throw Error(`BigInt not supported`)}})(t);var g=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=g,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})),n=e(((e,n)=>{(function(e,n){function r(e,t){if(!e)throw Error(t||`Assertion failed`)}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function a(e,t,n){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,e!==null&&((t===`le`||t===`be`)&&(n=t,t=10),this._init(e||0,t||10,n||`be`))}typeof e==`object`?e.exports=a:n.BN=a,a.BN=a,a.wordSize=26;var o;try{o=typeof window<`u`&&window.Buffer!==void 0?window.Buffer:t().Buffer}catch{}a.isBN=function(e){return e instanceof a||typeof e==`object`&&!!e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if(typeof e==`number`)return this._initNumber(e,t,n);if(typeof e==`object`)return this._initArray(e,t,n);t===`hex`&&(t=16),r(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,``);var i=0;e[0]===`-`&&(i++,this.negative=1),i<e.length&&(t===16?this._parseHex(e,i,n):(this._parseBase(e,t,i),n===`le`&&this._initArray(this.toArray(),t,n)))},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n===`le`&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(r(typeof e.length==`number`),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if(n===`be`)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if(n===`le`)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this._strip()};function s(e,t){var n=e.charCodeAt(t);if(n>=48&&n<=57)return n-48;if(n>=65&&n<=70)return n-55;if(n>=97&&n<=102)return n-87;r(!1,`Invalid character in `+e)}function c(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}a.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i=0,a=0,o;if(n===`be`)for(r=e.length-1;r>=t;r-=2)o=c(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=c(e,t,r)<<i,this.words[a]|=o&67108863,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()};function l(e,t,n,i){for(var a=0,o=0,s=Math.min(e.length,n),c=t;c<s;c++){var l=e.charCodeAt(c)-48;a*=i,o=l>=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&o<i,`Invalid character`),a+=o}return a}a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,o=a%r,s=Math.min(a,a-o)+n,c=0,u=n;u<s;u+=r)c=l(e,u,u+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(o!==0){var d=1;for(c=l(e,u,e.length,t),u=0;u<o;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},a.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red};function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(a.prototype._move=function(e){u(e,this)},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<`u`&&typeof Symbol.for==`function`)try{a.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=d}catch{a.prototype.inspect=d}else a.prototype.inspect=d;function d(){return(this.red?`<BN-R: `:`<BN: `)+this.toString(16)+`>`}var f=`.0.00.000.0000.00000.000000.0000000.00000000.000000000.0000000000.00000000000.000000000000.0000000000000.00000000000000.000000000000000.0000000000000000.00000000000000000.000000000000000000.0000000000000000000.00000000000000000000.000000000000000000000.0000000000000000000000.00000000000000000000000.000000000000000000000000.0000000000000000000000000`.split(`.`),p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){e||=10,t=t|0||1;var n;if(e===16||e===`hex`){n=``;for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=((s<<i|a)&16777215).toString(16);a=s>>>24-i&16777215,i+=2,i>=26&&(i-=26,o--),n=a!==0||o!==this.length-1?f[6-c.length]+c+n:c+n}for(a!==0&&(n=a.toString(16)+n);n.length%t!==0;)n=`0`+n;return this.negative!==0&&(n=`-`+n),n}if(e===(e|0)&&e>=2&&e<=36){var l=p[e],u=m[e];n=``;var d=this.clone();for(d.negative=0;!d.isZero();){var h=d.modrn(u).toString(e);d=d.idivn(u),n=d.isZero()?h+n:f[l-h.length]+h+n}for(this.isZero()&&(n=`0`+n);n.length%t!==0;)n=`0`+n;return this.negative!==0&&(n=`-`+n),n}r(!1,`Base should be between 2 and 36`)},a.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,`Number can only safely store up to 53 bits`),this.negative===0?e:-e},a.prototype.toJSON=function(){return this.toString(16,2)},o&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var h=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};a.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,`byte array longer than desired length`),r(a>0,`Requested array length <= 0`);var o=h(e,a),s=t===`le`?`LE`:`BE`;return this[`_toArrayLike`+s](o,i),o},a.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|r;e[n++]=o&255,n<e.length&&(e[n++]=o>>8&255),n<e.length&&(e[n++]=o>>16&255),a===6?(n<e.length&&(e[n++]=o>>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},a.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|r;e[n--]=o&255,n>=0&&(e[n--]=o>>8&255),n>=0&&(e[n--]=o>>16&255),a===6?(n>=0&&(e[n--]=o>>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return t&8191||(n+=13,t>>>=13),t&127||(n+=7,t>>>=7),t&15||(n+=4,t>>>=4),t&3||(n+=2,t>>>=2),t&1||n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function ee(e){for(var t=Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return this.negative===0?this.clone():this.abs().inotn(e).iaddn(1)},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},a.prototype.ior=function(e){return r((this.negative|e.negative)===0),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},a.prototype.iand=function(e){return r((this.negative|e.negative)===0),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},a.prototype.ixor=function(e){return r((this.negative|e.negative)===0),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){r(typeof e==`number`&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=~this.words[i]&67108863;for(n>0&&(this.words[i]=~this.words[i]&67108863>>26-n,i++);i<this.length;i++)this.words[i]=0;return this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r(typeof e==`number`&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<i:this.words[n]=this.words[n]&~(1<<i),this._strip()},a.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,r;this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(n.words[a]|0)+(r.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;for(;i!==0&&a<n.length;a++)t=(n.words[a]|0)+i,this.words[a]=t&67108863,i=t>>>26;if(this.length=n.length,i!==0)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,i;n>0?(r=this,i=e):(r=e,i=this);for(var a=0,o=0;o<i.length;o++)t=(r.words[o]|0)-(i.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;for(;a!==0&&o<r.length;o++)t=(r.words[o]|0)+a,a=t>>26,this.words[o]=t&67108863;if(a===0&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(e){return this.clone().isub(e)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=e.words[0]|0,a=t.words[0]|0,o=i*a,s=o&67108863,c=o/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var u=c>>>26,d=c&67108863,f=Math.min(l,t.length-1),p=Math.max(0,l-e.length+1);p<=f;p++){var m=l-p|0;i=e.words[m]|0,a=t.words[p]|0,o=i*a+d,u+=o/67108864|0,d=o&67108863}n.words[l]=d|0,c=u|0}return c===0?n.length--:n.words[l]=c|0,n._strip()}var _=function(e,t,n){var r=e.words,i=t.words,a=n.words,o=0,s,c,l,u=r[0]|0,d=u&8191,f=u>>>13,p=r[1]|0,m=p&8191,h=p>>>13,ee=r[2]|0,g=ee&8191,_=ee>>>13,te=r[3]|0,v=te&8191,y=te>>>13,ne=r[4]|0,b=ne&8191,x=ne>>>13,re=r[5]|0,S=re&8191,C=re>>>13,w=r[6]|0,T=w&8191,E=w>>>13,ie=r[7]|0,D=ie&8191,O=ie>>>13,ae=r[8]|0,k=ae&8191,A=ae>>>13,oe=r[9]|0,j=oe&8191,M=oe>>>13,se=i[0]|0,N=se&8191,P=se>>>13,F=i[1]|0,I=F&8191,L=F>>>13,ce=i[2]|0,R=ce&8191,z=ce>>>13,le=i[3]|0,B=le&8191,V=le>>>13,ue=i[4]|0,H=ue&8191,U=ue>>>13,de=i[5]|0,W=de&8191,G=de>>>13,fe=i[6]|0,K=fe&8191,q=fe>>>13,pe=i[7]|0,J=pe&8191,Y=pe>>>13,me=i[8]|0,X=me&8191,Z=me>>>13,he=i[9]|0,Q=he&8191,$=he>>>13;n.negative=e.negative^t.negative,n.length=19,s=Math.imul(d,N),c=Math.imul(d,P),c=c+Math.imul(f,N)|0,l=Math.imul(f,P);var ge=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ge>>>26)|0,ge&=67108863,s=Math.imul(m,N),c=Math.imul(m,P),c=c+Math.imul(h,N)|0,l=Math.imul(h,P),s=s+Math.imul(d,I)|0,c=c+Math.imul(d,L)|0,c=c+Math.imul(f,I)|0,l=l+Math.imul(f,L)|0;var _e=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(_e>>>26)|0,_e&=67108863,s=Math.imul(g,N),c=Math.imul(g,P),c=c+Math.imul(_,N)|0,l=Math.imul(_,P),s=s+Math.imul(m,I)|0,c=c+Math.imul(m,L)|0,c=c+Math.imul(h,I)|0,l=l+Math.imul(h,L)|0,s=s+Math.imul(d,R)|0,c=c+Math.imul(d,z)|0,c=c+Math.imul(f,R)|0,l=l+Math.imul(f,z)|0;var ve=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ve>>>26)|0,ve&=67108863,s=Math.imul(v,N),c=Math.imul(v,P),c=c+Math.imul(y,N)|0,l=Math.imul(y,P),s=s+Math.imul(g,I)|0,c=c+Math.imul(g,L)|0,c=c+Math.imul(_,I)|0,l=l+Math.imul(_,L)|0,s=s+Math.imul(m,R)|0,c=c+Math.imul(m,z)|0,c=c+Math.imul(h,R)|0,l=l+Math.imul(h,z)|0,s=s+Math.imul(d,B)|0,c=c+Math.imul(d,V)|0,c=c+Math.imul(f,B)|0,l=l+Math.imul(f,V)|0;var ye=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ye>>>26)|0,ye&=67108863,s=Math.imul(b,N),c=Math.imul(b,P),c=c+Math.imul(x,N)|0,l=Math.imul(x,P),s=s+Math.imul(v,I)|0,c=c+Math.imul(v,L)|0,c=c+Math.imul(y,I)|0,l=l+Math.imul(y,L)|0,s=s+Math.imul(g,R)|0,c=c+Math.imul(g,z)|0,c=c+Math.imul(_,R)|0,l=l+Math.imul(_,z)|0,s=s+Math.imul(m,B)|0,c=c+Math.imul(m,V)|0,c=c+Math.imul(h,B)|0,l=l+Math.imul(h,V)|0,s=s+Math.imul(d,H)|0,c=c+Math.imul(d,U)|0,c=c+Math.imul(f,H)|0,l=l+Math.imul(f,U)|0;var be=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(be>>>26)|0,be&=67108863,s=Math.imul(S,N),c=Math.imul(S,P),c=c+Math.imul(C,N)|0,l=Math.imul(C,P),s=s+Math.imul(b,I)|0,c=c+Math.imul(b,L)|0,c=c+Math.imul(x,I)|0,l=l+Math.imul(x,L)|0,s=s+Math.imul(v,R)|0,c=c+Math.imul(v,z)|0,c=c+Math.imul(y,R)|0,l=l+Math.imul(y,z)|0,s=s+Math.imul(g,B)|0,c=c+Math.imul(g,V)|0,c=c+Math.imul(_,B)|0,l=l+Math.imul(_,V)|0,s=s+Math.imul(m,H)|0,c=c+Math.imul(m,U)|0,c=c+Math.imul(h,H)|0,l=l+Math.imul(h,U)|0,s=s+Math.imul(d,W)|0,c=c+Math.imul(d,G)|0,c=c+Math.imul(f,W)|0,l=l+Math.imul(f,G)|0;var xe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(xe>>>26)|0,xe&=67108863,s=Math.imul(T,N),c=Math.imul(T,P),c=c+Math.imul(E,N)|0,l=Math.imul(E,P),s=s+Math.imul(S,I)|0,c=c+Math.imul(S,L)|0,c=c+Math.imul(C,I)|0,l=l+Math.imul(C,L)|0,s=s+Math.imul(b,R)|0,c=c+Math.imul(b,z)|0,c=c+Math.imul(x,R)|0,l=l+Math.imul(x,z)|0,s=s+Math.imul(v,B)|0,c=c+Math.imul(v,V)|0,c=c+Math.imul(y,B)|0,l=l+Math.imul(y,V)|0,s=s+Math.imul(g,H)|0,c=c+Math.imul(g,U)|0,c=c+Math.imul(_,H)|0,l=l+Math.imul(_,U)|0,s=s+Math.imul(m,W)|0,c=c+Math.imul(m,G)|0,c=c+Math.imul(h,W)|0,l=l+Math.imul(h,G)|0,s=s+Math.imul(d,K)|0,c=c+Math.imul(d,q)|0,c=c+Math.imul(f,K)|0,l=l+Math.imul(f,q)|0;var Se=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Se>>>26)|0,Se&=67108863,s=Math.imul(D,N),c=Math.imul(D,P),c=c+Math.imul(O,N)|0,l=Math.imul(O,P),s=s+Math.imul(T,I)|0,c=c+Math.imul(T,L)|0,c=c+Math.imul(E,I)|0,l=l+Math.imul(E,L)|0,s=s+Math.imul(S,R)|0,c=c+Math.imul(S,z)|0,c=c+Math.imul(C,R)|0,l=l+Math.imul(C,z)|0,s=s+Math.imul(b,B)|0,c=c+Math.imul(b,V)|0,c=c+Math.imul(x,B)|0,l=l+Math.imul(x,V)|0,s=s+Math.imul(v,H)|0,c=c+Math.imul(v,U)|0,c=c+Math.imul(y,H)|0,l=l+Math.imul(y,U)|0,s=s+Math.imul(g,W)|0,c=c+Math.imul(g,G)|0,c=c+Math.imul(_,W)|0,l=l+Math.imul(_,G)|0,s=s+Math.imul(m,K)|0,c=c+Math.imul(m,q)|0,c=c+Math.imul(h,K)|0,l=l+Math.imul(h,q)|0,s=s+Math.imul(d,J)|0,c=c+Math.imul(d,Y)|0,c=c+Math.imul(f,J)|0,l=l+Math.imul(f,Y)|0;var Ce=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,s=Math.imul(k,N),c=Math.imul(k,P),c=c+Math.imul(A,N)|0,l=Math.imul(A,P),s=s+Math.imul(D,I)|0,c=c+Math.imul(D,L)|0,c=c+Math.imul(O,I)|0,l=l+Math.imul(O,L)|0,s=s+Math.imul(T,R)|0,c=c+Math.imul(T,z)|0,c=c+Math.imul(E,R)|0,l=l+Math.imul(E,z)|0,s=s+Math.imul(S,B)|0,c=c+Math.imul(S,V)|0,c=c+Math.imul(C,B)|0,l=l+Math.imul(C,V)|0,s=s+Math.imul(b,H)|0,c=c+Math.imul(b,U)|0,c=c+Math.imul(x,H)|0,l=l+Math.imul(x,U)|0,s=s+Math.imul(v,W)|0,c=c+Math.imul(v,G)|0,c=c+Math.imul(y,W)|0,l=l+Math.imul(y,G)|0,s=s+Math.imul(g,K)|0,c=c+Math.imul(g,q)|0,c=c+Math.imul(_,K)|0,l=l+Math.imul(_,q)|0,s=s+Math.imul(m,J)|0,c=c+Math.imul(m,Y)|0,c=c+Math.imul(h,J)|0,l=l+Math.imul(h,Y)|0,s=s+Math.imul(d,X)|0,c=c+Math.imul(d,Z)|0,c=c+Math.imul(f,X)|0,l=l+Math.imul(f,Z)|0;var we=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(we>>>26)|0,we&=67108863,s=Math.imul(j,N),c=Math.imul(j,P),c=c+Math.imul(M,N)|0,l=Math.imul(M,P),s=s+Math.imul(k,I)|0,c=c+Math.imul(k,L)|0,c=c+Math.imul(A,I)|0,l=l+Math.imul(A,L)|0,s=s+Math.imul(D,R)|0,c=c+Math.imul(D,z)|0,c=c+Math.imul(O,R)|0,l=l+Math.imul(O,z)|0,s=s+Math.imul(T,B)|0,c=c+Math.imul(T,V)|0,c=c+Math.imul(E,B)|0,l=l+Math.imul(E,V)|0,s=s+Math.imul(S,H)|0,c=c+Math.imul(S,U)|0,c=c+Math.imul(C,H)|0,l=l+Math.imul(C,U)|0,s=s+Math.imul(b,W)|0,c=c+Math.imul(b,G)|0,c=c+Math.imul(x,W)|0,l=l+Math.imul(x,G)|0,s=s+Math.imul(v,K)|0,c=c+Math.imul(v,q)|0,c=c+Math.imul(y,K)|0,l=l+Math.imul(y,q)|0,s=s+Math.imul(g,J)|0,c=c+Math.imul(g,Y)|0,c=c+Math.imul(_,J)|0,l=l+Math.imul(_,Y)|0,s=s+Math.imul(m,X)|0,c=c+Math.imul(m,Z)|0,c=c+Math.imul(h,X)|0,l=l+Math.imul(h,Z)|0,s=s+Math.imul(d,Q)|0,c=c+Math.imul(d,$)|0,c=c+Math.imul(f,Q)|0,l=l+Math.imul(f,$)|0;var Te=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Te>>>26)|0,Te&=67108863,s=Math.imul(j,I),c=Math.imul(j,L),c=c+Math.imul(M,I)|0,l=Math.imul(M,L),s=s+Math.imul(k,R)|0,c=c+Math.imul(k,z)|0,c=c+Math.imul(A,R)|0,l=l+Math.imul(A,z)|0,s=s+Math.imul(D,B)|0,c=c+Math.imul(D,V)|0,c=c+Math.imul(O,B)|0,l=l+Math.imul(O,V)|0,s=s+Math.imul(T,H)|0,c=c+Math.imul(T,U)|0,c=c+Math.imul(E,H)|0,l=l+Math.imul(E,U)|0,s=s+Math.imul(S,W)|0,c=c+Math.imul(S,G)|0,c=c+Math.imul(C,W)|0,l=l+Math.imul(C,G)|0,s=s+Math.imul(b,K)|0,c=c+Math.imul(b,q)|0,c=c+Math.imul(x,K)|0,l=l+Math.imul(x,q)|0,s=s+Math.imul(v,J)|0,c=c+Math.imul(v,Y)|0,c=c+Math.imul(y,J)|0,l=l+Math.imul(y,Y)|0,s=s+Math.imul(g,X)|0,c=c+Math.imul(g,Z)|0,c=c+Math.imul(_,X)|0,l=l+Math.imul(_,Z)|0,s=s+Math.imul(m,Q)|0,c=c+Math.imul(m,$)|0,c=c+Math.imul(h,Q)|0,l=l+Math.imul(h,$)|0;var Ee=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,s=Math.imul(j,R),c=Math.imul(j,z),c=c+Math.imul(M,R)|0,l=Math.imul(M,z),s=s+Math.imul(k,B)|0,c=c+Math.imul(k,V)|0,c=c+Math.imul(A,B)|0,l=l+Math.imul(A,V)|0,s=s+Math.imul(D,H)|0,c=c+Math.imul(D,U)|0,c=c+Math.imul(O,H)|0,l=l+Math.imul(O,U)|0,s=s+Math.imul(T,W)|0,c=c+Math.imul(T,G)|0,c=c+Math.imul(E,W)|0,l=l+Math.imul(E,G)|0,s=s+Math.imul(S,K)|0,c=c+Math.imul(S,q)|0,c=c+Math.imul(C,K)|0,l=l+Math.imul(C,q)|0,s=s+Math.imul(b,J)|0,c=c+Math.imul(b,Y)|0,c=c+Math.imul(x,J)|0,l=l+Math.imul(x,Y)|0,s=s+Math.imul(v,X)|0,c=c+Math.imul(v,Z)|0,c=c+Math.imul(y,X)|0,l=l+Math.imul(y,Z)|0,s=s+Math.imul(g,Q)|0,c=c+Math.imul(g,$)|0,c=c+Math.imul(_,Q)|0,l=l+Math.imul(_,$)|0;var De=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(De>>>26)|0,De&=67108863,s=Math.imul(j,B),c=Math.imul(j,V),c=c+Math.imul(M,B)|0,l=Math.imul(M,V),s=s+Math.imul(k,H)|0,c=c+Math.imul(k,U)|0,c=c+Math.imul(A,H)|0,l=l+Math.imul(A,U)|0,s=s+Math.imul(D,W)|0,c=c+Math.imul(D,G)|0,c=c+Math.imul(O,W)|0,l=l+Math.imul(O,G)|0,s=s+Math.imul(T,K)|0,c=c+Math.imul(T,q)|0,c=c+Math.imul(E,K)|0,l=l+Math.imul(E,q)|0,s=s+Math.imul(S,J)|0,c=c+Math.imul(S,Y)|0,c=c+Math.imul(C,J)|0,l=l+Math.imul(C,Y)|0,s=s+Math.imul(b,X)|0,c=c+Math.imul(b,Z)|0,c=c+Math.imul(x,X)|0,l=l+Math.imul(x,Z)|0,s=s+Math.imul(v,Q)|0,c=c+Math.imul(v,$)|0,c=c+Math.imul(y,Q)|0,l=l+Math.imul(y,$)|0;var Oe=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,s=Math.imul(j,H),c=Math.imul(j,U),c=c+Math.imul(M,H)|0,l=Math.imul(M,U),s=s+Math.imul(k,W)|0,c=c+Math.imul(k,G)|0,c=c+Math.imul(A,W)|0,l=l+Math.imul(A,G)|0,s=s+Math.imul(D,K)|0,c=c+Math.imul(D,q)|0,c=c+Math.imul(O,K)|0,l=l+Math.imul(O,q)|0,s=s+Math.imul(T,J)|0,c=c+Math.imul(T,Y)|0,c=c+Math.imul(E,J)|0,l=l+Math.imul(E,Y)|0,s=s+Math.imul(S,X)|0,c=c+Math.imul(S,Z)|0,c=c+Math.imul(C,X)|0,l=l+Math.imul(C,Z)|0,s=s+Math.imul(b,Q)|0,c=c+Math.imul(b,$)|0,c=c+Math.imul(x,Q)|0,l=l+Math.imul(x,$)|0;var ke=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(ke>>>26)|0,ke&=67108863,s=Math.imul(j,W),c=Math.imul(j,G),c=c+Math.imul(M,W)|0,l=Math.imul(M,G),s=s+Math.imul(k,K)|0,c=c+Math.imul(k,q)|0,c=c+Math.imul(A,K)|0,l=l+Math.imul(A,q)|0,s=s+Math.imul(D,J)|0,c=c+Math.imul(D,Y)|0,c=c+Math.imul(O,J)|0,l=l+Math.imul(O,Y)|0,s=s+Math.imul(T,X)|0,c=c+Math.imul(T,Z)|0,c=c+Math.imul(E,X)|0,l=l+Math.imul(E,Z)|0,s=s+Math.imul(S,Q)|0,c=c+Math.imul(S,$)|0,c=c+Math.imul(C,Q)|0,l=l+Math.imul(C,$)|0;var Ae=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s=Math.imul(j,K),c=Math.imul(j,q),c=c+Math.imul(M,K)|0,l=Math.imul(M,q),s=s+Math.imul(k,J)|0,c=c+Math.imul(k,Y)|0,c=c+Math.imul(A,J)|0,l=l+Math.imul(A,Y)|0,s=s+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,c=c+Math.imul(O,X)|0,l=l+Math.imul(O,Z)|0,s=s+Math.imul(T,Q)|0,c=c+Math.imul(T,$)|0,c=c+Math.imul(E,Q)|0,l=l+Math.imul(E,$)|0;var je=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(je>>>26)|0,je&=67108863,s=Math.imul(j,J),c=Math.imul(j,Y),c=c+Math.imul(M,J)|0,l=Math.imul(M,Y),s=s+Math.imul(k,X)|0,c=c+Math.imul(k,Z)|0,c=c+Math.imul(A,X)|0,l=l+Math.imul(A,Z)|0,s=s+Math.imul(D,Q)|0,c=c+Math.imul(D,$)|0,c=c+Math.imul(O,Q)|0,l=l+Math.imul(O,$)|0;var Me=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Me>>>26)|0,Me&=67108863,s=Math.imul(j,X),c=Math.imul(j,Z),c=c+Math.imul(M,X)|0,l=Math.imul(M,Z),s=s+Math.imul(k,Q)|0,c=c+Math.imul(k,$)|0,c=c+Math.imul(A,Q)|0,l=l+Math.imul(A,$)|0;var Ne=(o+s|0)+((c&8191)<<13)|0;o=(l+(c>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,s=Math.imul(j,Q),c=Math.imul(j,$),c=c+Math.imul(M,Q)|0,l=Math.imul(M,$);var Pe=(o+s|0)+((c&8191)<<13)|0;return o=(l+(c>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,a[0]=ge,a[1]=_e,a[2]=ve,a[3]=ye,a[4]=be,a[5]=xe,a[6]=Se,a[7]=Ce,a[8]=we,a[9]=Te,a[10]=Ee,a[11]=De,a[12]=Oe,a[13]=ke,a[14]=Ae,a[15]=je,a[16]=Me,a[17]=Ne,a[18]=Pe,o!==0&&(a[19]=o,n.length++),n};Math.imul||(_=g);function te(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var o=i;i=0;for(var s=r&67108863,c=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=c;l++){var u=a-l,d=(e.words[u]|0)*(t.words[l]|0),f=d&67108863;o=o+(d/67108864|0)|0,f=f+s|0,s=f&67108863,o=o+(f>>>26)|0,i+=o>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return r===0?n.length--:n.words[a]=r,n._strip()}function v(e,t,n){return te(e,t,n)}a.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=this.length===10&&e.length===10?_(this,e,t):r<63?g(this,e,t):r<1024?te(this,e,t):v(this,e,t),n};function y(e,t){this.x=e,this.y=t}y.prototype.makeRBT=function(e){for(var t=Array(e),n=a.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},y.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(e&1)<<t-i-1,e>>=1;return r},y.prototype.permute=function(e,t,n,r,i,a){for(var o=0;o<a;o++)r[o]=t[e[o]],i[o]=n[e[o]]},y.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=c,f=l,p=0;p<o;p++){var m=n[u+p],h=r[u+p],ee=n[u+p+o],g=r[u+p+o],_=d*ee-f*g;g=d*g+f*ee,ee=_,n[u+p]=m+ee,r[u+p]=h+g,n[u+p+o]=m-ee,r[u+p+o]=h-g,p!==s&&(_=c*d-l*f,f=c*f+l*d,d=_)}},y.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,r=n&1,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},y.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},y.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=Math.round(e[2*r+1]/t)*8192+Math.round(e[2*r]/t)+n;e[r]=i&67108863,n=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,n,i){for(var a=0,o=0;o<t;o++)a+=e[o]|0,n[2*o]=a&8191,a>>>=13,n[2*o+1]=a&8191,a>>>=13;for(o=2*t;o<i;++o)n[o]=0;r(a===0),r(!(a&-8192))},y.prototype.stub=function(e){for(var t=Array(e),n=0;n<e;n++)t[n]=0;return t},y.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),o=Array(r),s=Array(r),c=Array(r),l=Array(r),u=Array(r),d=Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,o,r),this.convert13b(t.words,t.length,l,r),this.transform(o,a,s,c,r,i),this.transform(l,a,u,d,r,i);for(var p=0;p<r;p++){var m=s[p]*u[p]-c[p]*d[p];c[p]=s[p]*d[p]+c[p]*u[p],s[p]=m}return this.conjugate(s,c,r),this.transform(s,c,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=Array(this.length+e.length),v(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r(typeof e==`number`),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var a=(this.words[i]|0)*e,o=(a&67108863)+(n&67108863);n>>=26,n+=a/67108864|0,n+=o>>>26,this.words[i]=o&67108863}return n!==0&&(this.words[i]=n,this.length++),e===0&&(this.length=1,this._normSign()),t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=ee(e);if(t.length===0)return new a(1);for(var n=this,r=0;r<t.length&&t[r]===0;r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())t[r]!==0&&(n=n.mul(i));return n},a.prototype.iushln=function(e){r(typeof e==`number`&&e>=0);var t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t,a;if(t!==0){var o=0;for(a=0;a<this.length;a++){var s=this.words[a]&i,c=(this.words[a]|0)-s<<t;this.words[a]=c|o,o=s>>>26-t}o&&(this.words[a]=o,this.length++)}if(n!==0){for(a=this.length-1;a>=0;a--)this.words[a+n]=this.words[a];for(a=0;a<n;a++)this.words[a]=0;this.length+=n}return this._strip()},a.prototype.ishln=function(e){return r(this.negative===0),this.iushln(e)},a.prototype.iushrn=function(e,t,n){r(typeof e==`number`&&e>=0);var i=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=n;if(i-=o,i=Math.max(0,i),c){for(var l=0;l<o;l++)c.words[l]=this.words[l];c.length=o}if(o!==0){if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1}var u=0;for(l=this.length-1;l>=0&&(u!==0||l>=i);l--){var d=this.words[l]|0;this.words[l]=u<<26-a|d>>>a,u=d&s}return c&&u!==0&&(c.words[c.length++]=u),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,n){return r(this.negative===0),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){r(typeof e==`number`&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return this.length<=n?!1:!!(this.words[n]&i)},a.prototype.imaskn=function(e){r(typeof e==`number`&&e>=0);var t=e%26,n=(e-t)/26;if(r(this.negative===0,`imaskn works only with positive numbers`),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return r(typeof e==`number`),r(e<67108864),e<0?this.isubn(-e):this.negative===0?this._iaddn(e):this.length===1&&(this.words[0]|0)<=e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r(typeof e==`number`),r(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this._strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,n){var i=e.length+n,a;this._expand(i);var o,s=0;for(a=0;a<e.length;a++){o=(this.words[a+n]|0)+s;var c=(e.words[a]|0)*t;o-=c&67108863,s=(o>>26)-(c/67108864|0),this.words[a+n]=o&67108863}for(;a<this.length-n;a++)o=(this.words[a+n]|0)+s,s=o>>26,this.words[a+n]=o&67108863;if(s===0)return this._strip();for(r(s===-1),s=0,a=0;a<this.length;a++)o=-(this.words[a]|0)+s,s=o>>26,this.words[a]=o&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,r=this.clone(),i=e,o=i.words[i.length-1]|0;n=26-this._countBits(o),n!==0&&(i=i.ushln(n),r.iushln(n),o=i.words[i.length-1]|0);var s=r.length-i.length,c;if(t!==`mod`){c=new a(null),c.length=s+1,c.words=Array(c.length);for(var l=0;l<c.length;l++)c.words[l]=0}var u=r.clone()._ishlnsubmul(i,1,s);u.negative===0&&(r=u,c&&(c.words[s]=1));for(var d=s-1;d>=0;d--){var f=(r.words[i.length+d]|0)*67108864+(r.words[i.length+d-1]|0);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(i,f,d);r.negative!==0;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);c&&(c.words[d]=f)}return c&&c._strip(),r._strip(),t!==`div`&&n!==0&&r.iushrn(n),{div:c||null,mod:r}},a.prototype.divmod=function(e,t,n){if(r(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return this.negative!==0&&e.negative===0?(s=this.neg().divmod(e,t),t!==`mod`&&(i=s.div.neg()),t!==`div`&&(o=s.mod.neg(),n&&o.negative!==0&&o.iadd(e)),{div:i,mod:o}):this.negative===0&&e.negative!==0?(s=this.divmod(e.neg(),t),t!==`mod`&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)===0?e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:e.length===1?t===`div`?{div:this.divn(e.words[0]),mod:null}:t===`mod`?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),t!==`div`&&(o=s.mod.neg(),n&&o.negative!==0&&o.isub(e)),{div:s.div,mod:o})},a.prototype.div=function(e){return this.divmod(e,`div`,!1).div},a.prototype.mod=function(e){return this.divmod(e,`mod`,!1).mod},a.prototype.umod=function(e){return this.divmod(e,`mod`,!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.mod.abs(),r=e.abs().iushrn(1),i=e.words[0]&1,o=n.cmp(r);if(o<0||i===1&&o===0)return t.div;var s=new a(1);return s.negative=this.negative^e.negative,t.div.iadd(s)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(n*i+(this.words[a]|0))%e;return t?-i:i},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var a=(this.words[i]|0)+n*67108864;this.words[i]=a/e|0,n=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(e.negative===0),r(!e.isZero());var t=this,n=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var i=new a(1),o=new a(0),s=new a(0),c=new a(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var u=n.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;(t.words[0]&p)===0&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-->0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var m=0,h=1;(n.words[0]&h)===0&&m<26;++m,h<<=1);if(m>0)for(n.iushrn(m);m-->0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),o.isub(c)):(n.isub(t),s.isub(i),c.isub(o))}return{a:s,b:c,gcd:n.iushln(l)}},a.prototype._invmp=function(e){r(e.negative===0),r(!e.isZero());var t=this,n=e.clone();t=t.negative===0?t.clone():t.umod(e);for(var i=new a(1),o=new a(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;(t.words[0]&l)===0&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-->0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var u=0,d=1;(n.words[0]&d)===0&&u<26;++u,d<<=1);if(u>0)for(n.iushrn(u);u-->0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o)):(n.isub(t),o.isub(i))}var f=t.cmpn(1)===0?i:o;return f.cmpn(0)<0&&f.iadd(e),f},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(i===0||n.cmpn(1)===0)break;t.isub(n)}while(1);return n.iushln(r)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return!(this.words[0]&1)},a.prototype.isOdd=function(){return(this.words[0]&1)==1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){r(typeof e==`number`);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var a=i,o=n;a!==0&&o<this.length;o++){var s=this.words[o]|0;s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return a!==0&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this._strip();var n;if(this.length>1)n=1;else{t&&(e=-e),r(e<=67108863,`Number is too big`);var i=this.words[0]|0;n=i===e?0:i<e?-1:1}return this.negative===0?n:-n|0},a.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative===0?t:-t|0},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=this.words[n]|0,i=e.words[n]|0;if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return this.cmpn(e)===1},a.prototype.gt=function(e){return this.cmp(e)===1},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return this.cmpn(e)===0},a.prototype.eq=function(e){return this.cmp(e)===0},a.red=function(e){return new w(e)},a.prototype.toRed=function(e){return r(!this.red,`Already a number in reduction context`),r(this.negative===0,`red works only with positives`),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(this.red,`fromRed works only with numbers in reduction context`),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return r(!this.red,`Already a number in reduction context`),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,`redAdd works only with red numbers`),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,`redIAdd works only with red numbers`),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,`redSub works only with red numbers`),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,`redISub works only with red numbers`),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,`redShl works only with red numbers`),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,`redMul works only with red numbers`),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,`redSqr works only with red numbers`),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,`redISqr works only with red numbers`),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,`redSqrt works only with red numbers`),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,`redInvm works only with red numbers`),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,`redNeg works only with red numbers`),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,`redPow(normalNum)`),this.red._verify1(this),this.red.pow(this,e)};var ne={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}b.prototype._tmp=function(){var e=new a(null);return e.words=Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var r=n<this.n?-1:t.ucmp(this.p);return r===0?(t.words[0]=0,t.length=1):r>0?t.isub(this.p):t.strip===void 0?t._strip():t.strip(),t},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)};function x(){b.call(this,`k256`,`ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f`)}i(x,b),x.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var o=e.words[i]|0;e.words[i-10]=(o&n)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,a===0&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=e.words[n]|0;t+=r*977,e.words[n]=t&67108863,t=r*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function re(){b.call(this,`p224`,`ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001`)}i(re,b);function S(){b.call(this,`p192`,`ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff`)}i(S,b);function C(){b.call(this,`25519`,`7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed`)}i(C,b),C.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=(e.words[n]|0)*19+t,i=r&67108863;r>>>=26,e.words[n]=i,t=r}return t!==0&&(e.words[e.length++]=t),e},a._prime=function(e){if(ne[e])return ne[e];var t;if(e===`k256`)t=new x;else if(e===`p224`)t=new re;else if(e===`p192`)t=new S;else if(e===`p25519`)t=new C;else throw Error(`Unknown prime `+e);return ne[e]=t,t};function w(e){if(typeof e==`string`){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),`modulus must be greater than 1`),this.m=e,this.prime=null}w.prototype._verify1=function(e){r(e.negative===0,`red works only with positives`),r(e.red,`red works only with red numbers`)},w.prototype._verify2=function(e,t){r((e.negative|t.negative)===0,`red works only with positives`),r(e.red&&e.red===t.red,`red works only with red numbers`)},w.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},w.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},w.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},w.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},w.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},w.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},w.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},w.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},w.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},w.prototype.isqr=function(e){return this.imul(e,e.clone())},w.prototype.sqr=function(e){return this.mul(e,e)},w.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),t===3){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&i.andln(1)===0;)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),c=s.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);this.pow(u,l).cmp(c)!==0;)u.redIAdd(c);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),m=o;p.cmp(s)!==0;){for(var h=p,ee=0;h.cmp(s)!==0;ee++)h=h.redSqr();r(ee<m);var g=this.pow(d,new a(1).iushln(m-ee-1));f=f.redMul(g),d=g.redSqr(),p=p.redMul(d),m=ee}return f},w.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative===0?this.imod(t):(t.negative=0,this.imod(t).redNeg())},w.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,r=Array(1<<n);r[0]=new a(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,c=0,l=t.bitLength()%26;for(l===0&&(l=26),i=t.length-1;i>=0;i--){for(var u=t.words[i],d=l-1;d>=0;d--){var f=u>>d&1;if(o!==r[0]&&(o=this.sqr(o)),f===0&&s===0){c=0;continue}s<<=1,s|=f,c++,(c===n||i===0&&d===0)&&(o=this.mul(o,r[s]),c=0,s=0)}l=26}return o},w.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},w.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new T(e)};function T(e){w.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(T,w),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}})(n===void 0||n,e)}));export{t as n,n as t};