agenttwin 0.3.23 → 0.3.24

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 (167) hide show
  1. package/dist/api.js +1335 -729
  2. package/dist/dashboard/assets/next/static/chunks/5663-2ba656663ac4643f.js +1 -0
  3. package/dist/dashboard/assets/next/static/chunks/{webpack-9e40ef55e5f2fb53.js → webpack-ecd761d72719adb3.js} +1 -1
  4. package/dist/dashboard/index.html +2 -2
  5. package/dist/engine.js +2024 -1414
  6. package/dist/gateway.js +1411 -807
  7. package/dist/twins/catalog.json +20 -18
  8. package/dist/twins/engine/v2/agenttwin-clock.mjs +2 -0
  9. package/dist/twins/engine/v2/chunks/{4CPL6MPF.mjs → 52CMXHSV.mjs} +1 -1
  10. package/dist/twins/engine/v2/chunks/B2VTT7PF.mjs +2 -0
  11. package/dist/twins/engine/v2/chunks/{2CHBP57N.mjs → HZDHKUD5.mjs} +1 -1
  12. package/dist/twins/engine/v2/chunks/IVRB2YOK.mjs +8 -0
  13. package/dist/twins/engine/v2/chunks/{YSJQQVUM.mjs → MPX7J53E.mjs} +1 -1
  14. package/dist/twins/engine/v2/chunks/{SQSP35HM.mjs → RFZW5KCO.mjs} +1 -1
  15. package/dist/twins/engine/v2/react-dom_client.mjs +1 -1
  16. package/dist/twins/engine/v2/react-dom_server.mjs +1 -1
  17. package/dist/twins/engine/v2/react.mjs +1 -1
  18. package/dist/twins/engine/v2/react_jsx-runtime.mjs +1 -1
  19. package/dist/twins/engine/v2/volter_world-core.mjs +103 -109
  20. package/dist/twins/engine/v2/volter_world-core_app-route.mjs +1 -1
  21. package/dist/twins/engine/v2/volter_world-core_network-policy.mjs +1 -1
  22. package/dist/twins/engine/v3/agenttwin-clock.mjs +2 -0
  23. package/dist/twins/engine/v3/chunks/{MFH2VZPP.mjs → 2EG5AD6A.mjs} +1 -1
  24. package/dist/twins/engine/v3/chunks/{C46M5U3Q.mjs → 5QGCNQS3.mjs} +1 -1
  25. package/dist/twins/engine/v3/chunks/{O7HGPMXG.mjs → 5WNKAVCT.mjs} +1 -1
  26. package/dist/twins/engine/v3/chunks/7D6PDVOF.mjs +11 -0
  27. package/dist/twins/engine/v3/chunks/B2VTT7PF.mjs +2 -0
  28. package/dist/twins/engine/v3/chunks/{N5BL5RDF.mjs → F72NFZTW.mjs} +131 -140
  29. package/dist/twins/engine/v3/chunks/{TY4LDBVH.mjs → GY2CTF2C.mjs} +1 -1
  30. package/dist/twins/engine/v3/chunks/{MWCO5UV3.mjs → GZESXXB2.mjs} +1 -1
  31. package/dist/twins/engine/v3/chunks/{2CHBP57N.mjs → HZDHKUD5.mjs} +1 -1
  32. package/dist/twins/engine/v3/chunks/{WPATONSC.mjs → IC6JHXCF.mjs} +1 -1
  33. package/dist/twins/engine/v3/chunks/{5PWRY4UK.mjs → JLOGZJDO.mjs} +1 -1
  34. package/dist/twins/engine/v3/chunks/{2YSSPA5O.mjs → K7NBWSIY.mjs} +1 -1
  35. package/dist/twins/engine/v3/chunks/{WGUCFQK6.mjs → T4VKXHGB.mjs} +1 -1
  36. package/dist/twins/engine/v3/chunks/{AWOWH2H5.mjs → UAP25HWH.mjs} +1 -1
  37. package/dist/twins/engine/v3/chunks/{VDIRUSCM.mjs → UKHKF3CP.mjs} +1 -1
  38. package/dist/twins/engine/v3/chunks/{PLB7HTON.mjs → VJIL5WLL.mjs} +1 -1
  39. package/dist/twins/engine/v3/chunks/{7XRKSFFJ.mjs → ZIV3ZV6R.mjs} +1 -1
  40. package/dist/twins/engine/v3/react_jsx-runtime.mjs +1 -1
  41. package/dist/twins/engine/v3/volter_world-core.mjs +1 -1
  42. package/dist/twins/engine/v3/volter_world-ui.mjs +1 -1
  43. package/dist/twins/packs/ahrefs/NOTICE +1 -1
  44. package/dist/twins/packs/ai-gateway/NOTICE +1 -1
  45. package/dist/twins/packs/airtable/NOTICE +1 -1
  46. package/dist/twins/packs/algolia/NOTICE +1 -1
  47. package/dist/twins/packs/ambientcg/NOTICE +1 -1
  48. package/dist/twins/packs/anthropic/NOTICE +1 -1
  49. package/dist/twins/packs/assemblyai/NOTICE +1 -1
  50. package/dist/twins/packs/aws/NOTICE +1 -1
  51. package/dist/twins/packs/azure/NOTICE +1 -1
  52. package/dist/twins/packs/azureformrecognizer/NOTICE +1 -1
  53. package/dist/twins/packs/bitly/NOTICE +1 -1
  54. package/dist/twins/packs/bluesky/NOTICE +1 -1
  55. package/dist/twins/packs/calcom/NOTICE +1 -1
  56. package/dist/twins/packs/clerk/NOTICE +1 -1
  57. package/dist/twins/packs/cloudflare/NOTICE +1 -1
  58. package/dist/twins/packs/cohere/NOTICE +1 -1
  59. package/dist/twins/packs/datadog/NOTICE +1 -1
  60. package/dist/twins/packs/deepinfra/NOTICE +1 -1
  61. package/dist/twins/packs/deepseek/NOTICE +1 -1
  62. package/dist/twins/packs/discord/NOTICE +1 -1
  63. package/dist/twins/packs/duckduckgo/NOTICE +1 -1
  64. package/dist/twins/packs/dynadot/NOTICE +1 -1
  65. package/dist/twins/packs/e2b/NOTICE +1 -1
  66. package/dist/twins/packs/elevenlabs/NOTICE +1 -1
  67. package/dist/twins/packs/expo/NOTICE +1 -1
  68. package/dist/twins/packs/fal/NOTICE +1 -1
  69. package/dist/twins/packs/figma/NOTICE +1 -1
  70. package/dist/twins/packs/firecrawl/NOTICE +1 -1
  71. package/dist/twins/packs/fireworks/NOTICE +1 -1
  72. package/dist/twins/packs/fly/NOTICE +1 -1
  73. package/dist/twins/packs/gcs/NOTICE +1 -1
  74. package/dist/twins/packs/gemini/NOTICE +1 -1
  75. package/dist/twins/packs/github/NOTICE +1 -1
  76. package/dist/twins/packs/github/index.mjs +1 -1
  77. package/dist/twins/packs/googleads/NOTICE +1 -1
  78. package/dist/twins/packs/googlemaps/NOTICE +1 -1
  79. package/dist/twins/packs/googleoauth/NOTICE +1 -1
  80. package/dist/twins/packs/hackernews/NOTICE +1 -1
  81. package/dist/twins/packs/huggingface/NOTICE +1 -1
  82. package/dist/twins/packs/inngest/NOTICE +1 -1
  83. package/dist/twins/packs/inngest/index.mjs +1 -1
  84. package/dist/twins/packs/instagram/NOTICE +1 -1
  85. package/dist/twins/packs/jira/NOTICE +1 -1
  86. package/dist/twins/packs/langfuse/NOTICE +1 -1
  87. package/dist/twins/packs/linear/NOTICE +1 -1
  88. package/dist/twins/packs/linear/index.mjs +1 -1
  89. package/dist/twins/packs/linkedin/NOTICE +1 -1
  90. package/dist/twins/packs/livekit/NOTICE +1 -1
  91. package/dist/twins/packs/mailgun/NOTICE +1 -1
  92. package/dist/twins/packs/mapbox/NOTICE +1 -1
  93. package/dist/twins/packs/merge/NOTICE +1 -1
  94. package/dist/twins/packs/mistral/NOTICE +1 -1
  95. package/dist/twins/packs/mixpanel/NOTICE +1 -1
  96. package/dist/twins/packs/mongodb/NOTICE +1 -1
  97. package/dist/twins/packs/moonshot/NOTICE +1 -1
  98. package/dist/twins/packs/notion/NOTICE +1 -1
  99. package/dist/twins/packs/npm-registry/NOTICE +1 -1
  100. package/dist/twins/packs/oa-treasury/NOTICE +1 -1
  101. package/dist/twins/packs/openai/NOTICE +1 -1
  102. package/dist/twins/packs/openrouter/NOTICE +1 -1
  103. package/dist/twins/packs/openweather/NOTICE +1 -1
  104. package/dist/twins/packs/paypal/NOTICE +1 -1
  105. package/dist/twins/packs/pinecone/NOTICE +1 -1
  106. package/dist/twins/packs/plain/NOTICE +1 -1
  107. package/dist/twins/packs/plain/index.mjs +1 -1
  108. package/dist/twins/packs/planetscale/NOTICE +1 -1
  109. package/dist/twins/packs/polar/NOTICE +1 -1
  110. package/dist/twins/packs/polyhaven/NOTICE +1 -1
  111. package/dist/twins/packs/postmark/NOTICE +1 -1
  112. package/dist/twins/packs/reddit/NOTICE +1 -1
  113. package/dist/twins/packs/redis/NOTICE +1 -1
  114. package/dist/twins/packs/replicate/NOTICE +1 -1
  115. package/dist/twins/packs/resend/NOTICE +1 -1
  116. package/dist/twins/packs/runhuman/NOTICE +1 -1
  117. package/dist/twins/packs/scrapecreators/NOTICE +1 -1
  118. package/dist/twins/packs/segment/NOTICE +1 -1
  119. package/dist/twins/packs/sendblue/NOTICE +1 -1
  120. package/dist/twins/packs/sendgrid/NOTICE +1 -1
  121. package/dist/twins/packs/sentry/NOTICE +1 -1
  122. package/dist/twins/packs/sigstore/NOTICE +1 -1
  123. package/dist/twins/packs/slack/NOTICE +1 -1
  124. package/dist/twins/packs/smtp/NOTICE +1 -1
  125. package/dist/twins/packs/snowflake/NOTICE +1 -1
  126. package/dist/twins/packs/stigg/NOTICE +1 -1
  127. package/dist/twins/packs/stigg/index.mjs +1 -1
  128. package/dist/twins/packs/stream/NOTICE +1 -1
  129. package/dist/twins/packs/stripe/NOTICE +1 -1
  130. package/dist/twins/packs/supabase/NOTICE +1 -1
  131. package/dist/twins/packs/supermemory/NOTICE +1 -1
  132. package/dist/twins/packs/svix/NOTICE +1 -1
  133. package/dist/twins/packs/tavily/NOTICE +1 -1
  134. package/dist/twins/packs/telegram/NOTICE +1 -1
  135. package/dist/twins/packs/temporal/NOTICE +1 -1
  136. package/dist/twins/packs/temporal/index.mjs +1 -1
  137. package/dist/twins/packs/tiktok/NOTICE +1 -1
  138. package/dist/twins/packs/tinybird/NOTICE +1 -1
  139. package/dist/twins/packs/togetherai/NOTICE +1 -1
  140. package/dist/twins/packs/tremendous/NOTICE +1 -1
  141. package/dist/twins/packs/tripo/NOTICE +1 -1
  142. package/dist/twins/packs/tunnel/NOTICE +1 -1
  143. package/dist/twins/packs/twelvelabs/NOTICE +1 -1
  144. package/dist/twins/packs/twilio/NOTICE +1 -1
  145. package/dist/twins/packs/twitch/NOTICE +1 -1
  146. package/dist/twins/packs/upstash/NOTICE +1 -1
  147. package/dist/twins/packs/upstashvector/NOTICE +1 -1
  148. package/dist/twins/packs/vercel/NOTICE +1 -1
  149. package/dist/twins/packs/veriff/NOTICE +1 -1
  150. package/dist/twins/packs/vgauth/NOTICE +1 -1
  151. package/dist/twins/packs/vital/NOTICE +1 -1
  152. package/dist/twins/packs/volteridentity/NOTICE +1 -1
  153. package/dist/twins/packs/webrisk/NOTICE +1 -1
  154. package/dist/twins/packs/worldlabs/NOTICE +1 -1
  155. package/dist/twins/packs/x/NOTICE +1 -1
  156. package/dist/twins/packs/xai/NOTICE +1 -1
  157. package/dist/twins/packs/xidentity/NOTICE +1 -1
  158. package/dist/twins/packs/xidentity/index.mjs +1 -1
  159. package/dist/twins/packs/youtube/NOTICE +1 -1
  160. package/dist/worker.js +1518 -180
  161. package/dist/world-host.js +797 -263
  162. package/package.json +1 -1
  163. package/dist/dashboard/assets/next/static/chunks/5663-403316746afad10e.js +0 -1
  164. package/dist/twins/engine/v2/chunks/OYLYKZGD.mjs +0 -2
  165. package/dist/twins/engine/v3/chunks/OYLYKZGD.mjs +0 -2
  166. /package/dist/dashboard/assets/next/static/{GTd0IQ6HYyhE_2HqcgFno → ztFPFZw3-M7E56BfRipIn}/_buildManifest.js +0 -0
  167. /package/dist/dashboard/assets/next/static/{GTd0IQ6HYyhE_2HqcgFno → ztFPFZw3-M7E56BfRipIn}/_ssgManifest.js +0 -0
@@ -3,15 +3,17 @@
3
3
  "build": 1,
4
4
  "engine": {
5
5
  "v3": {
6
+ "clockSupport": "async-context-v1",
6
7
  "modules": [
7
8
  "@volter/world-core",
8
9
  "@volter/world-ui",
9
10
  "react/jsx-runtime"
10
11
  ],
11
- "bytes": 2458160,
12
- "sha256": "10209eaa595ec4a0197cbb20c4639658ee819b0771eb16387c5192491f4772fb"
12
+ "bytes": 2458820,
13
+ "sha256": "f98b2d2c80583dceb231e4634146d72f039561809bbe0f918e18ef5c9bbcf778"
13
14
  },
14
15
  "v2": {
16
+ "clockSupport": "async-context-v1",
15
17
  "modules": [
16
18
  "@volter/world-core",
17
19
  "@volter/world-core/app-route",
@@ -21,8 +23,8 @@
21
23
  "react-dom/server",
22
24
  "react/jsx-runtime"
23
25
  ],
24
- "bytes": 2035333,
25
- "sha256": "a25c9d61ea57ff3b51355aa622e4b68e692a1498b27fe53174c2ae1756e5dbe1"
26
+ "bytes": 2036058,
27
+ "sha256": "04474dcdffe4847f0f9f69b2d8702deb4148263698d40a06963aebc864a47739"
26
28
  }
27
29
  },
28
30
  "packs": {
@@ -992,8 +994,8 @@
992
994
  "acceptsProvidedIds": false,
993
995
  "logService": "github",
994
996
  "builtin": true,
995
- "bytes": 2893280,
996
- "sha256": "55abd218b848de455e7b02dbe35d376784e1c2e24c4c33265899017d23a38779"
997
+ "bytes": 2893313,
998
+ "sha256": "ec8395c0fa53768b35e3537f417d017e39eda0f7d4345e9a502da69ede7d76b6"
997
999
  },
998
1000
  "googleoauth": {
999
1001
  "name": "googleoauth",
@@ -1285,8 +1287,8 @@
1285
1287
  "acceptsProvidedIds": false,
1286
1288
  "logService": "linear",
1287
1289
  "builtin": true,
1288
- "bytes": 1855751,
1289
- "sha256": "aa007d9d741dce4ca10be5f258ffc861e7d2eca38442ecc2889cb204bb19bec6"
1290
+ "bytes": 1855784,
1291
+ "sha256": "8e8c07d28b4e2174613cb61b0c971ac3a1ede3c3dde9472cf80054790c40e0c9"
1290
1292
  },
1291
1293
  "linkedin": {
1292
1294
  "name": "linkedin",
@@ -4252,8 +4254,8 @@
4252
4254
  "acceptsProvidedIds": false,
4253
4255
  "logService": null,
4254
4256
  "builtin": true,
4255
- "bytes": 15381,
4256
- "sha256": "04f48d734db563857aa7cbc8ae24700a5534828be71f32606c534451553ee55d"
4257
+ "bytes": 15434,
4258
+ "sha256": "37691140087fbd5bf9312629dd788b0bbecc760ab983ff244f39a8a002d3db36"
4257
4259
  },
4258
4260
  "instagram": {
4259
4261
  "name": "instagram",
@@ -4979,8 +4981,8 @@
4979
4981
  "acceptsProvidedIds": false,
4980
4982
  "logService": null,
4981
4983
  "builtin": true,
4982
- "bytes": 893842,
4983
- "sha256": "b07f35248174154de209c7caffe297ea4facdbc3094e6ed9e05e5f8bc934e58b"
4984
+ "bytes": 893875,
4985
+ "sha256": "ab682e964c5830e6d4c624b034705e77c489cc10ffe7fb029796e62b11eb677a"
4984
4986
  },
4985
4987
  "postmark": {
4986
4988
  "name": "postmark",
@@ -5422,8 +5424,8 @@
5422
5424
  "acceptsProvidedIds": false,
5423
5425
  "logService": null,
5424
5426
  "builtin": true,
5425
- "bytes": 898545,
5426
- "sha256": "7d978b52486f4ffb73300193dbeca222439a877e8e09c492e3b8e0a952ff0809"
5427
+ "bytes": 898578,
5428
+ "sha256": "139b3b57e91fb186721d3e27b1708d0fcdd9e0763d1283431c9d44a8812379f9"
5427
5429
  },
5428
5430
  "stream": {
5429
5431
  "name": "stream",
@@ -5614,8 +5616,8 @@
5614
5616
  "acceptsProvidedIds": false,
5615
5617
  "logService": null,
5616
5618
  "builtin": true,
5617
- "bytes": 411757,
5618
- "sha256": "3dfa19bfe4c716e30679695903e876b57c015e718bf28cff75db6dcd7b25f299"
5619
+ "bytes": 411790,
5620
+ "sha256": "61b3a43590983d2d91fad97ab634ee929cbb7e55020408f166eb2575fe0768de"
5619
5621
  },
5620
5622
  "togetherai": {
5621
5623
  "name": "togetherai",
@@ -5953,8 +5955,8 @@
5953
5955
  "acceptsProvidedIds": false,
5954
5956
  "logService": null,
5955
5957
  "builtin": true,
5956
- "bytes": 570690,
5957
- "sha256": "62f80de549dc85c1e97cdc23d2715bde46798ab8365ac278dbaac496217f46b4"
5958
+ "bytes": 570743,
5959
+ "sha256": "0bc0f094dcb158f4bf16134c49267157a709fded40f6741aeeaab58e962504be"
5958
5960
  },
5959
5961
  "youtube": {
5960
5962
  "name": "youtube",
@@ -0,0 +1,2 @@
1
+ import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
+ import{z as o}from"./chunks/IVRB2YOK.mjs";import"./chunks/B2VTT7PF.mjs";export{o as worldNow};
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
- import{a as R}from"./SQSP35HM.mjs";import{b as v}from"./OYLYKZGD.mjs";var P=v(c=>{"use strict";var C=R();function D(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(){}var l={d:{f:g,r:function(){throw Error(D(522))},D:g,C:g,L:g,m:g,X:g,S:g,M:g},p:0,findDOMNode:null},k=Symbol.for("react.portal"),I=Symbol.for("react.recoverable"),b=Symbol.for("react.optimistic_key");function j(n,r,a){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:d==null?null:d===b?b:""+d,children:n,containerInfo:r,implementation:a}}var m=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function O(n,r){if(n==="font")return"";if(typeof r=="string")return r==="use-credentials"?r:""}c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l;c.browser=function(n){return{$$typeof:I,_reason:n}};c.createPortal=function(n,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)throw Error(D(299));return j(n,r,null,a)};c.flushSync=function(n){var r=m.T,a=l.p;try{if(m.T=null,l.p=2,n)return n()}finally{m.T=r,l.p=a,l.d.f()}};c.preconnect=function(n,r){typeof n=="string"&&(r?(r=r.crossOrigin,r=typeof r=="string"?r==="use-credentials"?r:"":void 0):r=null,l.d.C(n,r))};c.prefetchDNS=function(n){typeof n=="string"&&l.d.D(n)};c.preinit=function(n,r){if(typeof n=="string"&&r&&typeof r.as=="string"){var a=r.as,d=O(a,r.crossOrigin),u=typeof r.integrity=="string"?r.integrity:void 0,y=typeof r.fetchPriority=="string"?r.fetchPriority:void 0;a==="style"?l.d.S(n,typeof r.precedence=="string"?r.precedence:void 0,{crossOrigin:d,integrity:u,fetchPriority:y}):a==="script"&&l.d.X(n,{crossOrigin:d,integrity:u,fetchPriority:y,nonce:typeof r.nonce=="string"?r.nonce:void 0})}};c.preinitModule=function(n,r){if(typeof n=="string")if(typeof r=="object"&&r!==null){if(r.as==null||r.as==="script"){var a=O(r.as,r.crossOrigin);l.d.M(n,{crossOrigin:a,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0})}}else r==null&&l.d.M(n)};c.preload=function(n,r){if(typeof n=="string"&&typeof r=="object"&&r!==null&&typeof r.as=="string"){var a=r.as,d=O(a,r.crossOrigin);l.d.L(n,a,{crossOrigin:d,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,type:typeof r.type=="string"?r.type:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0,referrerPolicy:typeof r.referrerPolicy=="string"?r.referrerPolicy:void 0,imageSrcSet:typeof r.imageSrcSet=="string"?r.imageSrcSet:void 0,imageSizes:typeof r.imageSizes=="string"?r.imageSizes:void 0,media:typeof r.media=="string"?r.media:void 0})}};c.preloadModule=function(n,r){if(typeof n=="string")if(r){var a=O(r.as,r.crossOrigin);l.d.m(n,{as:typeof r.as=="string"&&r.as!=="script"?r.as:void 0,crossOrigin:a,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0})}else l.d.m(n)};c.requestFormReset=function(n){l.d.r(n)};c.unstable_batchedUpdates=function(n,r){return n(r)};c.useFormState=function(n,r,a){return m.H.useFormState(n,r,a)};c.useFormStatus=function(){return m.H.useHostTransitionStatus()};c.version="19.3.1"});var M=v(s=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(){}function r(t){return""+t}function a(t,e,i){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;if(o==null)o=null;else if(o===T)o=T;else{try{r(o);var p=!1}catch{p=!0}p&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object"),r(o)),o=""+o}return{$$typeof:N,key:o,children:t,containerInfo:e,implementation:i}}function d(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}function u(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":'something with type "'+typeof t+'"'}function y(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":typeof t=="string"?JSON.stringify(t):typeof t=="number"?"`"+t+"`":'something with type "'+typeof t+'"'}function E(){var t=_.H;return t===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
+ import{a as R}from"./RFZW5KCO.mjs";import{b as v}from"./B2VTT7PF.mjs";var P=v(c=>{"use strict";var C=R();function D(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(){}var l={d:{f:g,r:function(){throw Error(D(522))},D:g,C:g,L:g,m:g,X:g,S:g,M:g},p:0,findDOMNode:null},k=Symbol.for("react.portal"),I=Symbol.for("react.recoverable"),b=Symbol.for("react.optimistic_key");function j(n,r,a){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:d==null?null:d===b?b:""+d,children:n,containerInfo:r,implementation:a}}var m=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function O(n,r){if(n==="font")return"";if(typeof r=="string")return r==="use-credentials"?r:""}c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l;c.browser=function(n){return{$$typeof:I,_reason:n}};c.createPortal=function(n,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)throw Error(D(299));return j(n,r,null,a)};c.flushSync=function(n){var r=m.T,a=l.p;try{if(m.T=null,l.p=2,n)return n()}finally{m.T=r,l.p=a,l.d.f()}};c.preconnect=function(n,r){typeof n=="string"&&(r?(r=r.crossOrigin,r=typeof r=="string"?r==="use-credentials"?r:"":void 0):r=null,l.d.C(n,r))};c.prefetchDNS=function(n){typeof n=="string"&&l.d.D(n)};c.preinit=function(n,r){if(typeof n=="string"&&r&&typeof r.as=="string"){var a=r.as,d=O(a,r.crossOrigin),u=typeof r.integrity=="string"?r.integrity:void 0,y=typeof r.fetchPriority=="string"?r.fetchPriority:void 0;a==="style"?l.d.S(n,typeof r.precedence=="string"?r.precedence:void 0,{crossOrigin:d,integrity:u,fetchPriority:y}):a==="script"&&l.d.X(n,{crossOrigin:d,integrity:u,fetchPriority:y,nonce:typeof r.nonce=="string"?r.nonce:void 0})}};c.preinitModule=function(n,r){if(typeof n=="string")if(typeof r=="object"&&r!==null){if(r.as==null||r.as==="script"){var a=O(r.as,r.crossOrigin);l.d.M(n,{crossOrigin:a,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0})}}else r==null&&l.d.M(n)};c.preload=function(n,r){if(typeof n=="string"&&typeof r=="object"&&r!==null&&typeof r.as=="string"){var a=r.as,d=O(a,r.crossOrigin);l.d.L(n,a,{crossOrigin:d,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,type:typeof r.type=="string"?r.type:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0,referrerPolicy:typeof r.referrerPolicy=="string"?r.referrerPolicy:void 0,imageSrcSet:typeof r.imageSrcSet=="string"?r.imageSrcSet:void 0,imageSizes:typeof r.imageSizes=="string"?r.imageSizes:void 0,media:typeof r.media=="string"?r.media:void 0})}};c.preloadModule=function(n,r){if(typeof n=="string")if(r){var a=O(r.as,r.crossOrigin);l.d.m(n,{as:typeof r.as=="string"&&r.as!=="script"?r.as:void 0,crossOrigin:a,integrity:typeof r.integrity=="string"?r.integrity:void 0,nonce:typeof r.nonce=="string"?r.nonce:void 0,fetchPriority:typeof r.fetchPriority=="string"?r.fetchPriority:void 0})}else l.d.m(n)};c.requestFormReset=function(n){l.d.r(n)};c.unstable_batchedUpdates=function(n,r){return n(r)};c.useFormState=function(n,r,a){return m.H.useFormState(n,r,a)};c.useFormStatus=function(){return m.H.useHostTransitionStatus()};c.version="19.3.1"});var M=v(s=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function n(){}function r(t){return""+t}function a(t,e,i){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;if(o==null)o=null;else if(o===T)o=T;else{try{r(o);var p=!1}catch{p=!0}p&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object"),r(o)),o=""+o}return{$$typeof:N,key:o,children:t,containerInfo:e,implementation:i}}function d(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}function u(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":'something with type "'+typeof t+'"'}function y(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":typeof t=="string"?JSON.stringify(t):typeof t=="number"?"`"+t+"`":'something with type "'+typeof t+'"'}function E(){var t=_.H;return t===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
3
3
  1. You might have mismatching versions of React and the renderer (such as React DOM)
4
4
  2. You might be breaking the Rules of Hooks
5
5
  3. You might have more than one copy of React in the same app
@@ -0,0 +1,2 @@
1
+ import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
+ var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>{try{return b||a((b={exports:{}}).exports,b),b.exports}catch(c){throw b=0,c}},o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
- import{a as m,b as S,d as N}from"./OYLYKZGD.mjs";var T=S((br,He)=>{"use strict";var Ve=["nodebuffer","arraybuffer","fragments"],ze=typeof Blob<"u";ze&&Ve.push("blob");He.exports={BINARY_TYPES:Ve,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:ze,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Z=S((wr,W)=>{"use strict";var{websocketMask:Ye,websocketUnmask:Kt}=m("http"),{EMPTY_BUFFER:Xt}=T(),xe=Buffer[Symbol.species];function Zt(t,e){if(t.length===0)return Xt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new xe(s.buffer,s.byteOffset,r):s}function Se(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function Ee(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Qt(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function ve(t){if(ve.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new xe(t):ArrayBuffer.isView(t)?e=new xe(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),ve.readOnly=!1),e}W.exports={concat:Zt,mask:Se,toArrayBuffer:Qt,toBuffer:ve,unmask:Ee};if(Ye)W.exports.mask=function(t,e,s,r,i){i<24?Se(t,e,s,r,i):Ye(t,e,s,r,i)},W.exports.unmask=function(t,e){t.length<24?Ee(t,e):Kt(t,e)};else if(!process.env.WS_NO_BUFFER_UTIL)try{let t=m("bufferutil");W.exports.mask=function(e,s,r,i,n){n<48?Se(e,s,r,i,n):t.mask(e,s,r,i,n)},W.exports.unmask=function(e,s){e.length<32?Ee(e,s):t.unmask(e,s)}}catch{}});var Ze=S((Or,Xe)=>{"use strict";var Ke=Symbol("kDone"),be=Symbol("kRun"),we=class{constructor(e){this[Ke]=()=>{this.pending--,this[be]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[be]()}[be](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ke])}}};Xe.exports=we});var $=S((Tr,tt)=>{"use strict";var Q=m("zlib"),Qe=Z(),Jt=Ze(),{kStatusCode:Je}=T(),es=Buffer[Symbol.species],ts=Buffer.from([0,0,255,255]),ne=Symbol("permessage-deflate"),k=Symbol("total-length"),q=Symbol("callback"),P=Symbol("buffers"),G=Symbol("error"),ie,Oe=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ie){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ie=new Jt(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[q];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&(typeof i.client_max_window_bits=="number"?s.clientMaxWindowBits>i.client_max_window_bits:!i.client_max_window_bits)));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ie.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ie.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=Q.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ne]=this,this._inflate[k]=0,this._inflate[P]=[],this._inflate.on("error",rs),this._inflate.on("data",et)}this._inflate[q]=r,this._inflate.write(e),s&&this._inflate.write(ts),this._inflate.flush(()=>{let n=this._inflate[G];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Qe.concat(this._inflate[P],this._inflate[k]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[k]=0,this._inflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=Q.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[k]=0,this._deflate[P]=[],this._deflate.on("data",ss)}this._deflate[q]=r,this._deflate.write(e),this._deflate.flush(Q.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Qe.concat(this._deflate[P],this._deflate[k]);s&&(n=new es(n.buffer,n.byteOffset,n.length-4)),this._deflate[q]=null,this._deflate[k]=0,this._deflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};tt.exports=Oe;function ss(t){this[P].push(t),this[k]+=t.length}function et(t){if(this[k]+=t.length,this[ne]._maxPayload<1||this[k]<=this[ne]._maxPayload){this[P].push(t);return}this[G]=new RangeError("Max payload size exceeded"),this[G].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[G][Je]=1009,this.removeListener("data",et),this.reset()}function rs(t){if(this[ne]._inflate=null,this[G]){this[q](this[G]);return}t[Je]=1007,this[q](t)}});var j=S((kr,oe)=>{"use strict";var{isUtf8:st}=m("buffer"),{hasBlob:is}=T(),ns=[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,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function os(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Te(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function as(t){return is&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}oe.exports={isBlob:as,isValidStatusCode:os,isValidUTF8:Te,tokenChars:ns};if(st)oe.exports.isValidUTF8=function(t){return t.length<24?Te(t):st(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=m("utf-8-validate");oe.exports.isValidUTF8=function(e){return e.length<32?Te(e):t(e)}}catch{}});var Pe=S((Cr,lt)=>{"use strict";var{Writable:fs}=m("stream"),rt=$(),{BINARY_TYPES:ls,EMPTY_BUFFER:it,kStatusCode:hs,kWebSocket:cs}=T(),{concat:ke,toArrayBuffer:us,unmask:ds}=Z(),{isValidStatusCode:_s,isValidUTF8:nt}=j(),ae=Buffer[Symbol.species],v=0,ot=1,at=2,ft=3,Ce=4,Le=5,fe=6,Ne=class extends fs{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||ls[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[cs]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=v}_write(e,s,r){if(this._opcode===8&&this._state==v)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e),new ae(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case v:this.getInfo(e);break;case ot:this.getPayloadLength16(e);break;case at:this.getPayloadLength64(e);break;case ft:this.getMask();break;case Ce:this.getData(e);break;case Le:case fe:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[rt.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=ot:this._payloadLength===127?this._state=at:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=ft:this._state=Ce}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ce}getData(e){let s=it;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&ds(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}if(this._compressed){this._state=Le,this.decompress(s,e);return}s.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(s)),this.dataMessage(e)}decompress(e,s){this._extensions[rt.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===v&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=v;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=ke(r,s):this._binaryType==="arraybuffer"?i=us(ke(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=v):(this._state=fe,setImmediate(()=>{this.emit("message",i,!0),this._state=v,this.startLoop(e)}))}else{let i=ke(r,s);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Le||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=v):(this._state=fe,setImmediate(()=>{this.emit("message",i,!1),this._state=v,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,it),this.end();else{let r=e.readUInt16BE(0);if(!_s(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new ae(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=v;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=v):(this._state=fe,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=v,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[hs]=i,o}};lt.exports=Ne});var Ue=S((Nr,ut)=>{"use strict";var{Duplex:Lr}=m("stream"),{randomFillSync:ms}=m("crypto"),{types:{isUint8Array:ps}}=m("util"),ht=$(),{EMPTY_BUFFER:gs,kWebSocket:ys,NOOP:xs}=T(),{isBlob:V,isValidStatusCode:Ss}=j(),{mask:ct,toBuffer:R}=Z(),b=Symbol("kByteLength"),Es=Buffer.alloc(4),le=8*1024,U,z=le,w=0,vs=1,bs=2,Be=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=w,this.onerror=xs,this[ys]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||Es,s.generateMask?s.generateMask(r):(z===le&&(U===void 0&&(U=Buffer.alloc(le)),ms(U,0,le),z=0),r[0]=U[z++],r[1]=U[z++],r[2]=U[z++],r[3]=U[z++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[b]!==void 0?f=s[b]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],f?o?[a,e]:i?(ct(e,r,a,n,f),[a]):(ct(e,r,e,0,f),[a,e]):[a]):f?[a,e]:[a]}close(e,s,r,i){let n;if(e===void 0)n=gs;else{if(typeof e!="number"||!Ss(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");if(n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string")n.write(s,2);else if(ps(s))n.set(s,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[b]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==w?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};V(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};V(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ht.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):V(e)?(f=e.size,l=!1):(e=R(e),f=e.length,l=R.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[b]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};V(e)?this._state!==w?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==w?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[b],this._state=bs,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Re,this,f,i);return}this._bufferedBytes-=r[b];let o=R(n);s?this.dispatch(o,s,r,i):(this._state=w,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(ws,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[ht.extensionName];this._bufferedBytes+=r[b],this._state=vs,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Re(this,l,i);return}this._bufferedBytes-=r[b],this._state=w,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===w&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][b],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][b],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};ut.exports=Be;function Re(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function ws(t,e,s){Re(t,e,s),t.onerror(e)}});var Et=S((Pr,St)=>{"use strict";var{kForOnEventAttribute:J,kListener:Ie}=T(),dt=Symbol("kCode"),_t=Symbol("kData"),mt=Symbol("kError"),pt=Symbol("kMessage"),gt=Symbol("kReason"),H=Symbol("kTarget"),yt=Symbol("kType"),xt=Symbol("kWasClean"),C=class{constructor(e){this[H]=null,this[yt]=e}get target(){return this[H]}get type(){return this[yt]}};Object.defineProperty(C.prototype,"target",{enumerable:!0});Object.defineProperty(C.prototype,"type",{enumerable:!0});var I=class extends C{constructor(e,s={}){super(e),this[dt]=s.code===void 0?0:s.code,this[gt]=s.reason===void 0?"":s.reason,this[xt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[dt]}get reason(){return this[gt]}get wasClean(){return this[xt]}};Object.defineProperty(I.prototype,"code",{enumerable:!0});Object.defineProperty(I.prototype,"reason",{enumerable:!0});Object.defineProperty(I.prototype,"wasClean",{enumerable:!0});var Y=class extends C{constructor(e,s={}){super(e),this[mt]=s.error===void 0?null:s.error,this[pt]=s.message===void 0?"":s.message}get error(){return this[mt]}get message(){return this[pt]}};Object.defineProperty(Y.prototype,"error",{enumerable:!0});Object.defineProperty(Y.prototype,"message",{enumerable:!0});var ee=class extends C{constructor(e,s={}){super(e),this[_t]=s.data===void 0?null:s.data}get data(){return this[_t]}};Object.defineProperty(ee.prototype,"data",{enumerable:!0});var Os={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[J]&&i[Ie]===e&&!i[J])return;let r;if(t==="message")r=function(n,o){let f=new ee("message",{data:o?n:n.toString()});f[H]=this,he(e,this,f)};else if(t==="close")r=function(n,o){let f=new I("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[H]=this,he(e,this,f)};else if(t==="error")r=function(n){let o=new Y("error",{error:n,message:n.message});o[H]=this,he(e,this,o)};else if(t==="open")r=function(){let n=new C("open");n[H]=this,he(e,this,n)};else return;r[J]=!!s[J],r[Ie]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Ie]===e&&!s[J]){this.removeListener(t,s);break}}};St.exports={CloseEvent:I,ErrorEvent:Y,Event:C,EventTarget:Os,MessageEvent:ee};function he(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var ce=S((Br,vt)=>{"use strict";var{tokenChars:te}=j();function O(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function Ts(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(l,h);a===44?(O(e,g,s),s=Object.create(null)):o=g,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),O(s,t.slice(l,h),!0),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(te[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(te[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&te[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(l,h);r&&(g=g.replace(/\\/g,""),r=!1),O(s,f,g),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let _=t.slice(l,h);return o===void 0?O(e,_,s):(f===void 0?O(s,_,!0):r?O(s,f,_.replace(/\\/g,"")):O(s,f,_),O(e,o,s)),e}function ks(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}vt.exports={format:ks,parse:Ts}});var me=S((Ir,Ut)=>{"use strict";var Cs=m("events"),Ls=m("https"),Ns=m("http"),Ot=m("net"),Ps=m("tls"),{randomBytes:Bs,createHash:Rs}=m("crypto"),{Duplex:Rr,Readable:Ur}=m("stream"),{URL:De}=m("url"),B=$(),Us=Pe(),Is=Ue(),{isBlob:Ds}=j(),{BINARY_TYPES:bt,CLOSE_TIMEOUT:Ms,EMPTY_BUFFER:ue,GUID:As,kForOnEventAttribute:Me,kListener:Fs,kStatusCode:Ws,kWebSocket:y,NOOP:Tt}=T(),{EventTarget:{addEventListener:qs,removeEventListener:Gs}}=Et(),{format:$s,parse:js}=ce(),{toBuffer:Vs}=Z(),kt=Symbol("kAborted"),Ae=[8,13],L=["CONNECTING","OPEN","CLOSING","CLOSED"],zs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,d=class t extends Cs{constructor(e,s,r){super(),this._binaryType=bt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ue,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?!r||r.protocols===void 0?s=[]:Array.isArray(r.protocols)?s=r.protocols:s=[r.protocols]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,r.protocols===void 0?s=[]:Array.isArray(r.protocols)?s=r.protocols:s=[r.protocols]):s=[s]),Ct(this,e,s,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){bt.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Us({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Is(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[y]=this,n[y]=this,e[y]=this,i.on("conclude",Ks),i.on("drain",Xs),i.on("error",Zs),i.on("message",Qs),i.on("ping",Js),i.on("pong",er),n.onerror=tr,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Pt),e.on("data",_e),e.on("end",Bt),e.on("error",Rt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[B.extensionName]&&this._extensions[B.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._readyState=t.CLOSING,Nt(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||ue,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||ue,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[B.extensionName]||(i.compress=!1),this._sender.send(e||ue,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(d,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d.prototype,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d.prototype,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d.prototype,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});Object.defineProperty(d.prototype,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(d.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(d.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Me])return e[Fs];return null},set(e){for(let s of this.listeners(t))if(s[Me]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[Me]:!0})}})});d.prototype.addEventListener=qs;d.prototype.removeEventListener=Gs;Ut.exports=d;function Ct(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Ms,protocolVersion:Ae[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,protocols:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,t._closeTimeout=i.closeTimeout,!Ae.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Ae.join(", ")})`);let n;if(e instanceof De)n=e;else try{n=new De(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;de(t,u);return}let a=o?443:80,h=Bs(16).toString("base64"),c=o?Ls.request:Ns.request,_=new Set,g;if(i.createConnection=i.createConnection||(o?Ys:Hs),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(g=new B({...i.perMessageDeflate,isServer:!1,maxPayload:i.maxPayload}),i.headers["Sec-WebSocket-Extensions"]=$s({[B.extensionName]:g.offer()})),s.length){for(let u of s){if(typeof u!="string"||!zs.test(u)||_.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");_.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.indexOf(":");u===-1?(i.socketPath=i.path,i.path=""):(i.socketPath=i.path.slice(0,u),i.path=i.path.slice(u+1))}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[x,A]of Object.entries(u))r.headers[x.toLowerCase()]=A}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{E(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[kt]||(p=t._req=null,de(t,u))}),p.on("response",u=>{let x=u.headers.location,A=u.statusCode;if(x&&i.followRedirects&&A>=300&&A<400){if(++t._redirects>i.maxRedirects){E(t,p,"Maximum redirects exceeded");return}p.abort();let K;try{K=new De(x,e)}catch{let F=new SyntaxError(`Invalid URL: ${x}`);de(t,F);return}Ct(t,K,s,r)}else t.emit("unexpected-response",p,u)||E(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,x,A)=>{if(t.emit("upgrade",u),t.readyState!==d.CONNECTING)return;p=t._req=null;let K=u.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){E(t,x,"Invalid Upgrade header");return}let Ge=Rs("sha1").update(h+As).digest("base64");if(u.headers["sec-websocket-accept"]!==Ge){E(t,x,"Invalid Sec-WebSocket-Accept header");return}let F=u.headers["sec-websocket-protocol"],X;if(F!==void 0?_.size?_.has(F)||(X="Server sent an invalid subprotocol"):X="Server sent a subprotocol but none was requested":_.size&&(X="Server sent no subprotocol"),X){E(t,x,X);return}F&&(t._protocol=F);let $e=u.headers["sec-websocket-extensions"];if($e!==void 0){if(!g){E(t,x,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ge;try{ge=js($e)}catch{E(t,x,"Invalid Sec-WebSocket-Extensions header");return}let je=Object.keys(ge);if(je.length!==1||je[0]!==B.extensionName){E(t,x,"Server indicated an extension that was not requested");return}try{g.accept(ge[B.extensionName])}catch{E(t,x,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[B.extensionName]=g}t.setSocket(x,A,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function de(t,e){t._readyState=d.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Hs(t){return t.path=t.socketPath,Ot.connect(t)}function Ys(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=Ot.isIP(t.host)?"":t.host),Ps.connect(t)}function E(t,e,s){t._readyState=d.CLOSING;let r=new Error(s);Error.captureStackTrace(r,E),e.setHeader?(e[kt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(de,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Fe(t,e,s){if(e){let r=Ds(e)?e.size:Vs(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${L[t.readyState]})`);process.nextTick(s,r)}}function Ks(t,e){let s=this[y];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[y]!==void 0&&(s._socket.removeListener("data",_e),process.nextTick(Lt,s._socket),t===1005?s.close():s.close(t,e))}function Xs(){let t=this[y];t.isPaused||t._socket.resume()}function Zs(t){let e=this[y];e._socket[y]!==void 0&&(e._socket.removeListener("data",_e),process.nextTick(Lt,e._socket),e.close(t[Ws])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function wt(){this[y].emitClose()}function Qs(t,e){this[y].emit("message",t,e)}function Js(t){let e=this[y];e._autoPong&&e.pong(t,!this._isServer,Tt),e.emit("ping",t)}function er(t){this[y].emit("pong",t)}function Lt(t){t.resume()}function tr(t){let e=this[y];e.readyState!==d.CLOSED&&(e.readyState===d.OPEN&&(e._readyState=d.CLOSING,Nt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Nt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Pt(){let t=this[y];if(this.removeListener("close",Pt),this.removeListener("data",_e),this.removeListener("end",Bt),t._readyState=d.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[y]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",wt),t._receiver.on("finish",wt))}function _e(t){this[y]._receiver.write(t)||this.pause()}function Bt(){let t=this[y];t._readyState=d.CLOSING,t._receiver.end(),this.end()}function Rt(){let t=this[y];this.removeListener("error",Rt),this.on("error",Tt),t&&(t._readyState=d.CLOSING,this.destroy())}});var At=S((Mr,Mt)=>{"use strict";var Dr=me(),{Duplex:sr}=m("stream");function It(t){t.emit("close")}function rr(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Dt(t){this.removeListener("error",Dt),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function ir(t,e){let s=!0,r=new sr({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(It,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick(It,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",rr),r.on("error",Dt),r}Mt.exports=ir});var We=S((Ar,Ft)=>{"use strict";var{tokenChars:nr}=j();function or(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&nr[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}Ft.exports={parse:or}});var zt=S((Wr,Vt)=>{"use strict";var ar=m("events"),pe=m("http"),{Duplex:Fr}=m("stream"),{createHash:fr}=m("crypto"),Wt=ce(),D=$(),lr=We(),hr=me(),{CLOSE_TIMEOUT:cr,GUID:ur,kWebSocket:dr}=T(),_r=/^[+/0-9A-Za-z]{22}==$/,qt=0,Gt=1,jt=2,qe=class extends ar{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:cr,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:hr,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=pe.createServer((r,i)=>{let n=pe.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=mr(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=qt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(se,this);return}if(e&&this.once("close",e),this._state!==Gt)if(this._state=Gt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(se,this):process.nextTick(se,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{se(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",$t);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){M(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){M(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!_r.test(n)){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==13&&f!==8){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){re(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=lr.parse(l)}catch{M(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let _=new D({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let g=Wt.parse(h);g[D.extensionName]&&(_.accept(g[D.extensionName]),c[D.extensionName]=_)}catch{M(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let _={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(_,(g,p,u,x)=>{if(!g)return re(s,p||401,u,x);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(_))return re(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[dr])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>qt)return re(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${fr("sha1").update(s+ur).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[D.extensionName]){let c=e[D.extensionName].params,_=Wt.format({[D.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${_}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
2
+ import{a as m,b as S,d as N}from"./B2VTT7PF.mjs";var T=S((br,He)=>{"use strict";var Ve=["nodebuffer","arraybuffer","fragments"],ze=typeof Blob<"u";ze&&Ve.push("blob");He.exports={BINARY_TYPES:Ve,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:ze,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Z=S((wr,W)=>{"use strict";var{websocketMask:Ye,websocketUnmask:Kt}=m("http"),{EMPTY_BUFFER:Xt}=T(),xe=Buffer[Symbol.species];function Zt(t,e){if(t.length===0)return Xt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new xe(s.buffer,s.byteOffset,r):s}function Se(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function Ee(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Qt(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function ve(t){if(ve.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new xe(t):ArrayBuffer.isView(t)?e=new xe(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),ve.readOnly=!1),e}W.exports={concat:Zt,mask:Se,toArrayBuffer:Qt,toBuffer:ve,unmask:Ee};if(Ye)W.exports.mask=function(t,e,s,r,i){i<24?Se(t,e,s,r,i):Ye(t,e,s,r,i)},W.exports.unmask=function(t,e){t.length<24?Ee(t,e):Kt(t,e)};else if(!process.env.WS_NO_BUFFER_UTIL)try{let t=m("bufferutil");W.exports.mask=function(e,s,r,i,n){n<48?Se(e,s,r,i,n):t.mask(e,s,r,i,n)},W.exports.unmask=function(e,s){e.length<32?Ee(e,s):t.unmask(e,s)}}catch{}});var Ze=S((Or,Xe)=>{"use strict";var Ke=Symbol("kDone"),be=Symbol("kRun"),we=class{constructor(e){this[Ke]=()=>{this.pending--,this[be]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[be]()}[be](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ke])}}};Xe.exports=we});var $=S((Tr,tt)=>{"use strict";var Q=m("zlib"),Qe=Z(),Jt=Ze(),{kStatusCode:Je}=T(),es=Buffer[Symbol.species],ts=Buffer.from([0,0,255,255]),ne=Symbol("permessage-deflate"),k=Symbol("total-length"),q=Symbol("callback"),P=Symbol("buffers"),G=Symbol("error"),ie,Oe=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ie){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ie=new Jt(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[q];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&(typeof i.client_max_window_bits=="number"?s.clientMaxWindowBits>i.client_max_window_bits:!i.client_max_window_bits)));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ie.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ie.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=Q.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ne]=this,this._inflate[k]=0,this._inflate[P]=[],this._inflate.on("error",rs),this._inflate.on("data",et)}this._inflate[q]=r,this._inflate.write(e),s&&this._inflate.write(ts),this._inflate.flush(()=>{let n=this._inflate[G];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Qe.concat(this._inflate[P],this._inflate[k]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[k]=0,this._inflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=Q.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[k]=0,this._deflate[P]=[],this._deflate.on("data",ss)}this._deflate[q]=r,this._deflate.write(e),this._deflate.flush(Q.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Qe.concat(this._deflate[P],this._deflate[k]);s&&(n=new es(n.buffer,n.byteOffset,n.length-4)),this._deflate[q]=null,this._deflate[k]=0,this._deflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};tt.exports=Oe;function ss(t){this[P].push(t),this[k]+=t.length}function et(t){if(this[k]+=t.length,this[ne]._maxPayload<1||this[k]<=this[ne]._maxPayload){this[P].push(t);return}this[G]=new RangeError("Max payload size exceeded"),this[G].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[G][Je]=1009,this.removeListener("data",et),this.reset()}function rs(t){if(this[ne]._inflate=null,this[G]){this[q](this[G]);return}t[Je]=1007,this[q](t)}});var j=S((kr,oe)=>{"use strict";var{isUtf8:st}=m("buffer"),{hasBlob:is}=T(),ns=[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,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function os(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Te(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function as(t){return is&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}oe.exports={isBlob:as,isValidStatusCode:os,isValidUTF8:Te,tokenChars:ns};if(st)oe.exports.isValidUTF8=function(t){return t.length<24?Te(t):st(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=m("utf-8-validate");oe.exports.isValidUTF8=function(e){return e.length<32?Te(e):t(e)}}catch{}});var Pe=S((Cr,lt)=>{"use strict";var{Writable:fs}=m("stream"),rt=$(),{BINARY_TYPES:ls,EMPTY_BUFFER:it,kStatusCode:hs,kWebSocket:cs}=T(),{concat:ke,toArrayBuffer:us,unmask:ds}=Z(),{isValidStatusCode:_s,isValidUTF8:nt}=j(),ae=Buffer[Symbol.species],v=0,ot=1,at=2,ft=3,Ce=4,Le=5,fe=6,Ne=class extends fs{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||ls[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[cs]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=v}_write(e,s,r){if(this._opcode===8&&this._state==v)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e),new ae(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case v:this.getInfo(e);break;case ot:this.getPayloadLength16(e);break;case at:this.getPayloadLength64(e);break;case ft:this.getMask();break;case Ce:this.getData(e);break;case Le:case fe:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[rt.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=ot:this._payloadLength===127?this._state=at:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=ft:this._state=Ce}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ce}getData(e){let s=it;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&ds(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}if(this._compressed){this._state=Le,this.decompress(s,e);return}s.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(s)),this.dataMessage(e)}decompress(e,s){this._extensions[rt.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===v&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=v;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=ke(r,s):this._binaryType==="arraybuffer"?i=us(ke(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=v):(this._state=fe,setImmediate(()=>{this.emit("message",i,!0),this._state=v,this.startLoop(e)}))}else{let i=ke(r,s);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Le||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=v):(this._state=fe,setImmediate(()=>{this.emit("message",i,!1),this._state=v,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,it),this.end();else{let r=e.readUInt16BE(0);if(!_s(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new ae(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=v;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=v):(this._state=fe,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=v,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[hs]=i,o}};lt.exports=Ne});var Ue=S((Nr,ut)=>{"use strict";var{Duplex:Lr}=m("stream"),{randomFillSync:ms}=m("crypto"),{types:{isUint8Array:ps}}=m("util"),ht=$(),{EMPTY_BUFFER:gs,kWebSocket:ys,NOOP:xs}=T(),{isBlob:V,isValidStatusCode:Ss}=j(),{mask:ct,toBuffer:R}=Z(),b=Symbol("kByteLength"),Es=Buffer.alloc(4),le=8*1024,U,z=le,w=0,vs=1,bs=2,Be=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=w,this.onerror=xs,this[ys]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||Es,s.generateMask?s.generateMask(r):(z===le&&(U===void 0&&(U=Buffer.alloc(le)),ms(U,0,le),z=0),r[0]=U[z++],r[1]=U[z++],r[2]=U[z++],r[3]=U[z++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[b]!==void 0?f=s[b]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],f?o?[a,e]:i?(ct(e,r,a,n,f),[a]):(ct(e,r,e,0,f),[a,e]):[a]):f?[a,e]:[a]}close(e,s,r,i){let n;if(e===void 0)n=gs;else{if(typeof e!="number"||!Ss(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");if(n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string")n.write(s,2);else if(ps(s))n.set(s,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[b]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==w?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};V(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};V(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ht.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):V(e)?(f=e.size,l=!1):(e=R(e),f=e.length,l=R.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[b]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};V(e)?this._state!==w?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==w?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[b],this._state=bs,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Re,this,f,i);return}this._bufferedBytes-=r[b];let o=R(n);s?this.dispatch(o,s,r,i):(this._state=w,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(ws,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[ht.extensionName];this._bufferedBytes+=r[b],this._state=vs,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Re(this,l,i);return}this._bufferedBytes-=r[b],this._state=w,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===w&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][b],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][b],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};ut.exports=Be;function Re(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function ws(t,e,s){Re(t,e,s),t.onerror(e)}});var Et=S((Pr,St)=>{"use strict";var{kForOnEventAttribute:J,kListener:Ie}=T(),dt=Symbol("kCode"),_t=Symbol("kData"),mt=Symbol("kError"),pt=Symbol("kMessage"),gt=Symbol("kReason"),H=Symbol("kTarget"),yt=Symbol("kType"),xt=Symbol("kWasClean"),C=class{constructor(e){this[H]=null,this[yt]=e}get target(){return this[H]}get type(){return this[yt]}};Object.defineProperty(C.prototype,"target",{enumerable:!0});Object.defineProperty(C.prototype,"type",{enumerable:!0});var I=class extends C{constructor(e,s={}){super(e),this[dt]=s.code===void 0?0:s.code,this[gt]=s.reason===void 0?"":s.reason,this[xt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[dt]}get reason(){return this[gt]}get wasClean(){return this[xt]}};Object.defineProperty(I.prototype,"code",{enumerable:!0});Object.defineProperty(I.prototype,"reason",{enumerable:!0});Object.defineProperty(I.prototype,"wasClean",{enumerable:!0});var Y=class extends C{constructor(e,s={}){super(e),this[mt]=s.error===void 0?null:s.error,this[pt]=s.message===void 0?"":s.message}get error(){return this[mt]}get message(){return this[pt]}};Object.defineProperty(Y.prototype,"error",{enumerable:!0});Object.defineProperty(Y.prototype,"message",{enumerable:!0});var ee=class extends C{constructor(e,s={}){super(e),this[_t]=s.data===void 0?null:s.data}get data(){return this[_t]}};Object.defineProperty(ee.prototype,"data",{enumerable:!0});var Os={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[J]&&i[Ie]===e&&!i[J])return;let r;if(t==="message")r=function(n,o){let f=new ee("message",{data:o?n:n.toString()});f[H]=this,he(e,this,f)};else if(t==="close")r=function(n,o){let f=new I("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[H]=this,he(e,this,f)};else if(t==="error")r=function(n){let o=new Y("error",{error:n,message:n.message});o[H]=this,he(e,this,o)};else if(t==="open")r=function(){let n=new C("open");n[H]=this,he(e,this,n)};else return;r[J]=!!s[J],r[Ie]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Ie]===e&&!s[J]){this.removeListener(t,s);break}}};St.exports={CloseEvent:I,ErrorEvent:Y,Event:C,EventTarget:Os,MessageEvent:ee};function he(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var ce=S((Br,vt)=>{"use strict";var{tokenChars:te}=j();function O(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function Ts(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(l,h);a===44?(O(e,g,s),s=Object.create(null)):o=g,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),O(s,t.slice(l,h),!0),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(te[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(te[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&te[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(l,h);r&&(g=g.replace(/\\/g,""),r=!1),O(s,f,g),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let _=t.slice(l,h);return o===void 0?O(e,_,s):(f===void 0?O(s,_,!0):r?O(s,f,_.replace(/\\/g,"")):O(s,f,_),O(e,o,s)),e}function ks(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}vt.exports={format:ks,parse:Ts}});var me=S((Ir,Ut)=>{"use strict";var Cs=m("events"),Ls=m("https"),Ns=m("http"),Ot=m("net"),Ps=m("tls"),{randomBytes:Bs,createHash:Rs}=m("crypto"),{Duplex:Rr,Readable:Ur}=m("stream"),{URL:De}=m("url"),B=$(),Us=Pe(),Is=Ue(),{isBlob:Ds}=j(),{BINARY_TYPES:bt,CLOSE_TIMEOUT:Ms,EMPTY_BUFFER:ue,GUID:As,kForOnEventAttribute:Me,kListener:Fs,kStatusCode:Ws,kWebSocket:y,NOOP:Tt}=T(),{EventTarget:{addEventListener:qs,removeEventListener:Gs}}=Et(),{format:$s,parse:js}=ce(),{toBuffer:Vs}=Z(),kt=Symbol("kAborted"),Ae=[8,13],L=["CONNECTING","OPEN","CLOSING","CLOSED"],zs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,d=class t extends Cs{constructor(e,s,r){super(),this._binaryType=bt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ue,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?!r||r.protocols===void 0?s=[]:Array.isArray(r.protocols)?s=r.protocols:s=[r.protocols]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,r.protocols===void 0?s=[]:Array.isArray(r.protocols)?s=r.protocols:s=[r.protocols]):s=[s]),Ct(this,e,s,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){bt.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Us({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Is(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[y]=this,n[y]=this,e[y]=this,i.on("conclude",Ks),i.on("drain",Xs),i.on("error",Zs),i.on("message",Qs),i.on("ping",Js),i.on("pong",er),n.onerror=tr,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Pt),e.on("data",_e),e.on("end",Bt),e.on("error",Rt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[B.extensionName]&&this._extensions[B.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._readyState=t.CLOSING,Nt(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||ue,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||ue,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[B.extensionName]||(i.compress=!1),this._sender.send(e||ue,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(d,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d.prototype,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d.prototype,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d.prototype,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});Object.defineProperty(d.prototype,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(d.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(d.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Me])return e[Fs];return null},set(e){for(let s of this.listeners(t))if(s[Me]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[Me]:!0})}})});d.prototype.addEventListener=qs;d.prototype.removeEventListener=Gs;Ut.exports=d;function Ct(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Ms,protocolVersion:Ae[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,protocols:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,t._closeTimeout=i.closeTimeout,!Ae.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Ae.join(", ")})`);let n;if(e instanceof De)n=e;else try{n=new De(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;de(t,u);return}let a=o?443:80,h=Bs(16).toString("base64"),c=o?Ls.request:Ns.request,_=new Set,g;if(i.createConnection=i.createConnection||(o?Ys:Hs),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(g=new B({...i.perMessageDeflate,isServer:!1,maxPayload:i.maxPayload}),i.headers["Sec-WebSocket-Extensions"]=$s({[B.extensionName]:g.offer()})),s.length){for(let u of s){if(typeof u!="string"||!zs.test(u)||_.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");_.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.indexOf(":");u===-1?(i.socketPath=i.path,i.path=""):(i.socketPath=i.path.slice(0,u),i.path=i.path.slice(u+1))}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[x,A]of Object.entries(u))r.headers[x.toLowerCase()]=A}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{E(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[kt]||(p=t._req=null,de(t,u))}),p.on("response",u=>{let x=u.headers.location,A=u.statusCode;if(x&&i.followRedirects&&A>=300&&A<400){if(++t._redirects>i.maxRedirects){E(t,p,"Maximum redirects exceeded");return}p.abort();let K;try{K=new De(x,e)}catch{let F=new SyntaxError(`Invalid URL: ${x}`);de(t,F);return}Ct(t,K,s,r)}else t.emit("unexpected-response",p,u)||E(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,x,A)=>{if(t.emit("upgrade",u),t.readyState!==d.CONNECTING)return;p=t._req=null;let K=u.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){E(t,x,"Invalid Upgrade header");return}let Ge=Rs("sha1").update(h+As).digest("base64");if(u.headers["sec-websocket-accept"]!==Ge){E(t,x,"Invalid Sec-WebSocket-Accept header");return}let F=u.headers["sec-websocket-protocol"],X;if(F!==void 0?_.size?_.has(F)||(X="Server sent an invalid subprotocol"):X="Server sent a subprotocol but none was requested":_.size&&(X="Server sent no subprotocol"),X){E(t,x,X);return}F&&(t._protocol=F);let $e=u.headers["sec-websocket-extensions"];if($e!==void 0){if(!g){E(t,x,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ge;try{ge=js($e)}catch{E(t,x,"Invalid Sec-WebSocket-Extensions header");return}let je=Object.keys(ge);if(je.length!==1||je[0]!==B.extensionName){E(t,x,"Server indicated an extension that was not requested");return}try{g.accept(ge[B.extensionName])}catch{E(t,x,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[B.extensionName]=g}t.setSocket(x,A,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function de(t,e){t._readyState=d.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Hs(t){return t.path=t.socketPath,Ot.connect(t)}function Ys(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=Ot.isIP(t.host)?"":t.host),Ps.connect(t)}function E(t,e,s){t._readyState=d.CLOSING;let r=new Error(s);Error.captureStackTrace(r,E),e.setHeader?(e[kt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(de,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Fe(t,e,s){if(e){let r=Ds(e)?e.size:Vs(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${L[t.readyState]})`);process.nextTick(s,r)}}function Ks(t,e){let s=this[y];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[y]!==void 0&&(s._socket.removeListener("data",_e),process.nextTick(Lt,s._socket),t===1005?s.close():s.close(t,e))}function Xs(){let t=this[y];t.isPaused||t._socket.resume()}function Zs(t){let e=this[y];e._socket[y]!==void 0&&(e._socket.removeListener("data",_e),process.nextTick(Lt,e._socket),e.close(t[Ws])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function wt(){this[y].emitClose()}function Qs(t,e){this[y].emit("message",t,e)}function Js(t){let e=this[y];e._autoPong&&e.pong(t,!this._isServer,Tt),e.emit("ping",t)}function er(t){this[y].emit("pong",t)}function Lt(t){t.resume()}function tr(t){let e=this[y];e.readyState!==d.CLOSED&&(e.readyState===d.OPEN&&(e._readyState=d.CLOSING,Nt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Nt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Pt(){let t=this[y];if(this.removeListener("close",Pt),this.removeListener("data",_e),this.removeListener("end",Bt),t._readyState=d.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[y]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",wt),t._receiver.on("finish",wt))}function _e(t){this[y]._receiver.write(t)||this.pause()}function Bt(){let t=this[y];t._readyState=d.CLOSING,t._receiver.end(),this.end()}function Rt(){let t=this[y];this.removeListener("error",Rt),this.on("error",Tt),t&&(t._readyState=d.CLOSING,this.destroy())}});var At=S((Mr,Mt)=>{"use strict";var Dr=me(),{Duplex:sr}=m("stream");function It(t){t.emit("close")}function rr(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Dt(t){this.removeListener("error",Dt),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function ir(t,e){let s=!0,r=new sr({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(It,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick(It,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",rr),r.on("error",Dt),r}Mt.exports=ir});var We=S((Ar,Ft)=>{"use strict";var{tokenChars:nr}=j();function or(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&nr[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}Ft.exports={parse:or}});var zt=S((Wr,Vt)=>{"use strict";var ar=m("events"),pe=m("http"),{Duplex:Fr}=m("stream"),{createHash:fr}=m("crypto"),Wt=ce(),D=$(),lr=We(),hr=me(),{CLOSE_TIMEOUT:cr,GUID:ur,kWebSocket:dr}=T(),_r=/^[+/0-9A-Za-z]{22}==$/,qt=0,Gt=1,jt=2,qe=class extends ar{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:cr,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:hr,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=pe.createServer((r,i)=>{let n=pe.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=mr(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=qt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(se,this);return}if(e&&this.once("close",e),this._state!==Gt)if(this._state=Gt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(se,this):process.nextTick(se,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{se(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",$t);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){M(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){M(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!_r.test(n)){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==13&&f!==8){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){re(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=lr.parse(l)}catch{M(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let _=new D({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let g=Wt.parse(h);g[D.extensionName]&&(_.accept(g[D.extensionName]),c[D.extensionName]=_)}catch{M(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let _={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(_,(g,p,u,x)=>{if(!g)return re(s,p||401,u,x);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(_))return re(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[dr])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>qt)return re(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${fr("sha1").update(s+ur).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[D.extensionName]){let c=e[D.extensionName].params,_=Wt.format({[D.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${_}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
3
3
  `).join(`\r
4
4
  `)),n.removeListener("error",$t),h.setSocket(n,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(h),h.on("close",()=>{this.clients.delete(h),this._shouldEmitClose&&!this.clients.size&&process.nextTick(se,this)})),f(h,i)}};Vt.exports=qe;function mr(t,e){for(let s of Object.keys(e))t.on(s,e[s]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function se(t){t._state=jt,t.emit("close")}function $t(){this.destroy()}function re(t,e,s,r){s=s||pe.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${pe.STATUS_CODES[e]}\r
5
5
  `+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
@@ -0,0 +1,8 @@
1
+ import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
+ import{b as re,d as ne}from"./B2VTT7PF.mjs";var ee=re((Ke,P)=>{"use strict";function Ee(r){let e=String(r??"").trim(),t=/^(\S+)\s+from\s+(\S+)$/.exec(e);if(t){let n=Date.parse(t[1]),o=Date.parse(t[2]);if(!Number.isNaN(n)&&!Number.isNaN(o))return{kind:"running",at:n,since:o}}else{let n=Date.parse(e);if(!Number.isNaN(n))return{kind:"frozen",at:n}}throw new Error(`world clock: expected an ISO-8601 instant, or "<instant> from <instant>", got ${JSON.stringify(e.slice(0,60))}`)}function Ne(r,e){return r.kind==="running"?r.at+(e-r.since):r.at}function Ae(r){return r.kind==="running"?`${new Date(r.at).toISOString()} from ${new Date(r.since).toISOString()}`:new Date(r.at).toISOString()}P.exports={parseClock:Ee,clockNowMs:Ne,formatClock:Ae}});import{AsyncLocalStorage as oe}from"node:async_hooks";var z="traceparent",se=/^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/,ie="0".repeat(32),C="0".repeat(16);function F(r){if(typeof r!="string")return null;let e=se.exec(r.trim());if(!e)return null;let[,t,n,o,s]=e;return t==="ff"||n===ie||o===C?null:{version:t,traceId:n,parentId:o,flags:s}}function ce(r){let e=F(r);return e?`${e.version}-${e.traceId}-${e.parentId}-${e.flags}`:void 0}var j,ae=()=>j??=new oe;function E(r,e){let t=ce(r);return t?ae().run(t,e):e()}function ue(){return j?.getStore()}function be(r,e){return E(r.headers.get(z)??void 0,e)}function Te(){let r=new Uint8Array(16),e="";do globalThis.crypto.getRandomValues(r),e=Array.from(r,t=>t.toString(16).padStart(2,"0")).join("");while(/^0+$/.test(e));return`00-${e}-${q()}-01`}function q(){let r=new Uint8Array(8);for(;;){globalThis.crypto.getRandomValues(r);let e=Array.from(r,t=>t.toString(16).padStart(2,"0")).join("");if(e!==C)return e}}function N(r){let e=r===void 0?ue():typeof r=="string"?r:r?.traceparent,t=F(e);return t?`00-${t.traceId}-${q()}-${t.flags}`:void 0}function Re(r){let e=N(r);return e?{[z]:e}:{}}import{AsyncLocalStorage as le}from"node:async_hooks";var V="x-volter-read-only";function Ie(r){return r.headers.get(V)?.trim()==="1"}var h=class extends Error{service;constructor(e){super(`${e}: this request is read-only (${V}: 1); it cannot write`),this.service=e,this.name="ReadOnlyRequestError"}},w,A=()=>w??=new le;async function ke(r){let e={readOnly:!0,vendorMove:!1,refusals:[]};try{let t=await A().run(e,r),n=e.refusals[0];return n?{refused:n}:{value:t,refused:void 0}}catch(t){let n=e.refusals[0]??(t instanceof h?t:void 0);if(n)return{refused:n};throw t}}function _e(r){let e=A().getStore(),t=N(),n=t?()=>E(t,r):r;return e?A().run({...e,vendorMove:!0},n):n()}function ze(){return w?.getStore()?.vendorMove===!0}function fe(){let r=w?.getStore();return r!==void 0&&r.readOnly&&!r.vendorMove}function a(r){if(!fe())return;let e=new h(r);throw w.getStore().refusals.push(e),e}import{appendFileSync as de,chmodSync as U,closeSync as S,existsSync as p,fsyncSync as pe,fstatSync as B,lstatSync as H,mkdirSync as y,openSync as g,readdirSync as ye,readSync as me,realpathSync as he,readFileSync as O,renameSync as J,rmSync as K,statSync as G,unlinkSync as D,writeFileSync as m}from"node:fs";import{hostname as b}from"node:os";import{basename as we,dirname as f,join as Se,resolve as ge}from"node:path";var ve=0,xe=6e4;function T(r){try{return JSON.parse(O(r,"utf8"))}catch{return null}}function $e(r){try{return process.kill(r,0),!0}catch(e){return e.code==="EPERM"}}function X(r,e=!1){let t=T(r);if(t&&t.hostname===b()&&Number.isInteger(t.pid)&&!$e(t.pid))return!0;if(e)return!1;let o=t&&typeof t.at=="string"?Date.parse(t.at):NaN;if(!Number.isFinite(o))try{o=G(r).mtimeMs}catch{return!1}return Date.now()-o>xe}function Z(r){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,r)}var R=class{read(e){return p(e)?O(e,"utf8"):null}readLines(e){return p(e)?O(e,"utf8").split(`
3
+ `):[]}readRange(e,t){let n;try{n=g(e,"r")}catch(o){if(o.code==="ENOENT")return null;throw o}try{let o=B(n).size;if(t>=o)return"";let s=Buffer.allocUnsafe(o-t),c=0;for(;c<s.length;){let u=me(n,s,c,s.length-c,t+c);if(u===0)break;c+=u}return s.toString("utf8",0,c)}finally{S(n)}}append(e,t){a("the World");let n=g(e,"a");try{de(n,t),process.env.VOLTER_DURABLE==="1"&&pe(n)}finally{S(n)}}write(e,t,n={}){if(a("the World"),!n.secret){y(f(e),{recursive:!0}),m(e,t);return}y(f(e),{recursive:!0,mode:448}),m(e,t,{mode:384}),U(e,384)}writeAtomic(e,t,n={}){a("the World"),y(f(e),{recursive:!0});let o=`${e}.${process.pid}.${Date.now()}.${ve++}.tmp`;try{m(o,t,n.secret?{mode:384}:void 0),J(o,e),n.secret&&U(e,384)}finally{K(o,{force:!0})}}exists(e){return p(e)}remove(e){a("the World"),K(e,{recursive:!0,force:!0})}mkdir(e){y(e,{recursive:!0})}list(e){return p(e)?ye(e):[]}canonicalPath(e){let t=ge(e);try{return he(t)}catch(n){if(n.code!=="ENOENT"||f(t)===t)throw n;return Se(this.canonicalPath(f(t)),we(t))}}stat(e){if(!p(e))return null;let t=G(e);return{size:t.size,mtimeMs:t.mtimeMs,isDirectory:t.isDirectory(),...H(e).isSymbolicLink()?{isSymbolicLink:!0}:{}}}withLock(e,t,n={}){y(f(e),{recursive:!0});let o=Date.now(),s=null;for(;s===null;)try{s=g(e,"wx")}catch(u){if(u.code!=="EEXIST")throw u;if(X(e,n.retainLiveOwner)){let i=`${e}.recovery`,l;try{l=g(i,"wx")}catch(d){if(d.code!=="EEXIST")throw d;if(Date.now()-o>1e4)throw new Error(`Lock recovery is active or interrupted: ${i}. Inspect its owner before removing the recovery record.`);Z(25);continue}try{if(m(l,JSON.stringify({pid:process.pid,hostname:b()})),X(e,n.retainLiveOwner)){let d=T(e),k=`${e}.stale.${process.pid}.${Date.now()}`;try{J(e,k),console.warn(`[world] reclaiming stale storage lock ${e} (held by pid ${d?.pid??"?"} on ${d?.hostname??"?"})`),D(k)}catch(_){if(_.code!=="ENOENT")throw _}}}finally{S(l),D(i)}continue}if(Date.now()-o>1e4){let i=T(e),l=i&&typeof i.at=="string"?Date.parse(i.at):NaN;throw new Error(`Timed out waiting for world storage lock: ${e}${i?` (held by pid ${i.pid} on ${i.hostname}${Number.isFinite(l)?` for ${Date.now()-l}ms`:""})`:""}`)}Z(25)}try{m(s,`${JSON.stringify({pid:process.pid,hostname:b(),at:new Date().toISOString()})}
4
+ `)}catch{}let c=Date.now();try{return t()}finally{let u=Date.now()-c;u>2e3&&console.warn(`[world] held storage lock ${e} for ${u}ms (pid ${process.pid})
5
+ ${new Error().stack?.split(`
6
+ `).slice(2,8).join(`
7
+ `)??""}`);let $=B(s);S(s);try{let i=H(e);$.dev===i.dev&&$.ino===i.ino&&D(e)}catch{}}}},Q=0,v=r=>new TextEncoder().encode(r).length,Y=class{files=new Map;versions=new Map;sizes=new Map;lastMutation=0;mutationStamp(){return this.lastMutation}changedSince(e){let t=[];for(let[n,o]of this.versions)o>e&&this.files.has(n)&&t.push(n);return t.sort()}bump(e){this.lastMutation=Q+=1,this.versions.set(e,this.lastMutation)}read(e){return this.files.has(e)?this.files.get(e):null}readLines(e){let t=this.files.get(e);return t===void 0?[]:t.split(`
8
+ `)}append(e,t){a("the World"),this.files.set(e,(this.files.get(e)??"")+t),this.sizes.set(e,(this.sizes.get(e)??0)+v(t)),this.bump(e)}write(e,t){a("the World"),this.files.set(e,t),this.sizes.set(e,v(t)),this.bump(e)}writeAtomic(e,t){a("the World"),this.files.set(e,t),this.sizes.set(e,v(t)),this.bump(e)}exists(e){if(this.files.has(e))return!0;let t=e.endsWith("/")?e:`${e}/`;for(let n of this.files.keys())if(n.startsWith(t))return!0;return!1}remove(e){a("the World");let t=!1;this.files.delete(e)&&(this.versions.delete(e),this.sizes.delete(e),t=!0);let n=e.endsWith("/")?e:`${e}/`;for(let o of[...this.files.keys()])o.startsWith(n)&&(this.files.delete(o),this.versions.delete(o),this.sizes.delete(o),t=!0);t&&(this.lastMutation=Q+=1)}mkdir(e){}list(e){let t=e.endsWith("/")?e:`${e}/`,n=new Set;for(let o of this.files.keys()){if(!o.startsWith(t))continue;let s=o.slice(t.length),c=s.indexOf("/");n.add(c===-1?s:s.slice(0,c))}return[...n]}stat(e){let t=this.files.get(e);return t!==void 0?{size:this.sizes.get(e)??v(t),mtimeMs:this.versions.get(e)??0,isDirectory:!1}:this.exists(e)?{size:0,mtimeMs:0,isDirectory:!0}:null}withLock(e,t){return t()}entries(){return Object.fromEntries(this.files)}},L=new R,M=(()=>{try{let r=globalThis.process?.getBuiltinModule?.("node:async_hooks");return r?.AsyncLocalStorage?new r.AsyncLocalStorage:null}catch{return null}})();function W(){return M?.getStore()??L}function x(r){let e=L;return L=r,e}function Ue(r,e){if(M)return M.run(r,e);let t=x(r),n;try{n=e()}catch(o){throw x(t),o}return n instanceof Promise?n.finally(()=>x(t)):(x(t),n)}async function Be(r,e){let t=await e.load();for(let[n,o]of Object.entries(t))r.write(n,o)}async function He(r,e){await e.save(r.entries())}var I=ne(ee(),1),De="TWIN_WORLD_CLOCK_FILE",te=()=>{let r=globalThis[Symbol.for("volter.machineDateNow")];return typeof r=="function"?r():Date.now()};function Ze(){let r=globalThis[Symbol.for("agenttwin.twinClock.v1")]?.getStore();if(r!==void 0)return r;let e=process.env[De];if(e&&W().exists(e)){let t=I.default.parseClock(W().read(e)??"");return new Date(I.default.clockNowMs(t,te())).toISOString()}return new Date(te()).toISOString()}export{z as a,F as b,ce as c,E as d,ue as e,be as f,Te as g,N as h,Re as i,V as j,Ie as k,h as l,ke as m,_e as n,ze as o,fe as p,a as q,R as r,Y as s,W as t,x as u,Ue as v,Be as w,He as x,De as y,Ze as z};
@@ -1,2 +1,2 @@
1
1
  import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
- import{b as f}from"./OYLYKZGD.mjs";var p=f((y,h)=>{"use strict";var s="VOLTER_WORLD_NETWORK_POLICY";function i(e,r,t){if(!e||typeof e!="object"||Array.isArray(e)||Object.keys(e).some(o=>!r.includes(o)))throw new Error(`${t} has an invalid shape`);return e}function W(e){if(!Array.isArray(e)||e.length>256)throw new Error("World network egress must be an array of at most 256 exact HTTPS origins");let r=e.map(t=>{if(typeof t!="string"||t.length>2048)throw new Error("World network egress origins must be strings");let o;try{o=new URL(t)}catch{throw new Error(`Invalid World network origin: ${t}`)}if(o.protocol!=="https:"||o.origin!==t||o.username||o.password||!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/.test(o.hostname)||o.hostname.split(".").some(n=>!n||n.length>63||n.startsWith("-")||n.endsWith("-"))||/^[\d.]+$/.test(o.hostname)||o.hostname==="localhost"||o.hostname.endsWith(".localhost"))throw new Error(`World network requires an exact canonical HTTPS origin: ${t}`);return t});return Object.freeze([...new Set(r)].sort())}function l(e){let r=i(e,["egress"],"World network");return Object.freeze({egress:W(r.egress)})}function c(e,r){if(typeof e!="string"||!e||e.length>256)throw new Error("World network policy requires its World identity");return Object.freeze({version:1,world:e,egress:l(r).egress})}function a(e){let r=i(e,["version","world","egress"],"World network policy");if(r.version!==1)throw new Error("Unsupported World network policy version");return c(r.world,{egress:r.egress})}function d(e){let r=e[s];if(r===void 0)return;if(typeof r!="string"||r.length>65536)throw new Error("Invalid published World network policy");let t=a(JSON.parse(r));if(!e.VOLTER_WORLD||t.world!==e.VOLTER_WORLD)throw new Error("World network policy does not belong to the attached World");return t}function u(e,r){let t;try{t=new URL(String(r))}catch{return!1}return t.protocol==="https:"&&!t.username&&!t.password&&e.egress.includes(t.origin)}function w(e){let r=String(e||"").toLowerCase().replace(/^\[|\]$/g,"");if(!r||r==="localhost"||r.endsWith(".localhost")||r.endsWith(".test")||r==="0.0.0.0"||r==="::1")return!0;let t=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(t){let o=Number(t[1]),n=Number(t[2]);return o===127||o===10||o===172&&n>=16&&n<=31||o===192&&n===168}return r.includes(":")&&(r.startsWith("fc")||r.startsWith("fd"))&&r!=="fd00:ec2::254"}function g(e,r=process.env){let t;try{t=new URL(String(e))}catch{return`unparseable destination ${String(e)}`}if(w(t.hostname))return null;if(r.VOLTER_TWIN_STRICT_EGRESS==="1"||r.VOLTER_TWIN_STRICT_EGRESS==="true")return`sealed World refuses untwinned host ${t.hostname}`;let o;try{o=d(r)}catch(n){return`World network policy unreadable (${n.message}); refusing ${t.hostname}`}return o!==void 0&&!u(o,t)?`World network policy does not allow ${t.origin}`:null}h.exports={isWorldInternalHost:w,worldEgressRefusal:g,WORLD_NETWORK_POLICY_ENV:s,normalizeWorldNetwork:l,createWorldNetworkPolicy:c,parseWorldNetworkPolicy:a,worldNetworkPolicyFromEnv:d,allowsWorldNetworkEgress:u}});export{p as a};
2
+ import{b as f}from"./B2VTT7PF.mjs";var p=f((y,h)=>{"use strict";var s="VOLTER_WORLD_NETWORK_POLICY";function i(e,r,t){if(!e||typeof e!="object"||Array.isArray(e)||Object.keys(e).some(o=>!r.includes(o)))throw new Error(`${t} has an invalid shape`);return e}function W(e){if(!Array.isArray(e)||e.length>256)throw new Error("World network egress must be an array of at most 256 exact HTTPS origins");let r=e.map(t=>{if(typeof t!="string"||t.length>2048)throw new Error("World network egress origins must be strings");let o;try{o=new URL(t)}catch{throw new Error(`Invalid World network origin: ${t}`)}if(o.protocol!=="https:"||o.origin!==t||o.username||o.password||!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/.test(o.hostname)||o.hostname.split(".").some(n=>!n||n.length>63||n.startsWith("-")||n.endsWith("-"))||/^[\d.]+$/.test(o.hostname)||o.hostname==="localhost"||o.hostname.endsWith(".localhost"))throw new Error(`World network requires an exact canonical HTTPS origin: ${t}`);return t});return Object.freeze([...new Set(r)].sort())}function l(e){let r=i(e,["egress"],"World network");return Object.freeze({egress:W(r.egress)})}function c(e,r){if(typeof e!="string"||!e||e.length>256)throw new Error("World network policy requires its World identity");return Object.freeze({version:1,world:e,egress:l(r).egress})}function a(e){let r=i(e,["version","world","egress"],"World network policy");if(r.version!==1)throw new Error("Unsupported World network policy version");return c(r.world,{egress:r.egress})}function d(e){let r=e[s];if(r===void 0)return;if(typeof r!="string"||r.length>65536)throw new Error("Invalid published World network policy");let t=a(JSON.parse(r));if(!e.VOLTER_WORLD||t.world!==e.VOLTER_WORLD)throw new Error("World network policy does not belong to the attached World");return t}function u(e,r){let t;try{t=new URL(String(r))}catch{return!1}return t.protocol==="https:"&&!t.username&&!t.password&&e.egress.includes(t.origin)}function w(e){let r=String(e||"").toLowerCase().replace(/^\[|\]$/g,"");if(!r||r==="localhost"||r.endsWith(".localhost")||r.endsWith(".test")||r==="0.0.0.0"||r==="::1")return!0;let t=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(r);if(t){let o=Number(t[1]),n=Number(t[2]);return o===127||o===10||o===172&&n>=16&&n<=31||o===192&&n===168}return r.includes(":")&&(r.startsWith("fc")||r.startsWith("fd"))&&r!=="fd00:ec2::254"}function g(e,r=process.env){let t;try{t=new URL(String(e))}catch{return`unparseable destination ${String(e)}`}if(w(t.hostname))return null;if(r.VOLTER_TWIN_STRICT_EGRESS==="1"||r.VOLTER_TWIN_STRICT_EGRESS==="true")return`sealed World refuses untwinned host ${t.hostname}`;let o;try{o=d(r)}catch(n){return`World network policy unreadable (${n.message}); refusing ${t.hostname}`}return o!==void 0&&!u(o,t)?`World network policy does not allow ${t.origin}`:null}h.exports={isWorldInternalHost:w,worldEgressRefusal:g,WORLD_NETWORK_POLICY_ENV:s,normalizeWorldNetwork:l,createWorldNetworkPolicy:c,parseWorldNetworkPolicy:a,worldNetworkPolicyFromEnv:d,allowsWorldNetworkEgress:u}});export{p as a};
@@ -1,5 +1,5 @@
1
1
  import{createRequire as __atReq}from'node:module';const require=__atReq(import.meta.url);
2
- import{b as J}from"./OYLYKZGD.mjs";var Ve=J(l=>{"use strict";var ne=Symbol.for("react.transitional.element"),ft=Symbol.for("react.portal"),lt=Symbol.for("react.fragment"),pt=Symbol.for("react.strict_mode"),dt=Symbol.for("react.profiler"),yt=Symbol.for("react.consumer"),_t=Symbol.for("react.context"),vt=Symbol.for("react.forward_ref"),Et=Symbol.for("react.suspense"),mt=Symbol.for("react.memo"),We=Symbol.for("react.lazy"),ht=Symbol.for("react.activity"),gt=Symbol.for("react.view_transition"),He=Symbol.iterator;function Tt(t){return t===null||typeof t!="object"?null:(t=He&&t[He]||t["@@iterator"],typeof t=="function"?t:null)}var qe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ze=Object.assign,Ge={};function P(t,r,c){this.props=t,this.context=r,this.refs=Ge,this.updater=c||qe}P.prototype.isReactComponent={};P.prototype.setState=function(t,r){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,r,"setState")};P.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Be(){}Be.prototype=P.prototype;function re(t,r,c){this.props=t,this.context=r,this.refs=Ge,this.updater=c||qe}var oe=re.prototype=new Be;oe.constructor=re;ze(oe,P.prototype);oe.isPureReactComponent=!0;var Ie=Array.isArray;function te(){}var h={H:null,A:null,T:null,S:null},Qe=Object.prototype.hasOwnProperty;function ue(t,r,c){var a=c.ref;return{$$typeof:ne,type:t,key:r,ref:a!==void 0?a:null,props:c}}function wt(t,r){return ue(t.type,r,t.props)}function se(t){return typeof t=="object"&&t!==null&&t.$$typeof===ne}function Rt(t){var r={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(c){return r[c]})}var Ue=/\/+/g;function ee(t,r){return typeof t=="object"&&t!==null&&t.key!=null?Rt(""+t.key):r.toString(36)}function Ot(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(te,te):(t.status="pending",t.then(function(r){t.status==="pending"&&(t.status="fulfilled",t.value=r)},function(r){t.status==="pending"&&(t.status="rejected",t.reason=r)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function k(t,r,c,a,y){var _=typeof t;(_==="undefined"||_==="boolean")&&(t=null);var v=!1;if(t===null)v=!0;else switch(_){case"bigint":case"string":case"number":v=!0;break;case"object":switch(t.$$typeof){case ne:case ft:v=!0;break;case We:return v=t._init,k(v(t._payload),r,c,a,y)}}if(v)return y=y(t),v=a===""?"."+ee(t,0):a,Ie(y)?(c="",v!=null&&(c=v.replace(Ue,"$&/")+"/"),k(y,r,c,"",function(C){return C})):y!=null&&(se(y)&&(y=wt(y,c+(y.key==null||t&&t.key===y.key?"":(""+y.key).replace(Ue,"$&/")+"/")+v)),r.push(y)),1;v=0;var w=a===""?".":a+":";if(Ie(t))for(var T=0;T<t.length;T++)a=t[T],_=w+ee(a,T),v+=k(a,r,c,_,y);else if(T=Tt(t),typeof T=="function")for(t=T.call(t),T=0;!(a=t.next()).done;)a=a.value,_=w+ee(a,T++),v+=k(a,r,c,_,y);else if(_==="object"){if(typeof t.then=="function")return k(Ot(t),r,c,a,y);throw r=String(t),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return v}function x(t,r,c){if(t==null)return t;var a=[],y=0;return k(t,a,"","",function(_){return r.call(c,_,y++)}),a}function Ct(t){if(t._status===-1){var r=t._result,c=r();c.then(function(a){(t._status===0||t._status===-1)&&(t._status=1,t._result=a,c.status===void 0&&(c.status="fulfilled",c.value=a))},function(a){(t._status===0||t._status===-1)&&(t._status=2,t._result=a,c.status===void 0&&(c.status="rejected",c.reason=a))}),t._status===-1&&(t._status=0,t._result=c)}if(t._status===1)return t._result.default;throw t._result}var xe=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Ke(t){var r=h.T,c={};c.types=r!==null?r.types:null,h.T=c;try{var a=t(),y=h.S;y!==null&&y(c,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(te,xe)}catch(_){xe(_)}finally{r!==null&&c.types!==null&&(r.types=c.types),h.T=r}}function Xe(t){var r=h.T;if(r!==null){var c=r.types;c===null?r.types=[t]:c.indexOf(t)===-1&&c.push(t)}else Ke(Xe.bind(null,t))}var St={map:x,forEach:function(t,r,c){x(t,function(){r.apply(this,arguments)},c)},count:function(t){var r=0;return x(t,function(){r++}),r},toArray:function(t){return x(t,function(r){return r})||[]},only:function(t){if(!se(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};l.Activity=ht;l.Children=St;l.Component=P;l.Fragment=lt;l.Profiler=dt;l.PureComponent=re;l.StrictMode=pt;l.Suspense=Et;l.ViewTransition=gt;l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=h;l.__COMPILER_RUNTIME={__proto__:null,c:function(t){return h.H.useMemoCache(t)}};l.addTransitionType=Xe;l.cache=function(t){return function(){return t.apply(null,arguments)}};l.cacheSignal=function(){return null};l.cloneElement=function(t,r,c){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var a=ze({},t.props),y=t.key;if(r!=null)for(_ in r.key!==void 0&&(y=""+r.key),r)!Qe.call(r,_)||_==="key"||_==="__self"||_==="__source"||_==="ref"&&r.ref===void 0||(a[_]=r[_]);var _=arguments.length-2;if(_===1)a.children=c;else if(1<_){for(var v=Array(_),w=0;w<_;w++)v[w]=arguments[w+2];a.children=v}return ue(t.type,y,a)};l.createContext=function(t){return t={$$typeof:_t,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:yt,_context:t},t};l.createElement=function(t,r,c){var a,y={},_=null;if(r!=null)for(a in r.key!==void 0&&(_=""+r.key),r)Qe.call(r,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(y[a]=r[a]);var v=arguments.length-2;if(v===1)y.children=c;else if(1<v){for(var w=Array(v),T=0;T<v;T++)w[T]=arguments[T+2];y.children=w}if(t&&t.defaultProps)for(a in v=t.defaultProps,v)y[a]===void 0&&(y[a]=v[a]);return ue(t,_,y)};l.createRef=function(){return{current:null}};l.forwardRef=function(t){return{$$typeof:vt,render:t}};l.isValidElement=se;l.lazy=function(t){return{$$typeof:We,_payload:{_status:-1,_result:t},_init:Ct}};l.memo=function(t,r){return{$$typeof:mt,type:t,compare:r===void 0?null:r}};l.startTransition=Ke;l.unstable_useCacheRefresh=function(){return h.H.useCacheRefresh()};l.use=function(t){return h.H.use(t)};l.useActionState=function(t,r,c){return h.H.useActionState(t,r,c)};l.useCallback=function(t,r){return h.H.useCallback(t,r)};l.useContext=function(t){return h.H.useContext(t)};l.useDebugValue=function(){};l.useDeferredValue=function(t,r){return h.H.useDeferredValue(t,r)};l.useEffect=function(t,r){return h.H.useEffect(t,r)};l.useEffectEvent=function(t){return h.H.useEffectEvent(t)};l.useId=function(){return h.H.useId()};l.useImperativeHandle=function(t,r,c){return h.H.useImperativeHandle(t,r,c)};l.useInsertionEffect=function(t,r){return h.H.useInsertionEffect(t,r)};l.useLayoutEffect=function(t,r){return h.H.useLayoutEffect(t,r)};l.useMemo=function(t,r){return h.H.useMemo(t,r)};l.useOptimistic=function(t,r){return h.H.useOptimistic(t,r)};l.useReducer=function(t,r,c){return h.H.useReducer(t,r,c)};l.useRef=function(t){return h.H.useRef(t)};l.useState=function(t){return h.H.useState(t)};l.useSyncExternalStore=function(t,r,c){return h.H.useSyncExternalStore(t,r,c)};l.useTransition=function(){return h.H.useTransition()};l.version="19.3.1"});var Ze=J((f,W)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function t(e,n){Object.defineProperty(a.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",n[0],n[1])}})}function r(e){return e===null||typeof e!="object"?null:(e=Oe&&e[Oe]||e["@@iterator"],typeof e=="function"?e:null)}function c(e,n){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var o=e+"."+n;Ce[o]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",n,e),Ce[o]=!0)}function a(e,n,o){this.props=e,this.context=n,this.refs=Z,this.updater=o||Se}function y(){}function _(e,n,o){this.props=e,this.context=n,this.refs=Z,this.updater=o||Se}function v(){}function w(e){return""+e}function T(e){try{w(e);var n=!1}catch{n=!0}if(n){n=console;var o=n.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),w(e)}}function C(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ut?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case K:return"Fragment";case me:return"Profiler";case Ee:return"StrictMode";case Te:return"Suspense";case ot:return"SuspenseList";case we:return"Activity";case Re:return"ViewTransition"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ve:return"Portal";case he:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case ge:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return n=e.displayName||null,n!==null?n:C(e.type)||"Memo";case N:n=e._payload,e=e._init;try{return C(e(n))}catch{}}return null}function ae(e){if(e===K)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===N)return"<...>";try{var n=C(e);return n?"<"+n+">":"<...>"}catch{return"<...>"}}function ce(){var e=d.A;return e===null?null:e.getOwner()}function fe(){return Error("react-stack-top-frame")}function le(e){if(D.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function Fe(e,n){function o(){Pe||(Pe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function Je(){var e=C(this.type);return Ne[e]||(Ne[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function q(e,n,o,u,s,m){var i=o.ref;return e={$$typeof:Q,type:e,key:n,props:o,_owner:u},(i!==void 0?i:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:Je}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:m}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function et(e,n){return n=q(e.type,n,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(n._store.validated=e._store.validated),n}function pe(e){S(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===N&&(e._payload.status==="fulfilled"?S(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function S(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q}function tt(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return n[o]})}function z(e,n){return typeof e=="object"&&e!==null&&e.key!=null?(T(e.key),tt(""+e.key)):n.toString(36)}function nt(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(v,v):(e.status="pending",e.then(function(n){e.status==="pending"&&(e.status="fulfilled",e.value=n)},function(n){e.status==="pending"&&(e.status="rejected",e.reason=n)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function A(e,n,o,u,s){var m=typeof e;(m==="undefined"||m==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(m){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Q:case ve:i=!0;break;case N:return i=e._init,A(i(e._payload),n,o,u,s)}}if(i){i=e,s=s(i);var p=u===""?"."+z(i,0):u;return be(s)?(o="",p!=null&&(o=p.replace($e,"$&/")+"/"),A(s,n,o,"",function(O){return O})):s!=null&&(S(s)&&(s.key!=null&&(i&&i.key===s.key||T(s.key)),o=et(s,o+(s.key==null||i&&i.key===s.key?"":(""+s.key).replace($e,"$&/")+"/")+p),u!==""&&i!=null&&S(i)&&i.key==null&&i._store&&!i._store.validated&&(o._store.validated=2),s=o),n.push(s)),1}if(i=0,p=u===""?".":u+":",be(e))for(var E=0;E<e.length;E++)u=e[E],m=p+z(u,E),i+=A(u,n,o,m,s);else if(E=r(e),typeof E=="function")for(E===e.entries&&(Me||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Me=!0),e=E.call(e),E=0;!(u=e.next()).done;)u=u.value,m=p+z(u,E++),i+=A(u,n,o,m,s);else if(m==="object"){if(typeof e.then=="function")return A(nt(e),n,o,u,s);throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return i}function $(e,n,o){if(e==null)return e;var u=[],s=0;return A(e,u,"","",function(m){return n.call(o,m,s++)}),u}function rt(e){if(e._status===-1){var n=null,o=null,u=e._ioInfo;u!=null&&(u.start=u.end=performance.now(),u.value=new Promise(function(i,p){n=i,o=p})),u=e._result;var s=u();if(s.then(function(i){if(e._status===0||e._status===-1){e._status=1,e._result=i;var p=e._ioInfo;if(p!=null){p.end=performance.now();var E=i?.default;n(E),p.value.status="fulfilled",p.value.value=E}s.status===void 0&&(s.status="fulfilled",s.value=i)}},function(i){if(e._status===0||e._status===-1){e._status=2,e._result=i;var p=e._ioInfo;p!=null&&(p.end=performance.now(),p.value.then(v,v),o(i),p.value.status="rejected",p.value.reason=i),s.status===void 0&&(s.status="rejected",s.reason=i)}}),u=e._ioInfo,u!=null){var m=s.displayName;typeof m=="string"&&(u.name=m)}e._status===-1&&(e._status=0,e._result=s)}if(e._status===1)return u=e._result,u===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
+ import{b as J}from"./B2VTT7PF.mjs";var Ve=J(l=>{"use strict";var ne=Symbol.for("react.transitional.element"),ft=Symbol.for("react.portal"),lt=Symbol.for("react.fragment"),pt=Symbol.for("react.strict_mode"),dt=Symbol.for("react.profiler"),yt=Symbol.for("react.consumer"),_t=Symbol.for("react.context"),vt=Symbol.for("react.forward_ref"),Et=Symbol.for("react.suspense"),mt=Symbol.for("react.memo"),We=Symbol.for("react.lazy"),ht=Symbol.for("react.activity"),gt=Symbol.for("react.view_transition"),He=Symbol.iterator;function Tt(t){return t===null||typeof t!="object"?null:(t=He&&t[He]||t["@@iterator"],typeof t=="function"?t:null)}var qe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ze=Object.assign,Ge={};function P(t,r,c){this.props=t,this.context=r,this.refs=Ge,this.updater=c||qe}P.prototype.isReactComponent={};P.prototype.setState=function(t,r){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,r,"setState")};P.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Be(){}Be.prototype=P.prototype;function re(t,r,c){this.props=t,this.context=r,this.refs=Ge,this.updater=c||qe}var oe=re.prototype=new Be;oe.constructor=re;ze(oe,P.prototype);oe.isPureReactComponent=!0;var Ie=Array.isArray;function te(){}var h={H:null,A:null,T:null,S:null},Qe=Object.prototype.hasOwnProperty;function ue(t,r,c){var a=c.ref;return{$$typeof:ne,type:t,key:r,ref:a!==void 0?a:null,props:c}}function wt(t,r){return ue(t.type,r,t.props)}function se(t){return typeof t=="object"&&t!==null&&t.$$typeof===ne}function Rt(t){var r={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(c){return r[c]})}var Ue=/\/+/g;function ee(t,r){return typeof t=="object"&&t!==null&&t.key!=null?Rt(""+t.key):r.toString(36)}function Ot(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(te,te):(t.status="pending",t.then(function(r){t.status==="pending"&&(t.status="fulfilled",t.value=r)},function(r){t.status==="pending"&&(t.status="rejected",t.reason=r)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function k(t,r,c,a,y){var _=typeof t;(_==="undefined"||_==="boolean")&&(t=null);var v=!1;if(t===null)v=!0;else switch(_){case"bigint":case"string":case"number":v=!0;break;case"object":switch(t.$$typeof){case ne:case ft:v=!0;break;case We:return v=t._init,k(v(t._payload),r,c,a,y)}}if(v)return y=y(t),v=a===""?"."+ee(t,0):a,Ie(y)?(c="",v!=null&&(c=v.replace(Ue,"$&/")+"/"),k(y,r,c,"",function(C){return C})):y!=null&&(se(y)&&(y=wt(y,c+(y.key==null||t&&t.key===y.key?"":(""+y.key).replace(Ue,"$&/")+"/")+v)),r.push(y)),1;v=0;var w=a===""?".":a+":";if(Ie(t))for(var T=0;T<t.length;T++)a=t[T],_=w+ee(a,T),v+=k(a,r,c,_,y);else if(T=Tt(t),typeof T=="function")for(t=T.call(t),T=0;!(a=t.next()).done;)a=a.value,_=w+ee(a,T++),v+=k(a,r,c,_,y);else if(_==="object"){if(typeof t.then=="function")return k(Ot(t),r,c,a,y);throw r=String(t),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return v}function x(t,r,c){if(t==null)return t;var a=[],y=0;return k(t,a,"","",function(_){return r.call(c,_,y++)}),a}function Ct(t){if(t._status===-1){var r=t._result,c=r();c.then(function(a){(t._status===0||t._status===-1)&&(t._status=1,t._result=a,c.status===void 0&&(c.status="fulfilled",c.value=a))},function(a){(t._status===0||t._status===-1)&&(t._status=2,t._result=a,c.status===void 0&&(c.status="rejected",c.reason=a))}),t._status===-1&&(t._status=0,t._result=c)}if(t._status===1)return t._result.default;throw t._result}var xe=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Ke(t){var r=h.T,c={};c.types=r!==null?r.types:null,h.T=c;try{var a=t(),y=h.S;y!==null&&y(c,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(te,xe)}catch(_){xe(_)}finally{r!==null&&c.types!==null&&(r.types=c.types),h.T=r}}function Xe(t){var r=h.T;if(r!==null){var c=r.types;c===null?r.types=[t]:c.indexOf(t)===-1&&c.push(t)}else Ke(Xe.bind(null,t))}var St={map:x,forEach:function(t,r,c){x(t,function(){r.apply(this,arguments)},c)},count:function(t){var r=0;return x(t,function(){r++}),r},toArray:function(t){return x(t,function(r){return r})||[]},only:function(t){if(!se(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};l.Activity=ht;l.Children=St;l.Component=P;l.Fragment=lt;l.Profiler=dt;l.PureComponent=re;l.StrictMode=pt;l.Suspense=Et;l.ViewTransition=gt;l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=h;l.__COMPILER_RUNTIME={__proto__:null,c:function(t){return h.H.useMemoCache(t)}};l.addTransitionType=Xe;l.cache=function(t){return function(){return t.apply(null,arguments)}};l.cacheSignal=function(){return null};l.cloneElement=function(t,r,c){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var a=ze({},t.props),y=t.key;if(r!=null)for(_ in r.key!==void 0&&(y=""+r.key),r)!Qe.call(r,_)||_==="key"||_==="__self"||_==="__source"||_==="ref"&&r.ref===void 0||(a[_]=r[_]);var _=arguments.length-2;if(_===1)a.children=c;else if(1<_){for(var v=Array(_),w=0;w<_;w++)v[w]=arguments[w+2];a.children=v}return ue(t.type,y,a)};l.createContext=function(t){return t={$$typeof:_t,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:yt,_context:t},t};l.createElement=function(t,r,c){var a,y={},_=null;if(r!=null)for(a in r.key!==void 0&&(_=""+r.key),r)Qe.call(r,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(y[a]=r[a]);var v=arguments.length-2;if(v===1)y.children=c;else if(1<v){for(var w=Array(v),T=0;T<v;T++)w[T]=arguments[T+2];y.children=w}if(t&&t.defaultProps)for(a in v=t.defaultProps,v)y[a]===void 0&&(y[a]=v[a]);return ue(t,_,y)};l.createRef=function(){return{current:null}};l.forwardRef=function(t){return{$$typeof:vt,render:t}};l.isValidElement=se;l.lazy=function(t){return{$$typeof:We,_payload:{_status:-1,_result:t},_init:Ct}};l.memo=function(t,r){return{$$typeof:mt,type:t,compare:r===void 0?null:r}};l.startTransition=Ke;l.unstable_useCacheRefresh=function(){return h.H.useCacheRefresh()};l.use=function(t){return h.H.use(t)};l.useActionState=function(t,r,c){return h.H.useActionState(t,r,c)};l.useCallback=function(t,r){return h.H.useCallback(t,r)};l.useContext=function(t){return h.H.useContext(t)};l.useDebugValue=function(){};l.useDeferredValue=function(t,r){return h.H.useDeferredValue(t,r)};l.useEffect=function(t,r){return h.H.useEffect(t,r)};l.useEffectEvent=function(t){return h.H.useEffectEvent(t)};l.useId=function(){return h.H.useId()};l.useImperativeHandle=function(t,r,c){return h.H.useImperativeHandle(t,r,c)};l.useInsertionEffect=function(t,r){return h.H.useInsertionEffect(t,r)};l.useLayoutEffect=function(t,r){return h.H.useLayoutEffect(t,r)};l.useMemo=function(t,r){return h.H.useMemo(t,r)};l.useOptimistic=function(t,r){return h.H.useOptimistic(t,r)};l.useReducer=function(t,r,c){return h.H.useReducer(t,r,c)};l.useRef=function(t){return h.H.useRef(t)};l.useState=function(t){return h.H.useState(t)};l.useSyncExternalStore=function(t,r,c){return h.H.useSyncExternalStore(t,r,c)};l.useTransition=function(){return h.H.useTransition()};l.version="19.3.1"});var Ze=J((f,W)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function t(e,n){Object.defineProperty(a.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",n[0],n[1])}})}function r(e){return e===null||typeof e!="object"?null:(e=Oe&&e[Oe]||e["@@iterator"],typeof e=="function"?e:null)}function c(e,n){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var o=e+"."+n;Ce[o]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",n,e),Ce[o]=!0)}function a(e,n,o){this.props=e,this.context=n,this.refs=Z,this.updater=o||Se}function y(){}function _(e,n,o){this.props=e,this.context=n,this.refs=Z,this.updater=o||Se}function v(){}function w(e){return""+e}function T(e){try{w(e);var n=!1}catch{n=!0}if(n){n=console;var o=n.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),w(e)}}function C(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ut?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case K:return"Fragment";case me:return"Profiler";case Ee:return"StrictMode";case Te:return"Suspense";case ot:return"SuspenseList";case we:return"Activity";case Re:return"ViewTransition"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ve:return"Portal";case he:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case ge:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return n=e.displayName||null,n!==null?n:C(e.type)||"Memo";case N:n=e._payload,e=e._init;try{return C(e(n))}catch{}}return null}function ae(e){if(e===K)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===N)return"<...>";try{var n=C(e);return n?"<"+n+">":"<...>"}catch{return"<...>"}}function ce(){var e=d.A;return e===null?null:e.getOwner()}function fe(){return Error("react-stack-top-frame")}function le(e){if(D.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function Fe(e,n){function o(){Pe||(Pe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function Je(){var e=C(this.type);return Ne[e]||(Ne[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function q(e,n,o,u,s,m){var i=o.ref;return e={$$typeof:Q,type:e,key:n,props:o,_owner:u},(i!==void 0?i:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:Je}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:m}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function et(e,n){return n=q(e.type,n,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(n._store.validated=e._store.validated),n}function pe(e){S(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===N&&(e._payload.status==="fulfilled"?S(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function S(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q}function tt(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return n[o]})}function z(e,n){return typeof e=="object"&&e!==null&&e.key!=null?(T(e.key),tt(""+e.key)):n.toString(36)}function nt(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(v,v):(e.status="pending",e.then(function(n){e.status==="pending"&&(e.status="fulfilled",e.value=n)},function(n){e.status==="pending"&&(e.status="rejected",e.reason=n)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function A(e,n,o,u,s){var m=typeof e;(m==="undefined"||m==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(m){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Q:case ve:i=!0;break;case N:return i=e._init,A(i(e._payload),n,o,u,s)}}if(i){i=e,s=s(i);var p=u===""?"."+z(i,0):u;return be(s)?(o="",p!=null&&(o=p.replace($e,"$&/")+"/"),A(s,n,o,"",function(O){return O})):s!=null&&(S(s)&&(s.key!=null&&(i&&i.key===s.key||T(s.key)),o=et(s,o+(s.key==null||i&&i.key===s.key?"":(""+s.key).replace($e,"$&/")+"/")+p),u!==""&&i!=null&&S(i)&&i.key==null&&i._store&&!i._store.validated&&(o._store.validated=2),s=o),n.push(s)),1}if(i=0,p=u===""?".":u+":",be(e))for(var E=0;E<e.length;E++)u=e[E],m=p+z(u,E),i+=A(u,n,o,m,s);else if(E=r(e),typeof E=="function")for(E===e.entries&&(Me||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Me=!0),e=E.call(e),E=0;!(u=e.next()).done;)u=u.value,m=p+z(u,E++),i+=A(u,n,o,m,s);else if(m==="object"){if(typeof e.then=="function")return A(nt(e),n,o,u,s);throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return i}function $(e,n,o){if(e==null)return e;var u=[],s=0;return A(e,u,"","",function(m){return n.call(o,m,s++)}),u}function rt(e){if(e._status===-1){var n=null,o=null,u=e._ioInfo;u!=null&&(u.start=u.end=performance.now(),u.value=new Promise(function(i,p){n=i,o=p})),u=e._result;var s=u();if(s.then(function(i){if(e._status===0||e._status===-1){e._status=1,e._result=i;var p=e._ioInfo;if(p!=null){p.end=performance.now();var E=i?.default;n(E),p.value.status="fulfilled",p.value.value=E}s.status===void 0&&(s.status="fulfilled",s.value=i)}},function(i){if(e._status===0||e._status===-1){e._status=2,e._result=i;var p=e._ioInfo;p!=null&&(p.end=performance.now(),p.value.then(v,v),o(i),p.value.status="rejected",p.value.reason=i),s.status===void 0&&(s.status="rejected",s.reason=i)}}),u=e._ioInfo,u!=null){var m=s.displayName;typeof m=="string"&&(u.name=m)}e._status===-1&&(e._status=0,e._result=s)}if(e._status===1)return u=e._result,u===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
3
3
 
4
4
  Your code should look like:
5
5
  const MyComponent = lazy(() => import('./MyComponent'))