hrishioa commited on
Commit
7c89823
1 Parent(s): a1de0a7

Upload 77 files

Browse files
404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f2421110bbabd1e.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/813-2d6d2c33c642dc38.js" async=""></script><script src="/_next/static/chunks/app/layout-9e4af58933956f5d.js" async=""></script><title>404: This page could not be found.</title><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div></div><script src="/_next/static/chunks/webpack-0f2421110bbabd1e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[39275,[],\"\"]\n7:I[61343,[],\"\"]\n8:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Theme\"]\n9:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Toaster\"]\nf:I[76130,[],\"\"]\na:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\nb:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nc:{\"display\":\"inline-block\"}\nd:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n10:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"z5_6nr2naE2DVQmFEPcuU\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],null],null]},[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[\"$\",\"$L8\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$a\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$b\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$c\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$d\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Le\"],\"globalErrorComponent\":\"$f\",\"missingSlots\":\"$W10\"}]]\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
 
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-175f358084e3d9d3.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/813-59f8977cdcd82aee.js" async=""></script><script src="/_next/static/chunks/app/layout-a6c4067c34d30fd9.js" async=""></script><link rel="icon" href="/favicon.ico" sizes="any"/><title>404: This page could not be found.</title><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div></div><script src="/_next/static/chunks/webpack-175f358084e3d9d3.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[39275,[],\"\"]\n7:I[61343,[],\"\"]\n8:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Theme\"]\n9:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Toaster\"]\nf:I[76130,[],\"\"]\na:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\nb:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nc:{\"display\":\"inline-block\"}\nd:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n10:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"_uAk4OTCF37WtjscGxwuW\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],null],null]},[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"$L8\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$a\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$b\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$c\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$d\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Le\"],\"globalErrorComponent\":\"$f\",\"missingSlots\":\"$W10\"}]]\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
_next/static/_uAk4OTCF37WtjscGxwuW/_buildManifest.js ADDED
@@ -0,0 +1 @@
 
 
1
+ self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-6ae619510b1539d6.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
_next/static/_uAk4OTCF37WtjscGxwuW/_ssgManifest.js ADDED
@@ -0,0 +1 @@
 
 
1
+ self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
_next/static/chunks/104-8d2d9d6c39d4e709.js ADDED
@@ -0,0 +1 @@
 
 
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[104],{3592:function(e){function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=3592,e.exports=t},42480:function(){},75992:function(){},78110:function(){},55024:function(){},24754:function(e,t,r){"use strict";r.d(t,{j:function(){return v}});var s=r(14635),a=r(69893),n=r(78967),i=r(3682),o=r(36393),c=r(62052);let d=(0,c.hu)("PeerDB",c.$5.databases.peerDB);class l extends s.ZP{constructor(e={}){super("PeerDB",e),this.version(2).stores({peers:"synthientId, lastSeen"})}}class h{async updateChainIdentities(e,t,r){return await Promise.all(r.map(async r=>{e.find(e=>e.chain===r.chain&&e.address===r.address)||(await (0,i.N1)(t,r.synthientIdSignature)?e.push(r):d.error("Could not verify identity for ".concat(t," on chain ").concat(r.chain," with address ").concat(r.address)))})),e}async getNetworkTotalTokens(){return(await this.db.peers.toArray()).reduce((e,t)=>e+t.totalTokens,0)}async getPeerStats(e){let t=await this.db.peers.where("lastSeen").above(e).count();return{totalTokens:(await this.db.peers.where("lastSeen").above(e).toArray()).reduce((e,t)=>e+(!isNaN(t.totalTokens)&&t.totalTokens||0),0),totalPeers:t,totalWorkers:(await this.db.peers.where("lastSeen").above(e).toArray()).reduce((e,t)=>e+(!isNaN(t.totalWorkers)&&t.totalWorkers||0),0)}}async getLastPeers(e,t){return this.db.peers.where("lastSeen").aboveOrEqual(e).limit(t).toArray()}async getPeerCount(e){return e?this.db.peers.where("lastSeen").aboveOrEqual(e).count():this.db.peers.count()}async processPackets(e){let t=e.map(e=>e.synthientId),r=(await this.db.peers.bulkGet(t)).filter(e=>!!e),s=!1,a=await Promise.all(Array.from(new Set(t)).map(async t=>{let a=e.filter(e=>e.synthientId===t).sort((e,t)=>{var r,s;return((null===(r=t.receivedTime)||void 0===r?void 0:r.getTime())||0)-((null===(s=e.receivedTime)||void 0===s?void 0:s.getTime())||0)}),n=r.find(e=>e.synthientId===t);n||(s=!0);let i=a.filter(e=>"peerConnectedChain"===e.packet.type).flatMap(e=>e.packet.identities),o=a.map(e=>"peerStatusUpdate"===e.packet.type&&("completed_inference"===e.packet.status||"boot"===e.packet.status)?e.packet.totalTokens:0).concat([(null==n?void 0:n.totalTokens)||0]).filter(e=>!isNaN(e)&&e>0),c=a.map(e=>"peerStatusUpdate"===e.packet.type&&"loaded_worker"===e.packet.status?e.packet.totalWorkers:0).concat([(null==n?void 0:n.totalWorkers)||0]).filter(e=>!isNaN(e)&&e>0),d=o.length>0?Math.max(...o):0,l=n||{synthientId:t,seenOn:[],totalTokens:0,totalWorkers:0,lastSeen:a[0].receivedTime||new Date,chainIds:[]};return l.seenOn=Array.from(new Set([...l.seenOn,...a.map(e=>e.deliveredThrough).filter(e=>!!e)])),l.chainIds=await this.updateChainIdentities(l.chainIds,t,i),l.totalTokens=Math.max(d,l.totalTokens||0),l.totalWorkers=Math.max(c.length>0?Math.max(...c):0,l.totalWorkers||0),l}));await this.db.peers.bulkPut(a);let n=e.filter(e=>"knownPeers"===e.packet.type);return n.length>0&&this.loadKnownPeerPackets(n),s}async loadKnownPeerPackets(e){let t=e.flatMap(e=>e.packet.peerList.map(e=>e.synthientId)),r=(await this.db.peers.bulkGet(t)).filter(e=>!!e),s={},a={};e.forEach(e=>{e.packet.peerList.forEach(t=>{a[t.synthientId]&&a[t.synthientId].latestUpdate>=new Date(e.packet.createdAt)||(a[t.synthientId]={peer:{totalTokens:t.totalTokens,synthientId:t.synthientId,seenOn:t.seenOn,totalWorkers:t.totalWorkers,lastSeen:new Date(t.lastSeen),chainIds:t.identities||[]},latestUpdate:new Date(e.packet.createdAt)})})}),await Promise.all(Object.values(a).map(async e=>{let{peer:t}=e,a=r.find(e=>e.synthientId===t.synthientId)||s[t.synthientId]||{synthientId:t.synthientId,seenOn:t.seenOn,lastSeen:new Date(t.lastSeen),chainIds:[]};a.seenOn=Array.from(new Set([...a.seenOn,...t.seenOn])),a.chainIds=await this.updateChainIdentities(a.chainIds,t.synthientId,t.chainIds),a.lastSeen=a.lastSeen&&new Date(Math.max(a.lastSeen.getTime(),new Date(t.lastSeen).getTime())||new Date(t.lastSeen)),d.debug("UpdatedPeer totalTokens: ".concat(t.totalTokens," ").concat(a.totalTokens));let n=[t.totalTokens,a.totalTokens].filter(e=>!isNaN(e)&&e>0);a.totalTokens=n.length>0?Math.max(...n):0,a.totalWorkers=Math.max(t.totalWorkers,a.totalWorkers),s[t.synthientId]=a})),await this.db.peers.bulkPut(Object.values(s))}async getPeer(e){return this.db.peers.get(e)}async getAllPeers(){return this.db.peers.toArray()}async deletePeer(e){await this.db.peers.delete(e)}constructor(e={}){this.db=new l(e)}}var u=r(22170),p=r.n(u),k=r(13201),y=r(89028);let m=(0,c.hu)("PacketDB",c.$5.databases.packetDB);a.UG.sha512Sync=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.o)(a.UG.concatBytes(...t))};let g=(0,y.ri)().packetDBSettings;class f extends s.ZP{constructor(e={}){super("PacketDatabase",e),this.version(2).stores({packets:"[synthientId+signature], receivedTime"})}}class v extends o.Z{async getStats(e){return{peerStats:await this.peerDB.getPeerStats(e),packetCount:await this.db.packets.count()}}async getLastPackets(e){return{packets:await this.db.packets.orderBy("receivedTime").reverse().limit(e).toArray(),total:await this.db.packets.count()}}async emitNewPacketEvents(e){"p2pInferenceRequest"===e.packet.type&&this.emit("newP2PInferenceRequest",e.packet,e.synthientId),"inferenceQuorumComputed"===e.packet.type&&(e.packet.verifiedBy!==e.synthientId?m.debug("Received inferenceQuorumComputed not directly from the sender, dropping",e):this.emit("consensusPacketReceived",e.packet)),"inferenceCommit"===e.packet.type&&this.emit("newInferenceCommit",e),"inferenceRevealRequest"===e.packet.type&&this.validateInferenceRevealRequest(e),"inferenceReveal"==e.packet.type&&this.emit("newInferenceRevealed",e)}async validateInferenceRevealRequest(e){"inferenceRevealRequest"===e.packet.type&&e.packet.quorum.some(e=>e.synthientId===this.clientInfo.synthientId)&&(m.debug("Received inferenceRevealRequest for own synthientId"),this.emit("newInferenceRevealRequest",e))}async transmitPacket(e){let t={synthientId:this.clientInfo.synthientId,signature:"",packet:e};t.signature=(0,i.K4)(this.clientInfo.synthientPrivKey,e),await this.db.packets.add({...t,receivedTime:new Date}),this.emitNewPacketEvents(t),m.debug("Transmitting packet ".concat(t.packet.type),t),await this.sendPacketOverP2P(t)}async getAllPackets(){return await this.db.packets.toArray()}fixEmbeddingArraysInPackets(e){"inferenceReveal"===e.packet.type?(e.packet.embedding=Object.values(e.packet.embedding),e.packet.bEmbedding=Object.values(e.packet.bEmbedding)):"inferenceRevealRejected"===e.packet.type&&("computed_bembedding_fails_threshold"===e.packet.rejectReason.type&&(e.packet.rejectReason.computedBEmbedding=Object.values(e.packet.rejectReason.computedBEmbedding)),e.packet.rejectReason.revealedBEmbedding=Object.values(e.packet.rejectReason.revealedBEmbedding))}async getPacket(e,t){return await this.db.packets.get({synthientId:e,signature:t})}verifyAndDedupeReceivedPacketQueue(e){let t=e.filter(e=>{let t=(0,i.yj)(e.synthientId,e.signature,e.packet);return t||m.debug("Invalid signature on packet, dropping packet from ".concat(e.synthientId),e),t}),r={};return t.forEach(e=>{let t=e.synthientId+e.signature;r[t]||(r[t]=e)}),Object.values(r)}async transmitPeerList(){let e=new Date(Date.now()-432e5),t=await this.peerDB.getLastPeers(e,200);if(Math.random()<g.peerCommunicationCount/t.length){let e={type:"knownPeers",peerList:t.map(e=>({synthientId:e.synthientId,identities:e.chainIds,totalWorkers:e.totalWorkers||0,totalTokens:!isNaN(e.totalTokens)&&e.totalTokens||0,lastSeen:e.lastSeen&&(0,k.MQ)(e.lastSeen),seenOn:e.seenOn})),createdAt:(0,k.MQ)(new Date)};m.debug("Transmitting peer list with ".concat(Object.values(e).length),e),await this.transmitPacket(e)}}emitPeerHeart(e){this.emit("peerHeart",e)}receivePacket(e){m.trace("Queued received packet: ",e),this.receivedPacketQueue.push(e),this.processReceivedPacketQueue(),this.receivedPacketQueue.length>=g.maxReceivedPacketQueueSize&&this.processReceivedPacketQueue.flush()}async printPackets(){await this.db.packets.toArray()}async dropOldPackets(e){let t=new Date(Date.now()-e);await this.db.packets.where("receivedTime").below(t).delete(),m.debug("Dropped packets older than ".concat(e,"ms"))}async clearPackets(){await this.db.packets.clear(),m.debug("Cleared all packets from the database.")}constructor(e,t,r={}){super(),this.clientInfo=e,this.sendPacketOverP2P=t,this.receivedPacketQueue=[],this.cleanUpOldPackets=p()(async()=>{m.debug("Cleaning up old packets."),await this.db.packets.orderBy("receivedTime").reverse().offset(g.maxPacketDBSize+50).delete()},5e3),this.processReceivedPacketQueue=p()(async()=>{let e=this.receivedPacketQueue;this.receivedPacketQueue=[];let t=this.verifyAndDedupeReceivedPacketQueue(e),r=await this.db.packets.where("[synthientId+signature]").anyOf(t.map(e=>[e.synthientId,e.signature])).toArray(),a=t.filter(e=>!r.some(t=>t.synthientId===e.synthientId&&t.signature===e.signature)).map(e=>(this.fixEmbeddingArraysInPackets(e),e));try{await this.db.packets.bulkPut(a).catch(s.ZP.BulkError,function(e){m.error("".concat(e.failures.length," packets were added successfully, but some others could not be. Check console for errors"),e)})}catch(e){m.error("Different error adding packets to the database",e)}let n=!!a.some(e=>"peerStatusUpdate"===e.packet.type&&"boot"===e.packet.status);this.peerDB.processPackets(a).then(e=>{(e||n)&&this.transmitPeerList()}),a.forEach(e=>this.emitNewPacketEvents(e)),a.filter(e=>"peerHeart"===e.packet.type).slice(0,g.peerHeartLimit).forEach(e=>this.emitPeerHeart(e)),setTimeout(()=>this.cleanUpOldPackets(),0)},g.receivePacketQueueDebounceMs,{trailing:!0}),this.db=new f(r),this.peerDB=new h,this.clientInfo=e,this.sendPacketOverP2P=t}}},18951:function(e,t,r){"use strict";let s;r.d(t,{K6:function(){return h},il:function(){return l}});var a=r(3682),n=r(69893),i=r(78967),o=r(13201),c=r(89028);n.UG.sha512Sync=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,i.o)(n.UG.concatBytes(...t))};let d=c.wK;async function l(e,t){let r=await (0,a.q6)(e,t);localStorage.setItem(d,r)}async function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(s)return s;if(!t&&localStorage.getItem(d)&&e)try{let t=localStorage.getItem(d),r=await (0,a.ow)(t,e);r.synthientId||console.log("Could not properly decrypt with this password"),s=r}catch(e){throw console.error("Could not decrypt saved identity",e),e}else{let t=function(){let e=n.P6.randomPrivateKey(),t=n.$3(e);return{synthientId:n.UG.bytesToHex(t),synthientPrivKey:n.UG.bytesToHex(e),chainIds:[],deviceInfo:(0,o.dz)()}}();await l(t,e),s=t}return s}},12683:function(e,t,r){"use strict";r.d(t,{t:function(){return c}});var s=r(2105),a=r(33987),n=r(28580),i=r(62052);let o=(0,i.hu)("P2P: NKN",i.$5.p2pNetworks.nkn);class c extends a.l{async waitForReady(){return this.loadingPromise.promise}async broadcastPacket(e){if(this.nknClient){o.debug("Sending message",e);try{return await this.nknClient.publish(this.nknTopic,JSON.stringify(e),{txPool:!0}),!0}catch(e){o.error("Error sending message",e),this.transmissionErrorCount++,this.transmissionErrorCount>this.p2pNKNSettings.maxSendErrorsBeforeRestart&&this.errorHandlers.forEach(t=>t(e,!0))}}return!1}listenForPacket(e){return this.packetReceivedCallbacks.push(e),()=>{this.packetReceivedCallbacks=this.packetReceivedCallbacks.filter(t=>t!==e)}}registerErrorHandler(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}async gracefulShutdown(){this.renewalIntervalId&&clearInterval(this.renewalIntervalId),await this.nknClient.close()}constructor(e,t,r){super(e,t),this.p2pNKNSettings=r,this.loadingPromise=new n.C,this.transmissionErrorCount=0,this.packetReceivedCallbacks=[],this.errorHandlers=[],this.nknTopic=t.nknTopic;let a=new s.Wallet({password:t.nknWalletPassword});this.nknClient=new s.MultiClient({identifier:e,seed:a.getSeed()}),o.debug("NKN client created with id ".concat(e)),this.nknClient.onMessage(e=>{let{src:t,payload:r}=e,s=JSON.parse(r);s.receivedTime=new Date,s.deliveredThrough="nkn",this.packetReceivedCallbacks.forEach(e=>{e(s,{nknAddress:t})})}),this.nknClient.onConnect(e=>{let{addr:t}=e;o.debug("Connected"),this.loadingPromise.resolve(!0)}),this.nknClient.onConnectFailed(()=>{o.debug("Connection failed"),this.loadingPromise.resolve(!1),this.errorHandlers.forEach(e=>{e(Error("Connection failed"),!0)})}),a.subscribe(this.nknTopic,1e3,this.synthientId,"").then(e=>{o.debug("Subscribed to events in tx ".concat(e)),this.renewalIntervalId=setInterval(async()=>{await a.subscribe(this.nknTopic,1e3,this.synthientId,"").then(e=>{o.debug("Renewed subscription in tx ".concat(e))})},198e5)})}}},30701:function(e,t,r){"use strict";function s(e){return a.PEWPEW.topic=e.topic,a.NKN.topic=e.topic,a.TRYSTERO.appId=e.topic,a.TRYSTERO.topic=e.topic+"T",a.NKN.maxSendErrorsBeforeRestart=e.maxTransmissionErrorsBeforeRestart,a.TRYSTERO.maxTransmissionErrorsBeforeRestart=e.maxTransmissionErrorsBeforeRestart,a}r.d(t,{e:function(){return s}});let a={PEWPEW:{topic:"rakis0",bootFixedDelayMs:1e3,bootstrapPeers:["https://gun-manhattan.herokuapp.com/gun","https://peer.wallie.io/gun","https://plankton-app-6qfp3.ondigitalocean.app/"]},NKN:{maxSendErrorsBeforeRestart:5,topic:"rakis0"},TRYSTERO:{maxTransmissionErrorsBeforeRestart:5,appId:"rakis",topic:"rakis0",relayRedundancy:4,rtcConfig:{iceServers:[{urls:"stun:stun.relay.metered.ca:80"},{urls:"turn:a.relay.metered.ca:80",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"},{urls:"turn:a.relay.metered.ca:80?transport=tcp",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"},{urls:"turn:a.relay.metered.ca:443",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"},{urls:"turn:a.relay.metered.ca:443?transport=tcp",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"}]}}}},33987:function(e,t,r){"use strict";r.d(t,{l:function(){return s}});class s{constructor(e,t){this.synthientId=e,this.options=t}}},37678:function(e,t,r){"use strict";r.d(t,{p:function(){return d}});var s=r(24364),a=r.n(s),n=r(33987),i=r(28580),o=r(62052);let c=(0,o.hu)("P2P: PewPewDB",o.$5.p2pNetworks.pewpewdb);class d extends n.l{async waitForReady(){return await this.loadingPromise.promise,!0}async broadcastPacket(e){let t={...e,packet:JSON.stringify(e.packet)};return c.debug("Transmitting packet with gun",t),new Promise(e=>{this.gun.get(this.gunTopic).put(t,t=>t.err?(c.error("Error sending gun message: ",t.err),e(!1)):e(!0))})}listenForPacket(e){let t=this.packetHandlerIdCouinter++;return this.packetHandlerIds.push(t),this.gun.get(this.gunTopic).on((r,s,a,n)=>{if(!this.packetHandlerIds.includes(t)){n.off();return}c.debug("Received packet",r),e({...r,receivedTime:new Date,deliveredThrough:"gun",packet:JSON.parse(r.packet)},{})}),()=>{this.packetHandlerIds=this.packetHandlerIds.filter(e=>e!==t)}}registerErrorHandler(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}gracefulShutdown(){}constructor(e,t){super(e,t),this.packetHandlerIds=[],this.packetHandlerIdCouinter=0,this.loadingPromise=new i.C,this.errorHandlers=[],this.gunTopic=t.gunTopic,this.gun=a()({peers:t.gunPeers,localStorage:!1}),setTimeout(()=>{this.loadingPromise.resolve()},t.startupDelayMs)}}},31406:function(e,t,r){"use strict";r.d(t,{f:function(){return c}});var s=r(18210),a=r(97481),n=r(33987),i=r(28580),o=r(62052);class c extends n.l{async waitForReady(){return this.loadingPromise.promise}async broadcastPacket(e){if(this.trysteroRoom)try{let[t]=this.trysteroRoom.makeAction(this.options.trysteroTopic);return t(e),!0}catch(e){this.transmissionErrorCount++,this.logger.error("Error sending message",e),this.errorHandlers.forEach(t=>t(e,this.transmissionErrorCount>this.trysteroP2PSettings.maxTransmissionErrorsBeforeRestart))}return!1}listenForPacket(e){return this.packetReceivedCallbacks.push(e),()=>{this.packetReceivedCallbacks=this.packetReceivedCallbacks.filter(t=>t!==e)}}registerErrorHandler(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}async gracefulShutdown(){this.trysteroRoom.leave()}constructor(e,t,r){super(e,t),this.trysteroP2PSettings=r,this.loadingPromise=new i.C,this.transmissionErrorCount=0,this.packetReceivedCallbacks=[],this.errorHandlers=[],this.logger=(0,o.hu)("P2P: ".concat(t.trysteroType," (trystero)"),o.$5.p2pNetworks[t.trysteroType]);try{this.trysteroRoom="nostr"===this.options.trysteroType?(0,a.Ls)({appId:this.options.trysteroAppId,relayRedundancy:this.options.relayRedundancy,rtcConfig:this.options.rtcConfig},this.options.trysteroTopic):(0,s.Ls)({appId:this.options.trysteroAppId,relayRedundancy:this.options.relayRedundancy,rtcConfig:this.options.rtcConfig},this.options.trysteroTopic),this.logger.debug("Trystero client created",this.trysteroRoom);let[,e]=this.trysteroRoom.makeAction(this.options.trysteroTopic);e((e,t)=>{let r={...e,receivedTime:new Date,deliveredThrough:this.options.trysteroType};this.packetReceivedCallbacks.forEach(e=>{e(r,{peerId:t})})}),this.loadingPromise.resolve(!0)}catch(e){throw this.logger.error("Error setting up Trystero",e),this.loadingPromise.resolve(!1),this.errorHandlers.forEach(t=>t(e,!0)),e}}}}}]);
_next/static/chunks/109.4494b95474b67c66.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[109],{9109:function(t,e,r){/*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */let n=r(48738),i=r(6868),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function f(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return s(t,e,r)}function s(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!u.isEncoding(e))throw TypeError("Unknown encoding: "+e);let r=0|y(t,e),n=f(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(N(t,Uint8Array)){let e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return a(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(N(t,SharedArrayBuffer)||t&&N(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);let i=function(t){var e;if(u.isBuffer(t)){let e=0|c(t.length),r=f(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?f(0):a(t):"Buffer"===t.type&&Array.isArray(t.data)?a(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return h(t),f(t<0?0:0|c(t))}function a(t){let e=t.length<0?0:0|c(t.length),r=f(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){let n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),u.prototype),n}function c(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function y(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return P(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(t).length;default:if(i)return n?-1:P(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=F[t[n]];return i}(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":var o,f;return o=e,f=r,0===o&&f===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(o,f));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}(this,e,r);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function d(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,f=1,u=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;f=2,u/=2,s/=2,r/=2}function h(t,e){return 1===f?t[e]:t.readUInt16BE(e*f)}if(i){let n=-1;for(o=r;o<u;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===s)return n*f}else -1!==n&&(o-=o-n),n=-1}else for(r+s>u&&(r=u-s),o=r;o>=0;o--){let r=!0;for(let n=0;n<s;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return -1}function E(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,f=e>239?4:e>223?3:e>191?2:1;if(i+f<=r){let r,n,u,s;switch(f){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(s=(31&e)<<6|63&r)>127&&(o=s);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(s=(15&e)<<12|(63&r)<<6|63&n)>2047&&(s<55296||s>57343)&&(o=s);break;case 4:r=t[i+1],n=t[i+2],u=t[i+3],(192&r)==128&&(192&n)==128&&(192&u)==128&&(s=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&u)>65535&&s<1114112&&(o=s)}}null===o?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=f}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function B(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function m(t,e,r,n,i,o){if(!u.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function I(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f>>=8,t[r++]=f,f>>=8,t[r++]=f,f>>=8,t[r++]=f,r}function U(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f>>=8,t[r+2]=f,f>>=8,t[r+1]=f,f>>=8,t[r]=f,r+8}function A(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function v(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.Buffer=u,e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return s(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return(h(t),t<=0)?f(t):void 0!==e?"string"==typeof r?f(t).fill(e,r):f(t).fill(e):f(t)},u.allocUnsafe=function(t){return l(t)},u.allocUnsafeSlow=function(t){return l(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(N(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),N(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(N(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(u.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)d(this,e,e+1);return this},u.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},u.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},u.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?E(this,0,t):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(N(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,f=r-e,s=Math.min(o,f),h=this.slice(n,i),l=t.slice(e,r);for(let t=0;t<s;++t)if(h[t]!==l[t]){o=h[t],f=l[t];break}return o<f?-1:f<o?1:0},u.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){var i,o,f,u,s,h,l,a;if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let p=this.length-e;if((void 0===r||r>p)&&(r=p),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let c=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let f=e.length;for(n>f/2&&(n=f/2),i=0;i<n;++i){let n=parseInt(e.substr(2*i,2),16);if(n!=n)break;t[r+i]=n}return i}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,C(P(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return f=e,u=r,C(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,f,u);case"base64":return s=e,h=r,C(k(t),this,s,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,a=r,C(function(t,e){let r,n;let i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,a);default:if(c)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=M(function(t){S(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&$(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=M(function(t){S(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&$(t,this.length-8);let n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return(t>>>=0,e||B(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||B(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||B(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=M(function(t){S(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&$(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+16777216*this[++t])}),u.prototype.readBigInt64BE=M(function(t){S(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&$(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(16777216*this[++t]+65536*this[++t]+256*this[++t]+r)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;m(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;m(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=M(function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=M(function(t,e=0){return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);m(this,t,e,r,n-1,-n)}let i=0,o=1,f=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===f&&0!==this[e+i-1]&&(f=1),this[e+i]=(t/o>>0)-f&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);m(this,t,e,r,n-1,-n)}let i=r-1,o=1,f=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===f&&0!==this[e+i+1]&&(f=1),this[e+i]=(t/o>>0)-f&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=M(function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=M(function(t,e=0){return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,r){return v(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return v(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){let i;if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=u.isBuffer(t)?t:u.from(t,n),f=o.length;if(0===f)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%f]}return this};let T={};function O(t,e,r){T[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function _(t){let e="",r=t.length,n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function L(t,e,r,n,i,o){if(t>r||t<e){let n;let i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new T.ERR_OUT_OF_RANGE("value",n,t)}S(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&$(i,n.length-(o+1))}function S(t,e){if("number"!=typeof t)throw new T.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,r){if(Math.floor(t)!==t)throw S(t,r),new T.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new T.ERR_BUFFER_OUT_OF_BOUNDS;throw new T.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}O("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),O("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=_(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=_(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let x=/[^+/0-9A-Za-z-_]/g;function P(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let f=0;f<n;++f){if((r=t.charCodeAt(f))>55295&&r<57344){if(!i){if(r>56319||f+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function k(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function C(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let F=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function M(t){return"undefined"==typeof BigInt?j:t}function j(){throw Error("BigInt not supported")}}}]);
_next/static/chunks/136-cd893a48277c7262.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[136],{78030:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(2265);/**
2
+ * @license lucide-react v0.379.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};/**
7
+ * @license lucide-react v0.379.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
+ * @license lucide-react v0.379.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:u,className:d="",children:s,iconNode:c,...f}=e;return(0,r.createElement)("svg",{ref:t,...a,width:l,height:l,stroke:n,strokeWidth:u?24*Number(i)/Number(l):i,className:o("lucide",d),...f},[...c.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(s)?s:[s]])}),u=(e,t)=>{let n=(0,r.forwardRef)((n,a)=>{let{className:u,...d}=n;return(0,r.createElement)(i,{ref:a,iconNode:t,className:o("lucide-".concat(l(e)),u),...d})});return n.displayName="".concat(e),n}},1282:function(e,t,n){n.d(t,{Z:function(){return r}});/**
17
+ * @license lucide-react v0.379.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */let r=(0,n(78030).Z)("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]])},74697:function(e,t,n){n.d(t,{Z:function(){return r}});/**
22
+ * @license lucide-react v0.379.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */let r=(0,n(78030).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},57818:function(e,t,n){n.d(t,{default:function(){return l.a}});var r=n(50551),l=n.n(r)},50551:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(99920);n(57437),n(2265);let l=r._(n(40148));function o(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,l.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},10912:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=n(55592);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},40148:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let r=n(57437),l=n(2265),o=n(10912),a=n(61481);function i(e){return{default:e&&"default"in e?e.default:e}}let u={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},d=function(e){let t={...u,...e},n=(0,l.lazy)(()=>t.loader().then(i)),d=t.loading;function s(e){let i=d?(0,r.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(a.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(l.Suspense,{fallback:i,children:u})}return s.displayName="LoadableComponent",s}},61481:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let r=n(57437),l=n(58512);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,r.jsx)(r.Fragment,{children:o.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},40882:function(e,t,n){n.d(t,{Fw:function(){return v},fC:function(){return j},wy:function(){return w}});var r=n(22988),l=n(2265),o=n(78149),a=n(98324),i=n(91715),u=n(1336),d=n(1584),s=n(25171),c=n(31383),f=n(53201);let p="Collapsible",[m,b]=(0,a.b)(p),[y,h]=m(p),g=(0,l.forwardRef)((e,t)=>{let{__scopeCollapsible:n,open:o,defaultOpen:a,disabled:u,onOpenChange:d,...c}=e,[p=!1,m]=(0,i.T)({prop:o,defaultProp:a,onChange:d});return(0,l.createElement)(y,{scope:n,disabled:u,contentId:(0,f.M)(),open:p,onOpenToggle:(0,l.useCallback)(()=>m(e=>!e),[m])},(0,l.createElement)(s.WV.div,(0,r.Z)({"data-state":x(p),"data-disabled":u?"":void 0},c,{ref:t})))}),w=(0,l.forwardRef)((e,t)=>{let{__scopeCollapsible:n,...a}=e,i=h("CollapsibleTrigger",n);return(0,l.createElement)(s.WV.button,(0,r.Z)({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":x(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},a,{ref:t,onClick:(0,o.M)(e.onClick,i.onOpenToggle)}))}),C="CollapsibleContent",v=(0,l.forwardRef)((e,t)=>{let{forceMount:n,...o}=e,a=h(C,e.__scopeCollapsible);return(0,l.createElement)(c.z,{present:n||a.open},({present:e})=>(0,l.createElement)(_,(0,r.Z)({},o,{ref:t,present:e})))}),_=(0,l.forwardRef)((e,t)=>{let{__scopeCollapsible:n,present:o,children:a,...i}=e,c=h(C,n),[f,p]=(0,l.useState)(o),m=(0,l.useRef)(null),b=(0,d.e)(t,m),y=(0,l.useRef)(0),g=y.current,w=(0,l.useRef)(0),v=w.current,_=c.open||f,j=(0,l.useRef)(_),k=(0,l.useRef)();return(0,l.useEffect)(()=>{let e=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,u.b)(()=>{let e=m.current;if(e){k.current=k.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();y.current=t.height,w.current=t.width,j.current||(e.style.transitionDuration=k.current.transitionDuration,e.style.animationName=k.current.animationName),p(o)}},[c.open,o]),(0,l.createElement)(s.WV.div,(0,r.Z)({"data-state":x(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!_},i,{ref:b,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style}}),_&&a)});function x(e){return e?"open":"closed"}let j=g}}]);
_next/static/chunks/207-b92e6bc9e3af501d.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[207],{13414:function(t,e,n){var r=n(2381).Symbol;t.exports=r},12731:function(t,e,n){var r=n(13414),i=n(37363),o=n(68391),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},19334:function(t,e,n){var r=n(25788),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},93330:function(t,e,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},37363:function(t,e,n){var r=n(13414),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[u]=n:delete t[u]),i}},68391:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},2381:function(t,e,n){var r=n(93330),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},25788:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},22170:function(t,e,n){var r=n(63117),i=n(49423),o=n(49666),s=Math.max,u=Math.min;t.exports=function(t,e,n){var a,c,f,l,h,d,b=0,y=!1,p=!1,g=!0;if("function"!=typeof t)throw TypeError("Expected a function");function v(e){var n=a,r=c;return a=c=void 0,b=e,l=t.apply(r,n)}function w(t){var n=t-d,r=t-b;return void 0===d||n>=e||n<0||p&&r>=f}function x(){var t,n,r,o=i();if(w(o))return m(o);h=setTimeout(x,(t=o-d,n=o-b,r=e-t,p?u(r,f-n):r))}function m(t){return(h=void 0,g&&a)?v(t):(a=c=void 0,l)}function $(){var t,n=i(),r=w(n);if(a=arguments,c=this,d=n,r){if(void 0===h)return b=t=d,h=setTimeout(x,e),y?v(t):l;if(p)return clearTimeout(h),h=setTimeout(x,e),v(d)}return void 0===h&&(h=setTimeout(x,e)),l}return e=o(e)||0,r(n)&&(y=!!n.leading,f=(p="maxWait"in n)?s(o(n.maxWait)||0,e):f,g="trailing"in n?!!n.trailing:g),$.cancel=function(){void 0!==h&&clearTimeout(h),b=0,a=d=c=h=void 0},$.flush=function(){return void 0===h?l:m(i())},$}},63117:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},50561:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},41108:function(t,e,n){var r=n(12731),i=n(50561);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},49423:function(t,e,n){var r=n(2381);t.exports=function(){return r.Date.now()}},49666:function(t,e,n){var r=n(19334),i=n(63117),o=n(41108),s=0/0,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return s;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=a.test(t);return n||c.test(t)?f(t.slice(2),n?2:8):u.test(t)?s:+t}},69893:function(t,e,n){"use strict";let r,i;n.d(e,{$3:function(){return C},P6:function(){return q},T:function(){return G},UG:function(){return V},Xx:function(){return L}});/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */let o=2n**255n-19n,s=2n**252n+0x14def9dea2f79cd65812631a5cf5d3edn,u={a:-1n,d:0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3n,p:o,n:s,h:8,Gx:0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an,Gy:0x6666666666666666666666666666666666666666666666666666666666666658n},a=(t="")=>{throw Error(t)},c=t=>"string"==typeof t,f=t=>t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name,l=(t,e)=>!f(t)||"number"==typeof e&&e>0&&t.length!==e?a("Uint8Array of valid length expected"):t,h=t=>new Uint8Array(t),d=(t,e)=>l(c(t)?m(t):h(l(t)),e),b=(t,e=o)=>{let n=t%e;return n>=0n?n:e+n},y=t=>t instanceof p?t:a("Point expected");class p{constructor(t,e,n,r){this.ex=t,this.ey=e,this.ez=n,this.et=r}static fromAffine(t){return new p(t.x,t.y,1n,b(t.x*t.y))}static fromHex(t,e=!1){let{d:n}=u,r=(t=d(t,32)).slice(),i=t[31];r[31]=-129&i;let s=z(r);e&&!(0n<=s&&s<2n**256n)&&a("bad y coord 1"),e||0n<=s&&s<o||a("bad y coord 2");let c=b(s*s),{isValid:f,value:l}=S(b(c-1n),b(n*c+1n));f||a("bad y coordinate 3");let h=(1n&l)===1n,y=(128&i)!=0;return!e&&0n===l&&y&&a("bad y coord 3"),y!==h&&(l=b(-l)),new p(l,s,1n,b(l*s))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}equals(t){let{ex:e,ey:n,ez:r}=this,{ex:i,ey:o,ez:s}=y(t),u=b(e*s),a=b(i*r),c=b(n*s),f=b(o*r);return u===a&&c===f}is0(){return this.equals(v)}negate(){return new p(b(-this.ex),this.ey,this.ez,b(-this.et))}double(){let{ex:t,ey:e,ez:n}=this,{a:r}=u,i=b(t*t),o=b(e*e),s=b(2n*b(n*n)),a=b(r*i),c=t+e,f=b(b(c*c)-i-o),l=a+o,h=l-s,d=a-o,y=b(f*h),g=b(l*d),v=b(f*d);return new p(y,g,b(h*l),v)}add(t){let{ex:e,ey:n,ez:r,et:i}=this,{ex:o,ey:s,ez:a,et:c}=y(t),{a:f,d:l}=u,h=b(e*o),d=b(n*s),g=b(i*l*c),v=b(r*a),w=b((e+n)*(o+s)-h-d),x=b(v-g),m=b(v+g),$=b(d-f*h),z=b(w*x),A=b(m*$),O=b(w*$);return new p(z,A,b(x*m),O)}mul(t,e=!0){if(0n===t)return!0===e?a("cannot multiply by 0"):v;if("bigint"==typeof t&&0n<t&&t<s||a("invalid scalar, must be < L"),!e&&this.is0()||1n===t)return this;if(this.equals(g))return H(t).p;let n=v,r=g;for(let i=this;t>0n;i=i.double(),t>>=1n)1n&t?n=n.add(i):e&&(r=r.add(i));return n}multiply(t){return this.mul(t)}clearCofactor(){return this.mul(BigInt(u.h),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let t=this.mul(s/2n,!1).double();return s%2n&&(t=t.add(this)),t.is0()}toAffine(){let{ex:t,ey:e,ez:n}=this;if(this.equals(v))return{x:0n,y:1n};let r=O(n);return 1n!==b(n*r)&&a("invalid inverse"),{x:b(t*r),y:b(e*r)}}toRawBytes(){let{x:t,y:e}=this.toAffine(),n=$(e);return n[31]|=1n&t?128:0,n}toHex(){return x(this.toRawBytes())}}p.BASE=new p(0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an,0x6666666666666666666666666666666666666666666666666666666666666658n,1n,b(0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51an*0x6666666666666666666666666666666666666666666666666666666666666658n)),p.ZERO=new p(0n,1n,1n,0n);let{BASE:g,ZERO:v}=p,w=(t,e)=>t.toString(16).padStart(e,"0"),x=t=>Array.from(t).map(t=>w(t,2)).join(""),m=t=>{let e=t.length;(!c(t)||e%2)&&a("hex invalid 1");let n=h(e/2);for(let e=0;e<n.length;e++){let r=2*e,i=Number.parseInt(t.slice(r,r+2),16);(Number.isNaN(i)||i<0)&&a("hex invalid 2"),n[e]=i}return n},$=t=>m(w(t,64)).reverse(),z=t=>BigInt("0x"+x(h(l(t)).reverse())),A=(...t)=>{let e=h(t.reduce((t,e)=>t+l(e).length,0)),n=0;return t.forEach(t=>{e.set(t,n),n+=t.length}),e},O=(t,e=o)=>{(0n===t||e<=0n)&&a("no inverse n="+t+" mod="+e);let n=b(t,e),r=e,i=0n,s=1n,u=1n,c=0n;for(;0n!==n;){let t=r/n,e=r%n,o=i-u*t,a=s-c*t;r=n,n=e,i=u,s=c,u=o,c=a}return 1n===r?b(i,e):a("no inverse")},E=(t,e)=>{let n=t;for(;e-- >0n;)n*=n,n%=o;return n},I=t=>{let e=t*t%o*t%o,n=E(e,2n)*e%o,r=E(n,1n)*t%o,i=E(r,5n)*r%o,s=E(i,10n)*i%o,u=E(s,20n)*s%o,a=E(u,40n)*u%o,c=E(a,80n)*a%o,f=E(c,80n)*a%o,l=E(f,10n)*i%o;return{pow_p_5_8:E(l,2n)*t%o,b2:e}},S=(t,e)=>{let n=b(e*e*e),r=I(t*b(n*n*e)).pow_p_5_8,i=b(t*n*r),o=b(e*i*i),s=i,u=b(0x2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0n*i),a=o===t,c=o===b(-t),f=o===b(-(0x2b8324804fc1df0b2b4d00993dfbd7a72f431806ad2fe478c4ee1b274a0ea0b0n*t));return a&&(i=s),(c||f)&&(i=u),(1n&b(i))===1n&&(i=b(-i)),{isValid:a||c,value:i}},k=t=>b(z(t),s),B=(...t)=>V.sha512Async(...t),U=(...t)=>"function"==typeof r?r(...t):a("etc.sha512Sync not set"),j=t=>{let e=t.slice(0,32);e[0]&=248,e[31]&=127,e[31]|=64;let n=t.slice(32,64),r=k(e),i=g.mul(r),o=i.toRawBytes();return{head:e,prefix:n,scalar:r,point:i,pointBytes:o}},N=t=>j(U(d(t,32))),C=t=>N(t).pointBytes;function P(t,e){return t?B(e.hashable).then(e.finish):e.finish(U(e.hashable))}let T=(t,e,n)=>{let{pointBytes:r,scalar:i}=t,o=k(e),u=g.mul(o).toRawBytes();return{hashable:A(u,r,n),finish:t=>l(A(u,$(b(o+k(t)*i,s))),64)}},L=(t,e)=>{let n=d(t),r=N(e),i=U(r.prefix,n);return P(!1,T(r,i,n))},M={zip215:!0},R=(t,e,n,r=M)=>{e=d(e),t=d(t,64);let{zip215:i}=r,o,s,u,a,c=new Uint8Array;try{o=p.fromHex(n,i),s=p.fromHex(t.slice(0,32),i),u=z(t.slice(32,64)),a=g.mul(u,!1),c=A(s.toRawBytes(),o.toRawBytes(),e)}catch(t){}return{hashable:c,finish:t=>{if(null==a||!i&&o.isSmallOrder())return!1;let e=k(t);return s.add(o.mul(e,!1)).add(a.negate()).clearCofactor().is0()}}},G=(t,e,n,r=M)=>P(!1,R(t,e,n,r)),_=()=>"object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,V={bytesToHex:x,hexToBytes:m,concatBytes:A,mod:b,invert:O,randomBytes:(t=32)=>{let e=_();return e&&e.getRandomValues||a("crypto.getRandomValues must be defined"),e.getRandomValues(h(t))},sha512Async:async(...t)=>{let e=_();e&&e.subtle||a("crypto.subtle or etc.sha512Async must be defined");let n=A(...t);return h(await e.subtle.digest("SHA-512",n.buffer))},sha512Sync:void 0};Object.defineProperties(V,{sha512Sync:{configurable:!1,get:()=>r,set(t){r||(r=t)}}});let q={getExtendedPublicKeyAsync:t=>B(d(t,32)).then(j),getExtendedPublicKey:N,randomPrivateKey:()=>V.randomBytes(32),precompute:(t=8,e=g)=>(e.multiply(3n),e)},F=()=>{let t=[],e=g,n=e;for(let r=0;r<33;r++){n=e,t.push(n);for(let r=1;r<128;r++)n=n.add(e),t.push(n);e=n.double()}return t},H=t=>{let e=i||(i=F()),n=(t,e)=>{let n=e.negate();return t?n:e},r=v,o=g,s=BigInt(255),u=BigInt(8);for(let i=0;i<33;i++){let a=128*i,c=Number(t&s);t>>=u,c>128&&(c-=256,t+=1n);let f=a+Math.abs(c)-1,l=i%2!=0,h=c<0;0===c?o=o.add(n(l,e[a])):r=r.add(n(h,e[f]))}return{p:r,f:o}}},51359:function(t,e,n){"use strict";n.d(e,{b:function(){return i}});var r=n(48926);class i extends r.G{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},48926:function(t,e,n){"use strict";n.d(e,{G:function(){return i}});var r=n(94290);class i extends Error{constructor(t,e={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.bo)()});let n=e.cause instanceof i?e.cause.details:e.cause?.message?e.cause.message:e.details,o=e.cause instanceof i&&e.cause.docsPath||e.docsPath;this.message=[t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...o?[`Docs: https://viem.sh${o}${e.docsSlug?`#${e.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),e.cause&&(this.cause=e.cause),this.details=n,this.docsPath=o,this.metaMessages=e.metaMessages,this.shortMessage=t}walk(t){return function t(e,n){return n?.(e)?e:e&&"object"==typeof e&&"cause"in e?t(e.cause,n):n?null:e}(this,t)}}},74188:function(t,e,n){"use strict";n.d(e,{J5:function(){return i},M6:function(){return o}});var r=n(48926);class i extends r.G{constructor({max:t,min:e,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${e} to ${t})`:`(above ${e})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class o extends r.G{constructor({givenSize:t,maxSize:e}){super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},94290:function(t,e,n){"use strict";n.d(e,{Gr:function(){return r},bo:function(){return i}});let r=t=>t,i=()=>"[email protected]"},99112:function(t,e,n){"use strict";n.d(e,{K:function(){return f},x:function(){return c}});var r=n(51359),i=n(82361),o=n(45626),s=n(98992),u=n(64113);let a=new s.k(8192);function c(t,e){if(a.has(`${t}.${e}`))return a.get(`${t}.${e}`);let n=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),r=(0,o.w)((0,i.qX)(n),"bytes"),s=(e?n.substring(`${e}0x`.length):n).split("");for(let t=0;t<40;t+=2)r[t>>1]>>4>=8&&s[t]&&(s[t]=s[t].toUpperCase()),(15&r[t>>1])>=8&&s[t+1]&&(s[t+1]=s[t+1].toUpperCase());let u=`0x${s.join("")}`;return a.set(`${t}.${e}`,u),u}function f(t,e){if(!(0,u.U)(t,{strict:!1}))throw new r.b({address:t});return c(t,e)}},64113:function(t,e,n){"use strict";n.d(e,{U:function(){return u}});var r=n(98992),i=n(99112);let o=/^0x[a-fA-F0-9]{40}$/,s=new r.k(8192);function u(t,e){let{strict:n=!0}=e??{},r=`${t}.${n}`;if(s.has(r))return s.get(r);let u=!!o.test(t)&&(t.toLowerCase()===t||!n||(0,i.x)(t)===t);return s.set(r,u),u}},40369:function(t,e,n){"use strict";function r(t,{strict:e=!0}={}){return!!t&&"string"==typeof t&&(e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x"))}n.d(e,{v:function(){return r}})},685:function(t,e,n){"use strict";n.d(e,{vk:function(){return o}});var r=n(48926);class i extends r.G{constructor({size:t,targetSize:e,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function o(t,{dir:e,size:n=32}={}){return"string"==typeof t?function(t,{dir:e,size:n=32}={}){if(null===n)return t;let r=t.replace("0x","");if(r.length>2*n)throw new i({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===e?"padEnd":"padStart"](2*n,"0")}`}(t,{dir:e,size:n}):function(t,{dir:e,size:n=32}={}){if(null===n)return t;if(t.length>n)throw new i({size:t.length,targetSize:n,type:"bytes"});let r=new Uint8Array(n);for(let i=0;i<n;i++){let o="right"===e;r[o?i:n-i-1]=t[o?i:t.length-i-1]}return r}(t,{dir:e,size:n})}},88294:function(t,e,n){"use strict";n.d(e,{Yf:function(){return s},y_:function(){return u},ly:function(){return a}});var r=n(74188),i=n(40369);function o(t){return(0,i.v)(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function s(t,{size:e}){if(o(t)>e)throw new r.M6({givenSize:o(t),maxSize:e})}function u(t,e={}){let{signed:n}=e;e.size&&s(t,{size:e.size});let r=BigInt(t);if(!n)return r;let i=(t.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function a(t,e={}){return Number(u(t,e))}},82361:function(t,e,n){"use strict";n.d(e,{O0:function(){return c},qX:function(){return d}});var r=n(48926),i=n(40369),o=n(685),s=n(88294),u=n(95046);let a=new TextEncoder;function c(t,e={}){return"number"==typeof t||"bigint"==typeof t?h((0,u.eC)(t,e)):"boolean"==typeof t?function(t,e={}){let n=new Uint8Array(1);return(n[0]=Number(t),"number"==typeof e.size)?((0,s.Yf)(n,{size:e.size}),(0,o.vk)(n,{size:e.size})):n}(t,e):(0,i.v)(t)?h(t,e):d(t,e)}let f={zero:48,nine:57,A:65,F:70,a:97,f:102};function l(t){return t>=f.zero&&t<=f.nine?t-f.zero:t>=f.A&&t<=f.F?t-(f.A-10):t>=f.a&&t<=f.f?t-(f.a-10):void 0}function h(t,e={}){let n=t;e.size&&((0,s.Yf)(n,{size:e.size}),n=(0,o.vk)(n,{dir:"right",size:e.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let u=i.length/2,a=new Uint8Array(u);for(let t=0,e=0;t<u;t++){let n=l(i.charCodeAt(e++)),o=l(i.charCodeAt(e++));if(void 0===n||void 0===o)throw new r.G(`Invalid byte sequence ("${i[e-2]}${i[e-1]}" in "${i}").`);a[t]=16*n+o}return a}function d(t,e={}){let n=a.encode(t);return"number"==typeof e.size?((0,s.Yf)(n,{size:e.size}),(0,o.vk)(n,{dir:"right",size:e.size})):n}},95046:function(t,e,n){"use strict";n.d(e,{$G:function(){return l},NC:function(){return u},eC:function(){return c}});var r=n(74188),i=n(685),o=n(88294);let s=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function u(t,e={}){return"number"==typeof t||"bigint"==typeof t?c(t,e):"string"==typeof t?l(t,e):"boolean"==typeof t?function(t,e={}){let n=`0x${Number(t)}`;return"number"==typeof e.size?((0,o.Yf)(n,{size:e.size}),(0,i.vk)(n,{size:e.size})):n}(t,e):a(t,e)}function a(t,e={}){let n="";for(let e=0;e<t.length;e++)n+=s[t[e]];let r=`0x${n}`;return"number"==typeof e.size?((0,o.Yf)(r,{size:e.size}),(0,i.vk)(r,{dir:"right",size:e.size})):r}function c(t,e={}){let n;let{signed:o,size:s}=e,u=BigInt(t);s?n=o?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof t&&(n=BigInt(Number.MAX_SAFE_INTEGER));let a="bigint"==typeof n&&o?-n-1n:0;if(n&&u>n||u<a){let e="bigint"==typeof t?"n":"";throw new r.J5({max:n?`${n}${e}`:void 0,min:`${a}${e}`,signed:o,size:s,value:`${t}${e}`})}let c=`0x${(o&&u<0?(1n<<BigInt(8*s))+BigInt(u):u).toString(16)}`;return s?(0,i.vk)(c,{size:s}):c}let f=new TextEncoder;function l(t,e={}){return a(f.encode(t),e)}},45626:function(t,e,n){"use strict";n.d(e,{w:function(){return k}});var r=n(95861);let i=BigInt(4294967296-1),o=BigInt(32),s=(t,e,n)=>t<<n|e>>>32-n,u=(t,e,n)=>e<<n|t>>>32-n,a=(t,e,n)=>e<<n-32|t>>>64-n,c=(t,e,n)=>t<<n-32|e>>>64-n;var f=n(12403);let[l,h,d]=[[],[],[]],b=BigInt(0),y=BigInt(1),p=BigInt(2),g=BigInt(7),v=BigInt(256),w=BigInt(113);for(let t=0,e=y,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],l.push(2*(5*r+n)),h.push((t+1)*(t+2)/2%64);let i=b;for(let t=0;t<7;t++)(e=(e<<y^(e>>g)*w)%v)&p&&(i^=y<<(y<<BigInt(t))-y);d.push(i)}let[x,m]=function(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let s=0;s<t.length;s++){let{h:u,l:a}=function(t,e=!1){return e?{h:Number(t&i),l:Number(t>>o&i)}:{h:0|Number(t>>o&i),l:0|Number(t&i)}}(t[s],e);[n[s],r[s]]=[u,a]}return[n,r]}(d,!0),$=(t,e,n)=>n>32?a(t,e,n):s(t,e,n),z=(t,e,n)=>n>32?c(t,e,n):u(t,e,n);class A extends f.kb{constructor(t,e,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.Rx)(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,f.Jq)(this.state)}keccak(){!function(t,e=24){let n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let e=0;e<10;e++)n[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let r=(e+8)%10,i=(e+2)%10,o=n[i],s=n[i+1],u=$(o,s,1)^n[r],a=z(o,s,1)^n[r+1];for(let n=0;n<50;n+=10)t[e+n]^=u,t[e+n+1]^=a}let e=t[2],i=t[3];for(let n=0;n<24;n++){let r=h[n],o=$(e,i,r),s=z(e,i,r),u=l[n];e=t[u],i=t[u+1],t[u]=o,t[u+1]=s}for(let e=0;e<50;e+=10){for(let r=0;r<10;r++)n[r]=t[e+r];for(let r=0;r<10;r++)t[e+r]^=~n[(r+2)%10]&n[(r+4)%10]}t[0]^=x[r],t[1]^=m[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,r.Gg)(this);let{blockLen:e,state:n}=this,i=(t=(0,f.O0)(t)).length;for(let r=0;r<i;){let o=Math.min(e-this.pos,i-r);for(let e=0;e<o;e++)n[this.pos++]^=t[r++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:e,pos:n,blockLen:r}=this;t[n]^=e,(128&e)!=0&&n===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){(0,r.Gg)(this,!1),(0,r.aI)(t),this.finish();let e=this.state,{blockLen:n}=this;for(let r=0,i=t.length;r<i;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,i-r);t.set(e.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,r.Rx)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,r.J8)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:e,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return t||(t=new A(e,n,r,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=n,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}}let O=(0,f.hE)(()=>new A(136,1,32));var E=n(40369),I=n(82361),S=n(95046);function k(t,e){let n=O((0,E.v)(t,{strict:!1})?(0,I.O0)(t):t);return"bytes"===(e||"hex")?n:(0,S.NC)(n)}},98992:function(t,e,n){"use strict";n.d(e,{k:function(){return r}});class r extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}set(t,e){return super.set(t,e),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}},2342:function(t,e,n){"use strict";n.d(e,{k:function(){return h}});var r=n(82361),i=n(45626),o=n(99112),s=n(40369),u=n(88294),a=n(95046);async function c({hash:t,signature:e}){let r=(0,s.v)(t)?t:(0,a.NC)(t),{secp256k1:i}=await n.e(600).then(n.bind(n,35600)),o=(()=>{if("object"==typeof e&&"r"in e&&"s"in e){let{r:t,s:n,v:r,yParity:o}=e,s=f(Number(o??r));return new i.Signature((0,u.y_)(t),(0,u.y_)(n)).addRecoveryBit(s)}let t=(0,s.v)(e)?e:(0,a.NC)(e),n=f((0,u.ly)(`0x${t.slice(130)}`));return i.Signature.fromCompact(t.substring(2,130)).addRecoveryBit(n)})().recoverPublicKey(r.substring(2)).toHex(!1);return`0x${o}`}function f(t){if(0===t||1===t)return t;if(27===t)return 0;if(28===t)return 1;throw Error("Invalid yParityOrV value")}async function l({hash:t,signature:e}){return function(t){let e=(0,i.w)(`0x${t.substring(4)}`).substring(26);return(0,o.x)(`0x${e}`)}(await c({hash:t,signature:e}))}async function h({message:t,signature:e}){return l({hash:function(t,e){var n;let o="string"==typeof t?(0,r.qX)(t):t.raw instanceof Uint8Array?t.raw:(0,r.O0)(t.raw),s=(0,r.qX)(`\x19Ethereum Signed Message:
2
+ ${o.length}`);return(0,i.w)("string"==typeof(n=[s,o])[0]?`0x${n.reduce((t,e)=>t+e.replace("0x",""),"")}`:function(t){let e=0;for(let n of t)e+=n.length;let n=new Uint8Array(e),r=0;for(let e of t)n.set(e,r),r+=e.length;return n}(n),void 0)}(t),signature:e})}},25645:function(t,e,n){"use strict";n.d(e,{n:function(){return u}});var r=n(99112),i=n(51359),o=n(64113),s=n(2342);async function u({address:t,message:e,signature:n}){return function(t,e){if(!(0,o.U)(t,{strict:!1}))throw new i.b({address:t});if(!(0,o.U)(e,{strict:!1}))throw new i.b({address:e});return t.toLowerCase()===e.toLowerCase()}((0,r.K)(t),await (0,s.k)({message:e,signature:n}))}},95861:function(t,e,n){"use strict";function r(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`Wrong positive integer: ${t}`)}function i(t,...e){if(!(t instanceof Uint8Array))throw Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function o(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(t.outputLen),r(t.blockLen)}function s(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function u(t,e){i(t);let n=e.outputLen;if(t.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}n.d(e,{Gg:function(){return s},J8:function(){return u},Rx:function(){return r},aI:function(){return i},vp:function(){return o}})},12403:function(t,e,n){"use strict";n.d(e,{kb:function(){return f},eV:function(){return c},GL:function(){return s},O6:function(){return h},np:function(){return u},O0:function(){return a},Jq:function(){return o},hE:function(){return l}});let r="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,i=t=>t instanceof Uint8Array,o=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),s=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),u=(t,e)=>t<<32-e|t>>>e;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw Error("Non little-endian hardware is not supported");function a(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}(t)),!i(t))throw Error(`expected Uint8Array, got ${typeof t}`);return t}function c(...t){let e=new Uint8Array(t.reduce((t,e)=>t+e.length,0)),n=0;return t.forEach(t=>{if(!i(t))throw Error("Uint8Array expected");e.set(t,n),n+=t.length}),e}class f{clone(){return this._cloneInto()}}function l(t){let e=e=>t().update(a(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function h(t=32){if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(t));throw Error("crypto.getRandomValues must be defined")}}}]);
_next/static/chunks/33-0e9610205db2f7d7.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[33,109],{9109:function(t,e,r){/*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */let n=r(48738),i=r(6868),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function f(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!s.isEncoding(e))throw TypeError("Unknown encoding: "+e);let r=0|g(t,e),n=f(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(N(t,Uint8Array)){let e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return a(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(N(t,SharedArrayBuffer)||t&&N(t.buffer,SharedArrayBuffer)))return c(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);let i=function(t){var e;if(s.isBuffer(t)){let e=0|p(t.length),r=f(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?f(0):a(t):"Buffer"===t.type&&Array.isArray(t.data)?a(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return h(t),f(t<0?0:0|p(t))}function a(t){let e=t.length<0?0:0|p(t.length),r=f(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function c(t,e,r){let n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),s.prototype),n}function p(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function g(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return C(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(t).length;default:if(i)return n?-1:C(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=P[t[n]];return i}(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":var o,f;return o=e,f=r,0===o&&f===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(o,f));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}(this,e,r);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,f=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;f=2,s/=2,u/=2,r/=2}function h(t,e){return 1===f?t[e]:t.readUInt16BE(e*f)}if(i){let n=-1;for(o=r;o<s;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*f}else -1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return -1}function B(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,f=e>239?4:e>223?3:e>191?2:1;if(i+f<=r){let r,n,s,u;switch(f){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(u=(31&e)<<6|63&r)>127&&(o=u);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(u=(15&e)<<12|(63&r)<<6|63&n)>2047&&(u<55296||u>57343)&&(o=u);break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],(192&r)==128&&(192&n)==128&&(192&s)==128&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&u<1114112&&(o=u)}}null===o?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=f}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function E(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function m(t,e,r,n,i,o){if(!s.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function x(t,e,r,n,i){O(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f>>=8,t[r++]=f,f>>=8,t[r++]=f,f>>=8,t[r++]=f,r}function I(t,e,r,n,i){O(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f>>=8,t[r+2]=f,f>>=8,t[r+1]=f,f>>=8,t[r]=f,r+8}function U(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function A(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.Buffer=s,e.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=2147483647,s.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return(h(t),t<=0)?f(t):void 0!==e?"string"==typeof r?f(t).fill(e,r):f(t).fill(e):f(t)},s.allocUnsafe=function(t){return l(t)},s.allocUnsafeSlow=function(t){return l(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(N(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),N(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(N(e,Uint8Array))i+e.length>n.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(s.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},s.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},s.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},s.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?B(this,0,t):d.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,i){if(N(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,f=r-e,u=Math.min(o,f),h=this.slice(n,i),l=t.slice(e,r);for(let t=0;t<u;++t)if(h[t]!==l[t]){o=h[t],f=l[t];break}return o<f?-1:f<o?1:0},s.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){var i,o,f,s,u,h,l,a;if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let p=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let f=e.length;for(n>f/2&&(n=f/2),i=0;i<n;++i){let n=parseInt(e.substr(2*i,2),16);if(n!=n)break;t[r+i]=n}return i}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,H(C(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return f=e,s=r,H(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,f,s);case"base64":return u=e,h=r,H(k(t),this,u,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,a=r,H(function(t,e){let r,n;let i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,a);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=F(function(t){T(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&_(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=F(function(t){T(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&_(t,this.length-8);let n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return(t>>>=0,e||E(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=F(function(t){T(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&_(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+16777216*this[++t])}),s.prototype.readBigInt64BE=F(function(t){T(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&_(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(16777216*this[++t]+65536*this[++t]+256*this[++t]+r)}),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;m(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;m(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=F(function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=F(function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);m(this,t,e,r,n-1,-n)}let i=0,o=1,f=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===f&&0!==this[e+i-1]&&(f=1),this[e+i]=(t/o>>0)-f&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);m(this,t,e,r,n-1,-n)}let i=r-1,o=1,f=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===f&&0!==this[e+i+1]&&(f=1),this[e+i]=(t/o>>0)-f&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||m(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=F(function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=F(function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(t,e,r){return A(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},s.prototype.fill=function(t,e,r,n){let i;if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=s.isBuffer(t)?t:s.from(t,n),f=o.length;if(0===f)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%f]}return this};let v={};function R(t,e,r){v[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function S(t){let e="",r=t.length,n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function O(t,e,r,n,i,o){if(t>r||t<e){let n;let i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new v.ERR_OUT_OF_RANGE("value",n,t)}T(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&_(i,n.length-(o+1))}function T(t,e){if("number"!=typeof t)throw new v.ERR_INVALID_ARG_TYPE(e,"number",t)}function _(t,e,r){if(Math.floor(t)!==t)throw T(t,r),new v.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new v.ERR_BUFFER_OUT_OF_BOUNDS;throw new v.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}R("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),R("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),R("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=S(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=S(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let $=/[^+/0-9A-Za-z-_]/g;function C(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let f=0;f<n;++f){if((r=t.charCodeAt(f))>55295&&r<57344){if(!i){if(r>56319||f+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function k(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let P=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function F(t){return"undefined"==typeof BigInt?j:t}function j(){throw Error("BigInt not supported")}},65376:function(t,e,r){function n(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`positive integer expected, not ${t}`)}function i(t,...e){if(!(t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name))throw Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function o(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)}function f(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function s(t,e){i(t);let r=e.outputLen;if(t.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}r.d(e,{Gg:function(){return f},J8:function(){return s},Rx:function(){return n},aI:function(){return i},vp:function(){return o}})},44815:function(t,e,r){r.d(e,{VR:function(){return s},bc:function(){return o},l3:function(){return f}});var n=r(65376),i=r(68104);let o=(t,e,r)=>t&e^~t&r,f=(t,e,r)=>t&e^t&r^e&r;class s extends i.kb{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.GL)(this.buffer)}update(t){(0,n.Gg)(this);let{view:e,buffer:r,blockLen:o}=this,f=(t=(0,i.O0)(t)).length;for(let n=0;n<f;){let s=Math.min(o-this.pos,f-n);if(s===o){let e=(0,i.GL)(t);for(;o<=f-n;n+=o)this.process(e,n);continue}r.set(t.subarray(n,n+s),this.pos),this.pos+=s,n+=s,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.Gg)(this),(0,n.J8)(t,this),this.finished=!0;let{buffer:e,view:r,blockLen:o,isLE:f}=this,{pos:s}=this;e[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>o-s&&(this.process(r,0),s=0);for(let t=s;t<o;t++)e[t]=0;!function(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);let i=BigInt(32),o=BigInt(4294967295),f=Number(r>>i&o),s=Number(r&o),u=n?4:0,h=n?0:4;t.setUint32(e+u,f,n),t.setUint32(e+h,s,n)}(r,o-8,BigInt(8*this.length),f),this.process(r,0);let u=(0,i.GL)(t),h=this.outputLen;if(h%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=h/4,a=this.get();if(l>a.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<l;t++)u.setUint32(4*t,a[t],f)}digest(){let{buffer:t,outputLen:e}=this;this.digestInto(t);let r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:f}=this;return t.length=n,t.pos=f,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}},78967:function(t,e,r){r.d(e,{o:function(){return p}});var n=r(44815);let i=BigInt(4294967296-1),o=BigInt(32);var f={split:function(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let f=0;f<t.length;f++){let{h:s,l:u}=function(t,e=!1){return e?{h:Number(t&i),l:Number(t>>o&i)}:{h:0|Number(t>>o&i),l:0|Number(t&i)}}(t[f],e);[r[f],n[f]]=[s,u]}return[r,n]},shrSH:(t,e,r)=>t>>>r,shrSL:(t,e,r)=>t<<32-r|e>>>r,rotrSH:(t,e,r)=>t>>>r|e<<32-r,rotrSL:(t,e,r)=>t<<32-r|e>>>r,rotrBH:(t,e,r)=>t<<64-r|e>>>r-32,rotrBL:(t,e,r)=>t>>>r-32|e<<64-r,add:function(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/4294967296|0)|0,l:0|i}},add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/4294967296|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,i)=>e+r+n+i+(t/4294967296|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/4294967296|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)},s=r(68104);let[u,h]=f.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),l=new Uint32Array(80),a=new Uint32Array(80);class c extends n.VR{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:o,Dh:f,Dl:s,Eh:u,El:h,Fh:l,Fl:a,Gh:c,Gl:p,Hh:g,Hl:d}=this;return[t,e,r,n,i,o,f,s,u,h,l,a,c,p,g,d]}set(t,e,r,n,i,o,f,s,u,h,l,a,c,p,g,d){this.Ah=0|t,this.Al=0|e,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|f,this.Dl=0|s,this.Eh=0|u,this.El=0|h,this.Fh=0|l,this.Fl=0|a,this.Gh=0|c,this.Gl=0|p,this.Hh=0|g,this.Hl=0|d}process(t,e){for(let r=0;r<16;r++,e+=4)l[r]=t.getUint32(e),a[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){let e=0|l[t-15],r=0|a[t-15],n=f.rotrSH(e,r,1)^f.rotrSH(e,r,8)^f.shrSH(e,r,7),i=f.rotrSL(e,r,1)^f.rotrSL(e,r,8)^f.shrSL(e,r,7),o=0|l[t-2],s=0|a[t-2],u=f.rotrSH(o,s,19)^f.rotrBH(o,s,61)^f.shrSH(o,s,6),h=f.rotrSL(o,s,19)^f.rotrBL(o,s,61)^f.shrSL(o,s,6),c=f.add4L(i,h,a[t-7],a[t-16]),p=f.add4H(c,n,u,l[t-7],l[t-16]);l[t]=0|p,a[t]=0|c}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:s,Cl:c,Dh:p,Dl:g,Eh:d,El:y,Fh:b,Fl:w,Gh:B,Gl:E,Hh:m,Hl:x}=this;for(let t=0;t<80;t++){let e=f.rotrSH(d,y,14)^f.rotrSH(d,y,18)^f.rotrBH(d,y,41),I=f.rotrSL(d,y,14)^f.rotrSL(d,y,18)^f.rotrBL(d,y,41),U=d&b^~d&B,A=y&w^~y&E,L=f.add5L(x,I,A,h[t],a[t]),v=f.add5H(L,m,e,U,u[t],l[t]),R=0|L,S=f.rotrSH(r,n,28)^f.rotrBH(r,n,34)^f.rotrBH(r,n,39),O=f.rotrSL(r,n,28)^f.rotrBL(r,n,34)^f.rotrBL(r,n,39),T=r&i^r&s^i&s,_=n&o^n&c^o&c;m=0|B,x=0|E,B=0|b,E=0|w,b=0|d,w=0|y,({h:d,l:y}=f.add(0|p,0|g,0|v,0|R)),p=0|s,g=0|c,s=0|i,c=0|o,i=0|r,o=0|n;let $=f.add3L(R,O,_);r=f.add3H($,v,S,T),n=0|$}({h:r,l:n}=f.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=f.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:c}=f.add(0|this.Ch,0|this.Cl,0|s,0|c)),({h:p,l:g}=f.add(0|this.Dh,0|this.Dl,0|p,0|g)),({h:d,l:y}=f.add(0|this.Eh,0|this.El,0|d,0|y)),({h:b,l:w}=f.add(0|this.Fh,0|this.Fl,0|b,0|w)),({h:B,l:E}=f.add(0|this.Gh,0|this.Gl,0|B,0|E)),({h:m,l:x}=f.add(0|this.Hh,0|this.Hl,0|m,0|x)),this.set(r,n,i,o,s,c,p,g,d,y,b,w,B,E,m,x)}roundClean(){l.fill(0),a.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let p=(0,s.hE)(()=>new c)},68104:function(t,e,r){r.d(e,{kb:function(){return c},oY:function(){return u},U5:function(){return g},eV:function(){return a},GL:function(){return o},O6:function(){return y},np:function(){return f},O0:function(){return l},iY:function(){return h},hE:function(){return d}});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;var i=r(65376);let o=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),f=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];let s=async()=>{};async function u(t,e,r){let n=Date.now();for(let i=0;i<t;i++){r(i);let t=Date.now()-n;t>=0&&t<e||(await s(),n+=t)}}function h(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function l(t){return"string"==typeof t&&(t=h(t)),(0,i.aI)(t),t}function a(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];(0,i.aI)(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}class c{clone(){return this._cloneInto()}}let p={}.toString;function g(t,e){if(void 0!==e&&"[object Object]"!==p.call(e))throw Error("Options should be object or undefined");return Object.assign(t,e)}function d(t){let e=e=>t().update(l(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function y(t=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(t));throw Error("crypto.getRandomValues must be defined")}},36393:function(t,e,r){r.d(e,{v:function(){return n}});var n=r(37836);e.Z=n}}]);
_next/static/chunks/460.9ccc19d772db9f03.js ADDED
@@ -0,0 +1 @@
 
 
1
+ !function(){var e,o,n,t,r,i,s,c,l={50495:function(){},27147:function(){},31418:function(){},68741:function(){},70319:function(){},78386:function(){},73342:function(){},83743:function(e,o,n){"use strict";var t=n(78703);class r{constructor(){this.promise=new Promise((e,o)=>{this.resolve=e,this.reject=o})}}var i=n(36393),s=n(22170),c=n.n(s);let l="rakisSettings",a=null,d={initialLLMWorkers:[{modelName:"gemma-2b-it-q4f16_1",count:2}],initialEmbeddingWorkers:[{modelName:"nomic-ai/nomic-embed-text-v1.5",count:1}]},u={maxReceivedPacketQueueSize:100,receivePacketQueueDebounceMs:100,peerHeartLimit:20,peerCommunicationCount:40,maxPacketDBSize:5e3},g={topic:"rakis1",maxTransmissionErrorsBeforeRestart:5},f={dAppName:"Rakis",url:"https://rakis.ai"},m={maxLogsInMemory:1e3,loggersToSkipForInMemoryLog:["P2P: NKN","P2P: PewPewDB","P2P: nostr (trystero)","P2P: torrent (trystero)","PacketDB"],newLogEventDebounceMs:150},b={enabledP2PNetworks:["nostr","gun","torrent","nkn"],waitForP2PBootupMs:5e3,inferencePollingIntervalMs:5e3,inferenceRequestQueueDebounceMs:1e3,embeddingsQueueDebounceMs:100,requestSimilarityTimeWindowMs:2e3},v={quorumRevealRequestIssueTimeoutMs:1e4,quorumRevealTimeoutMs:2e4,quorumConsensusWindowMs:3e4,bEmbeddingThreshold:0},p={engineLogLimit:2e3,debounceLoadingProgressEventMs:50},w=function(){let e={};try{window.localStorage&&window.localStorage&&window.localStorage.getItem(l)&&(a=e=JSON.parse(window.localStorage.getItem(l)))}catch(o){console.error("Error loading settings from localStorage, loading saved settings if we have them",a),a&&(console.log("Using last loaded settings - ",a),e=a)}return e.packetDBSettings={...u,...e.packetDBSettings},e.p2pSettings={...g,...e.p2pSettings},e.chainConnectionSettings={...f,...e.chainConnectionSettings},e.loggerSettings={...m,...e.loggerSettings},e.theDomainSettings={...b,...e.theDomainSettings},e.quorumSettings={...v,...e.quorumSettings},e.llmEngineSettings={...p,...e.llmEngineSettings},e.workerSettings={...d,...e.workerSettings},e}().loggerSettings,y=0;class k extends i.Z{static getInstance(){return k.instance||(k.instance=new k),k.instance}static addLog(e,o,n){k.getInstance().logs.push({at:new Date,logger:e,type:o,id:y++,message:n}),k.getInstance().logs=k.getInstance().logs.slice(-w.maxLogsInMemory).sort((e,o)=>o.at.getTime()-e.at.getTime()),k.getInstance().emitNewLogs()}constructor(){super(),this.logs=[],this.emitNewLogs=c()(()=>{this.emit("newLog")},w.newLogEventDebounceMs)}}let L=function(e,o){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!n&&window&&(window.blockedLogLevels=localStorage.getItem("blockedLogLevels")||[],window.blockedLoggers=localStorage.getItem("blockedLoggers")||[]),{trace:function(t){for(var r,i,s,c,l=arguments.length,a=Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];!n&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("trace"))||(null===(c=window)||void 0===c?void 0:null===(s=c.blockedLoggers)||void 0===s?void 0:s.includes(e)))||console.log("%c[T] ".concat(e,":"),o,t,...a)},debug:function(t){for(var r,i,s,c,l=arguments.length,a=Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];!n&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("debug"))||(null===(c=window)||void 0===c?void 0:null===(s=c.blockedLoggers)||void 0===s?void 0:s.includes(e)))||(w.loggersToSkipForInMemoryLog.includes(e)||k.addLog(e,"debug",t),console.log("%c[D] ".concat(e,":"),o,t,...a))},info:function(t){for(var r,i,s,c,l=arguments.length,a=Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];!n&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("info"))||(null===(c=window)||void 0===c?void 0:null===(s=c.blockedLoggers)||void 0===s?void 0:s.includes(e)))||(w.loggersToSkipForInMemoryLog.includes(e)||k.addLog(e,"info",t),console.log("%c[I] ".concat(e,":"),o,t,...a))},warn:function(t){for(var r,i,s,c,l=arguments.length,a=Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];!n&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("warn"))||(null===(c=window)||void 0===c?void 0:null===(s=c.blockedLoggers)||void 0===s?void 0:s.includes(e)))||(w.loggersToSkipForInMemoryLog.includes(e)||k.addLog(e,"warn",t),console.warn("%c[W] ".concat(e,":"),o,t,...a))},error:function(t){for(var r,i,s,c,l=arguments.length,a=Array(l>1?l-1:0),d=1;d<l;d++)a[d-1]=arguments[d];!n&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("error"))||(null===(c=window)||void 0===c?void 0:null===(s=c.blockedLoggers)||void 0===s?void 0:s.includes(e)))||(w.loggersToSkipForInMemoryLog.includes(e)||k.addLog(e,"error",t),console.error("%c[ERROR] ".concat(e,":"),o,t,...a))}}}("Embedding Worker","background: #f0fff0; color: #90ee90;",!0);console.log("Created embedding worker logger ",L);let h=null;function S(e){self.postMessage(e)}async function P(e,o){try{h||((h={workerId:o,modelName:e,busyEmbedding:!1,modelLoadingProgress:0,modelLoadingPromise:new r}).pipeline=await (0,t.EUT)("feature-extraction",e,{quantized:!1,progress_callback:e=>{h&&(isNaN(e.progress)||(h.modelLoadingProgress=e.progress/100),e.progress>=100&&h.modelLoadingPromise.resolve())}}))}catch(e){return e.message}return await h.modelLoadingPromise.promise,!0}async function I(e,o){if(!h||!h.pipeline)return{success:!1,reason:"Model could not be loaded."};if(h.busyEmbedding)return{success:!1,reason:"Worker is busy embedding."};h.busyEmbedding=!0,S({type:"workerBusyEmbedding",batchId:o});try{L.debug("Worker ".concat(h.workerId," is now embedding ").concat(o),JSON.stringify(e));let n=await h.pipeline(e,{normalize:!0,pooling:"mean"});h.busyEmbedding=!1,S({type:"workerIdle"});let r=(0,t.eaU)(n,"ubinary"),i=await Promise.all(e.map(async(e,o)=>({text:e,embedding:n.slice([o,o+1]).data,binaryEmbedding:r.slice([o,o+1]).data})));return{success:!0,results:i}}catch(e){return h.busyEmbedding=!1,S({type:"workerIdle"}),{success:!1,reason:e.message}}}self.onmessage=async e=>{let o=e.data;switch(o.type){case"loadWorker":let n=await P(o.modelName,o.workerId);!0===n?S({type:"workerLoaded",modelName:o.modelName}):S({type:"workerLoadFailure",modelName:o.modelName,err:n});break;case"embedText":let t=await I(o.texts,o.batchId);t.success?S({type:"embeddingSuccess",batchId:o.batchId,results:t.results}):S({type:"embeddingFailure",batchId:o.batchId,reason:t.reason});break;default:L.error("EMBEDDING WORKER GOT ",e," - THIS SHOULDNT HAPPEN!")}}}},a={};function d(e){var o=a[e];if(void 0!==o)return o.exports;var n=a[e]={exports:{}},t=!0;try{l[e](n,n.exports,d),t=!1}finally{t&&delete a[e]}return n.exports}d.m=l,d.x=function(){var e=d.O(void 0,[165,132,15,708,109,611],function(){return d(83743)});return d.O(e)},e=[],d.O=function(o,n,t,r){if(n){r=r||0;for(var i=e.length;i>0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[n,t,r];return}for(var s=1/0,i=0;i<e.length;i++){for(var n=e[i][0],t=e[i][1],r=e[i][2],c=!0,l=0;l<n.length;l++)s>=r&&Object.keys(d.O).every(function(e){return d.O[e](n[l])})?n.splice(l--,1):(c=!1,r<s&&(s=r));if(c){e.splice(i--,1);var a=t();void 0!==a&&(o=a)}}return o},d.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(o,{a:o}),o},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},d.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);d.r(r);var i={};o=o||[null,n({}),n([]),n(n)];for(var s=2&t&&e;"object"==typeof s&&!~o.indexOf(s);s=n(s))Object.getOwnPropertyNames(s).forEach(function(o){i[o]=function(){return e[o]}});return i.default=function(){return e},d.d(r,i),r},d.d=function(e,o){for(var n in o)d.o(o,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(o,n){return d.f[n](e,o),o},[]))},d.u=function(e){return 708===e?"static/chunks/708-689e257ca99149f8.js":"static/chunks/"+(({15:"b2db8554",132:"6139e184",165:"590caa2a"})[e]||e)+"."+({15:"daf562cf211503d9",109:"4494b95474b67c66",132:"f7be02f919211e5d",165:"51e5370714aa8292",611:"f019be0ba621c646"})[e]+".js"},d.miniCssF=function(e){},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.tt=function(){return void 0===t&&(t={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(t=trustedTypes.createPolicy("nextjs#bundler",t))),t},d.tu=function(e){return d.tt().createScriptURL(e)},d.p="/_next/",r={460:1},d.f.i=function(e,o){r[e]||importScripts(d.tu(d.p+d.u(e)))},s=(i=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push.bind(i),i.push=function(e){var o=e[0],n=e[1],t=e[2];for(var i in n)d.o(n,i)&&(d.m[i]=n[i]);for(t&&t(d);o.length;)r[o.pop()]=1;s(e)},c=d.x,d.x=function(){return Promise.all([165,132,15,708,109,611].map(d.e,d)).then(c)},_N_E=d.x()}();
_next/static/chunks/483-34b8de39266be54b.js ADDED
@@ -0,0 +1 @@
 
 
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[483],{89733:function(e,r,n){n.d(r,{z:function(){return a}});var t=n(57437),o=n(2265),s=n(71538),i=n(12218),l=n(49354);let d=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),a=o.forwardRef((e,r)=>{let{className:n,variant:o,size:i,asChild:a=!1,...g}=e,m=a?s.g7:"button";return(0,t.jsx)(m,{className:(0,l.cn)(d({variant:o,size:i,className:n})),ref:r,...g})});a.displayName="Button"},4919:function(e,r,n){n.d(r,{g:function(){return i}});var t=n(57437),o=n(2265),s=n(49354);let i=o.forwardRef((e,r)=>{let{className:n,...o}=e;return(0,t.jsx)("textarea",{className:(0,s.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:r,...o})});i.displayName="Textarea"},80018:function(e,r,n){n.d(r,{X:function(){return d}});var t=n(28580),o=n(36393),s=n(13201),i=n(62052);let l=(0,i.hu)("Embedding Engine",i.$5.embeddingEngine.main);class d extends o.Z{getEmbeddingEngineLogs(e){return this.embeddingEngineLog.slice(-e)}getAvailableModels(){return Array.from(new Set(Object.keys(this.embeddingWorkers).map(e=>this.embeddingWorkers[e].modelName)))}logEngineEvent(e){e.at||(e.at=new Date);let r=this.embeddingEngineLog.length;return l.debug("Embedding engine event ".concat(e.type)),this.embeddingEngineLog.push(e),r}async scaleEmbeddingWorkers(e,r){let n=Object.values(this.embeddingWorkers).filter(r=>r.modelName===e).length;if(n!==r){if(n<r){l.debug("Scaling up number of embedding workers for ".concat(e," to ").concat(r));for(let t=0;t<r-n;t++){let r="embedding-".concat(e,"-").concat((0,s.zs)());this.addEmbeddingWorker(e,r)}}else for(let t of(l.debug("Scaling down number of embedding workers for ".concat(e," to ").concat(r)),Object.keys(this.embeddingWorkers).sort((e,r)=>this.embeddingWorkers[e].busy===this.embeddingWorkers[r].busy?0:this.embeddingWorkers[e].busy?-1:1).slice(0,n-r)))this.deleteEmbeddingWorker(t)}}addEmbeddingWorker(e,r){if(this.embeddingWorkers[r])return;l.debug("Trying to create new embedding worker ".concat(r," for model ").concat(e));let o=new Worker(n.tu(new URL(n.p+n.u(460),n.b)));o.onmessage=n=>{let t=n.data;switch(l.debug("Received message from worker ".concat(r,": ").concat(t.type)),t.type){case"workerLoaded":this.embeddingWorkers[r].status="loaded",this.embeddingWorkers[r].busy=!1,this.logEngineEvent({type:"embeddings_worker_loaded",modelName:e,workerId:r}),this.embeddingWorkers[r].workerLoadedPromise.resolve(!0),this.emit("workerFree",{modelName:e,workerId:r});break;case"workerLoadFailure":this.embeddingWorkers[r].status="failed",this.logEngineEvent({type:"engine_loading_error",modelName:e,error:"Failed to load embedding worker",workerId:r}),this.embeddingWorkers[r].workerLoadedPromise.resolve(!1),this.logEngineEvent({type:"embeddings_worker_unload",workerId:r}),delete this.embeddingWorkers[r];break;case"embeddingSuccess":let o=this.embeddingJobQueue.find(e=>e.batchId===t.batchId);o?o.completionPromise.resolve(t.results):l.error("EMBEDDING ENGINE ERROR: SHOUDLNT HAPPEN, couldn't find job to resolve"),this.emit("workerFree",{modelName:e,workerId:r});break;case"embeddingFailure":let s=this.embeddingJobQueue.find(e=>e.assignedWorkerId===r);s&&s.completionPromise.resolve(!1),this.emit("workerFree",{modelName:e,workerId:r});break;case"workerBusyEmbedding":this.embeddingWorkers[r].busy=!0;break;case"workerIdle":this.embeddingWorkers[r].busy=!1,this.runJobFromQueue()}},o.postMessage({type:"loadWorker",modelName:e,workerId:r}),this.embeddingWorkers[r]={busy:!0,worker:o,modelName:e,status:"loading",workerLoadedPromise:new t.C}}deleteEmbeddingWorker(e){this.embeddingWorkers[e]&&(this.embeddingWorkers[e].worker.terminate(),delete this.embeddingWorkers[e],this.logEngineEvent({type:"embeddings_worker_unload",workerId:e}))}async embedText(e,r){let n=new t.C;return this.embeddingJobQueue.push({batchId:"".concat(this.embeddingBatchCounter++),modelName:r,params:{texts:e},completionPromise:n}),this.queuesRunning<Object.keys(this.embeddingWorkers).length&&this.runJobFromQueue(),n.promise}async runJobFromQueue(){try{this.queuesRunning++,l.debug("Trying to run a job from the queue, queue length is ".concat(this.embeddingJobQueue.length," jobs, with ").concat(this.queuesRunning," queues running"));let e=this.embeddingJobQueue.filter(e=>!e.assignedWorkerId);if(0===e.length){l.debug("No jobs left, queue is going to sleep"),this.queuesRunning--;return}let r=e.shift(),n=Object.keys(this.embeddingWorkers).filter(e=>this.embeddingWorkers[e].modelName===r.modelName);if(0===n.length)l.error("No workers loaded with embedding model ".concat(r.modelName,", ignoring job")),r.completionPromise.resolve(!1);else{l.debug("".concat(n.length," workers available for embedding ").concat(r.params.texts));let t=n.filter(e=>this.embeddingWorkers[e]&&this.embeddingWorkers[e].modelName===r.modelName&&"loaded"===this.embeddingWorkers[e].status&&!this.embeddingWorkers[e].busy);if(0===t.length){e.unshift(r),l.debug("No free workers available, wait to be called on idle"),this.queuesRunning--;return}let o=t[Math.floor(Math.random()*t.length)];r.assignedWorkerId=o,this.embeddingJobQueue.push(r),r.params.texts.forEach((e,n)=>{this.logEngineEvent({type:"engine_embedding_start",text:e,batchId:r.batchId,workerId:o})}),l.debug("Embedding ".concat(r.batchId,": ").concat(r.params.texts.length," texts with ").concat(r.modelName," on worker ").concat(o));try{this.embeddingWorkers[o].worker.postMessage({type:"embedText",texts:r.params.texts,batchId:r.batchId});let e=await r.completionPromise.promise;return e?e.forEach((e,n)=>{this.logEngineEvent({type:"engine_embedding_success",batchId:r.batchId,workerId:o})}):r.params.texts.forEach((e,n)=>{this.logEngineEvent({type:"engine_embedding_error",error:"Failed to embed text, returned false",batchId:r.batchId,workerId:o})}),this.queuesRunning--,e}catch(e){r.params.texts.forEach((n,t)=>{this.logEngineEvent({type:"engine_embedding_error",error:e,batchId:r.batchId,workerId:o})}),r.completionPromise.resolve(!1),this.queuesRunning--}}}catch(e){l.error("Error running job from queue",e),this.logEngineEvent({type:"engine_embedding_error",error:e,batchId:"unassigned",workerId:"unassigned"}),this.queuesRunning--}}constructor(...e){super(...e),this.embeddingEngineLog=[],this.embeddingBatchCounter=0,this.queuesRunning=0,this.embeddingWorkers={},this.embeddingJobQueue=[]}}},89183:function(e,r,n){n.d(r,{g:function(){return u}});var t=n(28580),o=n(31561),s=n(36393),i=n(13201),l=n(62052),d=n(89028),a=n(22170),g=n.n(a);let m=(0,l.hu)("LLM Engine",l.$5.llmEngine.main),c=(0,d.ri)().llmEngineSettings;class u extends s.Z{logEngineEvent(e){e.at||(e.at=new Date);let r=this.engineLog.length;return m.debug("Engine event ".concat(e.type),e),this.engineLog.push(e),this.engineLog.length>c.engineLogLimit&&(this.engineLog=this.engineLog.slice(-c.engineLogLimit)),r}parseCustomLoadingProgress(e){let r=/Loading model from cache\[(\d+)\/(\d+)\]/.exec(e);if(r)try{let e=parseInt(r[1]),n=parseInt(r[2]);return e/n-.01}catch(e){return}}searchEngineLogs(e,r){return this.engineLog.filter(n=>n.type===e&&n.workerId===r)}getEngineLogs(e){return this.engineLog.slice(-e)}updateStreamingLogResult(e,r){let n=this.engineLog[r];"engine_inference_streaming_result"===n.type&&("token"===e.type?(n.result+=e.token,n.tokenCount++):"fullMessage"===e.type?(n.result=e.message,n.completed=!0):"tokenCount"===e.type&&(n.tokenCount=e.tokenCount))}getWorkerStates(){return Object.keys(this.llmWorkers).reduce((e,r)=>(e[r]={modelName:this.llmWorkers[r].modelName,state:this.llmWorkers[r].inferenceInProgress?"inference-in-progress":this.llmWorkers[r].modelLoadingProgress<1?"loading":"idle",loadingProgress:this.llmWorkers[r].modelLoadingProgress},e),{})}getWorkerAvailability(e){return Object.values(this.llmWorkers).reduce((r,n)=>{if(e.includes(n.modelName)){var t,o;null!==(o=r[t=n.modelName])&&void 0!==o||(r[t]={count:0,free:0}),r[n.modelName].count++,!n.inferenceInProgress&&n.modelLoadingProgress>=1&&r[n.modelName].free++}return r},{})}async unloadWorker(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.llmWorkers[e]){var n,t;r||await (null===(n=this.llmWorkers[e].inferencePromise)||void 0===n?void 0:n.promise),null===(t=this.llmWorkers[e].llmEngine)||void 0===t||t.unload(),delete this.llmWorkers[e],this.logEngineEvent({type:"engine_unload",workerId:e}),this.emit("workerUnloaded",{workerId:e}),this.saveWorkersToSettings()}}saveWorkersToSettings(){let e=Object.values(Object.values(this.llmWorkers).filter(e=>e.modelLoadingProgress>=1).reduce((e,r)=>(e[r.modelName]?e[r.modelName].count++:e[r.modelName]={modelName:r.modelName,count:1},e),{}));(0,d.zQ)({workerSettings:{initialLLMWorkers:e}})}async getWorkerState(e){return this.llmWorkers[e]?this.llmWorkers[e].modelLoadingProgress<1?{state:"loading",loadingProgress:this.llmWorkers[e].modelLoadingProgress}:this.llmWorkers[e].inferenceInProgress?{state:"inference-in-progress"}:{state:"idle"}:null}async loadWorker(e,r){var s,i,l;if(null!==(i=(s=this.llmWorkers)[r])&&void 0!==i||(s[r]={modelName:e,modelLoadingProgress:0}),this.llmWorkers[r].modelLoadingPromise)return m.debug("Tried to create worker ".concat(r,", but creation is already done or in progress")),await this.llmWorkers[r].modelLoadingPromise.promise;this.llmWorkers[r].modelLoadingPromise=new t.C;try{this.logEngineEvent({type:"engine_loading",modelName:e,workerId:r}),this.emit("workerLoading",{modelName:e,workerId:r}),this.llmWorkers[r].llmEngine=await o.F0(new Worker(n.tu(new URL(n.p+n.u(572),n.b)),{type:void 0}),e,{initProgressCallback:n=>{if(m.debug("Worker ".concat(r,": Loading ").concat(e," progress - "),n),this.emitModelLoadingProgress(),0===n.progress){let e=this.parseCustomLoadingProgress(n.text);e?(this.llmWorkers[r].modelLoadingProgress=e,m.debug("Worker ".concat(r,": Custom progress parsed - ").concat(e))):this.llmWorkers[r].modelLoadingProgress=n.progress}else this.llmWorkers[r].modelLoadingProgress=n.progress;if(1===n.progress&&!this.searchEngineLogs("engine_loaded",r).filter(r=>r.modelName===e).length){var t;this.logEngineEvent({type:"engine_loaded",modelName:e,workerId:r}),this.emit("workerLoaded",{modelName:e,workerId:r}),this.emit("workerFree",{workerId:r}),this.saveWorkersToSettings(),null===(t=this.llmWorkers[r].modelLoadingPromise)||void 0===t||t.resolve(r)}}})}catch(n){this.emit("workerLoadFailed",{modelName:e,workerId:r,error:n}),this.logEngineEvent({type:"engine_loading_error",modelName:e,workerId:r,error:n}),m.error("Worker ".concat(r,": Error loading ").concat(e,": ").concat(n),n),null===(l=this.llmWorkers[r].modelLoadingPromise)||void 0===l||l.reject(n),this.unloadWorker(r,!0)}return this.llmWorkers[r]&&await this.llmWorkers[r].modelLoadingPromise.promise||!1}getMatchingWorkers(e,r){return Object.keys(this.llmWorkers).filter(n=>this.llmWorkers[n].modelName===e.modelName&&this.llmWorkers[n].modelLoadingProgress>=1&&(!r||!this.llmWorkers[n].inferenceInProgress)).reduce((e,r)=>(e[r]=this.llmWorkers[r],e),{})}async runInferenceNonStreaming(e){let r=await this.runInference(e),n="",t=0;for await(let e of r)if("fullMessage"===e.type)n=e.message;else{if("error"===e.type)return{success:!1,error:e.error};"tokenCount"===e.type?t=e.tokenCount:"token"===e.type&&(n+=e.token,t++)}return{success:!0,result:n,tokenCount:t}}async *runInference(e,r){let n=this.getMatchingWorkers(e,!0);if(0===Object.keys(n).length)throw Error("No free workers available");let t=Object.keys(n)[Math.floor(Math.random()*Object.keys(n).length)];for await(let n of(await this.runInferenceOnWorker(e,t,r)))yield n}abortWorkerInference(e){let r=this.llmWorkers[e];if(r&&r.llmEngine&&r.inferenceInProgress){var n;r.llmEngine.interruptGenerate(),r.inferenceInProgress=!1,null===(n=r.inferencePromise)||void 0===n||n.resolve(!1),this.logEngineEvent({type:"engine_inference_error",workerId:e,inferenceId:this.inferenceCounter,error:"Inference manually aborted with control signal from the engine"})}}async *runInferenceOnWorker(e,r,n){if(!this.llmWorkers[r]||!this.llmWorkers[r].llmEngine||!this.llmWorkers[r].modelLoadingPromise)throw Error("Engine not loaded");if(await this.llmWorkers[r].modelLoadingPromise.promise,this.llmWorkers[r].inferenceInProgress)throw Error("Inference already in progress");let o=this.inferenceCounter++;this.logEngineEvent({type:"engine_inference_start",workerId:r,inferenceId:o,params:e}),this.emit("workerBusy",{workerId:r}),this.llmWorkers[r].inferenceInProgress=!0,this.llmWorkers[r].inferencePromise=new t.C;let s=this.logEngineEvent({type:"engine_inference_streaming_result",workerId:r,inferenceId:o,completed:!1,tokenCount:0,result:""});try{let t=await this.llmWorkers[r].llmEngine.chat.completions.create({stream:!0,messages:e.messages,temperature:1,max_gen_len:2048}),i="",l=0;for await(let e of t){if(null==n?void 0:n.aborted){this.llmWorkers[r].llmEngine.interruptGenerate(),this.llmWorkers[r].inferenceInProgress=!1,this.llmWorkers[r].inferencePromise.resolve(!1),this.logEngineEvent({type:"engine_inference_error",workerId:r,inferenceId:o,error:"Inference manually aborted with control signal during inference"}),yield{type:"error",error:"Inference manually aborted with control signal"};return}if(e.choices[0].delta.content){let r={type:"token",token:e.choices[0].delta.content};i+=e.choices[0].delta.content,l++,this.updateStreamingLogResult(r,s),yield r}}let d={type:"tokenCount",tokenCount:l};this.updateStreamingLogResult(d,s),yield d;let a={type:"fullMessage",message:i};this.updateStreamingLogResult(a,s),yield a,this.llmWorkers[r].inferenceInProgress=!1,this.llmWorkers[r].inferencePromise.resolve(!0)}catch(e){m.error("Worker ".concat(r,": Error running inference"),e),this.llmWorkers[r].inferenceInProgress=!1,this.llmWorkers[r].inferencePromise.resolve(!1),this.logEngineEvent({type:"engine_inference_error",workerId:r,inferenceId:o,error:e}),yield{type:"error",error:e}}this.emit("workerFree",{workerId:r})}async scaleLLMWorkers(e,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let t=Object.values(this.llmWorkers).filter(r=>r.modelName===e).length;if(t===r)return;if(t<r){m.debug("Scaling up number of llm workers for ".concat(e," to ").concat(r));let n=[];for(let o=0;o<r-t;o++){let r="llm-".concat(e,"-").concat((0,i.zs)());n.push(this.loadWorker(e,r))}}else{m.debug("Scaling down number of llm workers for ".concat(e," to ").concat(r));let o=Object.keys(this.llmWorkers).sort((e,r)=>this.llmWorkers[e].inferenceInProgress===this.llmWorkers[r].inferenceInProgress?0:this.llmWorkers[e].inferenceInProgress?-1:1).slice(0,t-r),s=[];for(let e of o)s.push(this.unloadWorker(e,n))}}catch(e){m.error("Error updating LLM workers",e)}}constructor(...e){super(...e),this.llmWorkers={},this.engineLog=[],this.inferenceCounter=0,this.emitModelLoadingProgress=g()(()=>{this.emit("modelLoadingProgress")},c.debounceLoadingProgressEventMs)}}},79798:function(e,r,n){n.d(r,{o:function(){return t}});let t=["Llama-3-8B-Instruct-q4f32_1","Llama-2-7b-chat-hf-q4f16_1","Llama-2-13b-chat-hf-q4f16_1","Mistral-7B-Instruct-v0.2-q4f16_1","Hermes-2-Pro-Mistral-7B-q4f16_1","gemma-2b-it-q4f16_1","TinyLlama-1.1B-Chat-v0.4-q0f16"]}}]);
_next/static/chunks/572.0a3b7ea4a23e12f2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ !function(){var t,r,e,n,o,i,u={48738:function(t,r){"use strict";r.byteLength=function(t){var r=a(t),e=r[0],n=r[1];return(e+n)*3/4-n},r.toByteArray=function(t){var r,e,i=a(t),u=i[0],c=i[1],f=new o((u+c)*3/4-c),s=0,h=c>0?u-4:u;for(e=0;e<h;e+=4)r=n[t.charCodeAt(e)]<<18|n[t.charCodeAt(e+1)]<<12|n[t.charCodeAt(e+2)]<<6|n[t.charCodeAt(e+3)],f[s++]=r>>16&255,f[s++]=r>>8&255,f[s++]=255&r;return 2===c&&(r=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,f[s++]=255&r),1===c&&(r=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,f[s++]=r>>8&255,f[s++]=255&r),f},r.fromByteArray=function(t){for(var r,n=t.length,o=n%3,i=[],u=0,c=n-o;u<c;u+=16383)i.push(function(t,r,n){for(var o,i=[],u=r;u<n;u+=3)i.push(e[(o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]))>>18&63]+e[o>>12&63]+e[o>>6&63]+e[63&o]);return i.join("")}(t,u,u+16383>c?c:u+16383));return 1===o?i.push(e[(r=t[n-1])>>2]+e[r<<4&63]+"=="):2===o&&i.push(e[(r=(t[n-2]<<8)+t[n-1])>>10]+e[r>>4&63]+e[r<<2&63]+"="),i.join("")};for(var e=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=i.length;u<c;++u)e[u]=i[u],n[i.charCodeAt(u)]=u;function a(t){var r=t.length;if(r%4>0)throw Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");-1===e&&(e=r);var n=e===r?0:4-e%4;return[e,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},6868:function(t,r){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */r.read=function(t,r,e,n,o){var i,u,c=8*o-n-1,a=(1<<c)-1,f=a>>1,s=-7,h=e?o-1:0,l=e?-1:1,p=t[r+h];for(h+=l,i=p&(1<<-s)-1,p>>=-s,s+=c;s>0;i=256*i+t[r+h],h+=l,s-=8);for(u=i&(1<<-s)-1,i>>=-s,s+=n;s>0;u=256*u+t[r+h],h+=l,s-=8);if(0===i)i=1-f;else{if(i===a)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,c,a,f=8*i-o-1,s=(1<<f)-1,h=s>>1,l=23===o?5960464477539062e-23:0,p=n?0:i-1,d=n?1:-1,v=r<0||0===r&&1/r<0?1:0;for(isNaN(r=Math.abs(r))||r===1/0?(c=isNaN(r)?1:0,u=s):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),u+h>=1?r+=l/a:r+=l*Math.pow(2,1-h),r*a>=2&&(u++,a/=2),u+h>=s?(c=0,u=s):u+h>=1?(c=(r*a-1)*Math.pow(2,o),u+=h):(c=r*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[e+p]=255&c,p+=d,c/=256,o-=8);for(u=u<<o|c,f+=o;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*v}},22661:function(t,r,e){"use strict";var n=e(31561);let o=new n.Lh,i=new n.cD(o);self.onmessage=t=>{i.onmessage(t)}},25566:function(t){var r,e,n,o=t.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{e="function"==typeof clearTimeout?clearTimeout:u}catch(t){e=u}}();var a=[],f=!1,s=-1;function h(){f&&n&&(f=!1,n.length?a=n.concat(a):s=-1,a.length&&l())}function l(){if(!f){var t=c(h);f=!0;for(var r=a.length;r;){for(n=a,a=[];++s<r;)n&&n[s].run();s=-1,r=a.length}n=null,f=!1,function(t){if(e===clearTimeout)return clearTimeout(t);if((e===u||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{e(t)}catch(r){try{return e.call(null,t)}catch(r){return e.call(this,t)}}}(t)}}function p(t,r){this.fun=t,this.array=r}function d(){}o.nextTick=function(t){var r=Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)r[e-1]=arguments[e];a.push(new p(t,r)),1!==a.length||f||c(l)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},c={};function a(t){var r=c[t];if(void 0!==r)return r.exports;var e=c[t]={exports:{}},n=!0;try{u[t](e,e.exports,a),n=!1}finally{n&&delete c[t]}return e.exports}a.m=u,a.x=function(){var t=a.O(void 0,[333,109],function(){return a(22661)});return a.O(t)},t=[],a.O=function(r,e,n,o){if(e){o=o||0;for(var i=t.length;i>0&&t[i-1][2]>o;i--)t[i]=t[i-1];t[i]=[e,n,o];return}for(var u=1/0,i=0;i<t.length;i++){for(var e=t[i][0],n=t[i][1],o=t[i][2],c=!0,f=0;f<e.length;f++)u>=o&&Object.keys(a.O).every(function(t){return a.O[t](e[f])})?e.splice(f--,1):(c=!1,o<u&&(u=o));if(c){t.splice(i--,1);var s=n();void 0!==s&&(r=s)}}return r},a.d=function(t,r){for(var e in r)a.o(r,e)&&!a.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},a.f={},a.e=function(t){return Promise.all(Object.keys(a.f).reduce(function(r,e){return a.f[e](t,r),r},[]))},a.u=function(t){return 333===t?"static/chunks/fbe89ba5-2be908ceba4a7d9b.js":"static/chunks/"+t+".4494b95474b67c66.js"},a.miniCssF=function(t){},a.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},a.j=572,a.tt=function(){return void 0===r&&(r={createScriptURL:function(t){return t}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(r=trustedTypes.createPolicy("nextjs#bundler",r))),r},a.tu=function(t){return a.tt().createScriptURL(t)},a.p="/_next/",e={572:1},a.f.i=function(t,r){e[t]||importScripts(a.tu(a.p+a.u(t)))},o=(n=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push.bind(n),n.push=function(t){var r=t[0],n=t[1],i=t[2];for(var u in n)a.o(n,u)&&(a.m[u]=n[u]);for(i&&i(a);r.length;)e[r.pop()]=1;o(t)},i=a.x,a.x=function(){return Promise.all([a.e(333),a.e(109)]).then(i)},_N_E=a.x()}();
_next/static/chunks/611.f019be0ba621c646.js ADDED
The diff for this file is too large to render. See raw diff
 
_next/static/chunks/635-3866341c9971375e.js ADDED
@@ -0,0 +1 @@
 
 
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[635],{53185:function(e,t,n){var r;r=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)},t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,o=Object.keys,a=Array.isArray;function u(e,t){return"object"!=typeof t||o(t).forEach(function(n){e[n]=t[n]}),e}"undefined"==typeof Promise||i.Promise||(i.Promise=Promise);var s=Object.getPrototypeOf,c={}.hasOwnProperty;function l(e,t){return c.call(e,t)}function f(e,t){"function"==typeof t&&(t=t(s(e))),("undefined"==typeof Reflect?o:Reflect.ownKeys)(t).forEach(function(n){d(e,n,t[n])})}var h=Object.defineProperty;function d(e,t,n,r){h(e,t,u(n&&l(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function p(e){return{from:function(t){return e.prototype=Object.create(t.prototype),d(e.prototype,"constructor",e),{extend:f.bind(null,e.prototype)}}}}var y=Object.getOwnPropertyDescriptor,v=[].slice;function m(e,t,n){return v.call(e,t,n)}function b(e,t){return t(e)}function g(e){if(!e)throw Error("Assertion Failed")}function w(e){i.setImmediate?setImmediate(e):setTimeout(e,0)}function _(e,t){if("string"==typeof t&&l(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,i=t.length;r<i;++r){var o=_(e,t[r]);n.push(o)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return null==u?void 0:_(u,t.substr(a+1))}}function x(e,t,n){if(e&&void 0!==t&&!("isFrozen"in Object&&Object.isFrozen(e))){if("string"!=typeof t&&"length"in t){g("string"!=typeof n&&"length"in n);for(var r=0,i=t.length;r<i;++r)x(e,t[r],n[r])}else{var o,u,s=t.indexOf(".");-1!==s?(o=t.substr(0,s),""===(u=t.substr(s+1))?void 0===n?a(e)&&!isNaN(parseInt(o))?e.splice(o,1):delete e[o]:e[o]=n:x(s=(s=e[o])&&l(e,o)?s:e[o]={},u,n)):void 0===n?a(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}}function k(e){var t,n={};for(t in e)l(e,t)&&(n[t]=e[t]);return n}var O=[].concat;function P(e){return O.apply([],e)}var E="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(P([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return i[e]}),K=new Set(E.map(function(e){return i[e]})),S=null;function j(e){return S=new WeakMap,e=function e(t){if(!t||"object"!=typeof t)return t;var n=S.get(t);if(n)return n;if(a(t)){n=[],S.set(t,n);for(var r=0,i=t.length;r<i;++r)n.push(e(t[r]))}else if(K.has(t.constructor))n=t;else{var o,u=s(t);for(o in n=u===Object.prototype?{}:Object.create(u),S.set(t,n),t)l(t,o)&&(n[o]=e(t[o]))}return n}(e),S=null,e}var C={}.toString;function A(e){return C.call(e).slice(8,-1)}var D="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",T="symbol"==typeof D?function(e){var t;return null!=e&&(t=e[D])&&t.apply(e)}:function(){return null};function q(e,t){return 0<=(t=e.indexOf(t))&&e.splice(t,1),0<=t}var I={};function B(e){var t,n,r,i;if(1==arguments.length){if(a(e))return e.slice();if(this===I&&"string"==typeof e)return[e];if(i=T(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(null==e||"number"!=typeof(t=e.length))return[e];for(n=Array(t);t--;)n[t]=e[t];return n}for(t=arguments.length,n=Array(t);t--;)n[t]=arguments[t];return n}var R="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},N=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],F=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(N),M={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function L(e,t){this.name=e,this.message=t}function U(e,t){return e+". Errors: "+Object.keys(t).map(function(e){return t[e].toString()}).filter(function(e,t,n){return n.indexOf(e)===t}).join("\n")}function V(e,t,n,r){this.failures=t,this.failedKeys=r,this.successCount=n,this.message=U(e,t)}function z(e,t){this.name="BulkError",this.failures=Object.keys(t).map(function(e){return t[e]}),this.failuresByPos=t,this.message=U(e,this.failures)}p(L).from(Error).extend({toString:function(){return this.name+": "+this.message}}),p(V).from(L),p(z).from(L);var W=F.reduce(function(e,t){return e[t]=t+"Error",e},{}),$=F.reduce(function(e,t){var n=t+"Error";function r(e,r){this.name=n,e?"string"==typeof e?(this.message="".concat(e).concat(r?"\n "+r:""),this.inner=r||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=M[t]||n,this.inner=null)}return p(r).from(L),e[t]=r,e},{});$.Syntax=SyntaxError,$.Type=TypeError,$.Range=RangeError;var Y=N.reduce(function(e,t){return e[t+"Error"]=$[t],e},{}),Q=F.reduce(function(e,t){return -1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=$[t]),e},{});function G(){}function X(e){return e}function H(e,t){return null==e||e===X?t:function(n){return t(e(n))}}function J(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Z(e,t){return e===G?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?J(r,this.onsuccess):r),i&&(this.onerror=this.onerror?J(i,this.onerror):i),void 0!==o?o:n}}function ee(e,t){return e===G?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?J(n,this.onsuccess):n),r&&(this.onerror=this.onerror?J(r,this.onerror):r)}}function et(e,t){return e===G?t:function(n){var r=e.apply(this,arguments);u(n,r);var i=this.onsuccess,o=this.onerror;return this.onsuccess=null,this.onerror=null,n=t.apply(this,arguments),i&&(this.onsuccess=this.onsuccess?J(i,this.onsuccess):i),o&&(this.onerror=this.onerror?J(o,this.onerror):o),void 0===r?void 0===n?void 0:n:u(r,n)}}function en(e,t){return e===G?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function er(e,t){return e===G?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,i=arguments.length,o=Array(i);i--;)o[i]=arguments[i];return n.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}Q.ModifyError=V,Q.DexieError=L,Q.BulkError=z;var ei="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),eo={},E="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,s(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,s(t),e]}(),N=E[0],F=E[1],E=E[2],F=F&&F.then,ea=N&&N.constructor,eu=!!E,es=function(e,t){ev.push([e,t]),el&&(queueMicrotask(eE),el=!1)},ec=!0,el=!0,ef=[],eh=[],ed=X,ep={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:G,pgp:!1,env:{},finalize:G},ey=ep,ev=[],em=0,eb=[];function eg(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=ey;if("function"!=typeof e){if(e!==eo)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ex(this,this._value))}this._state=null,this._value=null,++t.ref,function e(t,n){try{n(function(n){if(null===t._state){if(n===t)throw TypeError("A promise cannot be resolved with itself.");var r=t._lib&&eK();n&&"function"==typeof n.then?e(t,function(e,t){n instanceof eg?n._then(e,t):n.then(e,t)}):(t._state=!0,t._value=n,ek(t)),r&&eS()}},ex.bind(null,t))}catch(e){ex(t,e)}}(this,e)}var ew={get:function(){var e=ey,t=eB;function n(n,r){var i=this,o=!e.global&&(e!==ey||t!==eB),a=o&&!eM(),u=new eg(function(t,u){eO(i,new e_(e$(n,e,o,a),e$(r,e,o,a),t,u,e))});return this._consoleTask&&(u._consoleTask=this._consoleTask),u}return n.prototype=eo,n},set:function(e){d(this,"then",e&&e.prototype===eo?ew:{get:function(){return e},set:ew.set})}};function e_(e,t,n,r,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=i}function ex(e,t){var n;eh.push(t),null===e._state&&(n=e._lib&&eK(),t=ed(t),e._state=!1,e._value=t,ef.some(function(t){return t._value===e._value})||ef.push(e),ek(e),n&&eS())}function ek(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)eO(e,t[n]);var i=e._PSD;--i.ref||i.finalize(),0===em&&(++em,es(function(){0==--em&&ej()},[]))}function eO(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++em,es(eP,[n,e,t])}else e._listeners.push(t)}function eP(e,t,n){try{var r,i=t._value;!t._state&&eh.length&&(eh=[]),r=ei&&t._consoleTask?t._consoleTask.run(function(){return e(i)}):e(i),t._state||-1!==eh.indexOf(i)||function(e){for(var t=ef.length;t;)if(ef[--t]._value===e._value)return ef.splice(t,1)}(t),n.resolve(r)}catch(e){n.reject(e)}finally{0==--em&&ej(),--n.psd.ref||n.psd.finalize()}}function eE(){eW(ep,function(){eK()&&eS()})}function eK(){var e=ec;return el=ec=!1,e}function eS(){var e,t,n;do for(;0<ev.length;)for(e=ev,ev=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}while(0<ev.length);el=ec=!0}function ej(){var e=ef;ef=[],e.forEach(function(e){e._PSD.onunhandled.call(null,e._value,e)});for(var t=eb.slice(0),n=t.length;n;)t[--n]()}function eC(e){return new eg(eo,!1,e)}function eA(e,t){var n=ey;return function(){var r=eK(),i=ey;try{return eV(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{eV(i,!1),r&&eS()}}}f(eg.prototype,{then:ew,_then:function(e,t){eO(this,new e_(null,null,e,t,ey))},catch:function(e){if(1==arguments.length)return this.then(null,e);var t=arguments[1];return"function"==typeof e?this.then(null,function(n){return(n instanceof e?t:eC)(n)}):this.then(null,function(n){return(n&&n.name===e?t:eC)(n)})},finally:function(e){return this.then(function(t){return eg.resolve(e()).then(function(){return t})},function(t){return eg.resolve(e()).then(function(){return eC(t)})})},timeout:function(e,t){var n=this;return e<1/0?new eg(function(r,i){var o=setTimeout(function(){return i(new $.Timeout(t))},e);n.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&d(eg.prototype,Symbol.toStringTag,"Dexie.Promise"),ep.env=ez(),f(eg,{all:function(){var e=B.apply(null,arguments).map(eL);return new eg(function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(function(i,o){return eg.resolve(i).then(function(n){e[o]=n,--r||t(e)},n)})})},resolve:function(e){return e instanceof eg?e:e&&"function"==typeof e.then?new eg(function(t,n){e.then(t,n)}):new eg(eo,!0,e)},reject:eC,race:function(){var e=B.apply(null,arguments).map(eL);return new eg(function(t,n){e.map(function(e){return eg.resolve(e).then(t,n)})})},PSD:{get:function(){return ey},set:function(e){return ey=e}},totalEchoes:{get:function(){return eB}},newPSD:eN,usePSD:eW,scheduler:{get:function(){return es},set:function(e){es=e}},rejectionMapper:{get:function(){return ed},set:function(e){ed=e}},follow:function(e,t){return new eg(function(n,r){return eN(function(t,n){var r=ey;r.unhandleds=[],r.onunhandled=n,r.finalize=J(function(){var e,r=this;e=function(){0===r.unhandleds.length?t():n(r.unhandleds[0])},eb.push(function t(){e(),eb.splice(eb.indexOf(t),1)}),++em,es(function(){0==--em&&ej()},[])},r.finalize),e()},t,n,r)})}}),ea&&(ea.allSettled&&d(eg,"allSettled",function(){var e=B.apply(null,arguments).map(eL);return new eg(function(t){0===e.length&&t([]);var n=e.length,r=Array(n);e.forEach(function(e,i){return eg.resolve(e).then(function(e){return r[i]={status:"fulfilled",value:e}},function(e){return r[i]={status:"rejected",reason:e}}).then(function(){return--n||t(r)})})})}),ea.any&&"undefined"!=typeof AggregateError&&d(eg,"any",function(){var e=B.apply(null,arguments).map(eL);return new eg(function(t,n){0===e.length&&n(AggregateError([]));var r=e.length,i=Array(r);e.forEach(function(e,o){return eg.resolve(e).then(function(e){return t(e)},function(e){i[o]=e,--r||n(AggregateError(i))})})})}));var eD={awaits:0,echoes:0,id:0},eT=0,eq=[],eI=0,eB=0,eR=0;function eN(e,t,n,r){var i=ey,o=Object.create(i);return o.parent=i,o.ref=0,o.global=!1,o.id=++eR,ep.env,o.env=eu?{Promise:eg,PromiseProp:{value:eg,configurable:!0,writable:!0},all:eg.all,race:eg.race,allSettled:eg.allSettled,any:eg.any,resolve:eg.resolve,reject:eg.reject}:{},t&&u(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()},r=eW(o,e,n,r),0===o.ref&&o.finalize(),r}function eF(){return eD.id||(eD.id=++eT),++eD.awaits,eD.echoes+=100,eD.id}function eM(){return!!eD.awaits&&(0==--eD.awaits&&(eD.id=0),eD.echoes=100*eD.awaits,!0)}function eL(e){return eD.echoes&&e&&e.constructor===ea?(eF(),e.then(function(e){return eM(),e},function(e){return eM(),eQ(e)})):e}function eU(){var e=eq[eq.length-1];eq.pop(),eV(e,!1)}function eV(e,t){var n,r=ey;(t?!eD.echoes||eI++&&e===ey:!eI||--eI&&e===ey)||queueMicrotask(t?(function(e){++eB,eD.echoes&&0!=--eD.echoes||(eD.echoes=eD.awaits=eD.id=0),eq.push(ey),eV(e,!0)}).bind(null,e):eU),e!==ey&&(ey=e,r===ep&&(ep.env=ez()),eu&&(n=ep.env.Promise,t=e.env,(r.global||e.global)&&(Object.defineProperty(i,"Promise",t.PromiseProp),n.all=t.all,n.race=t.race,n.resolve=t.resolve,n.reject=t.reject,t.allSettled&&(n.allSettled=t.allSettled),t.any&&(n.any=t.any))))}function ez(){var e=i.Promise;return eu?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(i,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function eW(e,t,n,r,i){var o=ey;try{return eV(e,!0),t(n,r,i)}finally{eV(o,!1)}}function e$(e,t,n,r){return"function"!=typeof e?e:function(){var i=ey;n&&eF(),eV(t,!0);try{return e.apply(this,arguments)}finally{eV(i,!1),r&&queueMicrotask(eM)}}}function eY(e){Promise===ea&&0===eD.echoes?0===eI?e():enqueueNativeMicroTask(e):setTimeout(e,0)}-1===(""+F).indexOf("[native code]")&&(eF=eM=G);var eQ=eg.reject,eG=String.fromCharCode(65535),eX="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",eH="String expected.",eJ=[],eZ="__dbnames",e0="readonly",e1="readwrite";function e3(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var e2={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function e8(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=j(t))[e],t}}function e4(){throw $.Type()}function e5(e,t){try{var n=e6(e),r=e6(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return function(e,t){for(var n=e.length,r=t.length,i=n<r?n:r,o=0;o<i;++o)if(e[o]!==t[o])return e[o]<t[o]?-1:1;return n===r?0:n<r?-1:1}(e9(e),e9(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,i=n<r?n:r,o=0;o<i;++o){var a=e5(e[o],t[o]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function e6(e){var t=typeof e;return"object"!=t?t:ArrayBuffer.isView(e)?"binary":"ArrayBuffer"===(e=A(e))?"binary":e}function e9(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var e7=(te.prototype._trans=function(e,t,n){var r=this._tx||ey.trans,i=this.name,o=ei&&"undefined"!=typeof console&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===e?"read":"write"," ").concat(this.name));function a(e,n,r){if(!r.schema[i])throw new $.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)}var u=eK();try{var s=r&&r.db._novip===this.db._novip?r===ey.trans?r._promise(e,a,n):eN(function(){return r._promise(e,a,n)},{trans:r,transless:ey.transless||ey}):function e(t,n,r,i){if(t.idbdb&&(t._state.openComplete||ey.letThrough||t._vip)){var o=t._createTransaction(n,r,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===W.InvalidState&&t.isOpen()&&0<--t._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),t.close({disableAutoOpen:!1}),t.open().then(function(){return e(t,n,r,i)})):eQ(o)}return o._promise(n,function(e,t){return eN(function(){return ey.trans=o,i(e,t,o)})}).then(function(e){if("readwrite"===n)try{o.idbtrans.commit()}catch(e){}return"readonly"===n?e:o._completion.then(function(){return e})})}if(t._state.openComplete)return eQ(new $.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return eQ(new $.DatabaseClosed);t.open().catch(G)}return t._state.dbReadyPromise.then(function(){return e(t,n,r,i)})}(this.db,e,[this.name],a);return o&&(s._consoleTask=o,s=s.catch(function(e){return console.trace(e),eQ(e)})),s}finally{u&&eS()}},te.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):null==e?eQ(new $.Type("Invalid argument to Table.get()")):this._trans("readonly",function(t){return n.core.get({trans:t,key:e}).then(function(e){return n.hook.reading.fire(e)})}).then(t)},te.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(a(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=o(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter(function(e){if(e.compound&&t.every(function(t){return 0<=e.keyPath.indexOf(t)})){for(var n=0;n<t.length;++n)if(-1===t.indexOf(e.keyPath[n]))return!1;return!0}return!1}).sort(function(e,t){return e.keyPath.length-t.keyPath.length})[0];if(n&&this.db._maxKey!==eG){var r=n.keyPath.slice(0,t.length);return this.where(r).equals(r.map(function(t){return e[t]}))}!n&&ei&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName,u=this.db._deps.indexedDB;function s(e,t){return 0===u.cmp(e,t)}var c=t.reduce(function(t,n){var r=t[0],o=t[1],t=i[n],u=e[n];return[r||t,r||!t?e3(o,t&&t.multi?function(e){return a(e=_(e,n))&&e.some(function(e){return s(u,e)})}:function(e){return s(u,_(e,n))}):o]},[null,null]),r=c[0],c=c[1];return r?this.where(r.name).equals(e[r.keyPath]).filter(c):n?this.filter(c):this.where(t).equals("")},te.prototype.filter=function(e){return this.toCollection().and(e)},te.prototype.count=function(e){return this.toCollection().count(e)},te.prototype.offset=function(e){return this.toCollection().offset(e)},te.prototype.limit=function(e){return this.toCollection().limit(e)},te.prototype.each=function(e){return this.toCollection().each(e)},te.prototype.toArray=function(e){return this.toCollection().toArray(e)},te.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},te.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,a(e)?"[".concat(e.join("+"),"]"):e))},te.prototype.reverse=function(){return this.toCollection().reverse()},te.prototype.mapToClass=function(t){var n,r=this.db,i=this.name;function o(){return null!==n&&n.apply(this,arguments)||this}(this.schema.mappedClass=t).prototype instanceof e4&&(function(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(o,n=t),Object.defineProperty(o.prototype,"db",{get:function(){return r},enumerable:!1,configurable:!0}),o.prototype.table=function(){return i},t=o);for(var a=new Set,u=t.prototype;u;u=s(u))Object.getOwnPropertyNames(u).forEach(function(e){return a.add(e)});function c(e){if(!e)return e;var n,r=Object.create(t.prototype);for(n in e)if(!a.has(n))try{r[n]=e[n]}catch(e){}return r}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=c,this.hook("reading",c),t},te.prototype.defineClass=function(){return this.mapToClass(function(e){u(this,e)})},te.prototype.add=function(e,t){var n=this,r=this.schema.primKey,i=r.auto,o=r.keyPath,a=e;return o&&i&&(a=e8(o)(e)),this._trans("readwrite",function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})}).then(function(e){return e.numFailures?eg.reject(e.failures[0]):e.lastResult}).then(function(t){if(o)try{x(e,o,t)}catch(e){}return t})},te.prototype.update=function(e,t){return"object"!=typeof e||a(e)?this.where(":id").equals(e).modify(t):void 0===(e=_(e,this.schema.primKey.keyPath))?eQ(new $.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(t)},te.prototype.put=function(e,t){var n=this,r=this.schema.primKey,i=r.auto,o=r.keyPath,a=e;return o&&i&&(a=e8(o)(e)),this._trans("readwrite",function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})}).then(function(e){return e.numFailures?eg.reject(e.failures[0]):e.lastResult}).then(function(t){if(o)try{x(e,o,t)}catch(e){}return t})},te.prototype.delete=function(e){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})}).then(function(e){return e.numFailures?eg.reject(e.failures[0]):void 0})},te.prototype.clear=function(){var e=this;return this._trans("readwrite",function(t){return e.core.mutate({trans:t,type:"deleteRange",range:e2})}).then(function(e){return e.numFailures?eg.reject(e.failures[0]):void 0})},te.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",function(n){return t.core.getMany({keys:e,trans:n}).then(function(e){return e.map(function(e){return t.hook.reading.fire(e)})})})},te.prototype.bulkAdd=function(e,t,n){var r=this,i=Array.isArray(t)?t:void 0,o=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(t){var n=r.schema.primKey,a=n.auto,n=n.keyPath;if(n&&i)throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");var u=e.length,n=n&&a?e.map(e8(n)):e;return r.core.mutate({trans:t,type:"add",keys:i,values:n,wantResults:o}).then(function(e){var t=e.numFailures,n=e.results,i=e.lastResult,e=e.failures;if(0===t)return o?n:i;throw new z("".concat(r.name,".bulkAdd(): ").concat(t," of ").concat(u," operations failed"),e)})})},te.prototype.bulkPut=function(e,t,n){var r=this,i=Array.isArray(t)?t:void 0,o=(n=n||(i?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(t){var n=r.schema.primKey,a=n.auto,n=n.keyPath;if(n&&i)throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");var u=e.length,n=n&&a?e.map(e8(n)):e;return r.core.mutate({trans:t,type:"put",keys:i,values:n,wantResults:o}).then(function(e){var t=e.numFailures,n=e.results,i=e.lastResult,e=e.failures;if(0===t)return o?n:i;throw new z("".concat(r.name,".bulkPut(): ").concat(t," of ").concat(u," operations failed"),e)})})},te.prototype.bulkUpdate=function(e){var t=this,n=this.core,r=e.map(function(e){return e.key}),i=e.map(function(e){return e.changes}),o=[];return this._trans("readwrite",function(a){return n.getMany({trans:a,keys:r,cache:"clone"}).then(function(u){var s=[],c=[];e.forEach(function(e,n){var r=e.key,i=e.changes,a=u[n];if(a){for(var l=0,f=Object.keys(i);l<f.length;l++){var h=f[l],d=i[h];if(h===t.schema.primKey.keyPath){if(0!==e5(d,r))throw new $.Constraint("Cannot update primary key in bulkUpdate()")}else x(a,h,d)}o.push(n),s.push(r),c.push(a)}});var l=s.length;return n.mutate({trans:a,type:"put",keys:s,values:c,updates:{keys:r,changeSpecs:i}}).then(function(e){var n=e.numFailures,r=e.failures;if(0===n)return l;for(var i=0,a=Object.keys(r);i<a.length;i++){var u,s=a[i],c=o[Number(s)];null!=c&&(u=r[s],delete r[s],r[c]=u)}throw new z("".concat(t.name,".bulkUpdate(): ").concat(n," of ").concat(l," operations failed"),r)})})})},te.prototype.bulkDelete=function(e){var t=this,n=e.length;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"delete",keys:e})}).then(function(e){var r=e.numFailures,i=e.lastResult,e=e.failures;if(0===r)return i;throw new z("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),e)})},te);function te(){}function tt(e){function t(t,r){if(r){for(var i=arguments.length,o=Array(i-1);--i;)o[i-1]=arguments[i];return n[t].subscribe.apply(null,o),e}if("string"==typeof t)return n[t]}var n={};t.addEventType=u;for(var r=1,i=arguments.length;r<i;++r)u(arguments[r]);return t;function u(e,r,i){if("object"!=typeof e){r=r||en;var s={subscribers:[],fire:i=i||G,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=r(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter(function(t){return t!==e}),s.fire=s.subscribers.reduce(r,i)}};return n[e]=t[e]=s}o(e).forEach(function(t){var n=e[t];if(a(n))u(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new $.InvalidArgument("Invalid event config");var r=u(t,X,function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach(function(e){w(function(){e.apply(null,t)})})})}})}}function tn(e,t){return p(t).from({prototype:e}),t}function tr(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function ti(e,t){e.filter=e3(e.filter,t)}function to(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return e3(r(),t())}:t,e.justLimit=n&&!r}function ta(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new $.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function tu(e,t,n){var r=ta(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function ts(e,t,n,r){var i=e.replayFilter?e3(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,n,r){var a,u;i&&!i(n,r,function(e){return n.stop(e)},function(e){return n.fail(e)})||("[object ArrayBuffer]"==(u=""+(a=n.primaryKey))&&(u=""+new Uint8Array(a)),l(o,u)||(o[u]=!0,t(e,n,r)))};return Promise.all([e.or._iterate(a,n),tc(tu(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return tc(tu(e,r,n),e3(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function tc(e,t,n,r){var i=eA(r?function(e,t,i){return n(r(e),t,i)}:n);return e.then(function(e){if(e)return e.start(function(){var n=function(){return e.continue()};t&&!t(e,function(e){return n=e},function(t){e.stop(t),n=G},function(t){e.fail(t),n=G})||i(e.value,e,function(e){return n=e}),n()})})}var E=Symbol(),tl=(tf.prototype.execute=function(e){if(void 0!==this.add){var t=this.add;if(a(t))return r(r([],a(e)?e:[],!0),t,!0).sort();if("number"==typeof t)return(Number(e)||0)+t;if("bigint"==typeof t)try{return BigInt(e)+t}catch(e){return BigInt(0)+t}throw TypeError("Invalid term ".concat(t))}if(void 0!==this.remove){var n=this.remove;if(a(n))return a(e)?e.filter(function(e){return!n.includes(e)}).sort():[];if("number"==typeof n)return Number(e)-n;if("bigint"==typeof n)try{return BigInt(e)-n}catch(e){return BigInt(0)-n}throw TypeError("Invalid subtrahend ".concat(n))}return(t=null===(t=this.replacePrefix)||void 0===t?void 0:t[0])&&"string"==typeof e&&e.startsWith(t)?this.replacePrefix[1]+e.substring(t.length):e},tf);function tf(e){Object.assign(this,e)}var th=(td.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,eQ.bind(null,n.error)):n.table._trans("readonly",e).then(t)},td.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,eQ.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},td.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=e3(t.algorithm,e)},td.prototype._iterate=function(e,t){return ts(this._ctx,e,t,this._ctx.table.core)},td.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&u(n,e),t._ctx=n,t},td.prototype.raw=function(){return this._ctx.valueMapper=null,this},td.prototype.each=function(e){var t=this._ctx;return this._read(function(n){return ts(t,e,n,t.table.core)})},td.prototype.count=function(e){var t=this;return this._read(function(e){var n=t._ctx,r=n.table.core;if(tr(n,!0))return r.count({trans:e,query:{index:ta(n,r.schema),range:n.range}}).then(function(e){return Math.min(e,n.limit)});var i=0;return ts(n,function(){return++i,!1},e,r).then(function(){return i})}).then(e)},td.prototype.sortBy=function(e,t){var n=e.split(".").reverse(),r=n[0],i=n.length-1;function o(e,t){return t?o(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function u(e,t){return(e=o(e,i))<(t=o(t,i))?-a:t<e?a:0}return this.toArray(function(e){return e.sort(u)}).then(t)},td.prototype.toArray=function(e){var t=this;return this._read(function(e){var n=t._ctx;if("next"===n.dir&&tr(n,!0)&&0<n.limit){var r=n.valueMapper,i=ta(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:i,range:n.range}}).then(function(e){return e=e.result,r?e.map(r):e})}var o=[];return ts(n,function(e){return o.push(e)},e,n.table.core).then(function(){return o})},e)},td.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,tr(t)?to(t,function(){var t=e;return function(e,n){return 0===t||(1===t?--t:n(function(){e.advance(t),t=0}),!1)}}):to(t,function(){var t=e;return function(){return--t<0}})),this},td.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),to(this._ctx,function(){var t=e;return function(e,n,r){return--t<=0&&n(r),0<=t}},!0),this},td.prototype.until=function(e,t){return ti(this._ctx,function(n,r,i){return!e(n.value)||(r(i),t)}),this},td.prototype.first=function(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)},td.prototype.last=function(e){return this.reverse().first(e)},td.prototype.filter=function(e){var t;return ti(this._ctx,function(t){return e(t.value)}),(t=this._ctx).isMatch=e3(t.isMatch,e),this},td.prototype.and=function(e){return this.filter(e)},td.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},td.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},td.prototype.desc=function(){return this.reverse()},td.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})},td.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},td.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})},td.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)},td.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&tr(t,!0)&&0<t.limit)return this._read(function(e){var n=ta(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(function(e){return e.result}).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)},td.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},td.prototype.firstKey=function(e){return this.limit(1).keys(function(e){return e[0]}).then(e)},td.prototype.lastKey=function(e){return this.reverse().firstKey(e)},td.prototype.distinct=function(){var e=this._ctx,e=e.index&&e.table.schema.idxByName[e.index];if(!e||!e.multi)return this;var t={};return ti(this._ctx,function(e){var n=e.primaryKey.toString(),e=l(t,n);return t[n]=!0,!e}),this},td.prototype.modify=function(e){var t=this,n=this._ctx;return this._write(function(r){function i(e,t){var n=t.failures,t=t.numFailures;y+=e-t;for(var r=0,i=o(n);r<i.length;r++){var a=i[r];p.push(n[a])}}s="function"==typeof e?e:(u=(a=o(e)).length,function(t){for(var n=!1,r=0;r<u;++r){var i=a[r],o=e[i],s=_(t,i);o instanceof tl?(x(t,i,o.execute(s)),n=!0):s!==o&&(x(t,i,o),n=!0)}return n});var a,u,s,c=n.table.core,l=c.schema.primaryKey,f=l.outbound,h=l.extractKey,d=t.db._options.modifyChunkSize||200,p=[],y=0,v=[];return t.clone().primaryKeys().then(function(t){var o=tr(n)&&n.limit===1/0&&("function"!=typeof e||e===tp)&&{index:n.index,range:n.range};return(function n(a){var u=Math.min(d,t.length-a);return c.getMany({trans:r,keys:t.slice(a,a+u),cache:"immutable"}).then(function(l){for(var p=[],y=[],v=f?[]:null,m=[],b=0;b<u;++b){var g=l[b],w={value:j(g),primKey:t[a+b]};!1!==s.call(w,w.value,w)&&(null==w.value?m.push(t[a+b]):f||0===e5(h(g),h(w.value))?(y.push(w.value),f&&v.push(t[a+b])):(m.push(t[a+b]),p.push(w.value)))}return Promise.resolve(0<p.length&&c.mutate({trans:r,type:"add",values:p}).then(function(e){for(var t in e.failures)m.splice(parseInt(t),1);i(p.length,e)})).then(function(){return(0<y.length||o&&"object"==typeof e)&&c.mutate({trans:r,type:"put",keys:v,values:y,criteria:o,changeSpec:"function"!=typeof e&&e,isAdditionalChunk:0<a}).then(function(e){return i(y.length,e)})}).then(function(){return(0<m.length||o&&e===tp)&&c.mutate({trans:r,type:"delete",keys:m,criteria:o,isAdditionalChunk:0<a}).then(function(e){return i(m.length,e)})}).then(function(){return t.length>a+u&&n(a+d)})})})(0).then(function(){if(0<p.length)throw new V("Error modifying one or more objects",p,y,v);return t.length})})})},td.prototype.delete=function(){var e=this._ctx,t=e.range;return tr(e)&&(e.isPrimKey||3===t.type)?this._write(function(n){var r=e.table.core.schema.primaryKey;return e.table.core.count({trans:n,query:{index:r,range:t}}).then(function(r){return e.table.core.mutate({trans:n,type:"deleteRange",range:t}).then(function(e){var t=e.failures;if(e.lastResult,e.results,e=e.numFailures)throw new V("Could not delete some values",Object.keys(t).map(function(e){return t[e]}),r-e);return r-e})})}):this.modify(tp)},td);function td(){}var tp=function(e,t){return t.value=null};function ty(e,t){return e<t?-1:e===t?0:1}function tv(e,t){return t<e?-1:e===t?0:1}function tm(e,t,n){return(e=e instanceof tx?new e.Collection(e):e)._ctx.error=new(n||TypeError)(t),e}function tb(e){return new e.Collection(e,function(){return t_("")}).limit(0)}function tg(e,t,n,r){var i,o,a,u,s,c,l,f=n.length;if(!n.every(function(e){return"string"==typeof e}))return tm(e,eH);function h(e){i="next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()},o="next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()},a="next"===e?ty:tv;var t=n.map(function(e){return{lower:o(e),upper:i(e)}}).sort(function(e,t){return a(e.lower,t.lower)});u=t.map(function(e){return e.upper}),s=t.map(function(e){return e.lower}),l="next"===(c=e)?"":r}h("next"),(e=new e.Collection(e,function(){return tw(u[0],s[f-1]+r)}))._ondirectionchange=function(e){h(e)};var d=0;return e._addAlgorithm(function(e,n,r){var i=e.key;if("string"!=typeof i)return!1;var h=o(i);if(t(h,s,d))return!0;for(var p=null,y=d;y<f;++y){var v=function(e,t,n,r,i,o){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return 0>i(e[s],n[s])?e.substr(0,s)+n[s]+n.substr(s+1):0>i(e[s],r[s])?e.substr(0,s)+r[s]+n.substr(s+1):0<=u?e.substr(0,u)+t[u]+n.substr(u+1):null;0>i(e[s],c)&&(u=s)}return a<r.length&&"next"===o?e+n.substr(e.length):a<e.length&&"prev"===o?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)}(i,h,u[y],s[y],a,c);null===v&&null===p?d=y+1:(null===p||0<a(p,v))&&(p=v)}return n(null!==p?function(){e.continue(p+l)}:r),!1}),e}function tw(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function t_(e){return{type:1,lower:e,upper:e}}var tx=(Object.defineProperty(tk.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),tk.prototype.between=function(e,t,n,r){n=!1!==n,r=!0===r;try{return 0<this._cmp(e,t)||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?tb(this):new this.Collection(this,function(){return tw(e,t,!n,!r)})}catch(e){return tm(this,eX)}},tk.prototype.equals=function(e){return null==e?tm(this,eX):new this.Collection(this,function(){return t_(e)})},tk.prototype.above=function(e){return null==e?tm(this,eX):new this.Collection(this,function(){return tw(e,void 0,!0)})},tk.prototype.aboveOrEqual=function(e){return null==e?tm(this,eX):new this.Collection(this,function(){return tw(e,void 0,!1)})},tk.prototype.below=function(e){return null==e?tm(this,eX):new this.Collection(this,function(){return tw(void 0,e,!1,!0)})},tk.prototype.belowOrEqual=function(e){return null==e?tm(this,eX):new this.Collection(this,function(){return tw(void 0,e)})},tk.prototype.startsWith=function(e){return"string"!=typeof e?tm(this,eH):this.between(e,e+eG,!0,!0)},tk.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):tg(this,function(e,t){return 0===e.indexOf(t[0])},[e],eG)},tk.prototype.equalsIgnoreCase=function(e){return tg(this,function(e,t){return e===t[0]},[e],"")},tk.prototype.anyOfIgnoreCase=function(){var e=B.apply(I,arguments);return 0===e.length?tb(this):tg(this,function(e,t){return -1!==t.indexOf(e)},e,"")},tk.prototype.startsWithAnyOfIgnoreCase=function(){var e=B.apply(I,arguments);return 0===e.length?tb(this):tg(this,function(e,t){return t.some(function(t){return 0===e.indexOf(t)})},e,eG)},tk.prototype.anyOf=function(){var e=this,t=B.apply(I,arguments),n=this._cmp;try{t.sort(n)}catch(e){return tm(this,eX)}if(0===t.length)return tb(this);var r=new this.Collection(this,function(){return tw(t[0],t[t.length-1])});r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var i=0;return r._addAlgorithm(function(e,r,o){for(var a=e.key;0<n(a,t[i]);)if(++i===t.length)return r(o),!1;return 0===n(a,t[i])||(r(function(){e.continue(t[i])}),!1)}),r},tk.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},tk.prototype.noneOf=function(){var e=B.apply(I,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return tm(this,eX)}var t=e.reduce(function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]},null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},tk.prototype.inAnyRange=function(e,t){var n=this,r=this._cmp,i=this._ascending,o=this._descending,a=this._min,u=this._max;if(0===e.length)return tb(this);if(!e.every(function(e){return void 0!==e[0]&&void 0!==e[1]&&0>=i(e[0],e[1])}))return tm(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",$.InvalidArgument);var s,c=!t||!1!==t.includeLowers,l=t&&!0===t.includeUppers,f=i;function h(e,t){return f(e[0],t[0])}try{(s=e.reduce(function(e,t){for(var n=0,i=e.length;n<i;++n){var o=e[n];if(0>r(t[0],o[1])&&0<r(t[1],o[0])){o[0]=a(o[0],t[0]),o[1]=u(o[1],t[1]);break}}return n===i&&e.push(t),e},[])).sort(h)}catch(e){return tm(this,eX)}var d=0,p=l?function(e){return 0<i(e,s[d][1])}:function(e){return 0<=i(e,s[d][1])},y=c?function(e){return 0<o(e,s[d][0])}:function(e){return 0<=o(e,s[d][0])},v=p,e=new this.Collection(this,function(){return tw(s[0][0],s[s.length-1][1],!c,!l)});return e._ondirectionchange=function(e){f="next"===e?(v=p,i):(v=y,o),s.sort(h)},e._addAlgorithm(function(e,t,r){for(var o=e.key;v(o);)if(++d===s.length)return t(r),!1;return!p(o)&&!y(o)||(0===n._cmp(o,s[d][1])||0===n._cmp(o,s[d][0])||t(function(){f===i?e.continue(s[d][0]):e.continue(s[d][1])}),!1)}),e},tk.prototype.startsWithAnyOf=function(){var e=B.apply(I,arguments);return e.every(function(e){return"string"==typeof e})?0===e.length?tb(this):this.inAnyRange(e.map(function(e){return[e,e+eG]})):tm(this,"startsWithAnyOf() only works with strings")},tk);function tk(){}function tO(e){return eA(function(t){return tP(t),e(t.target.error),!1})}function tP(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var tE="storagemutated",tK="x-storagemutated-1",tS=tt(null,tE),tj=(tC.prototype._lock=function(){return g(!ey.global),++this._reculock,1!==this._reculock||ey.global||(ey.lockOwnerFor=this),this},tC.prototype._unlock=function(){if(g(!ey.global),0==--this._reculock)for(ey.global||(ey.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{eW(e[1],e[0])}catch(e){}}return this},tC.prototype._locked=function(){return this._reculock&&ey.lockOwnerFor!==this},tC.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(g(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new $.DatabaseClosed(r);case"MissingAPIError":throw new $.MissingAPI(r.message,r);default:throw new $.OpenFailed(r)}if(!this.active)throw new $.TransactionInactive;return g(null===this._completion._state),(e=this.idbtrans=e||(this.db.core||n).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=eA(function(n){tP(n),t._reject(e.error)}),e.onabort=eA(function(n){tP(n),t.active&&t._reject(new $.Abort(e.error)),t.active=!1,t.on("abort").fire(n)}),e.oncomplete=eA(function(){t.active=!1,t._resolve(),"mutatedParts"in e&&tS.storagemutated.fire(e.mutatedParts)}),this},tC.prototype._promise=function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return eQ(new $.ReadOnly("Transaction is readonly"));if(!this.active)return eQ(new $.TransactionInactive);if(this._locked())return new eg(function(i,o){r._blockedFuncs.push([function(){r._promise(e,t,n).then(i,o)},ey])});if(n)return eN(function(){var e=new eg(function(e,n){r._lock();var i=t(e,n,r);i&&i.then&&i.then(e,n)});return e.finally(function(){return r._unlock()}),e._lib=!0,e});var i=new eg(function(e,n){var i=t(e,n,r);i&&i.then&&i.then(e,n)});return i._lib=!0,i},tC.prototype._root=function(){return this.parent?this.parent._root():this},tC.prototype.waitFor=function(e){var t,n=this._root(),r=eg.resolve(e);n._waitingFor?n._waitingFor=n._waitingFor.then(function(){return r}):(n._waitingFor=r,n._waitingQueue=[],t=n.idbtrans.objectStore(n.storeNames[0]),function e(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(t.get(-1/0).onsuccess=e)}());var i=n._waitingFor;return new eg(function(e,t){r.then(function(t){return n._waitingQueue.push(eA(e.bind(null,t)))},function(e){return n._waitingQueue.push(eA(t.bind(null,e)))}).finally(function(){n._waitingFor===i&&(n._waitingFor=null)})})},tC.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new $.Abort))},tC.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(l(t,e))return t[e];var n=this.schema[e];if(!n)throw new $.NotFound("Table "+e+" not part of transaction");return(n=new this.db.Table(e,n,this)).core=this.db.core.table(e),t[e]=n},tC);function tC(){}function tA(e,t,n,r,i,o,a){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:o,src:(n&&!a?"&":"")+(r?"*":"")+(i?"++":"")+tD(t)}}function tD(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function tT(e,t,n){var r;return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:(r=function(e){return[e.name,e]},n.reduce(function(e,t,n){return(n=r(t,n))&&(e[n[0]]=n[1]),e},{}))}}var tq=function(e){try{return e.only([[]]),tq=function(){return[[]]},[[]]}catch(e){return tq=function(){return eG},eG}};function tI(e){return null==e?function(){}:"string"==typeof e?1===e.split(".").length?function(t){return t[e]}:function(t){return _(t,e)}:function(t){return _(t,e)}}function tB(e){return[].slice.call(e)}var tR=0;function tN(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")}function tF(e,n){var r,i,o,u,s=n.db,n=(r=e._middlewares,i=e._deps,o=n,u=i.IDBKeyRange,i.indexedDB,{dbcore:(o=function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");var n=e.lower,r=e.upper,i=e.lowerOpen,e=e.upperOpen;return void 0===n?void 0===r?null:t.upperBound(r,!!e):void 0===r?t.lowerBound(n,!!i):t.bound(n,r,!!i,!!e)}var i,o,u=(i=n,o=tB(e.objectStoreNames),{schema:{name:e.name,tables:o.map(function(e){return i.objectStore(e)}).map(function(e){var t=e.keyPath,n=e.autoIncrement,r=a(t),i={},n={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:null==t,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:tI(t)},indexes:tB(e.indexNames).map(function(t){return e.index(t)}).map(function(e){var t=e.name,n=e.unique,r=e.multiEntry,e=e.keyPath,r={name:t,compound:a(e),keyPath:e,unique:n,multiEntry:r,extractKey:tI(e)};return i[tN(e)]=r}),getIndexByKeyPath:function(e){return i[tN(e)]}};return i[":id"]=n.primaryKey,null!=t&&(i[tN(t)]=n.primaryKey),n})},hasGetAll:0<o.length&&"getAll"in i.objectStore(o[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),n=u.schema,s=u.hasGetAll,u=n.tables.map(function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var n=e.trans,i=e.type,o=e.keys,a=e.values,u=e.range;return new Promise(function(e,s){e=eA(e);var c=n.objectStore(t),l=null==c.keyPath,f="put"===i||"add"===i;if(!f&&"delete"!==i&&"deleteRange"!==i)throw Error("Invalid operation type: "+i);var h,d=(o||a||{length:1}).length;if(o&&a&&o.length!==a.length)throw Error("Given keys array must have same length as given values array.");if(0===d)return e({numFailures:0,failures:{},results:[],lastResult:void 0});function p(e){++m,tP(e)}var y=[],v=[],m=0;if("deleteRange"===i){if(4===u.type)return e({numFailures:m,failures:v,results:[],lastResult:void 0});3===u.type?y.push(h=c.clear()):y.push(h=c.delete(r(u)))}else{var l=f?l?[a,o]:[a,null]:[o,null],b=l[0],g=l[1];if(f)for(var w=0;w<d;++w)y.push(h=g&&void 0!==g[w]?c[i](b[w],g[w]):c[i](b[w])),h.onerror=p;else for(w=0;w<d;++w)y.push(h=c[i](b[w])),h.onerror=p}function _(t){t=t.target.result,y.forEach(function(e,t){return null!=e.error&&(v[t]=e.error)}),e({numFailures:m,failures:v,results:"delete"===i?o:y.map(function(e){return e.result}),lastResult:t})}h.onerror=function(e){p(e),_(e)},h.onsuccess=_})},getMany:function(e){var n=e.trans,r=e.keys;return new Promise(function(e,i){e=eA(e);for(var o,a=n.objectStore(t),u=r.length,s=Array(u),c=0,l=0,f=function(t){s[(t=t.target)._pos]=t.result,++l===c&&e(s)},h=tO(i),d=0;d<u;++d)null!=r[d]&&((o=a.get(r[d]))._pos=d,o.onsuccess=f,o.onerror=h,++c);0===c&&e(s)})},get:function(e){var n=e.trans,r=e.key;return new Promise(function(e,i){e=eA(e);var o=n.objectStore(t).get(r);o.onsuccess=function(t){return e(t.target.result)},o.onerror=tO(i)})},query:function(e){return new Promise(function(n,i){n=eA(n);var o,a,u,c=e.trans,l=e.values,f=e.limit,h=e.query,d=f===1/0?void 0:f,p=h.index,h=h.range,c=c.objectStore(t),p=p.isPrimaryKey?c:c.index(p.name),h=r(h);if(0===f)return n({result:[]});s?((d=l?p.getAll(h,d):p.getAllKeys(h,d)).onsuccess=function(e){return n({result:e.target.result})},d.onerror=tO(i)):(o=0,a=!l&&"openKeyCursor"in p?p.openKeyCursor(h):p.openCursor(h),u=[],a.onsuccess=function(e){var t=a.result;return t?(u.push(l?t.value:t.primaryKey),++o===f?n({result:u}):void t.continue()):n({result:u})},a.onerror=tO(i))})},openCursor:function(e){var n=e.trans,i=e.values,o=e.query,a=e.reverse,u=e.unique;return new Promise(function(e,s){e=eA(e);var c=o.index,l=o.range,f=n.objectStore(t),f=c.isPrimaryKey?f:f.index(c.name),c=a?u?"prevunique":"prev":u?"nextunique":"next",h=!i&&"openKeyCursor"in f?f.openKeyCursor(r(l),c):f.openCursor(r(l),c);h.onerror=tO(s),h.onsuccess=eA(function(t){var r,i,o,a,u=h.result;u?(u.___id=++tR,u.done=!1,r=u.continue.bind(u),i=(i=u.continuePrimaryKey)&&i.bind(u),o=u.advance.bind(u),a=function(){throw Error("Cursor not stopped")},u.trans=n,u.stop=u.continue=u.continuePrimaryKey=u.advance=function(){throw Error("Cursor not started")},u.fail=eA(s),u.next=function(){var e=this,t=1;return this.start(function(){return t--?e.continue():e.stop()}).then(function(){return e})},u.start=function(e){function t(){if(h.result)try{e()}catch(e){u.fail(e)}else u.done=!0,u.start=function(){throw Error("Cursor behind last entry")},u.stop()}var n=new Promise(function(e,t){e=eA(e),h.onerror=tO(t),u.fail=t,u.stop=function(t){u.stop=u.continue=u.continuePrimaryKey=u.advance=a,e(t)}});return h.onsuccess=eA(function(e){h.onsuccess=t,t()}),u.continue=r,u.continuePrimaryKey=i,u.advance=o,t(),n},e(u)):e(null)},s)})},count:function(e){var n=e.query,i=e.trans,o=n.index,a=n.range;return new Promise(function(e,n){var u=i.objectStore(t),s=o.isPrimaryKey?u:u.index(o.name),u=r(a),s=u?s.count(u):s.count();s.onsuccess=eA(function(t){return e(t.target.result)}),s.onerror=tO(n)})}}}),c={};return u.forEach(function(e){return c[e.name]=e}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!c[e])throw Error("Table '".concat(e,"' not found"));return c[e]},MIN_KEY:-1/0,MAX_KEY:tq(t),schema:n}}(s,u,o),r.dbcore.reduce(function(e,n){return n=n.create,t(t({},e),n(e))},o))});e.core=n.dbcore,e.tables.forEach(function(t){var n=t.name;e.core.schema.tables.some(function(e){return e.name===n})&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function tM(e,t,n,r){n.forEach(function(n){var i=r[n];t.forEach(function(t){var r=function e(t,n){return y(t,n)||(t=s(t))&&e(t,n)}(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?d(t,n,{get:function(){return this.table(n)},set:function(e){h(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,i))})})}function tL(e,t){t.forEach(function(t){for(var n in t)t[n]instanceof e.Table&&delete t[n]})}function tU(e,t){return e._cfg.version-t._cfg.version}function tV(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var i=e[n],o=t[n];if(i){var a={name:n,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)a.recreate=!0,r.change.push(a);else{var u=i.idxByName,s=o.idxByName,c=void 0;for(c in u)s[c]||a.del.push(c);for(c in s){var l=u[c],f=s[c];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(0<a.del.length||0<a.add.length||0<a.change.length)&&r.change.push(a)}}else r.add.push([n,o])}return r}function tz(e,t,n,r){var i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(function(e){return t$(i,e)}),i}function tW(e,t){o(e).forEach(function(n){t.db.objectStoreNames.contains(n)||(ei&&console.debug("Dexie: Creating missing table",n),tz(t,n,e[n].primKey,e[n].indexes))})}function t$(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function tY(e,t,n){var r={};return m(t.objectStoreNames,0).forEach(function(e){for(var t=n.objectStore(e),i=tA(tD(s=t.keyPath),s||"",!0,!1,!!t.autoIncrement,s&&"string"!=typeof s,!0),o=[],a=0;a<t.indexNames.length;++a){var u=t.index(t.indexNames[a]),s=u.keyPath,u=tA(u.name,s,!!u.unique,!!u.multiEntry,!1,s&&"string"!=typeof s,!1);o.push(u)}r[e]=tT(e,i,o)}),r}function tQ(e,t,n){for(var r=n.db.objectStoreNames,o=0;o<r.length;++o){var a=r[o],u=n.objectStore(a);e._hasGetAll="getAll"in u;for(var s=0;s<u.indexNames.length;++s){var c=u.indexNames[s],l=u.index(c).keyPath,f="string"==typeof l?l:"["+m(l).join("+")+"]";!t[a]||(l=t[a].idxByName[f])&&(l.name=c,delete t[a].idxByName[f],t[a].idxByName[c]=l)}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&i.WorkerGlobalScope&&i instanceof i.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function tG(e){return e.split(",").map(function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return tA(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),a(r),0===t)})}var tX=(tH.prototype._parseStoresSpec=function(e,t){o(e).forEach(function(n){if(null!==e[n]){var r=tG(e[n]),i=r.shift();if(i.unique=!0,i.multi)throw new $.Schema("Primary key cannot be multi-valued");r.forEach(function(e){if(e.auto)throw new $.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new $.Schema("Index must have a name and cannot be an empty string")}),t[n]=tT(n,i,r)}})},tH.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?u(this._cfg.storesSource,e):e;var e=t._versions,n={},r={};return e.forEach(function(e){u(n,e._cfg.storesSource),r=e._cfg.dbschema={},e._parseStoresSpec(n,r)}),t._dbSchema=r,tL(t,[t._allTables,t,t.Transaction.prototype]),tM(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],o(r),r),t._storeNames=o(r),this},tH.prototype.upgrade=function(e){return this._cfg.contentUpgrade=er(this._cfg.contentUpgrade||G,e),this},tH);function tH(){}function tJ(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new nO(eZ,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function tZ(e){return e&&"function"==typeof e.databases}function t0(e){return eN(function(){return ey.letThrough=!0,e()})}function t1(e){return!("from"in e)}var t3=function(e,t){if(!this){var n=new t3;return e&&"d"in e&&u(n,e),n}u(this,arguments.length?{d:1,from:e,to:1<arguments.length?t:e}:{d:0})};function t2(e,t,n){var r=e5(t,n);if(!isNaN(r)){if(0<r)throw RangeError();if(t1(e))return u(e,{from:t,to:n,d:1});var i=e.l,r=e.r;if(0>e5(n,e.from))return i?t2(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},t6(e);if(0<e5(t,e.to))return r?t2(r,t,n):e.r={from:t,to:n,d:1,l:null,r:null},t6(e);0>e5(t,e.from)&&(e.from=t,e.l=null,e.d=r?r.d+1:1),0<e5(n,e.to)&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1),n=!e.r,i&&!e.l&&t8(e,i),r&&n&&t8(e,r)}}function t8(e,t){t1(t)||function e(t,n){var r=n.from,i=n.to,o=n.l,n=n.r;t2(t,r,i),o&&e(t,o),n&&e(t,n)}(e,t)}function t4(e,t){var n=t5(t),r=n.next();if(r.done)return!1;for(var i=r.value,o=t5(e),a=o.next(i.from),u=a.value;!r.done&&!a.done;){if(0>=e5(u.from,i.to)&&0<=e5(u.to,i.from))return!0;0>e5(i.from,u.from)?i=(r=n.next(u.from)).value:u=(a=o.next(i.from)).value}return!1}function t5(e){var t=t1(e)?null:{s:0,n:e};return{next:function(e){for(var n=0<arguments.length;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&0>e5(e,t.n.from);)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||0>=e5(e,t.n.to))return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function t6(e){var n,r,i=((null===(n=e.r)||void 0===n?void 0:n.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),o=1<i?"r":i<-1?"l":"";o&&(n="r"==o?"l":"r",r=t({},e),i=e[o],e.from=i.from,e.to=i.to,e[o]=i[o],r[o]=i[n],(e[n]=r).d=t9(r)),e.d=t9(e)}function t9(e){var t=e.r,e=e.l;return(t?e?Math.max(t.d,e.d):t.d:e?e.d:0)+1}function t7(e,t){return o(t).forEach(function(n){e[n]?t8(e[n],t[n]):e[n]=function e(t){var n,r,i={};for(n in t)l(t,n)&&(r=t[n],i[n]=!r||"object"!=typeof r||K.has(r.constructor)?r:e(r));return i}(t[n])}),e}function ne(e,t){return e.all||t.all||Object.keys(e).some(function(n){return t[n]&&t4(t[n],e[n])})}f(t3.prototype,((F={add:function(e){return t8(this,e),this},addKey:function(e){return t2(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(e){return t2(t,e,e)}),this}})[D]=function(){return t5(this)},F));var nt={},nn={},nr=!1;function ni(e){t7(nn,e),nr||(nr=!0,setTimeout(function(){nr=!1,no(nn,(nn={},!1))},0))}function no(e,t){void 0===t&&(t=!1);var n=new Set;if(e.all)for(var r=0,i=Object.values(nt);r<i.length;r++)na(a=i[r],e,n,t);else for(var o in e){var a,u=/^idb\:\/\/(.*)\/(.*)\//.exec(o);u&&(o=u[1],u=u[2],(a=nt["idb://".concat(o,"/").concat(u)])&&na(a,e,n,t))}n.forEach(function(e){return e()})}function na(e,t,n,r){for(var i=[],o=0,a=Object.entries(e.queries.query);o<a.length;o++){for(var u=a[o],s=u[0],c=[],l=0,f=u[1];l<f.length;l++){var h=f[l];ne(t,h.obsSet)?h.subscribers.forEach(function(e){return n.add(e)}):r&&c.push(h)}r&&i.push([s,c])}if(r)for(var d=0;d<i.length;d++){var p=i[d],s=p[0],c=p[1];e.queries.query[s]=c}}function nu(e){function t(t){return e.next(t)}var n=i(t),r=i(function(t){return e.throw(t)});function i(e){return function(t){var i=e(t),t=i.value;return i.done?t:t&&"function"==typeof t.then?t.then(n,r):a(t)?Promise.all(t).then(n,r):n(t)}}return i(t)()}function ns(e,t,n){for(var r=a(e)?e.slice():[e],i=0;i<n;++i)r.push(t);return r}var nc={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return t(t({},e),{table:function(n){var r=e.table(n),i=r.schema,o={},a=[];function u(e,n,r){var i=tN(e),s=o[i]=o[i]||[],c=null==e?0:"string"==typeof e?1:e.length,l=0<n,l=t(t({},r),{name:l?"".concat(i,"(virtual-from:").concat(r.name,")"):r.name,lowLevelIndex:r,isVirtual:l,keyTail:n,keyLength:c,extractKey:tI(e),unique:!l&&r.unique});return s.push(l),l.isPrimaryKey||a.push(l),1<c&&u(2===c?e[0]:e.slice(0,c-1),n+1,r),s.sort(function(e,t){return e.keyTail-t.keyTail}),l}n=u(i.primaryKey.keyPath,0,i.primaryKey),o[":id"]=[n];for(var s=0,c=i.indexes;s<c.length;s++){var l=c[s];u(l.keyPath,0,l)}function f(n){var r,i=n.query.index;return i.isVirtual?t(t({},n),{query:{index:i.lowLevelIndex,range:(r=n.query.range,i=i.keyTail,{type:1===r.type?2:r.type,lower:ns(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,i),lowerOpen:!0,upper:ns(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,i),upperOpen:!0})}}):n}return t(t({},r),{schema:t(t({},i),{primaryKey:n,indexes:a,getIndexByKeyPath:function(e){return(e=o[tN(e)])&&e[0]}}),count:function(e){return r.count(f(e))},query:function(e){return r.query(f(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;return o?r.openCursor(f(t)).then(function(n){return n&&Object.create(n,{continue:{value:function(r){null!=r?n.continue(ns(r,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?n.continue(n.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):n.continue()}},continuePrimaryKey:{value:function(t,r){n.continuePrimaryKey(ns(t,e.MAX_KEY,i),r)}},primaryKey:{get:function(){return n.primaryKey}},key:{get:function(){var e=n.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return n.value}}})}):r.openCursor(t)}})}})}};function nl(e,t,n,r){return n=n||{},r=r||"",o(e).forEach(function(i){var o,a,u;l(t,i)?(o=e[i],a=t[i],"object"==typeof o&&"object"==typeof a&&o&&a?(u=A(o))!==A(a)?n[r+i]=t[i]:"Object"===u?nl(o,a,n,r+i+"."):o!==a&&(n[r+i]=t[i]):o!==a&&(n[r+i]=t[i])):n[r+i]=void 0}),o(t).forEach(function(i){l(e,i)||(n[r+i]=t[i])}),n}function nf(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}var nh={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return t(t({},e),{table:function(n){var i=e.table(n),o=i.schema.primaryKey;return t(t({},i),{mutate:function(e){var a=ey.trans,u=a.table(n).hook,s=u.deleting,c=u.creating,f=u.updating;switch(e.type){case"add":if(c.fire===G)break;return a._promise("readwrite",function(){return h(e)},!0);case"put":if(c.fire===G&&f.fire===G)break;return a._promise("readwrite",function(){return h(e)},!0);case"delete":if(s.fire===G)break;return a._promise("readwrite",function(){return h(e)},!0);case"deleteRange":if(s.fire===G)break;return a._promise("readwrite",function(){return function e(n,r,a){return i.query({trans:n,values:!1,query:{index:o,range:r},limit:a}).then(function(i){var o=i.result;return h({type:"delete",keys:o,trans:n}).then(function(i){return 0<i.numFailures?Promise.reject(i.failures[0]):o.length<a?{failures:[],numFailures:0,lastResult:void 0}:e(n,t(t({},r),{lower:o[o.length-1],lowerOpen:!0}),a)})})}(e.trans,e.range,1e4)},!0)}return i.mutate(e);function h(e){var n,a=ey.trans,u=e.keys||nf(o,e);if(!u)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?t(t({},e),{keys:u}):t({},e)).type&&(e.values=r([],e.values,!0)),e.keys&&(e.keys=r([],e.keys,!0)),("add"===(n=e).type?Promise.resolve([]):i.getMany({trans:n.trans,keys:u,cache:"immutable"})).then(function(t){var n=u.map(function(n,r){var i,u,h,d=t[r],p={onerror:null,onsuccess:null};return"delete"===e.type?s.fire.call(p,n,d,a):"add"===e.type||void 0===d?(i=c.fire.call(p,n,e.values[r],a),null==n&&null!=i&&(e.keys[r]=n=i,o.outbound||x(e.values[r],o.keyPath,n))):(i=nl(d,e.values[r]),(u=f.fire.call(p,i,n,d,a))&&(h=e.values[r],Object.keys(u).forEach(function(e){l(h,e)?h[e]=u[e]:x(h,e,u[e])}))),p});return i.mutate(e).then(function(r){for(var i=r.failures,o=r.results,a=r.numFailures,r=r.lastResult,s=0;s<u.length;++s){var c=(o||u)[s],l=n[s];null==c?l.onerror&&l.onerror(i[s]):l.onsuccess&&l.onsuccess("put"===e.type&&t[s]?e.values[s]:c)}return{failures:i,results:o,numFailures:a,lastResult:r}}).catch(function(e){return n.forEach(function(t){return t.onerror&&t.onerror(e)}),Promise.reject(e)})})}}})}})}};function nd(e,t,n){try{if(!t||t.keys.length<e.length)return null;for(var r=[],i=0,o=0;i<t.keys.length&&o<e.length;++i)0===e5(t.keys[i],e[o])&&(r.push(n?j(t.values[i]):t.values[i]),++o);return r.length===e.length?r:null}catch(e){return null}}var np={stack:"dbcore",level:-1,create:function(e){return{table:function(n){var r=e.table(n);return t(t({},r),{getMany:function(e){if(!e.cache)return r.getMany(e);var t=nd(e.keys,e.trans._cache,"clone"===e.cache);return t?eg.resolve(t):r.getMany(e).then(function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?j(t):t},t})},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),r.mutate(e)}})}}}};function ny(e,t){return"readonly"===e.trans.mode&&!!e.subscr&&!e.trans.explicit&&"disabled"!==e.trans.db._options.cache&&!t.schema.primaryKey.outbound}function nv(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var nm={stack:"dbcore",level:0,name:"Observability",create:function(e){var n=e.schema.name,r=new t3(e.MIN_KEY,e.MAX_KEY);return t(t({},e),{transaction:function(t,n,r){if(ey.subscr&&"readonly"!==n)throw new $.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(ey.querier));return e.transaction(t,n,r)},table:function(i){var u=e.table(i),s=u.schema,c=s.primaryKey,l=s.indexes,f=c.extractKey,h=c.outbound,d=c.autoIncrement&&l.filter(function(e){return e.compound&&e.keyPath.includes(c.keyPath)}),p=t(t({},u),{mutate:function(e){function t(e){return h[e="idb://".concat(n,"/").concat(i,"/").concat(e)]||(h[e]=new t3)}var o,l,f=e.trans,h=e.mutatedParts||(e.mutatedParts={}),p=t(""),y=t(":dels"),v=e.type,m="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[nf(c,e).filter(function(e){return e}),e.values]:[],b=m[0],g=m[1],m=e.trans._cache;return a(b)?(p.addKeys(b),(m="delete"===v||b.length===g.length?nd(b,m):null)||y.addKeys(b),(m||g)&&(o=m,l=g,s.indexes.forEach(function(e){var n=t(e.name||"");function r(t){return null!=t?e.extractKey(t):null}function i(t){return e.multiEntry&&a(t)?t.forEach(function(e){return n.addKey(e)}):n.addKey(t)}(o||l).forEach(function(e,t){var n=o&&r(o[t]),t=l&&r(l[t]);0!==e5(n,t)&&(null!=n&&i(n),null!=t&&i(t))})}))):b?(g={from:b.lower,to:b.upper},y.add(g),p.add(g)):(p.add(r),y.add(r),s.indexes.forEach(function(e){return t(e.name).add(r)})),u.mutate(e).then(function(n){return!b||"add"!==e.type&&"put"!==e.type||(p.addKeys(n.results),d&&d.forEach(function(r){var i=e.values.map(function(e){return r.extractKey(e)}),o=r.keyPath.findIndex(function(e){return e===c.keyPath});n.results.forEach(function(e){return i[o]=e}),t(r.name).addKeys(i)})),f.mutatedParts=t7(f.mutatedParts||{},h),n})}}),l=function(t){var n=t.query,t=n.index,n=n.range;return[t,new t3(null!==(t=n.lower)&&void 0!==t?t:e.MIN_KEY,null!==(n=n.upper)&&void 0!==n?n:e.MAX_KEY)]},y={get:function(e){return[c,new t3(e.key)]},getMany:function(e){return[c,(new t3).addKeys(e.keys)]},count:l,query:l,openCursor:l};return o(y).forEach(function(e){p[e]=function(o){var a=ey.subscr,s=!!a,c=ny(ey,u)&&nv(e,o)?o.obsSet={}:a;if(s){var l=function(e){return c[e="idb://".concat(n,"/").concat(i,"/").concat(e)]||(c[e]=new t3)},d=l(""),p=l(":dels"),a=y[e](o),s=a[0],a=a[1];if(("query"===e&&s.isPrimaryKey&&!o.values?p:l(s.name||"")).add(a),!s.isPrimaryKey){if("count"!==e){var v="query"===e&&h&&o.values&&u.query(t(t({},o),{values:!1}));return u[e].apply(this,arguments).then(function(t){if("query"===e){if(h&&o.values)return v.then(function(e){return e=e.result,d.addKeys(e),t});var n=o.values?t.result.map(f):t.result;(o.values?d:p).addKeys(n)}else if("openCursor"===e){var r=o.values;return t&&Object.create(t,{key:{get:function(){return p.addKey(t.primaryKey),t.key}},primaryKey:{get:function(){var e=t.primaryKey;return p.addKey(e),e}},value:{get:function(){return r&&d.addKey(t.primaryKey),t.value}}})}return t})}p.add(r)}}return u[e].apply(this,arguments)}}),p}})}};function nb(e,n,r){if(0===r.numFailures)return n;if("deleteRange"===n.type)return null;var i=n.keys?n.keys.length:"values"in n&&n.values?n.values.length:1;return r.numFailures===i?null:(a((n=t({},n)).keys)&&(n.keys=n.keys.filter(function(e,t){return!(t in r.failures)})),"values"in n&&a(n.values)&&(n.values=n.values.filter(function(e,t){return!(t in r.failures)})),n)}function ng(e,t){return(void 0===t.lower||(t.lowerOpen?0<e5(e,t.lower):0<=e5(e,t.lower)))&&(void 0===t.upper||(t.upperOpen?0>e5(e,t.upper):0>=e5(e,t.upper)))}function nw(e,t,n,r,i,o){if(!n||0===n.length)return e;var u=t.query.index,s=u.multiEntry,c=t.query.range,l=r.schema.primaryKey.extractKey,f=u.extractKey,h=(u.lowLevelIndex||u).extractKey,n=n.reduce(function(e,n){var r=e,i="add"===n.type||"put"===n.type?n.values.filter(function(e){return e=f(e),s&&a(e)?e.some(function(e){return ng(e,c)}):ng(e,c)}).map(function(e){return e=j(e),o&&Object.freeze(e),e}):[];switch(n.type){case"add":r=e.concat(t.values?i:i.map(function(e){return l(e)}));break;case"put":var u=(new t3).addKeys(n.values.map(function(e){return l(e)})),r=e.filter(function(e){return!t4(new t3(e=t.values?l(e):e),u)}).concat(t.values?i:i.map(function(e){return l(e)}));break;case"delete":var h=(new t3).addKeys(n.keys);r=e.filter(function(e){return!t4(new t3(e=t.values?l(e):e),h)});break;case"deleteRange":var d=n.range;r=e.filter(function(e){return!ng(l(e),d)})}return r},e);return n===e?e:(n.sort(function(e,t){return e5(h(e),h(t))||e5(l(e),l(t))}),t.limit&&t.limit<1/0&&(n.length>t.limit?n.length=t.limit:e.length===t.limit&&n.length<t.limit&&(i.dirty=!0)),o?Object.freeze(n):n)}function n_(e,t){return 0===e5(e.lower,t.lower)&&0===e5(e.upper,t.upper)&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}var nx={stack:"dbcore",level:0,name:"Cache",create:function(e){var n=e.schema.name;return t(t({},e),{transaction:function(t,r,i){var o,a,u=e.transaction(t,r,i);return"readwrite"===r&&(a=(o=new AbortController).signal,i=function(i){return function(){if(o.abort(),"readwrite"===r){for(var a=new Set,s=0;s<t.length;s++){var c=t[s],l=nt["idb://".concat(n,"/").concat(c)];if(l){var f=e.table(c),h=l.optimisticOps.filter(function(e){return e.trans===u});if(u._explicit&&i&&u.mutatedParts)for(var d=0,p=Object.values(l.queries.query);d<p.length;d++)for(var y=0,v=(g=p[d]).slice();y<v.length;y++)ne((w=v[y]).obsSet,u.mutatedParts)&&(q(g,w),w.subscribers.forEach(function(e){return a.add(e)}));else if(0<h.length){l.optimisticOps=l.optimisticOps.filter(function(e){return e.trans!==u});for(var m=0,b=Object.values(l.queries.query);m<b.length;m++)for(var g,w,_,x=0,k=(g=b[m]).slice();x<k.length;x++)null!=(w=k[x]).res&&u.mutatedParts&&(i&&!w.dirty?(_=Object.isFrozen(w.res),_=nw(w.res,w.req,h,f,w,_),w.dirty?(q(g,w),w.subscribers.forEach(function(e){return a.add(e)})):_!==w.res&&(w.res=_,w.promise=eg.resolve({result:_}))):(w.dirty&&q(g,w),w.subscribers.forEach(function(e){return a.add(e)})))}}}a.forEach(function(e){return e()})}}},u.addEventListener("abort",i(!1),{signal:a}),u.addEventListener("error",i(!1),{signal:a}),u.addEventListener("complete",i(!0),{signal:a})),u},table:function(r){var i=e.table(r),o=i.schema.primaryKey;return t(t({},i),{mutate:function(e){var a=ey.trans;if(o.outbound||"disabled"===a.db._options.cache||a.explicit)return i.mutate(e);var u=nt["idb://".concat(n,"/").concat(r)];return u?(a=i.mutate(e),("add"===e.type||"put"===e.type)&&(50<=e.values.length||nf(o,e).some(function(e){return null==e}))?a.then(function(n){var r=nb(0,t(t({},e),{values:e.values.map(function(e,r){var i,e=null!==(i=o.keyPath)&&void 0!==i&&i.includes(".")?j(e):t({},e);return x(e,o.keyPath,n.results[r]),e})}),n);u.optimisticOps.push(r),queueMicrotask(function(){return e.mutatedParts&&ni(e.mutatedParts)})}):(u.optimisticOps.push(e),e.mutatedParts&&ni(e.mutatedParts),a.then(function(t){0<t.numFailures&&(q(u.optimisticOps,e),(t=nb(0,e,t))&&u.optimisticOps.push(t),e.mutatedParts&&ni(e.mutatedParts))}),a.catch(function(){q(u.optimisticOps,e),e.mutatedParts&&ni(e.mutatedParts)})),a):i.mutate(e)},query:function(e){if(!ny(ey,i)||!nv("query",e))return i.query(e);var t,o,a="immutable"===(null===(l=ey.trans)||void 0===l?void 0:l.db._options.cache),u=ey,s=u.requery,c=u.signal,l=function(e,t,n,r){var i=nt["idb://".concat(e,"/").concat(t)];if(!i)return[];if(!(t=i.queries[n]))return[null,!1,i,null];var o=t[(r.query?r.query.index.name:null)||""];if(!o)return[null,!1,i,null];switch(n){case"query":var a=o.find(function(e){return e.req.limit===r.limit&&e.req.values===r.values&&n_(e.req.query.range,r.query.range)});return a?[a,!0,i,o]:[o.find(function(e){var t,n;return("limit"in e.req?e.req.limit:1/0)>=r.limit&&(!r.values||e.req.values)&&(t=e.req.query.range,n=r.query.range,0>=function(e,t,n,r){if(void 0===e)return void 0!==t?-1:0;if(void 0===t)return 1;if(0===(t=e5(e,t))){if(n&&r)return 0;if(n)return 1;if(r)return -1}return t}(t.lower,n.lower,t.lowerOpen,n.lowerOpen)&&0<=function(e,t,n,r){if(void 0===e)return void 0!==t?1:0;if(void 0===t)return -1;if(0===(t=e5(e,t))){if(n&&r)return 0;if(n)return -1;if(r)return 1}return t}(t.upper,n.upper,t.upperOpen,n.upperOpen))}),!1,i,o];case"count":return[a=o.find(function(e){return n_(e.req.query.range,r.query.range)}),!!a,i,o]}}(n,r,"query",e),f=l[0],u=l[1],h=l[2],d=l[3];return f&&u?f.obsSet=e.obsSet:(u=i.query(e).then(function(e){var t=e.result;if(f&&(f.res=t),a){for(var n=0,r=t.length;n<r;++n)Object.freeze(t[n]);Object.freeze(t)}else e.result=j(t);return e}).catch(function(e){return d&&f&&q(d,f),Promise.reject(e)}),f={obsSet:e.obsSet,promise:u,subscribers:new Set,type:"query",req:e,dirty:!1},d?d.push(f):(d=[f],(h=h||(nt["idb://".concat(n,"/").concat(r)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[e.query.index.name||""]=d)),t=f,o=d,t.subscribers.add(s),c.addEventListener("abort",function(){t.subscribers.delete(s),0===t.subscribers.size&&setTimeout(function(){0===t.subscribers.size&&q(o,t)},3e3)}),f.promise.then(function(t){return{result:nw(t.result,e,null==h?void 0:h.optimisticOps,i,f,a)}})}})}})}};function nk(e,t){return new Proxy(e,{get:function(e,n,r){return"db"===n?t:Reflect.get(e,n,r)}})}var nO=(nP.prototype.version=function(e){if(isNaN(e)||e<.1)throw new $.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new $.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter(function(t){return t._cfg.version===e})[0];return n||(n=new this.Version(e),t.push(n),t.sort(tU),n.stores({}),this._state.autoSchema=!1,n)},nP.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||ey.letThrough||this._vip)?e():new eg(function(e,n){if(t._state.openComplete)return n(new $.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void n(new $.DatabaseClosed);t.open().catch(G)}t._state.dbReadyPromise.then(e,n)}).then(e)},nP.prototype.use=function(e){var t=e.stack,n=e.create,r=e.level,i=e.name;return i&&this.unuse({stack:t,name:i}),(e=this._middlewares[t]||(this._middlewares[t]=[])).push({stack:t,create:n,level:null==r?10:r,name:i}),e.sort(function(e,t){return e.level-t.level}),this},nP.prototype.unuse=function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(e){return r?e.create!==r:!!n&&e.name!==n})),this},nP.prototype.open=function(){var e=this;return eW(ep,function(){return function(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?eQ(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var r=t.openCanceller,i=Math.round(10*e.verno),a=!1;function u(){if(t.openCanceller!==r)throw new $.DatabaseClosed("db.open() was cancelled")}var s,c=t.dbReadyResolve,l=null,f=!1;return eg.race([r,("undefined"==typeof navigator?eg.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){function t(){return indexedDB.databases().finally(e)}s=setInterval(t,100),t()}).finally(function(){return clearInterval(s)}):Promise.resolve()).then(function r(){return new eg(function(s,c){if(u(),!n)throw new $.MissingAPI;var h=e.name,d=t.autoSchema||!i?n.open(h):n.open(h,i);if(!d)throw new $.MissingAPI;d.onerror=tO(c),d.onblocked=eA(e._fireOnBlocked),d.onupgradeneeded=eA(function(r){var i,u,s,p,y,v,m;l=d.transaction,t.autoSchema&&!e._options.allowEmptyDB?(d.onerror=tP,l.abort(),d.result.close(),(i=n.deleteDatabase(h)).onsuccess=i.onerror=eA(function(){c(new $.NoSuchDatabase("Database ".concat(h," doesnt exist")))})):(l.onerror=tO(c),f=(r=r.oldVersion>0x4000000000000000?0:r.oldVersion)<1,e.idbdb=d.result,a&&function(e,t){tW(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var n=tY(0,e.idbdb,t);tQ(e,e._dbSchema,t);for(var r=0,i=tV(n,e._dbSchema).change;r<i.length;r++){var o=function(e){if(e.change.length||e.recreate)return console.warn("Unable to patch indexes of table ".concat(e.name," because it has changes on the type of index or primary key.")),{value:void 0};var n=t.objectStore(e.name);e.add.forEach(function(t){ei&&console.debug("Dexie upgrade patch: Creating missing index ".concat(e.name,".").concat(t.src)),t$(n,t)})}(i[r]);if("object"==typeof o)return o.value}}(e,l),u=r/10,s=l,p=e._dbSchema,s.objectStoreNames.contains("$meta")&&!p.$meta&&(p.$meta=tT("$meta",tG("")[0],[]),e._storeNames.push("$meta")),(y=e._createTransaction("readwrite",e._storeNames,p)).create(s),y._completion.catch(c),v=y._reject.bind(y),m=ey.transless||ey,eN(function(){return ey.trans=y,ey.transless=m,0!==u?(tF(e,s),(y.storeNames.includes("$meta")?y.table("$meta").get("version").then(function(e){return null!=e?e:u}):eg.resolve(u)).then(function(t){var n,r,i;return n=t,r=[],t=e._versions,i=e._dbSchema=tY(0,e.idbdb,s),0!==(t=t.filter(function(e){return e._cfg.version>=n})).length?(t.forEach(function(t){r.push(function(){var r=i,a=t._cfg.dbschema;tQ(e,r,s),tQ(e,a,s),i=e._dbSchema=a;var u=tV(r,a);u.add.forEach(function(e){tz(s,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(function(e){if(e.recreate)throw new $.Upgrade("Not yet support for changing primary key");var t=s.objectStore(e.name);e.add.forEach(function(e){return t$(t,e)}),e.change.forEach(function(e){t.deleteIndex(e.name),t$(t,e)}),e.del.forEach(function(e){return t.deleteIndex(e)})});var c=t._cfg.contentUpgrade;if(c&&t._cfg.version>n){tF(e,s),y._memoizedTables={};var l=k(a);u.del.forEach(function(e){l[e]=r[e]}),tL(e,[e.Transaction.prototype]),tM(e,[e.Transaction.prototype],o(l),l),y.schema=l;var f,h=R(c);return h&&eF(),u=eg.follow(function(){var e;(f=c(y))&&h&&(e=eM.bind(null,null),f.then(e,e))}),f&&"function"==typeof f.then?eg.resolve(f):u.then(function(){return f})}}),r.push(function(n){var r=t._cfg.dbschema;[].slice.call(n.db.objectStoreNames).forEach(function(e){return null==r[e]&&n.db.deleteObjectStore(e)}),tL(e,[e.Transaction.prototype]),tM(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),y.schema=e._dbSchema}),r.push(function(n){e.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(e.idbdb.version/10)===t._cfg.version?(e.idbdb.deleteObjectStore("$meta"),delete e._dbSchema.$meta,e._storeNames=e._storeNames.filter(function(e){return"$meta"!==e})):n.objectStore("$meta").put(t._cfg.version,"version"))})}),(function e(){return r.length?eg.resolve(r.shift()(y.idbtrans)).then(e):eg.resolve()})().then(function(){tW(i,s)})):eg.resolve()}).catch(v)):(o(p).forEach(function(e){tz(s,e,p[e].primKey,p[e].indexes)}),tF(e,s),void eg.follow(function(){return e.on.populate.fire(y)}).catch(v))}))},c),d.onsuccess=eA(function(){l=null;var n,u,c,p=e.idbdb=d.result,y=m(p.objectStoreNames);if(0<y.length)try{var v=p.transaction(1===y.length?y[0]:y,"readonly");if(t.autoSchema)n=p,u=v,e.verno=n.version/10,u=e._dbSchema=tY(0,n,u),e._storeNames=m(n.objectStoreNames,0),tM(e,[e._allTables],o(u),u);else if(tQ(e,e._dbSchema,v),((c=tV(tY(0,(c=e).idbdb,v),c._dbSchema)).add.length||c.change.some(function(e){return e.add.length||e.change.length}))&&!a)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),p.close(),i=p.version+1,a=!0,s(r());tF(e,v)}catch(e){}eJ.push(e),p.onversionchange=eA(function(n){t.vcFired=!0,e.on("versionchange").fire(n)}),p.onclose=eA(function(t){e.on("close").fire(t)}),f&&(c=e._deps,v=h,p=c.indexedDB,c=c.IDBKeyRange,tZ(p)||v===eZ||tJ(p,c).put({name:v}).catch(G)),s()},c)}).catch(function(e){switch(null==e?void 0:e.name){case"UnknownError":if(0<t.PR1398_maxLoop)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),r();break;case"VersionError":if(0<i)return i=0,r()}return eg.reject(e)})})]).then(function(){return u(),t.onReadyBeingFired=[],eg.resolve(t0(function(){return e.on.ready.fire(e.vip)})).then(function n(){if(0<t.onReadyBeingFired.length){var r=t.onReadyBeingFired.reduce(er,G);return t.onReadyBeingFired=[],eg.resolve(t0(function(){return r(e.vip)})).then(n)}})}).finally(function(){t.openCanceller===r&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(n){t.dbOpenError=n;try{l&&l.abort()}catch(e){}return r===t.openCanceller&&e._close(),eQ(n)}).finally(function(){t.openComplete=!0,c()}).then(function(){var t;return f&&(t={},e.tables.forEach(function(n){n.schema.indexes.forEach(function(r){r.name&&(t["idb://".concat(e.name,"/").concat(n.name,"/").concat(r.name)]=new t3(-1/0,[[[]]]))}),t["idb://".concat(e.name,"/").concat(n.name,"/")]=t["idb://".concat(e.name,"/").concat(n.name,"/:dels")]=new t3(-1/0,[[[]]])}),tS(tE).fire(t),no(t,!0)),e})}(e)})},nP.prototype._close=function(){var e=this._state,t=eJ.indexOf(this);if(0<=t&&eJ.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new eg(function(t){e.dbReadyResolve=t}),e.openCanceller=new eg(function(t,n){e.cancelOpen=n}))},nP.prototype.close=function(e){var t=(void 0===e?{disableAutoOpen:!0}:e).disableAutoOpen,e=this._state;t?(e.isBeingOpened&&e.cancelOpen(new $.DatabaseClosed),this._close(),e.autoOpen=!1,e.dbOpenError=new $.DatabaseClosed):(this._close(),e.autoOpen=this._options.autoOpen||e.isBeingOpened,e.openComplete=!1,e.dbOpenError=null)},nP.prototype.delete=function(e){var t=this;void 0===e&&(e={disableAutoOpen:!0});var n=0<arguments.length&&"object"!=typeof arguments[0],r=this._state;return new eg(function(i,o){function a(){t.close(e);var n=t._deps.indexedDB.deleteDatabase(t.name);n.onsuccess=eA(function(){var e,n,r;e=t._deps,n=t.name,r=e.indexedDB,e=e.IDBKeyRange,tZ(r)||n===eZ||tJ(r,e).delete(n).catch(G),i()}),n.onerror=tO(o),n.onblocked=t._fireOnBlocked}if(n)throw new $.InvalidArgument("Invalid closeOptions argument to db.delete()");r.isBeingOpened?r.dbReadyPromise.then(a):a()})},nP.prototype.backendDB=function(){return this.idbdb},nP.prototype.isOpen=function(){return null!==this.idbdb},nP.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},nP.prototype.hasFailed=function(){return null!==this._state.dbOpenError},nP.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(nP.prototype,"tables",{get:function(){var e=this;return o(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),nP.prototype.transaction=function(){var e=(function(e,t,n){var r=arguments.length;if(r<2)throw new $.InvalidArgument("Too few arguments");for(var i=Array(r-1);--r;)i[r-1]=arguments[r];return n=i.pop(),[e,P(i),n]}).apply(this,arguments);return this._transaction.apply(this,e)},nP.prototype._transaction=function(e,t,n){var r=this,i=ey.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map(function(e){if(e=e instanceof r.Table?e.name:e,"string"!=typeof e)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e}),"r"==e||e===e0)o=e0;else{if("rw"!=e&&e!=e1)throw new $.InvalidArgument("Invalid transaction mode: "+e);o=e1}if(i){if(i.mode===e0&&o===e1){if(!u)throw new $.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach(function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!u)throw new $.SubTransaction("Table "+e+" not included in parent transaction.");i=null}}),u&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,function(t,n){n(e)}):eQ(e)}var s=(function e(t,n,r,i,o){return eg.resolve().then(function(){var a=ey.transless||ey,u=t._createTransaction(n,r,t._dbSchema,i);if(u.explicit=!0,a={trans:u,transless:a},i)u.idbtrans=i.idbtrans;else try{u.create(),u.idbtrans._explicit=!0,t._state.PR1398_maxLoop=3}catch(i){return i.name===W.InvalidState&&t.isOpen()&&0<--t._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),t.close({disableAutoOpen:!1}),t.open().then(function(){return e(t,n,r,null,o)})):eQ(i)}var s,c=R(o);return c&&eF(),a=eg.follow(function(){var e;(s=o.call(u,u))&&(c?(e=eM.bind(null,null),s.then(e,e)):"function"==typeof s.next&&"function"==typeof s.throw&&(s=nu(s)))},a),(s&&"function"==typeof s.then?eg.resolve(s).then(function(e){return u.active?e:eQ(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):a.then(function(){return s})).then(function(e){return i&&u._resolve(),u._completion.then(function(){return e})}).catch(function(e){return u._reject(e),eQ(e)})})}).bind(null,this,o,a,i,n);return i?i._promise(o,s,"lock"):ey.trans?eW(ey.transless,function(){return r._whenReady(s)}):this._whenReady(s)},nP.prototype.table=function(e){if(!l(this._allTables,e))throw new $.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},nP);function nP(e,n){var r=this;this._middlewares={},this.verno=0;var i=nP.dependencies;this._options=n=t({addons:nP.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange},i=n.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var o,a,u,s,c,l={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:G,dbReadyPromise:null,cancelOpen:G,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:n.autoOpen};l.dbReadyPromise=new eg(function(e){l.dbReadyResolve=e}),l.openCanceller=new eg(function(e,t){l.cancelOpen=t}),this._state=l,this.name=e,this.on=tt(this,"populate","blocked","versionchange","close",{ready:[er,G]}),this.on.ready.subscribe=b(this.on.ready.subscribe,function(e){return function(t,n){nP.vip(function(){var i=r._state;i.openComplete?(i.dbOpenError||eg.resolve().then(t),n&&e(t)):i.onReadyBeingFired?(i.onReadyBeingFired.push(t),n&&e(t)):(e(t),n||e(function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))})}}),this.Collection=(o=this,tn(th.prototype,function(e,t){this.db=o;var n=e2,r=null;if(t)try{n=t()}catch(e){r=e}var i=e._ctx,t=i.table,e=t.hook.reading.fire;this._ctx={table:t,index:i.index,isPrimKey:!i.index||t.schema.primKey.keyPath&&i.index===t.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:i.or,valueMapper:e!==X?e:null}})),this.Table=(a=this,tn(e7.prototype,function(e,t,n){this.db=a,this._tx=n,this.name=e,this.schema=t,this.hook=a._allTables[e]?a._allTables[e].hook:tt(null,{creating:[Z,G],reading:[H,X],updating:[et,G],deleting:[ee,G]})})),this.Transaction=(u=this,tn(tj.prototype,function(e,t,n,r,i){var o=this;this.db=u,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=tt(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new eg(function(e,t){o._resolve=e,o._reject=t}),this._completion.then(function(){o.active=!1,o.on.complete.fire()},function(e){var t=o.active;return o.active=!1,o.on.error.fire(e),o.parent?o.parent._reject(e):t&&o.idbtrans&&o.idbtrans.abort(),eQ(e)})})),this.Version=(s=this,tn(tX.prototype,function(e){this.db=s,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(c=this,tn(tx.prototype,function(e,t,n){if(this.db=c,this._ctx={table:e,index:":id"===t?null:t,or:n},this._cmp=this._ascending=e5,this._descending=function(e,t){return e5(t,e)},this._max=function(e,t){return 0<e5(e,t)?e:t},this._min=function(e,t){return 0>e5(e,t)?e:t},this._IDBKeyRange=c._deps.IDBKeyRange,!this._IDBKeyRange)throw new $.MissingAPI})),this.on("versionchange",function(e){0<e.newVersion?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close({disableAutoOpen:!1})}),this.on("blocked",function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))}),this._maxKey=tq(n.IDBKeyRange),this._createTransaction=function(e,t,n,i){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,i)},this._fireOnBlocked=function(e){r.on("blocked").fire(e),eJ.filter(function(e){return e.name===r.name&&e!==r&&!e._state.vcFired}).map(function(t){return t.on("versionchange").fire(e)})},this.use(np),this.use(nx),this.use(nm),this.use(nc),this.use(nh);var f=new Proxy(this,{get:function(e,t,n){if("_vip"===t)return!0;if("table"===t)return function(e){return nk(r.table(e),f)};var i=Reflect.get(e,t,n);return i instanceof e7?nk(i,f):"tables"===t?i.map(function(e){return nk(e,f)}):"_createTransaction"===t?function(){return nk(i.apply(this,arguments),f)}:i}});this.vip=f,i.forEach(function(e){return e(r)})}var nE,F="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",nK=(nS.prototype.subscribe=function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})},nS.prototype[F]=function(){return this},nS);function nS(e){this._subscribe=e}try{nE={indexedDB:i.indexedDB||i.mozIndexedDB||i.webkitIndexedDB||i.msIndexedDB,IDBKeyRange:i.IDBKeyRange||i.webkitIDBKeyRange}}catch(e){nE={indexedDB:null,IDBKeyRange:null}}function nj(e){var t,n=!1,r=new nK(function(r){var i,o=R(e),a=!1,u={},s={},c={get closed(){return a},unsubscribe:function(){a||(a=!0,i&&i.abort(),f&&tS.storagemutated.unsubscribe(d))}};r.start&&r.start(c);var f=!1,h=function(){return eY(p)},d=function(e){t7(u,e),ne(s,u)&&h()},p=function(){var c,p;!a&&nE.indexedDB&&(u={},c={},i&&i.abort(),Promise.resolve(function(t){var n=eK();try{o&&eF();var r=eN(e,t);return r=o?r.finally(eM):r}finally{n&&eS()}}(p={subscr:c,signal:(i=new AbortController).signal,requery:h,querier:e,trans:null})).then(function(e){n=!0,t=e,a||p.signal.aborted||(u={},function(e){for(var t in e)if(l(e,t))return;return 1}(s=c)||f||(tS(tE,d),f=!0),eY(function(){return!a&&r.next&&r.next(e)}))},function(e){n=!1,["DatabaseClosedError","AbortError"].includes(null==e?void 0:e.name)||a||eY(function(){a||r.error&&r.error(e)})}))};return setTimeout(h,0),c});return r.hasValue=function(){return n},r.getValue=function(){return t},r}function nC(e){var t=nD;try{nD=!0,tS.storagemutated.fire(e),no(e,!0)}finally{nD=t}}f(nO,t(t({},Q),{delete:function(e){return new nO(e,{addons:[]}).delete()},exists:function(e){return new nO(e,{addons:[]}).open().then(function(e){return e.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){var t,n;try{return n=(t=nO.dependencies).indexedDB,t=t.IDBKeyRange,(tZ(n)?Promise.resolve(n.databases()).then(function(e){return e.map(function(e){return e.name}).filter(function(e){return e!==eZ})}):tJ(n,t).toCollection().primaryKeys()).then(e)}catch(e){return eQ(new $.MissingAPI)}},defineClass:function(){return function(e){u(this,e)}},ignoreTransaction:function(e){return ey.trans?eW(ey.transless,e):e()},vip:t0,async:function(e){return function(){try{var t=nu(e.apply(this,arguments));return t&&"function"==typeof t.then?t:eg.resolve(t)}catch(e){return eQ(e)}}},spawn:function(e,t,n){try{var r=nu(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:eg.resolve(r)}catch(e){return eQ(e)}},currentTransaction:{get:function(){return ey.trans||null}},waitFor:function(e,t){return t=eg.resolve("function"==typeof e?nO.ignoreTransaction(e):e).timeout(t||6e4),ey.trans?ey.trans.waitFor(t):t},Promise:eg,debug:{get:function(){return ei},set:function(e){ei=e}},derive:p,extend:u,props:f,override:b,Events:tt,on:tS,liveQuery:nj,extendObservabilitySet:t7,getByKeyPath:_,setByKeyPath:x,delByKeyPath:function(e,t){"string"==typeof t?x(e,t,void 0):"length"in t&&[].map.call(t,function(t){x(e,t,void 0)})},shallowClone:k,deepClone:j,getObjectDiff:nl,cmp:e5,asap:w,minKey:-1/0,addons:[],connections:eJ,errnames:W,dependencies:nE,cache:nt,semVer:"4.0.7",version:"4.0.7".split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,2*n)})})),nO.maxKey=tq(nO.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(tS(tE,function(e){nD||(e=new CustomEvent(tK,{detail:e}),nD=!0,dispatchEvent(e),nD=!1)}),addEventListener(tK,function(e){e=e.detail,nD||nC(e)}));var nA,nD=!1,nT=function(){};return"undefined"!=typeof BroadcastChannel&&((nT=function(){(nA=new BroadcastChannel(tK)).onmessage=function(e){return e.data&&nC(e.data)}})(),"function"==typeof nA.unref&&nA.unref(),tS(tE,function(e){nD||nA.postMessage(e)})),"undefined"!=typeof addEventListener&&(addEventListener("pagehide",function(e){if(!nO.disableBfCache&&e.persisted){ei&&console.debug("Dexie: handling persisted pagehide"),null!=nA&&nA.close();for(var t=0;t<eJ.length;t++)eJ[t].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!nO.disableBfCache&&e.persisted&&(ei&&console.debug("Dexie: handling persisted pageshow"),nT(),nC({all:new t3(-1/0,[[]])}))})),eg.rejectionMapper=function(e,t){return!e||e instanceof L||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Y[e.name]?e:(t=new Y[e.name](t||e.message,e),"stack"in e&&d(t,"stack",{get:function(){return this.inner.stack}}),t)},t(nO,Object.freeze({__proto__:null,Dexie:nO,liveQuery:nj,Entity:e4,cmp:e5,PropModSymbol:E,PropModification:tl,replacePrefix:function(e,t){return new tl({replacePrefix:[e,t]})},add:function(e){return new tl({add:e})},remove:function(e){return new tl({remove:e})},default:nO,RangeSet:t3,mergeRanges:t8,rangesOverlap:t4}),{default:nO}),nO},e.exports=r()},14635:function(e,t,n){"use strict";var r=n(53185);let i=Symbol.for("Dexie"),o=globalThis[i]||(globalThis[i]=r);if(r.semVer!==o.semVer)throw Error(`Two different versions of Dexie loaded in the same app: ${r.semVer} and ${o.semVer}`);let{liveQuery:a,mergeRanges:u,rangesOverlap:s,RangeSet:c,cmp:l,Entity:f,PropModSymbol:h,PropModification:d,replacePrefix:p,add:y,remove:v}=o;t.ZP=o}}]);
_next/static/chunks/659-cbbb4b3dad45579b.js ADDED
The diff for this file is too large to render. See raw diff
 
_next/static/chunks/672-4b868305a56bb5d8.js ADDED
@@ -0,0 +1 @@
 
 
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[672],{49354:function(e,n,o){o.d(n,{cn:function(){return i}});var t=o(44839),r=o(96164);function i(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return(0,r.m6)((0,t.W)(n))}},89028:function(e,n,o){o.d(n,{ri:function(){return i},wK:function(){return d},zQ:function(){return c}});let t="rakisSettings",r=null;function i(){let e={};try{window.localStorage&&window.localStorage&&window.localStorage.getItem(t)&&(r=e=JSON.parse(window.localStorage.getItem(t)))}catch(n){console.error("Error loading settings from localStorage, loading saved settings if we have them",r),r&&(console.log("Using last loaded settings - ",r),e=r)}return e.packetDBSettings={...s,...e.packetDBSettings},e.p2pSettings={...l,...e.p2pSettings},e.chainConnectionSettings={...u,...e.chainConnectionSettings},e.loggerSettings={...g,...e.loggerSettings},e.theDomainSettings={...f,...e.theDomainSettings},e.quorumSettings={...w,...e.quorumSettings},e.llmEngineSettings={...m,...e.llmEngineSettings},e.workerSettings={...a,...e.workerSettings},e}function c(e){{let n={};try{n=JSON.parse(window.localStorage.getItem(t))}catch(e){console.error("Error parsing existing settings",e)}window.localStorage.setItem(t,JSON.stringify({...n,...e}))}}let a={initialLLMWorkers:[{modelName:"gemma-2b-it-q4f16_1",count:2}],initialEmbeddingWorkers:[{modelName:"nomic-ai/nomic-embed-text-v1.5",count:1}]},s={maxReceivedPacketQueueSize:100,receivePacketQueueDebounceMs:100,peerHeartLimit:20,peerCommunicationCount:40,maxPacketDBSize:5e3},l={topic:"rakis1",maxTransmissionErrorsBeforeRestart:5},u={dAppName:"Rakis",url:"https://rakis.ai"},d="encSynthientId",g={maxLogsInMemory:1e3,loggersToSkipForInMemoryLog:["P2P: NKN","P2P: PewPewDB","P2P: nostr (trystero)","P2P: torrent (trystero)","PacketDB"],newLogEventDebounceMs:150},f={enabledP2PNetworks:["nostr","gun","torrent","nkn"],waitForP2PBootupMs:5e3,inferencePollingIntervalMs:5e3,inferenceRequestQueueDebounceMs:1e3,embeddingsQueueDebounceMs:100,requestSimilarityTimeWindowMs:2e3},w={quorumRevealRequestIssueTimeoutMs:1e4,quorumRevealTimeoutMs:2e4,quorumConsensusWindowMs:3e4,bEmbeddingThreshold:0},m={engineLogLimit:2e3,debounceLoadingProgressEventMs:50}},28580:function(e,n,o){o.d(n,{C:function(){return t}});class t{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}},62052:function(e,n,o){o.d(n,{$5:function(){return a},HQ:function(){return l},hu:function(){return u}});var t=o(36393),r=o(22170),i=o.n(r);let c=(0,o(89028).ri)().loggerSettings,a={llmEngine:{main:"background: #f0f8ff; color: #1e90ff; font-weight: bold;",worker:"background: #f0f8ff; color: #87cefa;"},embeddingEngine:{main:"background: #f0fff0; color: #2e8b57; font-weight: bold;",worker:"background: #f0fff0; color: #90ee90;"},theDomain:"background: #fff0f5; color: #ff69b4; font-weight: bold;",consensusCore:"background: #f5f5f5; color: #4682b4; font-weight: bold;",databases:{inferenceDB:"background: #f5f5f5; color: #a9a9a9;",packetDB:"background: #f5f5f5; color: #708090;",peerDB:"background: #f5f5f5; color: #778899;",quorumDB:"background: #f5f5f5; color: #696969;"},p2pNetworks:{nkn:"background: #fffacd; color: #ffa500;",torrent:"background: #fffacd; color: #ff8c00;",pewpewdb:"background: #fffacd; color: #ff7f50;",nostr:"background: #fffacd; color: #ff6347;"}},s=0;class l extends t.Z{static getInstance(){return l.instance||(l.instance=new l),l.instance}static addLog(e,n,o){l.getInstance().logs.push({at:new Date,logger:e,type:n,id:s++,message:o}),l.getInstance().logs=l.getInstance().logs.slice(-c.maxLogsInMemory).sort((e,n)=>n.at.getTime()-e.at.getTime()),l.getInstance().emitNewLogs()}constructor(){super(),this.logs=[],this.emitNewLogs=i()(()=>{this.emit("newLog")},c.newLogEventDebounceMs)}}function u(e,n){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!o&&window&&(window.blockedLogLevels=localStorage.getItem("blockedLogLevels")||[],window.blockedLoggers=localStorage.getItem("blockedLoggers")||[]),{trace:function(t){for(var r,i,c,a,s=arguments.length,l=Array(s>1?s-1:0),u=1;u<s;u++)l[u-1]=arguments[u];!o&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("trace"))||(null===(a=window)||void 0===a?void 0:null===(c=a.blockedLoggers)||void 0===c?void 0:c.includes(e)))||console.log("%c[T] ".concat(e,":"),n,t,...l)},debug:function(t){for(var r,i,a,s,u=arguments.length,d=Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];!o&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("debug"))||(null===(s=window)||void 0===s?void 0:null===(a=s.blockedLoggers)||void 0===a?void 0:a.includes(e)))||(c.loggersToSkipForInMemoryLog.includes(e)||l.addLog(e,"debug",t),console.log("%c[D] ".concat(e,":"),n,t,...d))},info:function(t){for(var r,i,a,s,u=arguments.length,d=Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];!o&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("info"))||(null===(s=window)||void 0===s?void 0:null===(a=s.blockedLoggers)||void 0===a?void 0:a.includes(e)))||(c.loggersToSkipForInMemoryLog.includes(e)||l.addLog(e,"info",t),console.log("%c[I] ".concat(e,":"),n,t,...d))},warn:function(t){for(var r,i,a,s,u=arguments.length,d=Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];!o&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("warn"))||(null===(s=window)||void 0===s?void 0:null===(a=s.blockedLoggers)||void 0===a?void 0:a.includes(e)))||(c.loggersToSkipForInMemoryLog.includes(e)||l.addLog(e,"warn",t),console.warn("%c[W] ".concat(e,":"),n,t,...d))},error:function(t){for(var r,i,a,s,u=arguments.length,d=Array(u>1?u-1:0),g=1;g<u;g++)d[g-1]=arguments[g];!o&&((null===(i=window)||void 0===i?void 0:null===(r=i.blockedLogLevels)||void 0===r?void 0:r.includes("error"))||(null===(s=window)||void 0===s?void 0:null===(a=s.blockedLoggers)||void 0===a?void 0:a.includes(e)))||(c.loggersToSkipForInMemoryLog.includes(e)||l.addLog(e,"error",t),console.error("%c[ERROR] ".concat(e,":"),n,t,...d))}}}},3682:function(e,n,o){o.d(n,{K4:function(){return f},N1:function(){return s},TU:function(){return u},Wu:function(){return d},YK:function(){return l},ow:function(){return m},q6:function(){return w},yj:function(){return g}});var t=o(9109),r=o(69893),i=o(78967),c=o(25645),a=o(2342);async function s(e,n){try{let o=await l(e,n);if(!o)return!1;return await (0,c.n)({address:o,message:e,signature:n})}catch(e){return console.error("Could not verify signature",e),!1}}async function l(e,n){try{return await (0,a.k)({message:e,signature:n})}catch(e){return console.error("Could not recover address from signature",e),null}}async function u(e,n){let o=new Uint8Array(e),t=new TextEncoder().encode(n);var r=new Uint8Array(o.length+t.length);return r.set(o),r.set(t,o.length),Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",r))).map(e=>e.toString(16).padStart(2,"0")).join("")}async function d(e){let n=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",n))).map(e=>e.toString(16).padStart(2,"0")).join("")}function g(e,n,o){let t=JSON.stringify(o),i=new Uint8Array(new TextEncoder().encode(t));return r.T(n,i,e)}function f(e,n){let o=JSON.stringify(n),t=new Uint8Array(new TextEncoder().encode(o)),i=r.Xx(t,e);return r.UG.bytesToHex(i)}async function w(e,n){console.time("Encrypting info for storage");let o=new TextEncoder,r=o.encode(n),i=crypto.getRandomValues(new Uint8Array(16)),c=crypto.getRandomValues(new Uint8Array(12)),a=await crypto.subtle.importKey("raw",r,{name:"PBKDF2"},!1,["deriveKey"]),s=await crypto.subtle.deriveKey({name:"PBKDF2",salt:i,iterations:1e5,hash:"SHA-256"},a,{name:"AES-GCM",length:256},!1,["encrypt"]),l=o.encode(JSON.stringify(e)),u=await crypto.subtle.encrypt({name:"AES-GCM",iv:c},s,l),d=t.Buffer.from(u).toString("base64"),g=t.Buffer.from(c).toString("hex"),f=t.Buffer.from(i).toString("hex");return console.timeEnd("Encrypting info for storage"),"".concat(d,".").concat(g,".").concat(f)}async function m(e,n){console.time("Decrypting info from storage");let[o,r,i]=e.split("."),c=t.Buffer.from(o,"base64"),a=t.Buffer.from(r,"hex"),s=t.Buffer.from(i,"hex"),l=new TextEncoder().encode(n),u=await crypto.subtle.importKey("raw",l,{name:"PBKDF2"},!1,["deriveKey"]),d=await crypto.subtle.deriveKey({name:"PBKDF2",salt:s,iterations:1e5,hash:"SHA-256"},u,{name:"AES-GCM",length:256},!1,["decrypt"]),g=await crypto.subtle.decrypt({name:"AES-GCM",iv:a},d,c),f=new TextDecoder().decode(g);return console.timeEnd("Decrypting info from storage"),JSON.parse(f)}r.UG.sha512Sync=function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return(0,i.o)(r.UG.concatBytes(...n))}},13201:function(e,n,o){function t(e){let n=new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString(),o=e.getTimezoneOffset(),t=Math.floor(Math.abs(o/60)).toString().padStart(2,"0"),r=Math.abs(o%60).toString().padStart(2,"0");return"".concat(n.slice(0,-1)).concat(o>0?"-":"+").concat(t,":").concat(r)}function r(){return"undefined"==typeof navigator||"undefined"==typeof screen?"not-client":window.disableAnalytics?"disabled-analytics":Object.values({userAgent:navigator.userAgent,browserVersion:navigator.appVersion,platform:navigator.platform,language:navigator.language,screenWidth:screen.width,screenHeight:screen.height,colorDepth:screen.colorDepth,timezoneOffset:new Date().getTimezoneOffset(),cpuCores:navigator.hardwareConcurrency,touchSupport:"ontouchstart"in window}).map(e=>"".concat(e)).join("#")}async function i(e){return new Promise(n=>{setTimeout(()=>n("timeout"),e)})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",o="";for(let t=0;t<e;t++)o+=n.charAt(Math.floor(Math.random()*n.length));return o}o.d(n,{GR:function(){return i},MQ:function(){return t},dz:function(){return r},zs:function(){return c}})}}]);
_next/static/chunks/813-59f8977cdcd82aee.js ADDED
The diff for this file is too large to render. See raw diff
 
_next/static/chunks/959-21298f74c09fcc74.js ADDED
The diff for this file is too large to render. See raw diff
 
_next/static/chunks/app/demos/ai/page-469346083790c5ed.js ADDED
@@ -0,0 +1 @@
 
 
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[760],{89965:function(e,s,a){Promise.resolve().then(a.bind(a,56030))},81810:function(e,s,a){"use strict";a.d(s,{Q:function(){return t},m:function(){return l}});let t={"Llama-3-8B-Instruct-q4f32_1":"border-blue-500","Llama-2-7b-chat-hf-q4f16_1":"border-sky-500","Llama-2-13b-chat-hf-q4f16_1":"border-green-500","Mistral-7B-Instruct-v0.2-q4f16_1":"border-purple-500","Hermes-2-Pro-Mistral-7B-q4f16_1":"border-cyan-500","gemma-2b-it-q4f16_1":"border-yellow-500","TinyLlama-1.1B-Chat-v0.4-q0f16":"border-red-500"},l={"border-blue-500":"#3B82F6","border-sky-500":"#0EA5E9","border-green-500":"#10B981","border-purple-500":"#8B5CF6","border-cyan-500":"#06B6D4","border-yellow-500":"#F59E0B","border-red-500":"#EF4444"}},56030:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return M}});var t=a(57437),l=a(2265),r=a(57818),n=a(79798),o=a(4867),i=a(17549),d=a(49354);let c=i.fC,m=i.ZA,u=i.B4,f=l.forwardRef((e,s)=>{let{className:a,children:l,...r}=e;return(0,t.jsxs)(i.xz,{ref:s,className:(0,d.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...r,children:[l,(0,t.jsx)(i.JO,{asChild:!0,children:(0,t.jsx)(o.jnn,{className:"h-4 w-4 opacity-50"})})]})});f.displayName=i.xz.displayName;let g=l.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(i.u_,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...l,children:(0,t.jsx)(o.g8U,{})})});g.displayName=i.u_.displayName;let x=l.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(i.$G,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...l,children:(0,t.jsx)(o.v4q,{})})});x.displayName=i.$G.displayName;let h=l.forwardRef((e,s)=>{let{className:a,children:l,position:r="popper",...n}=e;return(0,t.jsx)(i.h_,{children:(0,t.jsxs)(i.VY,{ref:s,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:r,...n,children:[(0,t.jsx)(g,{}),(0,t.jsx)(i.l_,{className:(0,d.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l}),(0,t.jsx)(x,{})]})})});h.displayName=i.VY.displayName;let p=l.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(i.__,{ref:s,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",a),...l})});p.displayName=i.__.displayName;let b=l.forwardRef((e,s)=>{let{className:a,children:l,...r}=e;return(0,t.jsxs)(i.ck,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(i.wU,{children:(0,t.jsx)(o.nQG,{className:"h-4 w-4"})})}),(0,t.jsx)(i.eT,{children:l})]})});b.displayName=i.ck.displayName,l.forwardRef((e,s)=>{let{className:a,...l}=e;return(0,t.jsx)(i.Z0,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...l})}).displayName=i.Z0.displayName;var v=a(89733),j=a(4919),w=a(52431);let N=l.forwardRef((e,s)=>{let{className:a,value:l,...r}=e;return(0,t.jsx)(w.fC,{ref:s,className:(0,d.cn)("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",a),...r,children:(0,t.jsx)(w.z$,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:"translateX(-".concat(100-(l||0),"%)")}})})});N.displayName=w.fC.displayName;var y=a(40882);let k=y.fC,C=y.wy,E=y.Fw;var z=a(74697),S=a(1282),_=a(81810),L=a(80018),P=a(89183),T=a(3682);let W=(0,r.default)(()=>Promise.all([a.e(934),a.e(994),a.e(122)]).then(a.bind(a,95122)),{loadableGenerated:{webpack:()=>[95122]},ssr:!1}),B=new L.X,I=new P.g;var M=()=>{let[e,s]=(0,l.useState)([]),[a,r]=(0,l.useState)([]),[o,i]=(0,l.useState)(n.o[0]),[d,g]=(0,l.useState)({}),[x,w]=(0,l.useState)({}),[y,L]=(0,l.useState)(0),[P,M]=(0,l.useState)(2),[R,q]=(0,l.useState)(""),[H,O]=(0,l.useState)([]),[A,F]=(0,l.useState)({}),[D,G]=(0,l.useState)(!1);(0,l.useEffect)(()=>{P<y?(L(P),console.log("Removing ",y-P," workers"),(async()=>{for(let e=y-1;e>=P;e--){let s="embedding-worker-".concat(e);console.log("Removing ",s),await B.deleteEmbeddingWorker(s)}})()):P>y&&(L(P),console.log("Adding ",P-y," workers"),(async()=>{for(let e=y;e<P;e++){let s="embedding-worker-".concat(e);console.log("Creating new embedding worker ",s),await B.addEmbeddingWorker("nomic-ai/nomic-embed-text-v1.5",s),console.log("Added embedding worker",e)}})())},[P,y]);let U=async e=>{try{let s=await I.getWorkerState(e);s&&F(a=>({...a,[e]:{...a[e],state:s.state,loadingProgress:s.loadingProgress||1}}))}catch(s){console.error("Error fetching worker state for ".concat(e,":"),s)}},Z=async()=>{try{let e=await I.getEngineLogs(50),s=B.getEmbeddingEngineLogs(50),a=[...e,...s].sort((e,s)=>e.at.getTime()-s.at.getTime());a.length>0&&O(a)}catch(e){console.error("Error fetching engine logs:",e)}};(0,l.useEffect)(()=>{let e=setInterval(Z,1e3);return()=>{clearInterval(e)}},[]);let Q=async()=>{let e=Math.random().toString(36).substring(7);s(s=>[...s,e]),g(s=>({...s,[e]:o})),F(s=>({...s,[e]:{tps:0,output:"",isLoading:!0,state:"loading",loadingProgress:0,embeddingHash:""}}));let a=setInterval(()=>U(e),1e3);try{await I.loadWorker(o,e)}catch(t){console.error("Error loading worker ".concat(e,":"),t),F(s=>{let{[e]:a,...t}=s;return t}),s(s=>s.filter(s=>s!==e)),clearInterval(a)}return()=>{clearInterval(a)}},V=async e=>{let s=x[e],a={modelName:d[e],messages:[{role:"user",content:s}]},t=I.runInferenceOnWorker(a,e),l=0,n="",o=Date.now();for await(let s of t)if("token"===s.type){l++,n+=s.token;let a=Math.round(l/((Date.now()-o)/1e3));F(s=>{var t,l;return{...s,[e]:{tps:a,output:n,isLoading:!1,loadingProgress:(null===(t=A[e])||void 0===t?void 0:t.loadingProgress)||1,state:(null===(l=A[e])||void 0===l?void 0:l.state)||"idle",embeddingHash:""}}})}let i=await B.embedText([n],"nomic-ai/nomic-embed-text-v1.5");if(i&&i.length>0&&r(s=>[...s,...i.map(s=>({...s,modelName:d[e]}))]),i&&i.length>0){let s=await (0,T.TU)(i[0].binaryEmbedding,e);F(a=>({...a,[e]:{...a[e],embeddingHash:s}}))}},$=async()=>{let s=e.map(async e=>{let s={modelName:d[e],messages:[{role:"user",content:R}]};try{let a=I.runInferenceOnWorker(s,e),t=0,l="",n=Date.now();for await(let s of a)if("token"===s.type){t++,l+=s.token;let a=(Date.now()-n)/1e3,r=Math.round(t/a);F(s=>{var a,t;return{...s,[e]:{tps:r,output:l,isLoading:!0,loadingProgress:(null===(a=A[e])||void 0===a?void 0:a.loadingProgress)||1,state:(null===(t=A[e])||void 0===t?void 0:t.state)||"idle",embeddingHash:""}}})}let o=await B.embedText([l],"nomic-ai/nomic-embed-text-v1.5");if(o&&o.length>0&&r(s=>[...s,...o.map(s=>({...s,modelName:d[e]}))]),o&&o.length>0){let s=await (0,T.TU)(o[0].binaryEmbedding,e);F(a=>({...a,[e]:{...a[e],isLoading:!1,bEmbeddingHash:s}}))}}catch(s){console.error("Error running inference on worker ".concat(e,":"),s)}});await Promise.all(s)},J=e=>{I.abortWorkerInference(e)},X=e=>{I.unloadWorker(e),s(s=>s.filter(s=>s!==e))};return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 bg-gray-100",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"LLM Testing"}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-lg",children:["Global Average TPS:"," ",(0,t.jsx)("span",{className:"font-bold",children:(Object.values(A).reduce((e,s)=>e+((null==s?void 0:s.tps)||0),0)/Object.keys(A).length||0).toFixed(1)||"Nil"})]}),(0,t.jsx)(j.g,{className:"w-80",placeholder:"Enter prompt...",value:R,onChange:e=>q(e.target.value)}),(0,t.jsx)(v.z,{onClick:$,children:"Send to All"})]}),(0,t.jsx)(v.z,{onClick:()=>G(!D),variant:"outline",children:D?"Hide Log":"Show Log"})]}),(0,t.jsxs)("div",{className:"flex-grow p-4",children:[(0,t.jsxs)("div",{className:"flex justify-end mb-4 items-center",children:[(0,t.jsxs)(c,{value:o,onValueChange:e=>i(e),children:[(0,t.jsx)(f,{className:"w-70",children:(0,t.jsx)(u,{placeholder:"Select Model"})}),(0,t.jsx)(h,{children:(0,t.jsxs)(m,{children:[(0,t.jsx)(p,{children:"Models"}),n.o.map(e=>(0,t.jsx)(b,{value:e,children:e},e))]})})]}),(0,t.jsx)(v.z,{onClick:Q,className:"ml-4",children:"Spawn Worker"}),(0,t.jsx)("span",{className:"ml-6",children:"Embedding Workers:"}),(0,t.jsxs)("div",{className:"ml-4 flex items-center",children:[(0,t.jsx)(v.z,{onClick:()=>M(e=>Math.max(0,e-1)),size:"sm",className:"w-8 p-0",children:"-"}),(0,t.jsx)("span",{className:"mx-2",children:y}),(0,t.jsx)(v.z,{onClick:()=>M(e=>e+1),size:"sm",className:"w-8 p-0",children:"+"})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(e=>{var s,a,l,r,n,o,i,c,m,u,f;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4 bg-white shadow ".concat(_.Q[d[e]]),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsxs)("span",{className:"text-lg font-semibold",children:["Worker: ",e]}),(0,t.jsxs)("span",{className:"text-lg",children:["TPS:"," ",(0,t.jsx)("span",{className:"font-bold",children:(null===(s=A[e])||void 0===s?void 0:s.tps)||0})]})]}),(0,t.jsxs)("p",{className:"text-sm mb-2",children:["Model: ",d[e]]}),(0,t.jsx)(j.g,{className:"w-full mb-2",rows:2,value:x[e]||"",onChange:s=>w(a=>({...a,[e]:s.target.value}))}),(0,t.jsxs)("div",{className:"relative mb-2 p-2 bg-gray-50 rounded text-sm max-h-20 overflow-auto",children:[(null===(a=A[e])||void 0===a?void 0:a.state)==="loading"&&(0,t.jsx)(N,{value:(null===(l=A[e])||void 0===l?void 0:l.loadingProgress)||0,className:"absolute top-0 left-0 w-full h-1"}),(null===(r=A[e])||void 0===r?void 0:r.state)==="inference-in-progress"&&(0,t.jsx)(N,{value:30,className:"absolute top-0 left-0 w-full h-1"}),(0,t.jsx)("p",{className:"whitespace-pre-line",children:null===(n=A[e])||void 0===n?void 0:n.output})]}),(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)("span",{className:"text-sm font-semibold",children:"Embedding Hash:"})," ",(0,t.jsx)("div",{className:"text-xs font-bold uppercase overflow-x-scroll",children:null===(o=A[e])||void 0===o?void 0:o.embeddingHash})]}),(0,t.jsxs)("div",{className:"flex space-x-2 justify-center",children:[(0,t.jsx)(v.z,{size:"sm",onClick:()=>V(e),disabled:(null===(i=A[e])||void 0===i?void 0:i.state)==="loading"||(null===(c=A[e])||void 0===c?void 0:c.state)==="inference-in-progress",children:"Send"}),(0,t.jsx)(v.z,{size:"sm",onClick:()=>J(e),disabled:(null===(m=A[e])||void 0===m?void 0:m.state)!=="inference-in-progress",children:"Stop"}),(0,t.jsx)(v.z,{size:"sm",onClick:()=>X(e),disabled:(null===(u=A[e])||void 0===u?void 0:u.state)==="loading"||(null===(f=A[e])||void 0===f?void 0:f.state)==="inference-in-progress",children:"Unload"})]})]},e)})})]}),(0,t.jsxs)("div",{className:"fixed top-0 right-0 bottom-0 w-96 bg-white p-4 shadow-lg transition-transform duration-300 ease-in-out border-l border-gray-200 ".concat(D?"translate-x-0":"translate-x-full"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h2",{className:"text-xl font-bold",children:"Engine Log"}),(0,t.jsxs)(v.z,{variant:"ghost",size:"sm",onClick:()=>G(!1),className:"p-0",children:[(0,t.jsx)(z.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]}),(0,t.jsx)("div",{className:"space-y-2 overflow-auto max-h-[calc(100vh-8rem)]",children:H.map((e,s)=>(0,t.jsxs)(k,{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between space-x-4 px-4",children:[(0,t.jsx)("h4",{className:"text-sm font-semibold",children:e.type}),(0,t.jsx)(C,{asChild:!0,children:(0,t.jsxs)(v.z,{variant:"ghost",size:"sm",className:"w-9 p-0",children:[(0,t.jsx)(S.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Toggle"})]})})]}),(0,t.jsx)(E,{children:(0,t.jsx)("pre",{className:"rounded-md border px-4 py-3 font-mono text-sm overflow-auto",children:(0,t.jsx)("code",{className:"language-json",children:JSON.stringify(e,null,2)})})})]},s))})]}),a.length>=6&&(0,t.jsx)(W,{embeddings:a})]})}}},function(e){e.O(0,[333,310,868,708,33,297,786,207,136,672,483,971,23,744],function(){return e(e.s=89965)}),_N_E=e.O()}]);
_next/static/chunks/app/demos/p2p-chat/page-14a6340db3c47961.js ADDED
@@ -0,0 +1 @@
 
 
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[749],{3592:function(e){function s(e){var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}s.keys=function(){return[]},s.resolve=s,s.id=3592,e.exports=s},95856:function(){},42480:function(){},75992:function(){},78110:function(){},62678:function(){},25819:function(){},24112:function(){},55024:function(){},6136:function(e,s,t){Promise.resolve().then(t.bind(t,13766))},13766:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return Y}});var a=t(57437),l=t(2265),n=t(18210),r=t(97481);let c="zensu",i="zensu-chat",d={iceServers:[{urls:"stun:stun.relay.metered.ca:80"},{urls:"turn:a.relay.metered.ca:80",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"},{urls:"turn:a.relay.metered.ca:80?transport=tcp",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"},{urls:"turn:a.relay.metered.ca:443",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"},{urls:"turn:a.relay.metered.ca:443?transport=tcp",username:"fd396a3275680a085c4d66cd",credential:"hFQmauZyx0Mv0bCK"}]};var o=function(e,s){let[t,a]=(0,l.useState)(),o=(0,l.useRef)(!1),[m,x]=(0,l.useState)({messages:[],events:[],peers:[]});return(0,l.useEffect)(()=>{let e=async()=>{let e="nostr"===s?await (0,r.Ls)({appId:c,relayRedundancy:4,rtcConfig:d},i):await (0,n.Ls)({appId:c,relayRedundancy:4,rtcConfig:d},i);console.log("Trystero: Trystero client created",e),x(e=>({...e,events:[...e.events,{type:"log",data:"".concat(s," client created"),timestamp:Date.now()}]})),a(e),e.onPeerJoin(e=>{console.log("Trystero: Peer joined",e),x(s=>({...s,events:[...s.events,{type:"peerJoined",data:e,timestamp:Date.now()}],peers:[...s.peers,e]}))}),e.onPeerLeave(e=>{x(s=>({...s,events:[...s.events,{type:"peerLeft",data:e,timestamp:Date.now()}],peers:s.peers.filter(s=>s!==e)}))});let[,t]=e.makeAction(i);t((e,s)=>{x(t=>({...t,messages:[...t.messages,{type:"message",data:e,peerId:s,timestamp:Date.now()}]}))})};o.current||(o.current=!0,console.log("Setting up Trystero..."),e())},[s]),{send:s=>{if(t){let[a]=t.makeAction(i);a({nickName:e,message:s}),x(t=>({...t,messages:[{type:"message",data:{nickName:e,message:s},peerId:e,timestamp:Date.now()},...t.messages]}))}},messages:m.messages,events:m.events,peers:m.peers}},m=t(92358),x=t(18976);let u="/zsu/8/json",h="/waku/2/default-waku/proto",p={contentTopics:[u],pubsubTopics:[h],defaultBootstrap:!1,bootstrapPeers:["/dns4/waku.myrandomdemos.online/tcp/8000/wss/p2p/16Uiu2HAmKfC2QUvMVyBsVjuEzdo1hVhRddZxo69YkBuXYvuZ83sc","/dns4/node-01.do-ams3.wakuv2.prod.status.im/tcp/8000/wss/p2p/16Uiu2HAmL5okWopX7NqZWBUKVqW8iUxCEmd5GMHLVPwCgzYzQv3e","/dns4/node-01.gc-us-central1-a.wakuv2.prod.statusim.net/tcp/8000/wss/p2p/16Uiu2HAmVkKntsECaYfefR1V2yCR79CegLATuTPE6B9TxgxBiiiA","/dns4/node-01.ac-cn-hongkong-c.wakuv2.prod.status.im/tcp/8000/wss/p2p/16Uiu2HAm4v86W3bmT1BiH6oSPzcsSr24iDQpSN5Qa992BCjjwgrD","/dns4/node-01.do-ams3.wakuv2.test.status.im/tcp/8000/wss/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ"],libp2p:{peerDiscovery:[(0,x.PZ)([h])]}};var f=function(e){let[s,t]=(0,l.useState)(),a=(0,l.useRef)(!1),[n,r]=(0,l.useState)({messages:[],events:[],connectedPeers:[]});return(0,l.useEffect)(()=>{let e=async()=>{console.log("Creating waku node...");let e=await (0,m.pq)(p);console.log("WAKU: Waku node created."),r(e=>({...e,events:[...e.events,{type:"log",data:"Waku node created",timestamp:Date.now()}]})),t(e),e.store.protocol.addLibp2pEventListener("peer:connect",async e=>{let s=e.detail;console.log("WAKU: Peer connected with peer id: ".concat(s)),r(e=>({...e,events:[...e.events,{type:"peerConnected",data:s,timestamp:Date.now()}]})),r(e=>({...e,connectedPeers:[...e.connectedPeers,s.toString()]}))}),console.log("WAKU: Starting Waku node..."),await e.start(),console.log("WAKU: Waiting for a peer"),await (0,m.gT)(e,[m.Uw.LightPush,m.Uw.Filter,m.Uw.Store]),console.log("WAKU: Peer found!");let s=(0,m.UF)(u,h);await e.filter.subscribe([s],e=>{if(!e.payload)return;let s=JSON.parse((0,m.Md)(e.payload));console.log("WAKU: Received Message - ",s),r(e=>({...e,messages:[{type:"message",data:s,peerId:s.sender,timestamp:s.timestamp},...e.messages]}))}),console.log("WAKU: Subscribed to messages");let a=await new Promise(t=>{let a=[];e.store.queryWithOrderedCallback([s],e=>{if(!e.payload)return;let s=JSON.parse((0,m.Md)(e.payload));a.push({type:"message",data:s,peerId:s.sender,timestamp:s.timestamp})}).then(()=>{console.log("WAKU: Finished querying messages"),t(a.sort((e,s)=>s.timestamp-e.timestamp))})});r(e=>({...e,messages:[...e.messages,...a]})),console.log("WAKU: Retrieved existing messages")};a.current||(a.current=!0,console.log("Setting up waku..."),e())},[]),{send:t=>{if(s){let a=(0,m.Mf)({contentTopic:u,pubsubTopic:h});console.log("Sending waku message ",t),s.lightPush.send(a,{payload:(0,m.iY)(JSON.stringify({timestamp:Date.now(),sender:e,message:t}))})}},messages:n.messages,events:n.events,connectedPeers:n.connectedPeers}},g=t(2105);let j="zensu3";var N=function(e){let[s,t]=(0,l.useState)(),a=(0,l.useRef)(!1),[n,r]=(0,l.useState)({messages:[],events:[],subscribers:[]});return(0,l.useEffect)(()=>{let s=async()=>{let s=new g.Wallet({password:"password"}),a=new g.MultiClient({identifier:e,seed:s.getSeed()});console.log("NKN: NKN client created with id ".concat(e)),r(e=>({...e,events:[...e.events,{type:"log",data:"NKN client created",timestamp:Date.now()}]})),t(a),a.onMessage(e=>{let{src:s,payload:t}=e;console.log("NKN: Received message from ",s,"payload",t),r(e=>({...e,messages:[{type:"message",data:{timestamp:Date.now(),sender:s.split(".")[0],message:t},peerId:s,timestamp:Date.now()},...e.messages]}))}),await a.onConnect(e=>{let{addr:s}=e;console.log("NKN: Connected to ".concat(s)),r(e=>({...e,events:[...e.events,{type:"connected",data:s,timestamp:Date.now()}]}))}),await a.onConnectFailed(()=>{console.log("NKN: Connection failed"),r(e=>({...e,events:[...e.events,{type:"connectFailed",data:null,timestamp:Date.now()}]}))}),await s.subscribe(j,1e3,e,"");let l=setInterval(async()=>{let e=await a.getSubscribers(j);r(s=>({...s,subscribers:e.subscribers}))},2e3);return()=>{clearInterval(l)}};a.current||(a.current=!0,console.log("Setting up NKN..."),s())},[e]),{send:e=>{s&&(console.log("NKN: Sending message",e),s.publish(j,e,{txPool:!0}))},messages:n.messages,events:n.events,subscribers:n.subscribers}},v=t(89733),b=t(77209),w=t(48185),y=t(44458),k=t(49354);let S=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(y.fC,{ref:s,className:(0,k.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...l})});S.displayName=y.fC.displayName;let C=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(y.Ee,{ref:s,className:(0,k.cn)("aspect-square h-full w-full",t),...l})});C.displayName=y.Ee.displayName;let D=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(y.NY,{ref:s,className:(0,k.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...l})});D.displayName=y.NY.displayName;var U=t(9646);let O=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)(U.fC,{className:(0,k.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...l,ref:s,children:(0,a.jsx)(U.bU,{className:(0,k.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})});O.displayName=U.fC.displayName;var P=t(66648),K=t(24364),R=t.n(K);let E="zensu/chat2";var Z=function(e){let s=(0,l.useRef)(!1),[t,a]=(0,l.useState)(),[n,r]=(0,l.useState)(),[c,i]=(0,l.useState)({messages:[],events:[]});return(0,l.useEffect)(()=>{if(n&&!c.messages.find(e=>e.timestamp===n.timestamp&&e.peerId===n.peerId)){let e=c.messages,s=[n,...c.messages].sort((e,s)=>s.timestamp-e.timestamp);console.log("GUN: Old message list",e),console.log("GUN: New message list",s),r(void 0),i(e=>({...e,messages:s}))}},[c,n]),(0,l.useEffect)(()=>{t||s.current||(s.current=!0,console.log("Setting up GUN..."),(()=>{let e=R()({peers:["https://gun-manhattan.herokuapp.com/gun","https://peer.wallie.io/gun","https://gundb-relay-mlccl.ondigitalocean.app/gun","https://plankton-app-6qfp3.ondigitalocean.app/"]});a(e),console.log("GUN: Gun instance created"),i(e=>({...e,events:[...e.events,{type:"log",data:"Gun instance created",timestamp:Date.now()}]})),console.log("Attaching gun listener"),e.get(E).on((e,s)=>{console.log("GUN: Received message",e),r({type:"message",data:JSON.parse(JSON.stringify(e)),peerId:e.nickName,timestamp:e.time})})})())},[t]),{send:s=>{t&&(console.log("GUN: Sending message",s),t.get(E).put({message:s,nickName:e,time:new Date().getTime()}))},messages:c.messages,events:c.events}};let L=e=>{let{nodeName:s}=e,{send:t,messages:n,events:r,peers:c}=o(s,"nostr"),{send:i,messages:d,events:m,peers:x}=o(s,"torrent"),{send:u,messages:h,events:p,connectedPeers:g}=f(s),{send:j,messages:y,events:k,subscribers:U}=N(s),{send:K,messages:R,events:E}=Z(s),[L,Y]=(0,l.useState)(""),[A,W]=(0,l.useState)(!1),T=()=>{""!==L.trim()&&(t(L),i(L),u(L),j(L),K(L),Y(""))};return(0,a.jsx)("div",{className:"".concat(A?"dark":""),children:(0,a.jsxs)("div",{className:"mx-auto p-4 bg-white dark:bg-slate-900",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-8",children:[(0,a.jsxs)("h1",{className:"text-3xl font-bold text-slate-800 dark:text-slate-100",children:["How good is Browser P2P SoTA? - ",s]}),(0,a.jsxs)("div",{className:"flex space-x-4 items-center",children:[(0,a.jsx)(b.I,{value:L,onChange:e=>Y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&T()},className:"w-64 px-3 py-2 bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm placeholder-slate-400 focus:outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 dark:focus:border-indigo-600 dark:focus:ring-indigo-600 dark:text-slate-200",placeholder:"Type your message..."}),(0,a.jsx)(v.z,{onClick:T,className:"bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-slate-900 text-white font-semibold py-2 px-4 rounded-md",children:"Send"})]}),(0,a.jsxs)(O,{checked:A,onCheckedChange:W,className:"ml-4 bg-slate-200 dark:bg-slate-700 relative inline-flex h-6 w-11 items-center rounded-full",children:[(0,a.jsx)("span",{className:"sr-only",children:"Enable dark mode"}),(0,a.jsx)("span",{className:"".concat(A?"translate-x-6":"translate-x-1"," inline-block h-4 w-4 transform rounded-full bg-white transition")})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-5 gap-8",children:[(0,a.jsxs)("div",{className:"bg-purple-100 dark:bg-purple-900 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-purple-600 dark:text-purple-400",children:"Torrent"}),(0,a.jsx)(P.default,{src:"/torrent.png",alt:"Vercel",width:32,height:32,className:"h-6 w-6"})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Connected Peers"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:x.map((e,s)=>(0,a.jsxs)("li",{className:"flex items-center space-x-2",children:[(0,a.jsxs)(S,{className:"w-6 h-6",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e),alt:e}),(0,a.jsx)(D,{children:e.slice(0,2)})]}),(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Events"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:m.map((e,s)=>(0,a.jsxs)("li",{children:[(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e.type}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Messages"})}),(0,a.jsx)(w.aY,{className:"h-64 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-4",children:d.map((e,t)=>(0,a.jsxs)("li",{className:"flex space-x-2",children:[(0,a.jsxs)(S,{className:"w-8 h-8",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e.data.nickName),alt:e.data.nickName}),(0,a.jsx)(D,{children:e.data.nickName.slice(0,2)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-semibold ".concat(e.data.nickName===s?"text-purple-600 dark:text-purple-400":"text-slate-700 dark:text-slate-400"),children:e.data.nickName}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data.message}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]})]},t))})})]})]})]}),(0,a.jsxs)("div",{className:"bg-red-100 dark:bg-red-900 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-red-600 dark:text-red-400",children:"Nostr"}),(0,a.jsx)(P.default,{src:"/nostr.png",alt:"Vercel",width:32,height:32,className:"h-6 w-6"})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Connected Peers"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:c.map((e,s)=>(0,a.jsxs)("li",{className:"flex items-center space-x-2",children:[(0,a.jsxs)(S,{className:"w-6 h-6",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e),alt:e}),(0,a.jsx)(D,{children:e.slice(0,2)})]}),(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Events"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:r.map((e,s)=>(0,a.jsxs)("li",{children:[(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e.type}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Messages"})}),(0,a.jsx)(w.aY,{className:"h-64 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-4",children:n.map((e,t)=>(0,a.jsxs)("li",{className:"flex space-x-2",children:[(0,a.jsxs)(S,{className:"w-8 h-8",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e.data.nickName),alt:e.data.nickName}),(0,a.jsx)(D,{children:e.data.nickName.slice(0,2)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-semibold ".concat(e.data.nickName===s?"text-red-600 dark:text-red-400":"text-slate-700 dark:text-slate-400"),children:e.data.nickName}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data.message}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]})]},t))})})]})]})]}),(0,a.jsxs)("div",{className:"bg-red-100 dark:bg-red-900 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-red-600 dark:text-red-400",children:"GunDB"}),(0,a.jsx)(P.default,{src:"/gundb.png",alt:"Vercel",width:32,height:32,className:"h-6 w-6"})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Events"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:E.map((e,s)=>(0,a.jsxs)("li",{children:[(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e.type}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Messages"})}),(0,a.jsx)(w.aY,{className:"h-64 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-4",children:R.map((e,t)=>(0,a.jsxs)("li",{className:"flex space-x-2",children:[(0,a.jsxs)(S,{className:"w-8 h-8",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e.data.nickName),alt:e.data.nickName}),(0,a.jsx)(D,{children:e.data.nickName.slice(0,2)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-semibold ".concat(e.data.nickName===s?"text-red-600 dark:text-red-400":"text-slate-700 dark:text-slate-400"),children:e.data.nickName}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data.message}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]})]},t))})})]})]})]}),(0,a.jsxs)("div",{className:"bg-emerald-100 dark:bg-emerald-900 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-emerald-600 dark:text-emerald-400",children:"Waku"}),(0,a.jsx)(P.default,{src:"/waku.svg",alt:"Vercel",width:32,height:32,className:"h-6 w-6"})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Connected Peers (For relay)"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:g.map((e,s)=>(0,a.jsxs)("li",{className:"flex items-center space-x-2",children:[(0,a.jsxs)(S,{className:"w-6 h-6",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e.slice(-2)),alt:e}),(0,a.jsx)(D,{children:e.slice(-2)})]}),(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Events"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:p.map((e,s)=>(0,a.jsxs)("li",{children:[(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e.type}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:JSON.stringify(e.data)}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Messages"})}),(0,a.jsx)(w.aY,{className:"h-64 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-4",children:h.map((e,t)=>(0,a.jsxs)("li",{className:"flex space-x-2",children:[(0,a.jsxs)(S,{className:"w-8 h-8",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e.data.sender),alt:e.data.sender}),(0,a.jsx)(D,{children:e.data.sender.slice(0,2)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-semibold ".concat(e.data.sender===s?"text-emerald-600 dark:text-emerald-400":"text-slate-700 dark:text-slate-400"),children:e.data.sender}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data.message}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]})]},t))})})]})]})]}),(0,a.jsxs)("div",{className:"bg-sky-100 dark:bg-sky-900 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-sky-600 dark:text-sky-400",children:"NKN"}),(0,a.jsx)(P.default,{src:"/nkn.png",alt:"Vercel",width:32,height:32,className:"h-6 w-6"})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Subscribers"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:U.map((e,s)=>(0,a.jsxs)("li",{className:"flex items-center space-x-2",children:[(0,a.jsxs)(S,{className:"w-6 h-6",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e.slice(-4,-2)),alt:e}),(0,a.jsx)(D,{children:e.slice(0,2)})]}),(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Events"})}),(0,a.jsx)(w.aY,{className:"h-24 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-2",children:k.map((e,s)=>(0,a.jsxs)("li",{children:[(0,a.jsx)("div",{className:"font-medium text-slate-700 dark:text-slate-400",children:e.type}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]},s))})})]}),(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{children:(0,a.jsx)(w.ll,{children:"Messages"})}),(0,a.jsx)(w.aY,{className:"h-64 overflow-y-auto",children:(0,a.jsx)("ul",{className:"text-sm space-y-4",children:y.map((e,t)=>(0,a.jsxs)("li",{className:"flex space-x-2",children:[(0,a.jsxs)(S,{className:"w-8 h-8",children:[(0,a.jsx)(C,{src:"https://api.dicebear.com/5.x/initials/svg?seed=".concat(e.data.sender),alt:e.data.sender}),(0,a.jsx)(D,{children:e.data.sender.slice(0,2)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-semibold ".concat(e.data.sender===s?"text-sky-600 dark:text-sky-400":"text-slate-700 dark:text-slate-400"),children:e.data.sender}),(0,a.jsx)("div",{className:"text-slate-500 dark:text-slate-500",children:e.data.message}),(0,a.jsx)("div",{className:"text-xs text-slate-400 dark:text-slate-600",children:new Date(e.timestamp).toLocaleString()})]})]},t))})})]})]})]})]})]})})};var Y=()=>{let[e,s]=(0,l.useState)(""),t=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{e||t.current||(t.current=!0,(async()=>{let e=await fetch("https://randomuser.me/api/"),t=await e.json();t.results.length>0&&s("".concat(t.results[0].name.title," ").concat(t.results[0].name.first," ").concat(t.results[0].name.last))})())},[e]),e&&(0,a.jsx)(L,{nodeName:e})||null}},89733:function(e,s,t){"use strict";t.d(s,{z:function(){return d}});var a=t(57437),l=t(2265),n=t(71538),r=t(12218),c=t(49354);let i=(0,r.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=l.forwardRef((e,s)=>{let{className:t,variant:l,size:r,asChild:d=!1,...o}=e,m=d?n.g7:"button";return(0,a.jsx)(m,{className:(0,c.cn)(i({variant:l,size:r,className:t})),ref:s,...o})});d.displayName="Button"},48185:function(e,s,t){"use strict";t.d(s,{Ol:function(){return c},Zb:function(){return r},aY:function(){return d},ll:function(){return i}});var a=t(57437),l=t(2265),n=t(49354);let r=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("rounded-xl border bg-card text-card-foreground shadow",t),...l})});r.displayName="Card";let c=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",t),...l})});c.displayName="CardHeader";let i=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("h3",{ref:s,className:(0,n.cn)("font-semibold leading-none tracking-tight",t),...l})});i.displayName="CardTitle",l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("p",{ref:s,className:(0,n.cn)("text-sm text-muted-foreground",t),...l})}).displayName="CardDescription";let d=l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("p-6 pt-0",t),...l})});d.displayName="CardContent",l.forwardRef((e,s)=>{let{className:t,...l}=e;return(0,a.jsx)("div",{ref:s,className:(0,n.cn)("flex items-center p-6 pt-0",t),...l})}).displayName="CardFooter"},77209:function(e,s,t){"use strict";t.d(s,{I:function(){return r}});var a=t(57437),l=t(2265),n=t(49354);let r=l.forwardRef((e,s)=>{let{className:t,type:l,...r}=e;return(0,a.jsx)("input",{type:l,className:(0,n.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),ref:s,...r})});r.displayName="Input"},49354:function(e,s,t){"use strict";t.d(s,{cn:function(){return n}});var a=t(44839),l=t(96164);function n(){for(var e=arguments.length,s=Array(e),t=0;t<e;t++)s[t]=arguments[t];return(0,l.m6)((0,a.W)(s))}}},function(e){e.O(0,[443,218,864,868,708,33,297,959,659,971,23,744],function(){return e(e.s=6136)}),_N_E=e.O()}]);
_next/static/chunks/app/demos/p2p-hearts/page-d69c604016ff7b63.js ADDED
@@ -0,0 +1 @@
 
 
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[115],{9747:function(e,t,n){Promise.resolve().then(n.bind(n,67869))},67869:function(e,t,n){"use strict";n.r(t);var a=n(57437),s=n(2265),r=n(18951),l=n(37678),o=n(24754),i=n(48185),c=n(77209),d=n(13201),u=n(12683),f=n(31406),p=n(30701),y=n(89028);let m=e=>{let{x:t,y:n,source:r}=e,[l,o]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{let e=setTimeout(()=>{o(!1)},1e3);return()=>{clearTimeout(e)}},[]),l)?(0,a.jsxs)("span",{className:"absolute animate-pulse",style:{left:t,top:n},children:[(0,a.jsx)("span",{className:"text-4xl",children:"❤️"}),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"absolute text-sm",children:r})]}):null};t.default=()=>{let[e,t]=(0,s.useState)(""),[n,g]=(0,s.useState)(null),[w,x]=(0,s.useState)(null),[N,k]=(0,s.useState)(null),[P,b]=(0,s.useState)(null),[h,R]=(0,s.useState)(null),[E,v]=(0,s.useState)([]),[I,T]=(0,s.useState)(null);(0,s.useEffect)(()=>{T((0,p.e)((0,y.ri)().p2pSettings))},[]);let j=(0,s.useRef)(!1);(0,s.useEffect)(()=>{(async()=>{if(!j.current&&n&&I){j.current=!0,console.log("Initializing GunP2PNetworkInstance...");let e=new l.p(n.synthientId,{gunPeers:I.PEWPEW.bootstrapPeers,gunTopic:I.PEWPEW.topic,startupDelayMs:I.PEWPEW.bootFixedDelayMs});x(e),console.log("GunP2PNetworkInstance initialized."),console.log("Initializing NknP2PNetworkInstance...");let t=new u.t(n.synthientId,{nknTopic:I.NKN.topic,nknWalletPassword:"password"},I.NKN);k(t),console.log("Initializing TrysteroP2PNetworkInstance...");let a=new f.f(n.synthientId,{relayRedundancy:I.TRYSTERO.relayRedundancy,rtcConfig:I.TRYSTERO.rtcConfig,trysteroTopic:I.TRYSTERO.topic,trysteroAppId:I.TRYSTERO.appId,trysteroType:"nostr"},I.TRYSTERO);b(a),await Promise.all([e.waitForReady(),t.waitForReady(),a.waitForReady()]),console.log("Initializing PacketDB...");let s=new o.j(n,async n=>{await Promise.all([e.broadcastPacket(n),t.broadcastPacket(n),a.broadcastPacket(n)])});R(s),console.log("PacketDB initialized."),window.packetDB=s,j.current=!1}})()},[n,I]),(0,s.useEffect)(()=>{w&&h&&(console.log("Listening for packets..."),w.listenForPacket(async e=>{console.log("Received packet from Gun:",e),await h.receivePacket(e)}))},[w,h]),(0,s.useEffect)(()=>{N&&h&&(console.log("Listening for packets..."),N.listenForPacket(async e=>{console.log("Received packet from NKN:",e),await h.receivePacket(e)}))},[N,h]),(0,s.useEffect)(()=>{P&&h&&(console.log("Listening for packets..."),P.listenForPacket(async e=>{console.log("Received packet from Trystero:",e),await h.receivePacket(e)}))},[P,h]);let S=async t=>{if("Enter"===t.key){console.log("Initializing identity...");let t=await (0,r.K6)(e);g(t),console.log("Identity initialized:",t)}},C=async e=>{if(h){let t={type:"peerHeart",windowX:e.clientX,windowY:e.clientY,createdAt:(0,d.MQ)(new Date)};console.log("Sending heart:",t),await h.transmitPacket(t)}};return(0,a.jsxs)("div",{onClick:C,className:"relative h-screen",children:[n?(0,a.jsx)(i.Zb,{className:"absolute top-4 left-4",children:(0,a.jsxs)("p",{children:["synthientId: ",n.synthientId]})}):(0,a.jsx)(i.Zb,{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:(0,a.jsx)(c.I,{type:"password",placeholder:"Enter password",value:e,onChange:e=>t(e.target.value),onKeyPress:S})}),E.map(e=>(0,a.jsx)(m,{x:e.x,y:e.y,source:e.source},e.id))]})}},48185:function(e,t,n){"use strict";n.d(t,{Ol:function(){return o},Zb:function(){return l},aY:function(){return c},ll:function(){return i}});var a=n(57437),s=n(2265),r=n(49354);let l=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("rounded-xl border bg-card text-card-foreground shadow",n),...s})});l.displayName="Card";let o=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",n),...s})});o.displayName="CardHeader";let i=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("h3",{ref:t,className:(0,r.cn)("font-semibold leading-none tracking-tight",n),...s})});i.displayName="CardTitle",s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("p",{ref:t,className:(0,r.cn)("text-sm text-muted-foreground",n),...s})}).displayName="CardDescription";let c=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("p-6 pt-0",n),...s})});c.displayName="CardContent",s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("flex items-center p-6 pt-0",n),...s})}).displayName="CardFooter"},77209:function(e,t,n){"use strict";n.d(t,{I:function(){return l}});var a=n(57437),s=n(2265),r=n(49354);let l=s.forwardRef((e,t)=>{let{className:n,type:s,...l}=e;return(0,a.jsx)("input",{type:s,className:(0,r.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...l})});l.displayName="Input"}},function(e){e.O(0,[443,218,864,868,708,33,959,207,635,672,104,971,23,744],function(){return e(e.s=9747)}),_N_E=e.O()}]);
_next/static/chunks/app/layout-a6c4067c34d30fd9.js ADDED
@@ -0,0 +1 @@
 
 
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{51857:function(e,t,r){Promise.resolve().then(r.bind(r,91048)),Promise.resolve().then(r.bind(r,16502)),Promise.resolve().then(r.bind(r,52515)),Promise.resolve().then(r.bind(r,38507)),Promise.resolve().then(r.bind(r,44581)),Promise.resolve().then(r.bind(r,36756)),Promise.resolve().then(r.bind(r,76895)),Promise.resolve().then(r.bind(r,32781)),Promise.resolve().then(r.bind(r,23195)),Promise.resolve().then(r.bind(r,17584)),Promise.resolve().then(r.bind(r,62187)),Promise.resolve().then(r.bind(r,16808)),Promise.resolve().then(r.bind(r,84285)),Promise.resolve().then(r.bind(r,77959)),Promise.resolve().then(r.bind(r,37654)),Promise.resolve().then(r.bind(r,11416)),Promise.resolve().then(r.bind(r,76484)),Promise.resolve().then(r.bind(r,62381)),Promise.resolve().then(r.bind(r,19829)),Promise.resolve().then(r.bind(r,90393)),Promise.resolve().then(r.bind(r,37967)),Promise.resolve().then(r.bind(r,63817)),Promise.resolve().then(r.bind(r,32039)),Promise.resolve().then(r.bind(r,15961)),Promise.resolve().then(r.bind(r,67738)),Promise.resolve().then(r.bind(r,42594)),Promise.resolve().then(r.bind(r,36982)),Promise.resolve().then(r.bind(r,90448)),Promise.resolve().then(r.bind(r,29340)),Promise.resolve().then(r.bind(r,16823)),Promise.resolve().then(r.bind(r,22794)),Promise.resolve().then(r.t.bind(r,64671,23)),Promise.resolve().then(r.t.bind(r,27131,23)),Promise.resolve().then(r.t.bind(r,53054,23)),Promise.resolve().then(r.t.bind(r,44069,23)),Promise.resolve().then(r.bind(r,42371))},42371:function(e,t,r){"use strict";r.d(t,{Toaster:function(){return en}});var n=r(57437),o=r(2265),s=r(4867),a=r(22988),i=r(54887),l=r(78149),d=r(1584),u=r(90976),c=r(98324),p=r(53938),f=r(56935),m=r(31383),v=r(25171),w=r(75137),E=r(91715),h=r(1336),b=r(31725);let y="ToastProvider",[T,x,g]=(0,u.B)("Toast"),[P,_]=(0,c.b)("Toast",[g]),[R,S]=P(y),C=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:a=50,children:i}=e,[l,d]=(0,o.useState)(null),[u,c]=(0,o.useState)(0),p=(0,o.useRef)(!1),f=(0,o.useRef)(!1);return(0,o.createElement)(T.Provider,{scope:t},(0,o.createElement)(R,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:d,onToastAdd:(0,o.useCallback)(()=>c(e=>e+1),[]),onToastRemove:(0,o.useCallback)(()=>c(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:f},i))};C.propTypes={label:e=>e.label&&"string"==typeof e.label&&!e.label.trim()?Error(`Invalid prop \`label\` supplied to \`${y}\`. Expected non-empty \`string\`.`):null};let N=["F8"],D="toast.viewportPause",A="toast.viewportResume",I=(0,o.forwardRef)((e,t)=>{let{__scopeToast:r,hotkey:n=N,label:s="Notifications ({hotkey})",...i}=e,l=S("ToastViewport",r),u=x(r),c=(0,o.useRef)(null),f=(0,o.useRef)(null),m=(0,o.useRef)(null),w=(0,o.useRef)(null),E=(0,d.e)(t,w,l.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=l.toastCount>0;(0,o.useEffect)(()=>{let e=e=>{var t;n.every(t=>e[t]||e.code===t)&&(null===(t=w.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[n]),(0,o.useEffect)(()=>{let e=c.current,t=w.current;if(b&&e&&t){let r=()=>{if(!l.isClosePausedRef.current){let e=new CustomEvent(D);t.dispatchEvent(e),l.isClosePausedRef.current=!0}},n=()=>{if(l.isClosePausedRef.current){let e=new CustomEvent(A);t.dispatchEvent(e),l.isClosePausedRef.current=!1}},o=t=>{e.contains(t.relatedTarget)||n()},s=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",o),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",s),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}},[b,l.isClosePausedRef]);let y=(0,o.useCallback)(({tabbingDirection:e})=>{let t=u().map(t=>{let r=t.ref.current,n=[r,...function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}(r)];return"forwards"===e?n:n.reverse()});return("forwards"===e?t.reverse():t).flat()},[u]);return(0,o.useEffect)(()=>{let e=w.current;if(e){let t=t=>{let r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){var n,o,s;let r=document.activeElement,a=t.shiftKey;if(t.target===e&&a){null===(n=f.current)||void 0===n||n.focus();return}let i=y({tabbingDirection:a?"backwards":"forwards"}),l=i.findIndex(e=>e===r);q(i.slice(l+1))?t.preventDefault():a?null===(o=f.current)||void 0===o||o.focus():null===(s=m.current)||void 0===s||s.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[u,y]),(0,o.createElement)(p.I0,{ref:c,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&(0,o.createElement)(M,{ref:f,onFocusFromOutsideViewport:()=>{q(y({tabbingDirection:"forwards"}))}}),(0,o.createElement)(T.Slot,{scope:r},(0,o.createElement)(v.WV.ol,(0,a.Z)({tabIndex:-1},i,{ref:E}))),b&&(0,o.createElement)(M,{ref:m,onFocusFromOutsideViewport:()=>{q(y({tabbingDirection:"backwards"}))}}))}),M=(0,o.forwardRef)((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=S("ToastFocusProxy",r);return(0,o.createElement)(b.T,(0,a.Z)({"aria-hidden":!0,tabIndex:0},s,{ref:t,style:{position:"fixed"},onFocus:e=>{var t;let r=e.relatedTarget;null!==(t=i.viewport)&&void 0!==t&&t.contains(r)||n()}}))}),F="Toast",k=(0,o.forwardRef)((e,t)=>{let{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...d}=e,[u=!0,c]=(0,E.T)({prop:n,defaultProp:s,onChange:i});return(0,o.createElement)(m.z,{present:r||u},(0,o.createElement)(j,(0,a.Z)({open:u},d,{ref:t,onClose:()=>c(!1),onPause:(0,w.W)(e.onPause),onResume:(0,w.W)(e.onResume),onSwipeStart:(0,l.M)(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,l.M)(e.onSwipeMove,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)}),onSwipeCancel:(0,l.M)(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,l.M)(e.onSwipeEnd,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),c(!1)})})))}),[L,O]=P(F,{onClose(){}}),j=(0,o.forwardRef)((e,t)=>{let{__scopeToast:r,type:n="foreground",duration:s,open:u,onClose:c,onEscapeKeyDown:f,onPause:m,onResume:E,onSwipeStart:h,onSwipeMove:b,onSwipeCancel:y,onSwipeEnd:x,...g}=e,P=S(F,r),[_,R]=(0,o.useState)(null),C=(0,d.e)(t,e=>R(e)),N=(0,o.useRef)(null),I=(0,o.useRef)(null),M=s||P.duration,k=(0,o.useRef)(0),O=(0,o.useRef)(M),j=(0,o.useRef)(0),{onToastAdd:K,onToastRemove:W}=P,Z=(0,w.W)(()=>{var e;(null==_?void 0:_.contains(document.activeElement))&&(null===(e=P.viewport)||void 0===e||e.focus()),c()}),$=(0,o.useCallback)(e=>{e&&e!==1/0&&(window.clearTimeout(j.current),k.current=new Date().getTime(),j.current=window.setTimeout(Z,e))},[Z]);(0,o.useEffect)(()=>{let e=P.viewport;if(e){let t=()=>{$(O.current),null==E||E()},r=()=>{let e=new Date().getTime()-k.current;O.current=O.current-e,window.clearTimeout(j.current),null==m||m()};return e.addEventListener(D,r),e.addEventListener(A,t),()=>{e.removeEventListener(D,r),e.removeEventListener(A,t)}}},[P.viewport,M,m,E,$]),(0,o.useEffect)(()=>{u&&!P.isClosePausedRef.current&&$(M)},[u,M,P.isClosePausedRef,$]),(0,o.useEffect)(()=>(K(),()=>W()),[K,W]);let U=(0,o.useMemo)(()=>_?function e(t){let r=[];return Array.from(t.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),t.nodeType===t.ELEMENT_NODE){let n=t.ariaHidden||t.hidden||"none"===t.style.display,o=""===t.dataset.radixToastAnnounceExclude;if(!n){if(o){let e=t.dataset.radixToastAnnounceAlt;e&&r.push(e)}else r.push(...e(t))}}}),r}(_):null,[_]);return P.viewport?(0,o.createElement)(o.Fragment,null,U&&(0,o.createElement)(V,{__scopeToast:r,role:"status","aria-live":"foreground"===n?"assertive":"polite","aria-atomic":!0},U),(0,o.createElement)(L,{scope:r,onClose:Z},(0,i.createPortal)((0,o.createElement)(T.ItemSlot,{scope:r},(0,o.createElement)(p.fC,{asChild:!0,onEscapeKeyDown:(0,l.M)(f,()=>{P.isFocusedToastEscapeKeyDownRef.current||Z(),P.isFocusedToastEscapeKeyDownRef.current=!1})},(0,o.createElement)(v.WV.li,(0,a.Z)({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":P.swipeDirection},g,{ref:C,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,l.M)(e.onKeyDown,e=>{"Escape"!==e.key||(null==f||f(e.nativeEvent),e.nativeEvent.defaultPrevented||(P.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:(0,l.M)(e.onPointerDown,e=>{0===e.button&&(N.current={x:e.clientX,y:e.clientY})}),onPointerMove:(0,l.M)(e.onPointerMove,e=>{if(!N.current)return;let t=e.clientX-N.current.x,r=e.clientY-N.current.y,n=!!I.current,o=["left","right"].includes(P.swipeDirection),s=["left","up"].includes(P.swipeDirection)?Math.min:Math.max,a=o?s(0,t):0,i=o?0:s(0,r),l="touch"===e.pointerType?10:2,d={x:a,y:i},u={originalEvent:e,delta:d};n?(I.current=d,H("toast.swipeMove",b,u,{discrete:!1})):X(d,P.swipeDirection,l)?(I.current=d,H("toast.swipeStart",h,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(N.current=null)}),onPointerUp:(0,l.M)(e.onPointerUp,e=>{let t=I.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),I.current=null,N.current=null,t){let r=e.currentTarget,n={originalEvent:e,delta:t};X(t,P.swipeDirection,P.swipeThreshold)?H("toast.swipeEnd",x,n,{discrete:!0}):H("toast.swipeCancel",y,n,{discrete:!0}),r.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})))),P.viewport))):null});j.propTypes={type:e=>e.type&&!["foreground","background"].includes(e.type)?Error(`Invalid prop \`type\` supplied to \`${F}\`. Expected \`foreground | background\`.`):null};let V=e=>{let{__scopeToast:t,children:r,...n}=e,s=S(F,t),[a,i]=(0,o.useState)(!1),[l,d]=(0,o.useState)(!1);return function(e=()=>{}){let t=(0,w.W)(e);(0,h.b)(()=>{let e=0,r=0;return e=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}},[t])}(()=>i(!0)),(0,o.useEffect)(()=>{let e=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(e)},[]),l?null:(0,o.createElement)(f.h,{asChild:!0},(0,o.createElement)(b.T,n,a&&(0,o.createElement)(o.Fragment,null,s.label," ",r)))},K=(0,o.forwardRef)((e,t)=>{let{__scopeToast:r,...n}=e;return(0,o.createElement)(v.WV.div,(0,a.Z)({},n,{ref:t}))}),W=(0,o.forwardRef)((e,t)=>{let{__scopeToast:r,...n}=e;return(0,o.createElement)(v.WV.div,(0,a.Z)({},n,{ref:t}))}),Z=(0,o.forwardRef)((e,t)=>{let{altText:r,...n}=e;return r?(0,o.createElement)(U,{altText:r,asChild:!0},(0,o.createElement)($,(0,a.Z)({},n,{ref:t}))):null});Z.propTypes={altText:e=>e.altText?null:Error("Missing prop `altText` expected on `ToastAction`")};let $=(0,o.forwardRef)((e,t)=>{let{__scopeToast:r,...n}=e,s=O("ToastClose",r);return(0,o.createElement)(U,{asChild:!0},(0,o.createElement)(v.WV.button,(0,a.Z)({type:"button"},n,{ref:t,onClick:(0,l.M)(e.onClick,s.onClose)})))}),U=(0,o.forwardRef)((e,t)=>{let{__scopeToast:r,altText:n,...s}=e;return(0,o.createElement)(v.WV.div,(0,a.Z)({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:t}))});function H(e,t,r,{discrete:n}){let o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?(0,v.jH)(o,s):o.dispatchEvent(s)}let X=(e,t,r=0)=>{let n=Math.abs(e.x),o=Math.abs(e.y),s=n>o;return"left"===t||"right"===t?s&&n>r:!s&&o>r};function q(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var z=r(12218),B=r(49354);let Y=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(I,{ref:t,className:(0,B.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...o})});Y.displayName=I.displayName;let G=(0,z.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),J=o.forwardRef((e,t)=>{let{className:r,variant:o,...s}=e;return(0,n.jsx)(k,{ref:t,className:(0,B.cn)(G({variant:o}),r),...s})});J.displayName=k.displayName,o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(Z,{ref:t,className:(0,B.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...o})}).displayName=Z.displayName;let Q=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)($,{ref:t,className:(0,B.cn)("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...o,children:(0,n.jsx)(s.Pxu,{className:"h-4 w-4"})})});Q.displayName=$.displayName;let ee=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(K,{ref:t,className:(0,B.cn)("text-sm font-semibold [&+div]:text-xs",r),...o})});ee.displayName=K.displayName;let et=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(W,{ref:t,className:(0,B.cn)("text-sm opacity-90",r),...o})});et.displayName=W.displayName;var er=r(78068);function en(){let{toasts:e}=(0,er.pm)();return(0,n.jsxs)(C,{children:[e.map(function(e){let{id:t,title:r,description:o,action:s,...a}=e;return(0,n.jsxs)(J,{...a,children:[(0,n.jsxs)("div",{className:"grid gap-1",children:[r&&(0,n.jsx)(ee,{children:r}),o&&(0,n.jsx)(et,{children:o})]}),s,(0,n.jsx)(Q,{})]},t)}),(0,n.jsx)(Y,{})]})}},78068:function(e,t,r){"use strict";r.d(t,{Am:function(){return c},pm:function(){return p}});var n=r(2265);let o=0,s=new Map,a=e=>{if(s.has(e))return;let t=setTimeout(()=>{s.delete(e),u({type:"REMOVE_TOAST",toastId:e})},1e6);s.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?a(r):e.toasts.forEach(e=>{a(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],d={toasts:[]};function u(e){d=i(d,e),l.forEach(e=>{e(d)})}function c(e){let{...t}=e,r=(o=(o+1)%Number.MAX_SAFE_INTEGER).toString(),n=()=>u({type:"DISMISS_TOAST",toastId:r});return u({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:e=>{e||n()}}}),{id:r,dismiss:n,update:e=>u({type:"UPDATE_TOAST",toast:{...e,id:r}})}}function p(){let[e,t]=n.useState(d);return n.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:c,dismiss:e=>u({type:"DISMISS_TOAST",toastId:e})}}},49354:function(e,t,r){"use strict";r.d(t,{cn:function(){return s}});var n=r(44839),o=r(96164);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.m6)((0,n.W)(t))}},44069:function(){},53054:function(){},27131:function(e){e.exports={style:{fontFamily:"'__Inter_aaf875', '__Inter_Fallback_aaf875'",fontStyle:"normal"},className:"__className_aaf875",variable:"__variable_aaf875"}},64671:function(e){e.exports={style:{fontFamily:"'__Inter_aaf875', '__Inter_Fallback_aaf875'",fontStyle:"normal"},className:"__className_aaf875"}},52515:function(e,t,r){"use strict";r.r(t),r.d(t,{AspectRatio:function(){return a}});var n=r(22988),o=r(2265),s=r(25171);let a=(0,o.forwardRef)((e,t)=>{let{ratio:r=1,style:a,...i}=e;return(0,o.createElement)("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/r}%`},"data-radix-aspect-ratio-wrapper":""},(0,o.createElement)(s.WV.div,(0,n.Z)({},i,{ref:t,style:{...a,position:"absolute",top:0,right:0,bottom:0,left:0}})))})},77959:function(e,t,r){"use strict";r.r(t),r.d(t,{Portal:function(){return n.h}});var n=r(56935)},22794:function(e,t,r){"use strict";r.r(t),r.d(t,{VisuallyHidden:function(){return n.T}});var n=r(31725)}},function(e){e.O(0,[51,532,310,868,297,786,813,971,23,744],function(){return e(e.s=51857)}),_N_E=e.O()}]);
_next/static/chunks/app/page-f71a0471b723bc9f.js ADDED
The diff for this file is too large to render. See raw diff
 
_next/static/chunks/fbe89ba5-2be908ceba4a7d9b.js CHANGED
The diff for this file is too large to render. See raw diff
 
_next/static/chunks/webpack-175f358084e3d9d3.js ADDED
@@ -0,0 +1 @@
 
 
1
+ !function(){"use strict";var e,t,n,r,o,u,i,c,f,a={},d={};function l(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={id:e,loaded:!1,exports:{}},r=!0;try{a[e].call(n.exports,n,n.exports,l),r=!1}finally{r&&delete d[e]}return n.loaded=!0,n.exports}l.m=a,l.amdO={},e=[],l.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u<e.length;u++){for(var n=e[u][0],r=e[u][1],o=e[u][2],c=!0,f=0;f<n.length;f++)i>=o&&Object.keys(l.O).every(function(e){return l.O[e](n[f])})?n.splice(f--,1):(c=!1,o<i&&(i=o));if(c){e.splice(u--,1);var a=r();void 0!==a&&(t=a)}}return t},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},l.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);l.r(o);var u={};t=t||[null,n({}),n([]),n(n)];for(var i=2&r&&e;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach(function(t){u[t]=function(){return e[t]}});return u.default=function(){return e},l.d(o,u),o},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=function(e){return Promise.all(Object.keys(l.f).reduce(function(t,n){return l.f[n](e,t),t},[]))},l.u=function(e){return"static/chunks/"+(({497:"b75e687f",934:"f2d0f643"})[e]||e)+"."+({122:"0b40314ff1634299",460:"9ccc19d772db9f03",497:"1f7b440207b462e5",572:"0a3b7ea4a23e12f2",600:"1a3187cf8347a55a",934:"7ab3a1c531783b23",994:"9c06f9b54c3d1316"})[e]+".js"},l.miniCssF=function(e){},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",l.l=function(e,t,n,u){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var i,c,f=document.getElementsByTagName("script"),a=0;a<f.length;a++){var d=f[a];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){i=d;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,l.nc&&i.setAttribute("nonce",l.nc),i.setAttribute("data-webpack",o+n),i.src=l.tu(e)),r[e]=[t];var s=function(t,n){i.onerror=i.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=s.bind(null,i.onerror),i.onload=s.bind(null,i.onload),c&&document.head.appendChild(i)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},l.j=272,l.tt=function(){return void 0===u&&(u={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(u=trustedTypes.createPolicy("nextjs#bundler",u))),u},l.tu=function(e){return l.tt().createScriptURL(e)},l.p="/_next/",l.b=document.baseURI||self.location.href,i={272:0,51:0,532:0},l.f.j=function(e,t){var n=l.o(i,e)?i[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(272|51|532)$/.test(e))i[e]=0;else{var r=new Promise(function(t,r){n=i[e]=[t,r]});t.push(n[2]=r);var o=l.p+l.u(e),u=Error();l.l(o,function(t){if(l.o(i,e)&&(0!==(n=i[e])&&(i[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}},"chunk-"+e,e)}}},l.O.j=function(e){return 0===i[e]},c=function(e,t){var n,r,o=t[0],u=t[1],c=t[2],f=0;if(o.some(function(e){return 0!==i[e]})){for(n in u)l.o(u,n)&&(l.m[n]=u[n]);if(c)var a=c(l)}for(e&&e(t);f<o.length;f++)r=o[f],l.o(i,r)&&i[r]&&i[r][0](),i[r]=0;return l.O(a)},(f=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(c.bind(null,0)),f.push=c.bind(null,f.push.bind(f)),l.nc=void 0}();
demos/ai.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f2421110bbabd1e.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/fbe89ba5-2be908ceba4a7d9b.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/955-5748263a00b1ccb8.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/631-4a742885cf0d6748.js" async=""></script><script src="/_next/static/chunks/483-89e4495ce79573dc.js" async=""></script><script src="/_next/static/chunks/app/demos/ai/page-f871d3e26fff73e4.js" async=""></script><script src="/_next/static/chunks/813-2d6d2c33c642dc38.js" async=""></script><script src="/_next/static/chunks/app/layout-9e4af58933956f5d.js" async=""></script><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="flex flex-col min-h-screen"><div class="flex items-center justify-between p-4 bg-gray-100"><h1 class="text-2xl font-bold">LLM Testing</h1><div class="flex items-center space-x-4"><span class="text-lg">Global Average TPS:<!-- --> <span class="font-bold">0.0</span></span><textarea class="flex min-h-[60px] rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-80" placeholder="Enter prompt..."></textarea><button class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2">Send to All</button></div><button class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2">Show Log</button></div><div class="flex-grow p-4"><div class="flex justify-end mb-4 items-center"><button type="button" role="combobox" aria-controls="radix-:Rl9uuuja:" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" class="flex h-9 items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&amp;&gt;span]:line-clamp-1 w-70"><span style="pointer-events:none"></span><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 opacity-50" aria-hidden="true"><path d="M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select><button class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2 ml-4">Spawn Worker</button><span class="ml-6">Embedding Workers:</span><div class="ml-4 flex items-center"><button class="inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 rounded-md text-xs w-8 p-0">-</button><span class="mx-2">0</span><button class="inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 rounded-md text-xs w-8 p-0">+</button></div></div><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div></div><div class="fixed top-0 right-0 bottom-0 w-96 bg-white p-4 shadow-lg transition-transform duration-300 ease-in-out border-l border-gray-200 translate-x-full"><div class="flex items-center justify-between mb-4"><h2 class="text-xl font-bold">Engine Log</h2><button class="inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 rounded-md text-xs p-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x h-4 w-4"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg><span class="sr-only">Close</span></button></div><div class="space-y-2 overflow-auto max-h-[calc(100vh-8rem)]"></div></div></div></div><script src="/_next/static/chunks/webpack-0f2421110bbabd1e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[56030,[\"333\",\"static/chunks/fbe89ba5-2be908ceba4a7d9b.js\",\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"955\",\"static/chunks/955-5748263a00b1ccb8.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"631\",\"static/chunks/631-4a742885cf0d6748.js\",\"483\",\"static/chunks/483-89e4495ce79573dc.js\",\"760\",\"static/chunks/app/demos/ai/page-f871d3e26fff73e4.js\"],\"default\"]\n8:I[39275,[],\"\"]\n9:I[61343,[],\"\"]\na:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Theme\"]\nb:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Toaster\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"z5_6nr2naE2DVQmFEPcuU\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/demos/ai\",\"initialTree\":[\"\",{\"children\":[\"demos\",{\"children\":[\"ai\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"demos\",{\"children\":[\"ai\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\",\"ai\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[\"$\",\"$La\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
 
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-175f358084e3d9d3.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/fbe89ba5-2be908ceba4a7d9b.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/33-0e9610205db2f7d7.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/207-b92e6bc9e3af501d.js" async=""></script><script src="/_next/static/chunks/136-cd893a48277c7262.js" async=""></script><script src="/_next/static/chunks/672-4b868305a56bb5d8.js" async=""></script><script src="/_next/static/chunks/483-34b8de39266be54b.js" async=""></script><script src="/_next/static/chunks/app/demos/ai/page-469346083790c5ed.js" async=""></script><script src="/_next/static/chunks/813-59f8977cdcd82aee.js" async=""></script><script src="/_next/static/chunks/app/layout-a6c4067c34d30fd9.js" async=""></script><link rel="icon" href="/favicon.ico" sizes="any"/><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="flex flex-col min-h-screen"><div class="flex items-center justify-between p-4 bg-gray-100"><h1 class="text-2xl font-bold">LLM Testing</h1><div class="flex items-center space-x-4"><span class="text-lg">Global Average TPS:<!-- --> <span class="font-bold">0.0</span></span><textarea class="flex min-h-[60px] rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-80" placeholder="Enter prompt..."></textarea><button class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2">Send to All</button></div><button class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2">Show Log</button></div><div class="flex-grow p-4"><div class="flex justify-end mb-4 items-center"><button type="button" role="combobox" aria-controls="radix-:R2l7rrqja:" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" class="flex h-9 items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&amp;&gt;span]:line-clamp-1 w-70"><span style="pointer-events:none"></span><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 opacity-50" aria-hidden="true"><path d="M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select><button class="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2 ml-4">Spawn Worker</button><span class="ml-6">Embedding Workers:</span><div class="ml-4 flex items-center"><button class="inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 rounded-md text-xs w-8 p-0">-</button><span class="mx-2">0</span><button class="inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-8 rounded-md text-xs w-8 p-0">+</button></div></div><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div></div><div class="fixed top-0 right-0 bottom-0 w-96 bg-white p-4 shadow-lg transition-transform duration-300 ease-in-out border-l border-gray-200 translate-x-full"><div class="flex items-center justify-between mb-4"><h2 class="text-xl font-bold">Engine Log</h2><button class="inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 rounded-md text-xs p-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x h-4 w-4"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg><span class="sr-only">Close</span></button></div><div class="space-y-2 overflow-auto max-h-[calc(100vh-8rem)]"></div></div></div></div><script src="/_next/static/chunks/webpack-175f358084e3d9d3.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[56030,[\"333\",\"static/chunks/fbe89ba5-2be908ceba4a7d9b.js\",\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"33\",\"static/chunks/33-0e9610205db2f7d7.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"207\",\"static/chunks/207-b92e6bc9e3af501d.js\",\"136\",\"static/chunks/136-cd893a48277c7262.js\",\"672\",\"static/chunks/672-4b868305a56bb5d8.js\",\"483\",\"static/chunks/483-34b8de39266be54b.js\",\"760\",\"static/chunks/app/demos/ai/page-469346083790c5ed.js\"],\"default\"]\n8:I[39275,[],\"\"]\n9:I[61343,[],\"\"]\na:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Theme\"]\nb:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Toaster\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"_uAk4OTCF37WtjscGxwuW\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/demos/ai\",\"initialTree\":[\"\",{\"children\":[\"demos\",{\"children\":[\"ai\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"demos\",{\"children\":[\"ai\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\",\"ai\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"$La\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
demos/ai.txt CHANGED
@@ -1,9 +1,9 @@
1
  2:I[66513,[],"ClientPageRoot"]
2
- 3:I[56030,["333","static/chunks/fbe89ba5-2be908ceba4a7d9b.js","310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","955","static/chunks/955-5748263a00b1ccb8.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","631","static/chunks/631-4a742885cf0d6748.js","483","static/chunks/483-89e4495ce79573dc.js","760","static/chunks/app/demos/ai/page-f871d3e26fff73e4.js"],"default"]
3
  4:I[39275,[],""]
4
  5:I[61343,[],""]
5
- 6:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Theme"]
6
- 7:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Toaster"]
7
- 0:["z5_6nr2naE2DVQmFEPcuU",[[["",{"children":["demos",{"children":["ai",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["demos",{"children":["ai",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children","ai","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":["$","$L6",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L7",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null
 
1
  2:I[66513,[],"ClientPageRoot"]
2
+ 3:I[56030,["333","static/chunks/fbe89ba5-2be908ceba4a7d9b.js","310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","33","static/chunks/33-0e9610205db2f7d7.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","207","static/chunks/207-b92e6bc9e3af501d.js","136","static/chunks/136-cd893a48277c7262.js","672","static/chunks/672-4b868305a56bb5d8.js","483","static/chunks/483-34b8de39266be54b.js","760","static/chunks/app/demos/ai/page-469346083790c5ed.js"],"default"]
3
  4:I[39275,[],""]
4
  5:I[61343,[],""]
5
+ 6:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Theme"]
6
+ 7:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Toaster"]
7
+ 0:["_uAk4OTCF37WtjscGxwuW",[[["",{"children":["demos",{"children":["ai",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["demos",{"children":["ai",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children","ai","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":[["$","link",null,{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","$L6",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L7",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null
demos/p2p-chat.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f2421110bbabd1e.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/c77734ac-6d5723adcc46a65e.js" async=""></script><script src="/_next/static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js" async=""></script><script src="/_next/static/chunks/adeb83e6-84f90efd33747506.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/955-5748263a00b1ccb8.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/881-917fbfa492ed201a.js" async=""></script><script src="/_next/static/chunks/659-26d3e22fcd77f788.js" async=""></script><script src="/_next/static/chunks/app/demos/p2p-chat/page-703dc37b96b7b6bd.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/813-2d6d2c33c642dc38.js" async=""></script><script src="/_next/static/chunks/app/layout-9e4af58933956f5d.js" async=""></script><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script src="/_next/static/chunks/webpack-0f2421110bbabd1e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[13766,[\"443\",\"static/chunks/c77734ac-6d5723adcc46a65e.js\",\"218\",\"static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js\",\"864\",\"static/chunks/adeb83e6-84f90efd33747506.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"955\",\"static/chunks/955-5748263a00b1ccb8.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"881\",\"static/chunks/881-917fbfa492ed201a.js\",\"659\",\"static/chunks/659-26d3e22fcd77f788.js\",\"749\",\"static/chunks/app/demos/p2p-chat/page-703dc37b96b7b6bd.js\"],\"default\"]\n8:I[39275,[],\"\"]\n9:I[61343,[],\"\"]\na:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Theme\"]\nb:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Toaster\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"z5_6nr2naE2DVQmFEPcuU\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/demos/p2p-chat\",\"initialTree\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-chat\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-chat\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\",\"p2p-chat\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[\"$\",\"$La\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
 
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-175f358084e3d9d3.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/c77734ac-6d5723adcc46a65e.js" async=""></script><script src="/_next/static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js" async=""></script><script src="/_next/static/chunks/adeb83e6-84f90efd33747506.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/33-0e9610205db2f7d7.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/959-21298f74c09fcc74.js" async=""></script><script src="/_next/static/chunks/659-cbbb4b3dad45579b.js" async=""></script><script src="/_next/static/chunks/app/demos/p2p-chat/page-14a6340db3c47961.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/813-59f8977cdcd82aee.js" async=""></script><script src="/_next/static/chunks/app/layout-a6c4067c34d30fd9.js" async=""></script><link rel="icon" href="/favicon.ico" sizes="any"/><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div></div><script src="/_next/static/chunks/webpack-175f358084e3d9d3.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[13766,[\"443\",\"static/chunks/c77734ac-6d5723adcc46a65e.js\",\"218\",\"static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js\",\"864\",\"static/chunks/adeb83e6-84f90efd33747506.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"33\",\"static/chunks/33-0e9610205db2f7d7.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"959\",\"static/chunks/959-21298f74c09fcc74.js\",\"659\",\"static/chunks/659-cbbb4b3dad45579b.js\",\"749\",\"static/chunks/app/demos/p2p-chat/page-14a6340db3c47961.js\"],\"default\"]\n8:I[39275,[],\"\"]\n9:I[61343,[],\"\"]\na:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Theme\"]\nb:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Toaster\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"_uAk4OTCF37WtjscGxwuW\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/demos/p2p-chat\",\"initialTree\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-chat\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-chat\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\",\"p2p-chat\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"$La\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
demos/p2p-chat.txt CHANGED
@@ -1,9 +1,9 @@
1
  2:I[66513,[],"ClientPageRoot"]
2
- 3:I[13766,["443","static/chunks/c77734ac-6d5723adcc46a65e.js","218","static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js","864","static/chunks/adeb83e6-84f90efd33747506.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","955","static/chunks/955-5748263a00b1ccb8.js","297","static/chunks/297-5cd3572cb54de033.js","881","static/chunks/881-917fbfa492ed201a.js","659","static/chunks/659-26d3e22fcd77f788.js","749","static/chunks/app/demos/p2p-chat/page-703dc37b96b7b6bd.js"],"default"]
3
  4:I[39275,[],""]
4
  5:I[61343,[],""]
5
- 6:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Theme"]
6
- 7:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Toaster"]
7
- 0:["z5_6nr2naE2DVQmFEPcuU",[[["",{"children":["demos",{"children":["p2p-chat",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["demos",{"children":["p2p-chat",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children","p2p-chat","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":["$","$L6",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L7",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null
 
1
  2:I[66513,[],"ClientPageRoot"]
2
+ 3:I[13766,["443","static/chunks/c77734ac-6d5723adcc46a65e.js","218","static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js","864","static/chunks/adeb83e6-84f90efd33747506.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","33","static/chunks/33-0e9610205db2f7d7.js","297","static/chunks/297-5cd3572cb54de033.js","959","static/chunks/959-21298f74c09fcc74.js","659","static/chunks/659-cbbb4b3dad45579b.js","749","static/chunks/app/demos/p2p-chat/page-14a6340db3c47961.js"],"default"]
3
  4:I[39275,[],""]
4
  5:I[61343,[],""]
5
+ 6:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Theme"]
6
+ 7:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Toaster"]
7
+ 0:["_uAk4OTCF37WtjscGxwuW",[[["",{"children":["demos",{"children":["p2p-chat",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["demos",{"children":["p2p-chat",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children","p2p-chat","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":[["$","link",null,{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","$L6",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L7",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null
demos/p2p-hearts.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f2421110bbabd1e.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/c77734ac-6d5723adcc46a65e.js" async=""></script><script src="/_next/static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js" async=""></script><script src="/_next/static/chunks/adeb83e6-84f90efd33747506.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/955-5748263a00b1ccb8.js" async=""></script><script src="/_next/static/chunks/881-917fbfa492ed201a.js" async=""></script><script src="/_next/static/chunks/141-3a9c8eec94898f8e.js" async=""></script><script src="/_next/static/chunks/556-188289cdaafedc35.js" async=""></script><script src="/_next/static/chunks/app/demos/p2p-hearts/page-f2d2f1251944f7fe.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/813-2d6d2c33c642dc38.js" async=""></script><script src="/_next/static/chunks/app/layout-9e4af58933956f5d.js" async=""></script><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="relative h-screen"><div class="rounded-xl border bg-card text-card-foreground shadow absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"><input type="password" class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" placeholder="Enter password" value=""/></div></div></div><script src="/_next/static/chunks/webpack-0f2421110bbabd1e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[67869,[\"443\",\"static/chunks/c77734ac-6d5723adcc46a65e.js\",\"218\",\"static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js\",\"864\",\"static/chunks/adeb83e6-84f90efd33747506.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"955\",\"static/chunks/955-5748263a00b1ccb8.js\",\"881\",\"static/chunks/881-917fbfa492ed201a.js\",\"141\",\"static/chunks/141-3a9c8eec94898f8e.js\",\"556\",\"static/chunks/556-188289cdaafedc35.js\",\"115\",\"static/chunks/app/demos/p2p-hearts/page-f2d2f1251944f7fe.js\"],\"default\"]\n8:I[39275,[],\"\"]\n9:I[61343,[],\"\"]\na:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Theme\"]\nb:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Toaster\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"z5_6nr2naE2DVQmFEPcuU\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/demos/p2p-hearts\",\"initialTree\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-hearts\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-hearts\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\",\"p2p-hearts\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[\"$\",\"$La\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
 
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-175f358084e3d9d3.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/c77734ac-6d5723adcc46a65e.js" async=""></script><script src="/_next/static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js" async=""></script><script src="/_next/static/chunks/adeb83e6-84f90efd33747506.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/33-0e9610205db2f7d7.js" async=""></script><script src="/_next/static/chunks/959-21298f74c09fcc74.js" async=""></script><script src="/_next/static/chunks/207-b92e6bc9e3af501d.js" async=""></script><script src="/_next/static/chunks/635-3866341c9971375e.js" async=""></script><script src="/_next/static/chunks/672-4b868305a56bb5d8.js" async=""></script><script src="/_next/static/chunks/104-8d2d9d6c39d4e709.js" async=""></script><script src="/_next/static/chunks/app/demos/p2p-hearts/page-d69c604016ff7b63.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/813-59f8977cdcd82aee.js" async=""></script><script src="/_next/static/chunks/app/layout-a6c4067c34d30fd9.js" async=""></script><link rel="icon" href="/favicon.ico" sizes="any"/><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="relative h-screen"><div class="rounded-xl border bg-card text-card-foreground shadow absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"><input type="password" class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" placeholder="Enter password" value=""/></div></div></div><script src="/_next/static/chunks/webpack-175f358084e3d9d3.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[67869,[\"443\",\"static/chunks/c77734ac-6d5723adcc46a65e.js\",\"218\",\"static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js\",\"864\",\"static/chunks/adeb83e6-84f90efd33747506.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"33\",\"static/chunks/33-0e9610205db2f7d7.js\",\"959\",\"static/chunks/959-21298f74c09fcc74.js\",\"207\",\"static/chunks/207-b92e6bc9e3af501d.js\",\"635\",\"static/chunks/635-3866341c9971375e.js\",\"672\",\"static/chunks/672-4b868305a56bb5d8.js\",\"104\",\"static/chunks/104-8d2d9d6c39d4e709.js\",\"115\",\"static/chunks/app/demos/p2p-hearts/page-d69c604016ff7b63.js\"],\"default\"]\n8:I[39275,[],\"\"]\n9:I[61343,[],\"\"]\na:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Theme\"]\nb:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Toaster\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"_uAk4OTCF37WtjscGxwuW\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/demos/p2p-hearts\",\"initialTree\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-hearts\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"demos\",{\"children\":[\"p2p-hearts\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\",\"p2p-hearts\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"demos\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"$La\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$Lb\",null,{}],[\"$\",\"$L8\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L9\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
demos/p2p-hearts.txt CHANGED
@@ -1,9 +1,9 @@
1
  2:I[66513,[],"ClientPageRoot"]
2
- 3:I[67869,["443","static/chunks/c77734ac-6d5723adcc46a65e.js","218","static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js","864","static/chunks/adeb83e6-84f90efd33747506.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","955","static/chunks/955-5748263a00b1ccb8.js","881","static/chunks/881-917fbfa492ed201a.js","141","static/chunks/141-3a9c8eec94898f8e.js","556","static/chunks/556-188289cdaafedc35.js","115","static/chunks/app/demos/p2p-hearts/page-f2d2f1251944f7fe.js"],"default"]
3
  4:I[39275,[],""]
4
  5:I[61343,[],""]
5
- 6:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Theme"]
6
- 7:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Toaster"]
7
- 0:["z5_6nr2naE2DVQmFEPcuU",[[["",{"children":["demos",{"children":["p2p-hearts",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["demos",{"children":["p2p-hearts",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children","p2p-hearts","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":["$","$L6",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L7",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null
 
1
  2:I[66513,[],"ClientPageRoot"]
2
+ 3:I[67869,["443","static/chunks/c77734ac-6d5723adcc46a65e.js","218","static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js","864","static/chunks/adeb83e6-84f90efd33747506.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","33","static/chunks/33-0e9610205db2f7d7.js","959","static/chunks/959-21298f74c09fcc74.js","207","static/chunks/207-b92e6bc9e3af501d.js","635","static/chunks/635-3866341c9971375e.js","672","static/chunks/672-4b868305a56bb5d8.js","104","static/chunks/104-8d2d9d6c39d4e709.js","115","static/chunks/app/demos/p2p-hearts/page-d69c604016ff7b63.js"],"default"]
3
  4:I[39275,[],""]
4
  5:I[61343,[],""]
5
+ 6:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Theme"]
6
+ 7:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Toaster"]
7
+ 0:["_uAk4OTCF37WtjscGxwuW",[[["",{"children":["demos",{"children":["p2p-hearts",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["demos",{"children":["p2p-hearts",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children","p2p-hearts","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","demos","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":[["$","link",null,{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","$L6",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L7",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null
favicon.ico ADDED
index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0f2421110bbabd1e.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/fbe89ba5-2be908ceba4a7d9b.js" async=""></script><script src="/_next/static/chunks/c77734ac-6d5723adcc46a65e.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js" async=""></script><script src="/_next/static/chunks/adeb83e6-84f90efd33747506.js" async=""></script><script src="/_next/static/chunks/dc112a36-9245e58b51327391.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/955-5748263a00b1ccb8.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/881-917fbfa492ed201a.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/813-2d6d2c33c642dc38.js" async=""></script><script src="/_next/static/chunks/141-3a9c8eec94898f8e.js" async=""></script><script src="/_next/static/chunks/832-887eb6d665e26afc.js" async=""></script><script src="/_next/static/chunks/556-188289cdaafedc35.js" async=""></script><script src="/_next/static/chunks/483-89e4495ce79573dc.js" async=""></script><script src="/_next/static/chunks/app/page-0650d8116c8fa2b9.js" async=""></script><script src="/_next/static/chunks/app/layout-9e4af58933956f5d.js" async=""></script><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div style="--height:100vh" class="rt-Flex rt-r-fd-column rt-r-jc-center rt-r-h"><div class="rt-Flex rt-r-fd-row rt-r-jc-center"><div class="rt-reset rt-BaseCard rt-Card rt-r-size-1 rt-variant-ghost"><div class="rt-Container rt-r-size-1 rt-r-p-4"><div class="rt-ContainerInner"><h1 class="rt-Heading rt-r-size-9 rt-r-weight-medium">Welcome to Rakis.</h1><div class="rt-Flex rt-r-jc-end mt-2"><a data-accent-color="blue" href="https://twitter.com/hrishioa" target="_blank" class="rt-Text rt-reset rt-Link rt-underline-auto">built as a two-week experiment by @hrishioa</a></div><div data-accent-color="gray" class="rt-Text rt-r-size-4 mt-6">Rakis is a permissionless inference network that runs entirely in the browser. Choose a password below and instantly be a part of the network.</div> <div class="rt-Flex rt-r-fd-row rt-r-jc-space-between mt-3"><a data-accent-color="amber" class="rt-Text rt-reset rt-Link rt-underline-auto">The Story</a><a data-accent-color="amber" class="rt-Text rt-reset rt-Link rt-underline-auto">How Rakis Works</a><a data-accent-color="amber" href="https://github.com/hrishioa/rakis" target="_blank" class="rt-Text rt-reset rt-Link rt-underline-auto">See the code</a></div><div class="rt-Flex rt-r-fd-row rt-r-gap-3 mt-6"><div class="rt-Box rt-r-fg-1"><div class="rt-TextFieldRoot rt-r-size-3 rt-variant-classic"><input spellCheck="false" type="password" placeholder="Create a password..." class="rt-reset rt-TextFieldInput" value=""/></div></div><div class="rt-Box"><button data-accent-color="" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-classic rt-Button"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.29227 0.048984C3.47033 -0.032338 3.67946 -0.00228214 3.8274 0.125891L12.8587 7.95026C13.0134 8.08432 13.0708 8.29916 13.0035 8.49251C12.9362 8.68586 12.7578 8.81866 12.5533 8.82768L9.21887 8.97474L11.1504 13.2187C11.2648 13.47 11.1538 13.7664 10.9026 13.8808L8.75024 14.8613C8.499 14.9758 8.20255 14.8649 8.08802 14.6137L6.15339 10.3703L3.86279 12.7855C3.72196 12.934 3.50487 12.9817 3.31479 12.9059C3.1247 12.8301 3 12.6461 3 12.4414V0.503792C3 0.308048 3.11422 0.130306 3.29227 0.048984ZM4 1.59852V11.1877L5.93799 9.14425C6.05238 9.02363 6.21924 8.96776 6.38319 8.99516C6.54715 9.02256 6.68677 9.12965 6.75573 9.2809L8.79056 13.7441L10.0332 13.178L8.00195 8.71497C7.93313 8.56376 7.94391 8.38824 8.03072 8.24659C8.11753 8.10494 8.26903 8.01566 8.435 8.00834L11.2549 7.88397L4 1.59852Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg> Join</button></div></div></div></div></div></div></div></div><script src="/_next/static/chunks/webpack-0f2421110bbabd1e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[85668,[\"333\",\"static/chunks/fbe89ba5-2be908ceba4a7d9b.js\",\"443\",\"static/chunks/c77734ac-6d5723adcc46a65e.js\",\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"218\",\"static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js\",\"864\",\"static/chunks/adeb83e6-84f90efd33747506.js\",\"705\",\"static/chunks/dc112a36-9245e58b51327391.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"955\",\"static/chunks/955-5748263a00b1ccb8.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"881\",\"static/chunks/881-917fbfa492ed201a.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"141\",\"static/chunks/141-3a9c8eec94898f8e.js\",\"832\",\"static/chunks/832-887eb6d665e26afc.js\",\"556\",\"static/chunks/556-188289cdaafedc35.js\",\"483\",\"static/chunks/483-89e4495ce79573dc.js\",\"931\",\"static/chunks/app/page-0650d8116c8fa2b9.js\"],\"default\"]\n8:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Theme\"]\n9:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-2d6d2c33c642dc38.js\",\"185\",\"static/chunks/app/layout-9e4af58933956f5d.js\"],\"Toaster\"]\na:I[39275,[],\"\"]\nb:I[61343,[],\"\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"z5_6nr2naE2DVQmFEPcuU\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[\"$\",\"$L8\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
 
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/3d3edf2fd4cc037f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-175f358084e3d9d3.js"/><script src="/_next/static/chunks/fd9d1056-a13296a158fa50d4.js" async=""></script><script src="/_next/static/chunks/23-c30270c4d93da1b8.js" async=""></script><script src="/_next/static/chunks/main-app-4b489319a554267b.js" async=""></script><script src="/_next/static/chunks/fbe89ba5-2be908ceba4a7d9b.js" async=""></script><script src="/_next/static/chunks/c77734ac-6d5723adcc46a65e.js" async=""></script><script src="/_next/static/chunks/0e5ce63c-06490805b4fe70ef.js" async=""></script><script src="/_next/static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js" async=""></script><script src="/_next/static/chunks/adeb83e6-84f90efd33747506.js" async=""></script><script src="/_next/static/chunks/dc112a36-9245e58b51327391.js" async=""></script><script src="/_next/static/chunks/868-984cc4aa9dbc4378.js" async=""></script><script src="/_next/static/chunks/708-689e257ca99149f8.js" async=""></script><script src="/_next/static/chunks/33-0e9610205db2f7d7.js" async=""></script><script src="/_next/static/chunks/297-5cd3572cb54de033.js" async=""></script><script src="/_next/static/chunks/959-21298f74c09fcc74.js" async=""></script><script src="/_next/static/chunks/786-27c6123eb7ab9aa9.js" async=""></script><script src="/_next/static/chunks/207-b92e6bc9e3af501d.js" async=""></script><script src="/_next/static/chunks/813-59f8977cdcd82aee.js" async=""></script><script src="/_next/static/chunks/635-3866341c9971375e.js" async=""></script><script src="/_next/static/chunks/832-887eb6d665e26afc.js" async=""></script><script src="/_next/static/chunks/672-4b868305a56bb5d8.js" async=""></script><script src="/_next/static/chunks/104-8d2d9d6c39d4e709.js" async=""></script><script src="/_next/static/chunks/483-34b8de39266be54b.js" async=""></script><script src="/_next/static/chunks/app/page-f71a0471b723bc9f.js" async=""></script><script src="/_next/static/chunks/app/layout-a6c4067c34d30fd9.js" async=""></script><link rel="icon" href="/favicon.ico" sizes="any"/><title>Rakis</title><meta name="description" content="Decentralized inference in the browser"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="min-h-screen bg-background font-sans antialiased __variable_aaf875"><div data-is-root-theme="true" data-accent-color="violet" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div style="--height:100vh" class="rt-Flex rt-r-fd-column rt-r-jc-center rt-r-h"><div class="rt-Flex rt-r-fd-row rt-r-jc-center"><div class="rt-reset rt-BaseCard rt-Card rt-r-size-1 rt-variant-ghost"><div class="rt-Container rt-r-size-1 rt-r-p-4"><div class="rt-ContainerInner"><h1 class="rt-Heading rt-r-size-9 rt-r-weight-medium">Welcome to Rakis.</h1><div class="rt-Flex rt-r-jc-end mt-2"><a data-accent-color="blue" href="https://twitter.com/hrishioa" target="_blank" class="rt-Text rt-reset rt-Link rt-underline-auto">built as a two-week experiment by @hrishioa</a></div><div data-accent-color="gray" class="rt-Text rt-r-size-4 mt-6">Rakis is a permissionless inference network that runs entirely in the browser. Choose a password below and instantly be a part of the network.</div> <div class="rt-Flex rt-r-fd-row rt-r-jc-space-between mt-3"><a data-accent-color="amber" href="https://olickel.com/introducing-rakis" target="_blank" class="rt-Text rt-reset rt-Link rt-underline-auto">The Story</a><a data-accent-color="amber" href="https://rakis-docs.vercel.app" target="_blank" class="rt-Text rt-reset rt-Link rt-underline-auto">Docs</a><a data-accent-color="amber" href="https://github.com/hrishioa/rakis" target="_blank" class="rt-Text rt-reset rt-Link rt-underline-auto">See the code</a></div><div class="rt-Flex rt-r-fd-row rt-r-gap-3 mt-6"><div class="rt-Box rt-r-fg-1"><div class="rt-TextFieldRoot rt-r-size-3 rt-variant-classic"><input spellCheck="false" autofocus="" type="password" placeholder="Create a password..." class="rt-reset rt-TextFieldInput" value=""/></div></div><div class="rt-Box"><button data-accent-color="" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-classic rt-Button"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.29227 0.048984C3.47033 -0.032338 3.67946 -0.00228214 3.8274 0.125891L12.8587 7.95026C13.0134 8.08432 13.0708 8.29916 13.0035 8.49251C12.9362 8.68586 12.7578 8.81866 12.5533 8.82768L9.21887 8.97474L11.1504 13.2187C11.2648 13.47 11.1538 13.7664 10.9026 13.8808L8.75024 14.8613C8.499 14.9758 8.20255 14.8649 8.08802 14.6137L6.15339 10.3703L3.86279 12.7855C3.72196 12.934 3.50487 12.9817 3.31479 12.9059C3.1247 12.8301 3 12.6461 3 12.4414V0.503792C3 0.308048 3.11422 0.130306 3.29227 0.048984ZM4 1.59852V11.1877L5.93799 9.14425C6.05238 9.02363 6.21924 8.96776 6.38319 8.99516C6.54715 9.02256 6.68677 9.12965 6.75573 9.2809L8.79056 13.7441L10.0332 13.178L8.00195 8.71497C7.93313 8.56376 7.94391 8.38824 8.03072 8.24659C8.11753 8.10494 8.26903 8.01566 8.435 8.00834L11.2549 7.88397L4 1.59852Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg> Join</button></div></div></div></div></div></div></div></div><script src="/_next/static/chunks/webpack-175f358084e3d9d3.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/3d3edf2fd4cc037f.css\",\"style\"]\n3:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[66513,[],\"ClientPageRoot\"]\n7:I[32373,[\"333\",\"static/chunks/fbe89ba5-2be908ceba4a7d9b.js\",\"443\",\"static/chunks/c77734ac-6d5723adcc46a65e.js\",\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"218\",\"static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js\",\"864\",\"static/chunks/adeb83e6-84f90efd33747506.js\",\"705\",\"static/chunks/dc112a36-9245e58b51327391.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"708\",\"static/chunks/708-689e257ca99149f8.js\",\"33\",\"static/chunks/33-0e9610205db2f7d7.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"959\",\"static/chunks/959-21298f74c09fcc74.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"207\",\"static/chunks/207-b92e6bc9e3af501d.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"635\",\"static/chunks/635-3866341c9971375e.js\",\"832\",\"static/chunks/832-887eb6d665e26afc.js\",\"672\",\"static/chunks/672-4b868305a56bb5d8.js\",\"104\",\"static/chunks/104-8d2d9d6c39d4e709.js\",\"483\",\"static/chunks/483-34b8de39266be54b.js\",\"931\",\"static/chunks/app/page-f71a0471b723bc9f.js\"],\"default\"]\n8:I[29340,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Theme\"]\n9:I[42371,[\"310\",\"static/chunks/0e5ce63c-06490805b4fe70ef.js\",\"868\",\"static/chunks/868-984cc4aa9dbc4378.js\",\"297\",\"static/chunks/297-5cd3572cb54de033.js\",\"786\",\"static/chunks/786-27c6123eb7ab9aa9.js\",\"813\",\"static/chunks/813-59f8977cdcd82aee.js\",\"185\",\"static/chunks/app/layout-a6c4067c34d30fd9.js\"],\"Toaster\"]\na:I[39275,[],\"\"]\nb:I[61343,[],\"\"]\nd:I[76130,[],\"\"]\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3d3edf2fd4cc037f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"_uAk4OTCF37WtjscGxwuW\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/\",\"initialTree\":[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[\"$\",\"$L6\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$7\"}]],null],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"suppressHydrationWarning\":true,\"className\":\"min-h-screen bg-background font-sans antialiased __variable_aaf875\",\"children\":[[\"$\",\"link\",null,{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"$L8\",null,{\"accentColor\":\"violet\",\"grayColor\":\"slate\",\"radius\":\"medium\",\"scaling\":\"100%\",\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"$La\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]]}]]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Rakis\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Decentralized inference in the browser\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
index.txt CHANGED
@@ -1,9 +1,9 @@
1
  2:I[66513,[],"ClientPageRoot"]
2
- 3:I[85668,["333","static/chunks/fbe89ba5-2be908ceba4a7d9b.js","443","static/chunks/c77734ac-6d5723adcc46a65e.js","310","static/chunks/0e5ce63c-06490805b4fe70ef.js","218","static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js","864","static/chunks/adeb83e6-84f90efd33747506.js","705","static/chunks/dc112a36-9245e58b51327391.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","955","static/chunks/955-5748263a00b1ccb8.js","297","static/chunks/297-5cd3572cb54de033.js","881","static/chunks/881-917fbfa492ed201a.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","141","static/chunks/141-3a9c8eec94898f8e.js","832","static/chunks/832-887eb6d665e26afc.js","556","static/chunks/556-188289cdaafedc35.js","483","static/chunks/483-89e4495ce79573dc.js","931","static/chunks/app/page-0650d8116c8fa2b9.js"],"default"]
3
- 4:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Theme"]
4
- 5:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-2d6d2c33c642dc38.js","185","static/chunks/app/layout-9e4af58933956f5d.js"],"Toaster"]
5
  6:I[39275,[],""]
6
  7:I[61343,[],""]
7
- 0:["z5_6nr2naE2DVQmFEPcuU",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":["$","$L4",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L5",null,{}],["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null
 
1
  2:I[66513,[],"ClientPageRoot"]
2
+ 3:I[32373,["333","static/chunks/fbe89ba5-2be908ceba4a7d9b.js","443","static/chunks/c77734ac-6d5723adcc46a65e.js","310","static/chunks/0e5ce63c-06490805b4fe70ef.js","218","static/chunks/aaea2bcf-c1ab7d5d39d6eb59.js","864","static/chunks/adeb83e6-84f90efd33747506.js","705","static/chunks/dc112a36-9245e58b51327391.js","868","static/chunks/868-984cc4aa9dbc4378.js","708","static/chunks/708-689e257ca99149f8.js","33","static/chunks/33-0e9610205db2f7d7.js","297","static/chunks/297-5cd3572cb54de033.js","959","static/chunks/959-21298f74c09fcc74.js","786","static/chunks/786-27c6123eb7ab9aa9.js","207","static/chunks/207-b92e6bc9e3af501d.js","813","static/chunks/813-59f8977cdcd82aee.js","635","static/chunks/635-3866341c9971375e.js","832","static/chunks/832-887eb6d665e26afc.js","672","static/chunks/672-4b868305a56bb5d8.js","104","static/chunks/104-8d2d9d6c39d4e709.js","483","static/chunks/483-34b8de39266be54b.js","931","static/chunks/app/page-f71a0471b723bc9f.js"],"default"]
3
+ 4:I[29340,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Theme"]
4
+ 5:I[42371,["310","static/chunks/0e5ce63c-06490805b4fe70ef.js","868","static/chunks/868-984cc4aa9dbc4378.js","297","static/chunks/297-5cd3572cb54de033.js","786","static/chunks/786-27c6123eb7ab9aa9.js","813","static/chunks/813-59f8977cdcd82aee.js","185","static/chunks/app/layout-a6c4067c34d30fd9.js"],"Toaster"]
5
  6:I[39275,[],""]
6
  7:I[61343,[],""]
7
+ 0:["_uAk4OTCF37WtjscGxwuW",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}]],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"suppressHydrationWarning":true,"className":"min-h-screen bg-background font-sans antialiased __variable_aaf875","children":[["$","link",null,{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","$L4",null,{"accentColor":"violet","grayColor":"slate","radius":"medium","scaling":"100%","children":[["$","$L5",null,{}],["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}]]}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3d3edf2fd4cc037f.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2aafeea248cede9a.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]]
8
  8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Rakis"}],["$","meta","3",{"name":"description","content":"Decentralized inference in the browser"}],["$","meta","4",{"name":"next-size-adjust"}]]
9
  1:null