From 211512807a41797c3cd9857e1842e02a6f312703 Mon Sep 17 00:00:00 2001 From: Corey Petty Date: Sun, 19 May 2019 13:47:54 -0400 Subject: [PATCH] include build files for embedding --- .gitignore | 4 - build/css/main.css | 0 build/index.html | 234 ++++++++++++++++++ build/js/main.d7287a5639e08859fa47.js | 2 + build/js/main.d7287a5639e08859fa47.js.map | 1 + build/js/runtime~main.e6dd4b6bdd4350738cf1.js | 2 + .../runtime~main.e6dd4b6bdd4350738cf1.js.map | 1 + build/js/vendors.9d13aeb150165ab32cb0.js | 216 ++++++++++++++++ build/js/vendors.9d13aeb150165ab32cb0.js.map | 1 + src/App.jsx | 147 +++++++++-- 10 files changed, 588 insertions(+), 20 deletions(-) create mode 100644 build/css/main.css create mode 100644 build/index.html create mode 100644 build/js/main.d7287a5639e08859fa47.js create mode 100644 build/js/main.d7287a5639e08859fa47.js.map create mode 100644 build/js/runtime~main.e6dd4b6bdd4350738cf1.js create mode 100644 build/js/runtime~main.e6dd4b6bdd4350738cf1.js.map create mode 100644 build/js/vendors.9d13aeb150165ab32cb0.js create mode 100644 build/js/vendors.9d13aeb150165ab32cb0.js.map diff --git a/.gitignore b/.gitignore index ec75251..3f4b087 100644 --- a/.gitignore +++ b/.gitignore @@ -20,10 +20,6 @@ yarn-debug.log* yarn-error.log* yarn.lock* package-lock.json -/build/bundle.js -/build/index.html -/build* -/build/* # Editor/IDE .idea packages/api/etc/ diff --git a/build/css/main.css b/build/css/main.css new file mode 100644 index 0000000..e69de29 diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000..06eb13b --- /dev/null +++ b/build/index.html @@ -0,0 +1,234 @@ + + + + + + + Webpack react boilerplate + + + + +
+ + + diff --git a/build/js/main.d7287a5639e08859fa47.js b/build/js/main.d7287a5639e08859fa47.js new file mode 100644 index 0000000..c68882d --- /dev/null +++ b/build/js/main.d7287a5639e08859fa47.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{17:function(e,t,a){},33:function(e,t,a){"use strict";a.r(t);var o=a(0),s=a.n(o),i=a(1),r=a.n(i),n=a(13),h=a.n(n),l=a(18),u=a(3),d=a(19),c=a(16),f=a.n(c),m=a(17),w=a.n(m),v=s()("h2",{},void 0,"Introduction"),p=s()("p",{},void 0,"The Status Network has a utility token, the Status Network Token (SNT). What does that even mean? What utilities does it have and how do their uses affect the rest of the ecosystem? Does it have an impact on valuation? What even is valuation of a utility token?"),b=s()("p",{},void 0,"These questions are hard, and there does not seem to be sufficient academic answers to them, for very good reasons. The technology enabling a “utility token” is new, and transcendent of many older technologies. This consequently means the models used to evaluate the older technologies will never be able to completely describe the newer ones. We, as a community, need to build new ones and evaluate them rigorously."),y=s()("p",{},void 0,"There is currently quite a bit of work being done in this field, but it is mostly for investment firms to make appropriate calls on buying, selling, and holding various project’s tokens. While this is drastically important for growth and project funding, we at Status feel that there are other, less financially motivated reasons to do this work which require a different approach. More specifically, any utility token needs to be able to objectively evaluate various features and utilities of their platform, and how they affect the entirety of their ecosystem. For instance, we need to be able to ask questions like the following: “How can we objectively measure the use of SNT if it gets used in feature X as a function of our user base? Based on that measurement, is its development cost justified, or should we focus on something else?”"),g=s()("p",{},void 0,"We will be launching Status with the following SNT use-cases, as described in the"," ",s()("a",{href:"https://status.im/whitepaper.pdf"},void 0,"whitepaper"),":",s()("ul",{},void 0,s()("li",{},void 0,"Teller Network"),s()("li",{},void 0,"Tribute to Talk"),s()("li",{},void 0,"ENS Usernames"),s()("li",{},void 0,"Sticker Market"),s()("li",{},void 0,"SNT Curated Dapp Store"),s()("li",{},void 0,"Network Incentivization (may not be available at launch)"))),S=s()("p",{},void 0,"Each of these use-cases are run by the SNT token, but in very different ways. This means each will have differing effects on the supply and demand of the token itself. It doesn’t stop there, as Status is an open and permissionless platform for developers to build on and use, which means that anyone can build SNT use-cases that affect the overall supply and demand. But how do we know what effect a utility has? Where do we go to try and evaluate its usefulness?"),R=s()("p",{},void 0,"To this end, we would like to start a blog series detailing some of the research we are doing within Status to objectively evaluate the flow of SNT, the potential effects of our implemented (and upcoming) SNT use cases within Status, and how our potential user growth changes things. This work will encompass traditional economic and portfolio theory, work currently being done in crypto-economics, and novel methodology. That means a part of this endeavor is an attempt to get peer review and evaluation of what we do by you, the community!"),k=s()("p",{},void 0,"Let’s start with the ENS naming system. In Status, for a little SNT, you can register your username on the Ethereum Name System (ENS) so others can find you easily. In order for us to apply models or understand the economics of a use case, we first have to understand what it is, how it works, and how it fits within the Status ecosystem. Let’s start by breaking down how ENS usernames work within Status:",s()("ol",{},void 0,s()("li",{},void 0,"User selects a unique username, ",""),s()("li",{},void 0,"User deposits 10 SNT into the ENS username dapp"),s()("li",{},void 0,"User is granted sole control over the subdomain ","",".stateofus.eth for 1 year"),s()("li",{},void 0,"User is able to get deposited funds after this yearly period, and release the username back into available names."),s()("li",{},void 0,"User is now searchable within Status as ",""," or","",".stateofus.eth outside of the Status app."))),N=s()("p",{},void 0,"The use case and token flow are both relatively simple, but what are the effects on the ecosystem? Let’s first try and model what value this could potentially accrue over time. We can start by picking out the variables in this process to see how things depend on each other. Furthermore, the above values are what we currently use, but in terms of modeling, we should turn those into variables that allow us to see what effect each has on the overall mechanism. This can help inform us (and you) on appropriate choices."),T=s()("h2",{},void 0,"Disucssion of variables"),E=s()("h3",{},void 0,"Number of Users"),U=s()("p",{},void 0,"It is clear that this all depends on how many users Status has in the app. If they are not using Status, then they won’t use the feature. This is our base metric, and we will model it using compounding growth and loss. We can start with a number of users that are using the app, and set additional growth and loss variables (in percentages) that define how this number changes over the next 10 years. This means that every year, we expect a certain percentage change in users based on the numbers of the previous year. Depending on how you set those percentages, the number of users can grow very rapidly! Go ahead and play with the following variables to see how the number of users change over the years."),I=s()("h3",{},void 0,"Conversion rate of users to ENS username"),W=s()("p",{},void 0,"Ok cool. We have our user base locked and loaded for the next 10 years, but not everyone is going to register an ENS username. We can brand it, make it simple, and incentivize people to do it but the reality is that that number will never be 100%. So the number of people that DO decide to register an ENS username is what we want. We get this number by multiplying the total number of users by the adoption conversion rate, which is another variable."),B=s()("p",{},void 0,"Now not all users will keep their usernames. Some people will remove their deposit after the year and bring their SNT back into circulation. Some people will leave Status altogether. If they never manually release their SNT from the ENS username contract, it can be considered locked forever. For this, we will continue to consider them users because from the contract's perspective, they are indestiguishable. We’ll model the people who release their username with another conversion factor. Go ahead and change these variables and see how the following graph changes."),C=s()("h3",{},void 0,"Amount of SNT required to deposit"),D=s()("p",{},void 0,"Now we have the amount of users that will (or have) use(d) this utility. Let’s figure out how that translates to SNT. In order to do that, we have another variable to define: The amount of SNT required to register an ENS username. By multiplying each user by this variable, we can show how much SNT is being locked up every year which effectively takes it out of the circulating supply, i.e."),q=s()("h3",{},void 0,s()(f.a,{displayMode:!0},void 0,"$$N_{\\text{SNT locked}} = N_{\\text{registrations}} * N_{\\text{SNT per registration}}$$")),j=s()("h3",{},void 0,"How to assign value to all of this?"),x=s()("h2",{},void 0,"Thoughts and Conclusions"),G=s()("p",{},void 0,"So what have we learned from all of this? How can we change the model to better fit reality? Are their any actionable conclusions around ENS usernames that come from this information?");var L=Object(l.hot)(class extends i.Component{constructor(){super(...arguments),this.numberUserInputRef=r.a.createRef(),this.userGrowthRateRef=r.a.createRef(),this.userChurnRateRef=r.a.createRef(),this.userbarRef=r.a.createRef(),this.userConversionRef=r.a.createRef(),this.removalRateRef=r.a.createRef(),this.ensUserbarRef=r.a.createRef(),this.amountDepositSntRef=r.a.createRef(),this.lockedSntBarRef=r.a.createRef(),this.sntPriceRef=r.a.createRef(),this.lockedUsdBarRef=r.a.createRef()}componentDidMount(){(new u.b).module(d.a,e=>"viewof numberStatusUsers"===e?new u.a(this.numberUserInputRef.current):"viewof userGrowthRate"===e?new u.a(this.userGrowthRateRef.current):"viewof userChurnRate"===e?new u.a(this.userChurnRateRef.current):"viewof userbar"===e?new u.a(this.userbarRef.current):"viewof percentUsersRegisterName"===e?new u.a(this.userConversionRef.current):"viewof removalRate"===e?new u.a(this.removalRateRef.current):"viewof ensUserbar"===e?new u.a(this.ensUserbarRef.current):"viewof amountDepositSnt"===e?new u.a(this.amountDepositSntRef.current):"viewof lockedSntBar"===e?new u.a(this.lockedSntBarRef.current):"viewof sntPrice"===e?new u.a(this.sntPriceRef.current):"viewof lockedUsdBar"===e?new u.a(this.lockedUsdBarRef.current):null)}render(){return s()("div",{className:"App"},void 0,v,p,b,y,g,S,R,k,N,T,E,U,r.a.createElement("div",{ref:this.numberUserInputRef}),r.a.createElement("div",{ref:this.userGrowthRateRef}),r.a.createElement("div",{ref:this.userChurnRateRef}),r.a.createElement("div",{ref:this.userbarRef,className:w.a.chart}),I,W,B,r.a.createElement("div",{ref:this.userConversionRef}),r.a.createElement("div",{ref:this.removalRateRef}),r.a.createElement("div",{ref:this.ensUserbarRef}),C,D,q,r.a.createElement("div",{ref:this.amountDepositSntRef}),r.a.createElement("div",{ref:this.lockedSntBarRef}),j,r.a.createElement("div",{ref:this.sntPriceRef}),r.a.createElement("div",{ref:this.lockedUsdBarRef}),x,G)}});h.a.render(s()(L,{}),document.getElementById("app"))}},[[33,1,2]]]); +//# sourceMappingURL=main.d7287a5639e08859fa47.js.map \ No newline at end of file diff --git a/build/js/main.d7287a5639e08859fa47.js.map b/build/js/main.d7287a5639e08859fa47.js.map new file mode 100644 index 0000000..b8a5831 --- /dev/null +++ b/build/js/main.d7287a5639e08859fa47.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./src/App.jsx","webpack:///./src/index.jsx"],"names":["jsx_default","href","latex_default","a","displayMode","hot","Component","[object Object]","super","arguments","this","numberUserInputRef","React","createRef","userGrowthRateRef","userChurnRateRef","userbarRef","userConversionRef","removalRateRef","ensUserbarRef","amountDepositSntRef","lockedSntBarRef","sntPriceRef","lockedUsdBarRef","componentDidMount","Runtime","module","notebook","name","Inspector","current","render","className","_ref","_ref2","_ref3","_ref4","_ref5","_ref6","_ref7","_ref8","_ref9","_ref10","_ref11","_ref12","react_default","createElement","ref","style","chart","_ref13","_ref14","_ref15","_ref16","_ref17","_ref18","_ref19","_ref20","_ref21","ReactDOM","src_App_0","document","getElementById"],"mappings":"qOAyEQA,IAAA,iCACAA,IAAA,yRAMAA,IAAA,obASAA,IAAA,61BAeAA,IAAA,kGAEmB,IACjBA,IAAA,KAAGC,KAAK,yCAAR,gBAHF,IAIED,IAAA,eACEA,IAAA,iCACAA,IAAA,kCACAA,IAAA,gCACAA,IAAA,iCACAA,IAAA,yCACAA,IAAA,+EAGJA,IAAA,meASAA,IAAA,ijBAUAA,IAAA,saAOEA,IAAA,eACEA,IAAA,gEACAA,IAAA,kEACAA,IAAA,4GAIAA,IAAA,oIAIAA,IAAA,2IAMJA,IAAA,2hBAUAA,IAAA,4CACAA,IAAA,oCACAA,IAAA,stBAiBAA,IAAA,6DACAA,IAAA,udASAA,IAAA,6kBAcAA,IAAA,sDACAA,IAAA,2ZAQAA,IAAA,eACEA,IAACE,EAAAC,EAAD,CAAOC,aAAW,QAAlB,EAEI,gGAMNJ,IAAA,wDAGAA,IAAA,6CACAA,IAAA,yMAUOK,oBA9Of,cAAkBC,YAAUC,cAAAC,SAAAC,WAAAC,KAyC1BC,mBAAqBC,IAAMC,YAzCDH,KA2C1BI,kBAAoBF,IAAMC,YA3CAH,KA6C1BK,iBAAmBH,IAAMC,YA7CCH,KA+C1BM,WAAaJ,IAAMC,YA/COH,KAiD1BO,kBAAoBL,IAAMC,YAjDAH,KAmD1BQ,eAAiBN,IAAMC,YAnDGH,KAqD1BS,cAAgBP,IAAMC,YArDIH,KAuD1BU,oBAAsBR,IAAMC,YAvDFH,KAyD1BW,gBAAkBT,IAAMC,YAzDEH,KA2D1BY,YAAcV,IAAMC,YA3DMH,KA6D1Ba,gBAAkBX,IAAMC,YA5DxBW,qBACkB,IAAIC,KACZC,OAAOC,IAAUC,GACV,6BAATA,EACK,IAAIC,IAAUnB,KAAKC,mBAAmBmB,SAElC,0BAATF,EACK,IAAIC,IAAUnB,KAAKI,kBAAkBgB,SAEjC,yBAATF,EACK,IAAIC,IAAUnB,KAAKK,iBAAiBe,SAEhC,mBAATF,EACK,IAAIC,IAAUnB,KAAKM,WAAWc,SAE1B,oCAATF,EACK,IAAIC,IAAUnB,KAAKO,kBAAkBa,SAEjC,uBAATF,EACK,IAAIC,IAAUnB,KAAKQ,eAAeY,SAE9B,sBAATF,EACK,IAAIC,IAAUnB,KAAKS,cAAcW,SAE7B,4BAATF,EACK,IAAIC,IAAUnB,KAAKU,oBAAoBU,SAEnC,wBAATF,EACK,IAAIC,IAAUnB,KAAKW,gBAAgBS,SAE/B,oBAATF,EACK,IAAIC,IAAUnB,KAAKY,YAAYQ,SAE3B,wBAATF,EACK,IAAIC,IAAUnB,KAAKa,gBAAgBO,SAErC,MA0BXC,SACE,OACE/B,IAAA,OAAKgC,UAAU,YAAf,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAiHEC,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKC,qBACfkC,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKI,oBACf+B,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKK,mBACf8B,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKM,WAAYgB,UAAWgB,IAAMC,QApH9CC,EAAAC,EAAAC,EA0IEP,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKO,oBACf4B,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKQ,iBACf2B,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKS,gBA5IjBkC,EAAAC,EAAAC,EA6JEV,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKU,sBACfyB,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKW,kBA9JjBmC,EAgKEX,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKY,cACfuB,EAAA1C,EAAA2C,cAAA,OAAKC,IAAKrC,KAAKa,kBAjKjBkC,EAAAC,MCpENC,IAAS5B,OAAO/B,IAAC4D,EAAD,IAASC,SAASC,eAAe","file":"js/main.d7287a5639e08859fa47.js","sourcesContent":["import React, { Component } from 'react';\nimport { hot } from 'react-hot-loader/root';\nimport { Runtime, Inspector } from '@observablehq/runtime';\nimport notebook from '@corpetty/test-graph-embed';\nimport Latex from 'react-latex';\nimport style from './App.css';\n\nclass App extends Component {\n componentDidMount() {\n const runtime = new Runtime();\n runtime.module(notebook, name => {\n if (name === 'viewof numberStatusUsers') {\n return new Inspector(this.numberUserInputRef.current);\n }\n if (name === 'viewof userGrowthRate') {\n return new Inspector(this.userGrowthRateRef.current);\n }\n if (name === 'viewof userChurnRate') {\n return new Inspector(this.userChurnRateRef.current);\n }\n if (name === 'viewof userbar') {\n return new Inspector(this.userbarRef.current);\n }\n if (name === 'viewof percentUsersRegisterName') {\n return new Inspector(this.userConversionRef.current);\n }\n if (name === 'viewof removalRate') {\n return new Inspector(this.removalRateRef.current);\n }\n if (name === 'viewof ensUserbar') {\n return new Inspector(this.ensUserbarRef.current);\n }\n if (name === 'viewof amountDepositSnt') {\n return new Inspector(this.amountDepositSntRef.current);\n }\n if (name === 'viewof lockedSntBar') {\n return new Inspector(this.lockedSntBarRef.current);\n }\n if (name === 'viewof sntPrice') {\n return new Inspector(this.sntPriceRef.current);\n }\n if (name === 'viewof lockedUsdBar') {\n return new Inspector(this.lockedUsdBarRef.current);\n }\n return null;\n });\n }\n\n numberUserInputRef = React.createRef();\n\n userGrowthRateRef = React.createRef();\n\n userChurnRateRef = React.createRef();\n\n userbarRef = React.createRef();\n\n userConversionRef = React.createRef();\n\n removalRateRef = React.createRef();\n\n ensUserbarRef = React.createRef();\n\n amountDepositSntRef = React.createRef();\n\n lockedSntBarRef = React.createRef();\n\n sntPriceRef = React.createRef();\n\n lockedUsdBarRef = React.createRef();\n\n render() {\n return (\n
\n

Introduction

\n

\n The Status Network has a utility token, the Status Network Token\n (SNT). What does that even mean? What utilities does it have and how\n do their uses affect the rest of the ecosystem? Does it have an impact\n on valuation? What even is valuation of a utility token?\n

\n

\n These questions are hard, and there does not seem to be sufficient\n academic answers to them, for very good reasons. The technology\n enabling a “utility token” is new, and transcendent of many older\n technologies. This consequently means the models used to evaluate the\n older technologies will never be able to completely describe the newer\n ones. We, as a community, need to build new ones and evaluate them\n rigorously.\n

\n

\n There is currently quite a bit of work being done in this field, but\n it is mostly for investment firms to make appropriate calls on buying,\n selling, and holding various project’s tokens. While this is\n drastically important for growth and project funding, we at Status\n feel that there are other, less financially motivated reasons to do\n this work which require a different approach. More specifically, any\n utility token needs to be able to objectively evaluate various\n features and utilities of their platform, and how they affect the\n entirety of their ecosystem. For instance, we need to be able to ask\n questions like the following: “How can we objectively measure the use\n of SNT if it gets used in feature X as a function of our user base?\n Based on that measurement, is its development cost justified, or\n should we focus on something else?”\n

\n

\n We will be launching Status with the following SNT use-cases, as\n described in the{' '}\n whitepaper:\n

    \n
  • Teller Network
  • \n
  • Tribute to Talk
  • \n
  • ENS Usernames
  • \n
  • Sticker Market
  • \n
  • SNT Curated Dapp Store
  • \n
  • Network Incentivization (may not be available at launch)
  • \n
\n

\n

\n Each of these use-cases are run by the SNT token, but in very\n different ways. This means each will have differing effects on the\n supply and demand of the token itself. It doesn’t stop there, as\n Status is an open and permissionless platform for developers to build\n on and use, which means that anyone can build SNT use-cases that\n affect the overall supply and demand. But how do we know what effect a\n utility has? Where do we go to try and evaluate its usefulness?\n

\n

\n To this end, we would like to start a blog series detailing some of\n the research we are doing within Status to objectively evaluate the\n flow of SNT, the potential effects of our implemented (and upcoming)\n SNT use cases within Status, and how our potential user growth changes\n things. This work will encompass traditional economic and portfolio\n theory, work currently being done in crypto-economics, and novel\n methodology. That means a part of this endeavor is an attempt to get\n peer review and evaluation of what we do by you, the community!\n

\n

\n Let’s start with the ENS naming system. In Status, for a little SNT,\n you can register your username on the Ethereum Name System (ENS) so\n others can find you easily. In order for us to apply models or\n understand the economics of a use case, we first have to understand\n what it is, how it works, and how it fits within the Status ecosystem.\n Let’s start by breaking down how ENS usernames work within Status:\n

    \n
  1. User selects a unique username, {``}
  2. \n
  3. User deposits 10 SNT into the ENS username dapp
  4. \n
  5. \n User is granted sole control over the subdomain {``}\n .stateofus.eth for 1 year\n
  6. \n
  7. \n User is able to get deposited funds after this yearly period, and\n release the username back into available names.\n
  8. \n
  9. \n User is now searchable within Status as {``} or\n {``}.stateofus.eth outside of the Status app.\n
  10. \n
\n

\n

\n The use case and token flow are both relatively simple, but what are\n the effects on the ecosystem? Let’s first try and model what value\n this could potentially accrue over time. We can start by picking out\n the variables in this process to see how things depend on each other.\n Furthermore, the above values are what we currently use, but in terms\n of modeling, we should turn those into variables that allow us to see\n what effect each has on the overall mechanism. This can help inform us\n (and you) on appropriate choices.\n

\n

Disucssion of variables

\n

Number of Users

\n

\n It is clear that this all depends on how many users Status has in the\n app. If they are not using Status, then they won’t use the feature.\n This is our base metric, and we will model it using compounding growth\n and loss. We can start with a number of users that are using the app,\n and set additional growth and loss variables (in percentages) that\n define how this number changes over the next 10 years. This means that\n every year, we expect a certain percentage change in users based on\n the numbers of the previous year. Depending on how you set those\n percentages, the number of users can grow very rapidly! Go ahead and\n play with the following variables to see how the number of users\n change over the years.\n

\n
\n
\n
\n
\n

Conversion rate of users to ENS username

\n

\n Ok cool. We have our user base locked and loaded for the next 10\n years, but not everyone is going to register an ENS username. We can\n brand it, make it simple, and incentivize people to do it but the\n reality is that that number will never be 100%. So the number of\n people that DO decide to register an ENS username is what we want. We\n get this number by multiplying the total number of users by the\n adoption conversion rate, which is another variable.\n

\n

\n Now not all users will keep their usernames. Some people will remove\n their deposit after the year and bring their SNT back into\n circulation. Some people will leave Status altogether. If they never\n manually release their SNT from the ENS username contract, it can be\n considered locked forever. For this, we will continue to consider them\n users because from the contract's perspective, they are\n indestiguishable. We’ll model the people who release their username\n with another conversion factor. Go ahead and change these variables\n and see how the following graph changes.\n

\n
\n
\n
\n

Amount of SNT required to deposit

\n

\n Now we have the amount of users that will (or have) use(d) this\n utility. Let’s figure out how that translates to SNT. In order to do\n that, we have another variable to define: The amount of SNT required\n to register an ENS username. By multiplying each user by this\n variable, we can show how much SNT is being locked up every year which\n effectively takes it out of the circulating supply, i.e.\n

\n

\n \n {\n '$$N_{\\\\text{SNT locked}} = N_{\\\\text{registrations}} * N_{\\\\text{SNT per registration}}$$'\n }\n \n

\n
\n
\n

How to assign value to all of this?

\n
\n
\n

Thoughts and Conclusions

\n

\n So what have we learned from all of this? How can we change the model\n to better fit reality? Are their any actionable conclusions around ENS\n usernames that come from this information?\n

\n
\n );\n }\n}\n\nexport default hot(App);\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App.jsx';\n\nReactDOM.render(, document.getElementById('app'));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/build/js/runtime~main.e6dd4b6bdd4350738cf1.js b/build/js/runtime~main.e6dd4b6bdd4350738cf1.js new file mode 100644 index 0000000..13f2090 --- /dev/null +++ b/build/js/runtime~main.e6dd4b6bdd4350738cf1.js @@ -0,0 +1,2 @@ +!function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c1){for(var u=new Array(o),s=0;s\n \n ",f.appendChild(document.createTextNode(`${l}${a?" [":" {"}`)),f.addEventListener("mouseup",function(t){t.stopPropagation(),K(c,M(e,null,n))}),u=u(e);for(let e=0;!(s=u.next()).done&&e<20;++e)c.appendChild(s.value);if(!s.done){const e=c.appendChild(document.createElement("a"));e.className="observablehq--field",e.style.display="block",e.appendChild(document.createTextNode(" … more")),e.addEventListener("mouseup",function(e){e.stopPropagation(),c.insertBefore(s.value,c.lastChild.previousSibling);for(let e=0;!(s=u.next()).done&&e<19;++e)c.insertBefore(s.value,c.lastChild.previousSibling);s.done&&c.removeChild(c.lastChild.previousSibling),r(c,"load")})}return c.appendChild(document.createTextNode(a?"]":"}")),c}function*b(e){for(const[t,n]of e)yield S(t,n);yield*x(e)}function*y(e){for(const t of e)yield T(t);yield*x(e)}function*w(e){for(let t=0,n=e.length;t ")),n.appendChild(Q(t)),n}function T(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(Q(e)),t}function _(e){const t=window.getSelection();return"Range"===t.type&&(t.containsNode(e,!0)||t.anchorNode.isSelfOrDescendant(e)||t.focusNode.isSelfOrDescendant(e))}function M(e,t,n){const r=i(e);let a,l,u;if(e instanceof Map?(a=`Map(${e.size})`,l=C):e instanceof Set?(a=`Set(${e.size})`,l=E):r?(a=`${e.constructor.name}(${e.length})`,l=z):(a=m(e),l=N),t){const t=document.createElement("span");return t.className="observablehq--shallow",n&&t.appendChild(o(n)),t.appendChild(document.createTextNode(a)),t.addEventListener("mouseup",function(n){_(t)||(n.stopPropagation(),K(t,M(e)))}),t}const s=document.createElement("span");s.className="observablehq--collapsed",n&&s.appendChild(o(n));const c=s.appendChild(document.createElement("a"));c.innerHTML="\n \n ",c.appendChild(document.createTextNode(`${a}${r?" [":" {"}`)),s.addEventListener("mouseup",function(t){_(s)||(t.stopPropagation(),K(s,g(e,0,n)))},!0),l=l(e);for(let e=0;!(u=l.next()).done&&e<20;++e)e>0&&s.appendChild(document.createTextNode(", ")),s.appendChild(u.value);return u.done||s.appendChild(document.createTextNode(", …")),s.appendChild(document.createTextNode(r?"]":"}")),s}function*C(e){for(const[t,n]of e)yield A(t,n);yield*N(e)}function*E(e){for(const t of e)yield Q(t,!0);yield*N(e)}function*z(e){let t=-1,n=0;for(const r=e.length;nt+1&&(yield O(n-t-1)),yield Q(v(e,n),!0),t=n);n>t+1&&(yield O(n-t-1));for(const t in e)!a(t)&&h(e,t)&&(yield P(t,v(e,t),"observablehq--key"));for(const t of p(e))yield P(u(t),v(e,t),"observablehq--symbol")}function*N(e){for(const t in e)h(e,t)&&(yield P(t,v(e,t),"observablehq--key"));for(const t of p(e))yield P(u(t),v(e,t),"observablehq--symbol")}function O(e){const t=document.createElement("span");return t.className="observablehq--empty",t.textContent=1===e?"empty":`empty × ${e}`,t}function P(e,t,n){const r=document.createDocumentFragment(),i=r.appendChild(document.createElement("span"));return i.className=n,i.textContent=e,r.appendChild(document.createTextNode(": ")),r.appendChild(Q(t,!0)),r}function A(e,t){const n=document.createDocumentFragment();return n.appendChild(Q(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(Q(t,!0)),n}function j(e,t){var n=e+"",r=n.length;return r9999?"+"+j(e,6):j(e,4)}var R=Error.prototype.toString;var I=RegExp.prototype.toString;const L=20;function q(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,B)}function B(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}function F(e,t){for(var n=0;t.exec(e);)++n;return n}var U=Function.prototype.toString,H={prefix:"async ƒ"},$={prefix:"async ƒ*"},V={prefix:"class"},W={prefix:"ƒ"},G={prefix:"ƒ*"};function Y(e,t,n){var r=document.createElement("span");r.className="observablehq--function",n&&r.appendChild(o(n));var i=r.appendChild(document.createElement("span"));return i.className="observablehq--keyword",i.textContent=e.prefix,r.appendChild(document.createTextNode(t)),r}const{prototype:{toString:X}}=Object;function Q(e,t,n,r){let i=typeof e;switch(i){case"boolean":case"undefined":e+="";break;case"number":e=0===e&&1/e<0?"-0":e+"";break;case"bigint":e+="n";break;case"symbol":e=u(e);break;case"function":return function(e,t){var n,r,i=U.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=H;break;case"AsyncGeneratorFunction":n=$;break;case"GeneratorFunction":n=G;break;default:n=/^class\b/.test(i)?V:W}return n===V?Y(n,"",t):(r=/^(?:async\s*)?(\w+)\s*=>/.exec(i))?Y(n,"("+r[1]+")",t):(r=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(i))?Y(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):(r=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(i))?Y(n,r[1]?"("+r[1].replace(/\s*,\s*/g,", ")+")":"()",t):Y(n,"(…)",t)}(e,r);case"string":return function(e,t,n,r){if(!1===t){if(F(e,/["\n]/g)<=F(e,/`|\${/g)){const t=document.createElement("span");r&&t.appendChild(o(r));const n=t.appendChild(document.createElement("span"));return n.className="observablehq--string",n.textContent=JSON.stringify(e),t}const i=e.split("\n");if(i.length>L&&!n){const n=document.createElement("div");r&&n.appendChild(o(r));const a=n.appendChild(document.createElement("span"));a.className="observablehq--string",a.textContent="`"+q(i.slice(0,L).join("\n"));const l=n.appendChild(document.createElement("span")),u=i.length-L;return l.textContent=`Show ${u} truncated line${u>1?"s":""}`,l.className="observablehq--string-expand",l.addEventListener("mouseup",function(i){i.stopPropagation(),K(n,Q(e,t,!0,r))}),n}const a=document.createElement("span");r&&a.appendChild(o(r));const l=a.appendChild(document.createElement("span"));return l.className=`observablehq--string${n?" observablehq--expanded":""}`,l.textContent="`"+q(e)+"`",a}const i=document.createElement("span");r&&i.appendChild(o(r));const a=i.appendChild(document.createElement("span"));return a.className="observablehq--string",a.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}…${e.slice(-49)}`:e),i}(e,t,n,r);default:if(null===e){i=null,e="null";break}if(e instanceof Date){i="date",a=e,e=isNaN(a)?"Invalid Date":function(e){return 0===e.getUTCMilliseconds()&&0===e.getUTCSeconds()&&0===e.getUTCMinutes()&&0===e.getUTCHours()}(a)?D(a.getUTCFullYear())+"-"+j(a.getUTCMonth()+1,2)+"-"+j(a.getUTCDate(),2):D(a.getFullYear())+"-"+j(a.getMonth()+1,2)+"-"+j(a.getDate(),2)+"T"+j(a.getHours(),2)+":"+j(a.getMinutes(),2)+(a.getMilliseconds()?":"+j(a.getSeconds(),2)+"."+j(a.getMilliseconds(),3):a.getSeconds()?":"+j(a.getSeconds(),2):"");break}if(e===d){i="forbidden",e="[forbidden]";break}switch(X.call(e)){case"[object RegExp]":i="regexp",e=function(e){return I.call(e)}(e);break;case"[object Error]":case"[object DOMException]":i="error",e=function(e){return e.stack||R.call(e)}(e);break;default:return(n?g:M)(e,t,r)}}var a;const l=document.createElement("span");r&&l.appendChild(o(r));const s=l.appendChild(document.createElement("span"));return s.className=`observablehq--${i}`,s.textContent=e,l}function K(e,t){e.classList.contains("observablehq--inspect")&&t.classList.add("observablehq--inspect"),e.parentNode.replaceChild(t,e),r(t,"load")}const Z=/\s+\(\d+:\d+\)$/m;class J{constructor(e){if(!e)throw new Error("invalid node");this._node=e,e.classList.add("observablehq")}pending(){const{_node:e}=this;e.classList.remove("observablehq--error"),e.classList.add("observablehq--running")}fulfilled(e,t){const{_node:n}=this;if((!(e instanceof Element||e instanceof Text)||e.parentNode&&e.parentNode!==n)&&(e=Q(e,!1,n.firstChild&&n.firstChild.classList&&n.firstChild.classList.contains("observablehq--expanded"),t)).classList.add("observablehq--inspect"),n.classList.remove("observablehq--running","observablehq--error"),n.firstChild!==e)if(n.firstChild){for(;n.lastChild!==n.firstChild;)n.removeChild(n.lastChild);n.replaceChild(e,n.firstChild)}else n.appendChild(e);r(n,"update")}rejected(e,t){const{_node:n}=this;for(n.classList.remove("observablehq--running"),n.classList.add("observablehq--error");n.lastChild;)n.removeChild(n.lastChild);var i=document.createElement("div");i.className="observablehq--inspect",t&&i.appendChild(o(t)),i.appendChild(document.createTextNode((e+"").replace(Z,""))),n.appendChild(i),r(n,"error",{error:e})}}J.into=function(e){if("string"==typeof e&&null==(e=document.querySelector(e)))throw new Error("container not found");return function(){return new J(e.appendChild(document.createElement("div")))}};n(7),n(4);var ee=n(6);n.d(t,"a",function(){return J}),n.d(t,"b",function(){return ee.a})},function(e,t,n){"use strict";function r(e,t){this.message=e+"",this.input=t}n.d(t,"a",function(){return r}),r.prototype=Object.create(Error.prototype),r.prototype.name="RuntimeError",r.prototype.constructor=r},function(e,t,n){"use strict";t.a=function(){}},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return f}),n.d(t,"c",function(){return d}),n.d(t,"a",function(){return p});var r=n(7),i=n(4),a=n(14),o=n(15),l=n(20),u=n(5),s=n(2);const c="function"==typeof requestAnimationFrame?requestAnimationFrame:e;var f={},d={};function p(e=new r.a,t=function(e){return window[e]}){var n=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_computing:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:n},_global:{value:t}}),e)for(var i in e)new s.d(s.b,n).define(i,[],e[i])}function h(e){++e._indegree}function m(e){return e._promise.catch(e._rejector)}function v(e){return new Promise(function(t){e._invalidate=t})}function g(e,t){let n,r,i="function"==typeof IntersectionObserver&&t._observer&&t._observer._node,a=!i,o=u.a,l=u.a;return i&&((r=new IntersectionObserver(([e])=>(a=e.isIntersecting)&&(n=null,o()))).observe(i),e.then(()=>(r.disconnect(),r=null,l()))),function(e){return a?Promise.resolve(e):r?(n||(n=new Promise((e,t)=>(o=e,l=t))),n.then(()=>e)):Promise.reject()}}function b(e){e._invalidate(),e._invalidate=u.a,e._pending();var t=e._value,n=++e._version,r=null,i=e._promise=Promise.all(e._inputs.map(m)).then(function(i){if(e._version===n){for(var a=0,o=i.length;at._reachable?this._updates.add(t):n{e._invalidate(),e._version=NaN})},writable:!0,configurable:!0},module:{value:function(e,t=u.a){if(void 0===e)return new l.a(this);let n=this._modules.get(e);return n||(this._modules.set(e,n=e(this,t)),n)},writable:!0,configurable:!0}})}).call(this,n(25).setImmediate)},function(e,t,n){"use strict";var r=function(e){return function(){return e}},i={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},a=0;function o(e){this.id=e,this.href=window.location.href+"#"+e}o.prototype.toString=function(){return"url("+this.href+")"};var l={canvas:function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},context2d:function(e,t,n){null==n&&(n=devicePixelRatio);var r=document.createElement("canvas");r.width=e*n,r.height=t*n,r.style.width=e+"px";var i=r.getContext("2d");return i.scale(n,n),i},download:function(e,t="untitled",n="Save"){const r=document.createElement("a"),i=r.appendChild(document.createElement("button"));async function a(){await new Promise(requestAnimationFrame),URL.revokeObjectURL(r.href),r.removeAttribute("href"),i.textContent=n,i.disabled=!1}return i.textContent=n,r.download=t,r.onclick=(async t=>{if(i.disabled=!0,r.href)return a();i.textContent="Saving…";try{const t=await("function"==typeof e?e():e);i.textContent="Download",r.href=URL.createObjectURL(t)}catch(e){i.textContent=n}if(t.eventPhase)return a();i.disabled=!1}),r},element:function(e,t){var n,r=e+="",a=r.indexOf(":");a>=0&&"xmlns"!==(r=e.slice(0,a))&&(e=e.slice(a+1));var o=i.hasOwnProperty(r)?document.createElementNS(i[r],e):document.createElement(e);if(t)for(var l in t)a=(r=l).indexOf(":"),n=t[l],a>=0&&"xmlns"!==(r=l.slice(0,a))&&(l=l.slice(a+1)),i.hasOwnProperty(r)?o.setAttributeNS(i[r],l,n):o.setAttribute(l,n);return o},input:function(e){var t=document.createElement("input");return null!=e&&(t.type=e),t},range:function(e,t,n){1===arguments.length&&(t=e,e=null);var r=document.createElement("input");return r.min=e=null==e?0:+e,r.max=t=null==t?1:+t,r.step=null==n?"any":n=+n,r.type="range",r},select:function(e){var t=document.createElement("select");return Array.prototype.forEach.call(e,function(e){var n=document.createElement("option");n.value=n.textContent=e,t.appendChild(n)}),t},svg:function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("viewBox",[0,0,e,t]),n.setAttribute("width",e),n.setAttribute("height",t),n},text:function(e){return document.createTextNode(e)},uid:function(e){return new o("O-"+(null==e?"":e+"-")+ ++a)}},u={buffer:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsArrayBuffer(e)})},text:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsText(e)})},url:function(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsDataURL(e)})}};function s(){return this}function c(e,t){let n=!1;return{[Symbol.iterator]:s,next:()=>n?{done:!0}:(n=!0,{done:!1,value:e}),return:()=>(n=!0,t(e),{done:!0}),throw:()=>({done:n=!0})}}var f=function(e){let t,n,r=!1;const i=e(function(e){n?(n(e),n=null):r=!0;return t=e});return{[Symbol.iterator]:s,throw:()=>({done:!0}),return:()=>(null!=i&&i(),{done:!0}),next:function(){return{done:!1,value:r?(r=!1,Promise.resolve(t)):new Promise(e=>n=e)}}}};function d(e){switch(e.type){case"range":case"number":return e.valueAsNumber;case"date":return e.valueAsDate;case"checkbox":return e.checked;case"file":return e.multiple?e.files:e.files[0];default:return e.value}}var p={disposable:c,filter:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)t(n.value,++r)&&(yield n.value)},input:function(e){return f(function(t){var n=function(e){switch(e.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}(e),r=d(e);function i(){t(d(e))}return e.addEventListener(n,i),void 0!==r&&t(r),function(){e.removeEventListener(n,i)}})},map:function*(e,t){for(var n,r=-1;!(n=e.next()).done;)yield t(n.value,++r)},observe:f,queue:function(e){let t;const n=[],r=e(function(e){return n.push(e),t&&(t(n.shift()),t=null),e});return{[Symbol.iterator]:s,throw:()=>({done:!0}),return:()=>(null!=r&&r(),{done:!0}),next:function(){return{done:!1,value:n.length?Promise.resolve(n.shift()):new Promise(e=>t=e)}}}},range:function*(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n));++r{n.terminate(),URL.revokeObjectURL(t)})}};function h(e,t){return function(n){var r,i,a,o,l,u,s,c,f=n[0],d=[],p=null,h=-1;for(l=1,u=arguments.length;l0){for(a=new Array(h),o=document.createTreeWalker(p,NodeFilter.SHOW_COMMENT,null,!1);o.nextNode();)i=o.currentNode,/^o:/.test(i.nodeValue)&&(a[+i.nodeValue.slice(2)]=i);for(l=0;l[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:C,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};function g(e){this.tokens=[],this.tokens.links={},this.options=e||z.defaults,this.rules=v.normal,this.options.gfm&&(this.options.tables?this.rules=v.tables:this.rules=v.gfm)}v.bullet=/(?:[*+-]|\d+\.)/,v.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,v.item=S(v.item,"gm")(/bull/g,v.bullet)(),v.list=S(v.list)(/bull/g,v.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+v.def.source+")")(),v.blockquote=S(v.blockquote)("def",v.def)(),v._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",v.html=S(v.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,v._tag)(),v.paragraph=S(v.paragraph)("hr",v.hr)("heading",v.heading)("lheading",v.lheading)("blockquote",v.blockquote)("tag","<"+v._tag)("def",v.def)(),v.normal=E({},v),v.gfm=E({},v.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),v.gfm.paragraph=S(v.paragraph)("(?!","(?!"+v.gfm.fences.source.replace("\\1","\\2")+"|"+v.list.source.replace("\\1","\\3")+"|")(),v.tables=E({},v.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),g.rules=v,g.lex=function(e,t){return new g(t).lex(e)},g.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},g.prototype.token=function(e,t,n){var r,i,a,o,l,u,s,c,f;for(e=e.replace(/^ +$/gm,"");e;)if((a=this.rules.newline.exec(e))&&(e=e.substring(a[0].length),a[0].length>1&&this.tokens.push({type:"space"})),a=this.rules.code.exec(e))e=e.substring(a[0].length),a=a[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?a:a.replace(/\n+$/,"")});else if(a=this.rules.fences.exec(e))e=e.substring(a[0].length),this.tokens.push({type:"code",lang:a[2],text:a[3]||""});else if(a=this.rules.heading.exec(e))e=e.substring(a[0].length),this.tokens.push({type:"heading",depth:a[1].length,text:a[2]});else if(t&&(a=this.rules.nptable.exec(e))){for(e=e.substring(a[0].length),u={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(a,t,!0),this.tokens.push({type:"blockquote_end"});else if(a=this.rules.list.exec(e)){for(e=e.substring(a[0].length),o=a[2],this.tokens.push({type:"list_start",ordered:o.length>1}),r=!1,f=(a=a[0].match(this.rules.item)).length,c=0;c1&&l.length>1||(e=a.slice(c+1).join("\n")+e,c=f-1)),i=r||/\n\n(?!\s*$)/.test(u),c!==f-1&&(r="\n"===u.charAt(u.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(u,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(a=this.rules.html.exec(e))e=e.substring(a[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===a[1]||"script"===a[1]||"style"===a[1]),text:a[0]});else if(!n&&t&&(a=this.rules.def.exec(e)))e=e.substring(a[0].length),this.tokens.links[a[1].toLowerCase()]={href:a[2],title:a[3]};else if(t&&(a=this.rules.table.exec(e))){for(e=e.substring(a[0].length),u={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ <>]+(@|:\/)[^ <>]+)>/,url:C,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:C,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function S(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=(i=i.source||i).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function T(e,t){return _[" "+e]||(/^[^:]+:\/*[^\/]*$/.test(e)?_[" "+e]=e+"/":_[" "+e]=e.replace(/[^\/]*$/,"")),e=_[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^\/]*)[\s\S]*/,"$1")+t:e+t}b._inside=/(?:\[[^\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,b._href=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,b.link=S(b.link)("inside",b._inside)("href",b._href)(),b.reflink=S(b.reflink)("inside",b._inside)(),b.normal=E({},b),b.pedantic=E({},b.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),b.gfm=E({},b.normal,{escape:S(b.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:S(b.text)("]|","~]|")("|","|https?://|")()}),b.breaks=E({},b.gfm,{br:S(b.br)("{2,}","*")(),text:S(b.gfm.text)("{2,}","*")()}),y.rules=b,y.output=function(e,t,n){return new y(t,n).output(e)},y.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=k(":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1])),r=this.mangle("mailto:")+n):r=n=k(i[1]),a+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):k(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,a+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=this.renderer.codespan(k(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=this.renderer.text(k(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),r=n=k(i[1]),a+=this.renderer.link(r,null,n);return a},y.prototype.outputLink=function(e,t){var n=k(t.href),r=t.title?k(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,k(e[1]))},y.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},y.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},w.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:k(e,!0))+"\n
\n":"
"+(n?e:k(e,!0))+"\n
"},w.prototype.blockquote=function(e){return"
\n"+e+"
\n"},w.prototype.html=function(e){return e},w.prototype.heading=function(e,t,n){return"'+e+"\n"},w.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},w.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},w.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},w.prototype.paragraph=function(e){return"

    "+e+"

    \n"},w.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},w.prototype.tablerow=function(e){return"\n"+e+"\n"},w.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},w.prototype.strong=function(e){return""+e+""},w.prototype.em=function(e){return""+e+""},w.prototype.codespan=function(e){return""+e+""},w.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},w.prototype.del=function(e){return""+e+""},w.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent((i=e,i.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}var i;this.options.baseUrl&&!M.test(e)&&(e=T(this.options.baseUrl,e));var a='
    "},w.prototype.image=function(e,t,n){this.options.baseUrl&&!M.test(e)&&(e=T(this.options.baseUrl,e));var r=''+n+'":">"},w.prototype.text=function(e){return e},x.parse=function(e,t,n){return new x(t,n).parse(e)},x.prototype.parse=function(e){this.inline=new y(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},x.prototype.next=function(){return this.token=this.tokens.pop()},x.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},x.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},x.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",a="";for(n="",e=0;eAn error occurred:

    "+k(e.message+"",!0)+"
    ";throw e}}C.exec=C,z.options=z.setOptions=function(e){return E(z.defaults,e),z},z.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new w,xhtml:!1,baseUrl:null},z.Parser=x,z.parser=x.parse,z.Renderer=w,z.Lexer=g,z.lexer=g.lex,z.InlineLexer=y,z.inlineLexer=y.output,z.parse=z;var N=z;const O="https://cdn.jsdelivr.net/npm/@observablehq/highlight.js@2.0.0/";var P=function(e){return function(){return h(function(t){var n=document.createElement("div");n.innerHTML=N(t,{langPrefix:""}).trim();var r=n.querySelectorAll("pre code[class]");return r.length>0&&e(O+"highlight.min.js").then(function(t){r.forEach(function(n){function r(){t.highlightBlock(n),n.parentNode.classList.add("observablehq--md-pre")}t.getLanguage(n.className)?r():e(O+"async-languages/index.js").then(r=>{if(r.has(n.className))return e(O+"async-languages/"+r.get(n.className)).then(e=>{t.registerLanguage(n.className,e)})}).then(r,r)})}),n},function(){return document.createElement("div")})}};function A(e){let t;Object.defineProperties(this,{generator:{value:f(e=>void(t=e))},value:{get:()=>e,set:n=>t(e=n)}}),void 0!==e&&t(e)}var j=function*(){for(;;)yield Date.now()},D=new Map;function R(e,t){var n;return(n=D.get(e=+e))?n.then(r(t)):(n=Date.now())>=e?Promise.resolve(t):function(e,t){var n=new Promise(function(n){D.delete(t);var r=t-e;if(!(r>0))throw new Error("invalid time");if(r>2147483647)throw new Error("too long to wait");setTimeout(n,r)});return D.set(t,n),n}(n,e).then(r(t))}var I={delay:function(e,t){return new Promise(function(n){setTimeout(function(){n(t)},e)})},tick:function(e,t){return R(Math.ceil((Date.now()+1)/e)*e,t)},when:R};function L(e,t){if(/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new Error("illegal name");return"https://unpkg.com/"+e}const q=new Map,B=[],F=B.map,U=B.some,H=B.hasOwnProperty,$="https://cdn.jsdelivr.net/npm/",V=/^((?:@[^\/@]+\/)?[^\/@]+)(?:@([^\/]+))?(?:\/(.*))?$/,W=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/,G=/\.[^\/]*$/,Y=["unpkg","jsdelivr","browser","main"];class X extends Error{constructor(e){super(e)}}function Q(e){const t=V.exec(e);return t&&{name:t[1],version:t[2],path:t[3]}}function K(e){const t=`${$}${e.name}${e.version?`@${e.version}`:""}/package.json`;let n=q.get(t);return n||q.set(t,n=fetch(t).then(e=>{if(!e.ok)throw new X("unable to load package.json");return e.redirected&&!q.has(e.url)&&q.set(e.url,n),e.json()})),n}X.prototype.name=X.name;const Z=J(async function(e,t){if(e.startsWith($)&&(e=e.substring($.length)),/^(\w+:)|\/\//i.test(e))return e;if(/^[.]{0,2}\//i.test(e))return new URL(e,null==t?location:t).href;if(!e.length||/^[\s._]/.test(e)||/\s$/.test(e))throw new X("illegal name");const n=Q(e);if(!n)return`${$}${e}`;if(!n.version&&null!=t&&t.startsWith($)){const e=await K(Q(t.substring($.length)));n.version=e.dependencies&&e.dependencies[n.name]||e.peerDependencies&&e.peerDependencies[n.name]}if(n.path&&!G.test(n.path)&&(n.path+=".js"),n.path&&n.version&&W.test(n.version))return`${$}${n.name}@${n.version}/${n.path}`;const r=await K(n);return`${$}${r.name}@${r.version}/${n.path||function(e){for(const t of Y){const n=e[t];if("string"==typeof n)return G.test(n)?n:`${n}.js`}}(r)||"index.js"}`});function J(e){const t=new Map,n=i(null);function r(e){if("string"!=typeof e)return e;let n=t.get(e);return n||t.set(e,n=new Promise((t,n)=>{const r=document.createElement("script");r.onload=(()=>{try{t(B.pop()(i(e)))}catch(e){n(new X("invalid module"))}r.remove()}),r.onerror=(()=>{n(new X("unable to load module")),r.remove()}),r.async=!0,r.src=e,window.define=re,document.head.appendChild(r)})),n}function i(t){return n=>Promise.resolve(e(n,t)).then(r)}function a(e){return arguments.length>1?Promise.all(F.call(arguments,n)).then(ee):n(e)}return a.alias=function(t){return J((n,r)=>n in t&&(r=null,"string"!=typeof(n=t[n]))?n:e(n,r))},a.resolve=e,a}function ee(e){const t={};for(const n of e)for(const e in n)H.call(n,e)&&(null==n[e]?Object.defineProperty(t,e,{get:te(n,e)}):t[e]=n[e]);return t}function te(e,t){return()=>e[t]}function ne(e){return e+""=="exports"}function re(e,t,n){const r=arguments.length;r<2?(n=e,t=[]):r<3&&(n=t,t="string"==typeof e?[]:e),B.push(U.call(t,ne)?e=>{const r={};return Promise.all(F.call(t,t=>ne(t+="")?r:e(t))).then(e=>(n.apply(null,e),r))}:e=>Promise.all(F.call(t,e)).then(e=>"function"==typeof n?n.apply(null,e):n))}re.amd={};var ie=function(e){return null==e?Z:J(e)},ae=h(function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.innerHTML=e.trim(),t},function(){return document.createElementNS("http://www.w3.org/2000/svg","g")}),oe=String.raw;function le(e){return new Promise(function(t,n){var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onerror=n,r.onload=t,document.head.appendChild(r)})}var ue=function(e){return function(){return Promise.all([e("@observablehq/katex@0.10.1/dist/katex.min.js"),e.resolve("@observablehq/katex@0.10.1/dist/katex.min.css").then(le)]).then(function(e){var t=e[0],n=r();function r(e){return function(){var n=document.createElement("div");return t.render(oe.apply(String,arguments),n,e),n.removeChild(n.firstChild)}}return n.options=r,n.block=r({displayMode:!0}),n})}},se=function(){return f(function(e){var t=e(document.body.clientWidth);function n(){var n=document.body.clientWidth;n!==t&&e(t=n)}return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}})};function ce(e){const t=ie(e);Object.defineProperties(this,{DOM:{value:l,writable:!0,enumerable:!0},Files:{value:u,writable:!0,enumerable:!0},Generators:{value:p,writable:!0,enumerable:!0},html:{value:r(m),writable:!0,enumerable:!0},md:{value:P(t),writable:!0,enumerable:!0},Mutable:{value:r(A),writable:!0,enumerable:!0},now:{value:j,writable:!0,enumerable:!0},Promises:{value:I,writable:!0,enumerable:!0},require:{value:r(t),writable:!0,enumerable:!0},resolve:{value:r(L),writable:!0,enumerable:!0},svg:{value:r(ae),writable:!0,enumerable:!0},tex:{value:ue(t),writable:!0,enumerable:!0},width:{value:se,writable:!0,enumerable:!0}})}n.d(t,"a",function(){return ce})},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return a});var r=Array.prototype,i=r.map,a=r.forEach},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t,n){"use strict";t.a=function(e){return e}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u]+)>)/gi,"");var n=/\$\$[\s\S]+?\$\$|\$[\s\S]+?\$/g,i=[],a=e.match(n),o=e.split(n);a?o.forEach(function(e,t){var n;i.push({string:e,type:"text"}),a[t]&&i.push({string:(n=a[t],n="$"===n[1]?n.slice(2,-2):n.slice(1,-1)),type:"latex"})}):i.push({string:e,type:"text"});return i.map(function(e){return"text"===e.type?e.string:function(e){var n=void 0;try{n=r.default.renderToString(e,t)}catch(t){return console.error("couldn`t convert string",e),e}return n}(e.string)}).join(" ")},u=function(e){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i.default.Component),t(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.displayMode;return i.default.createElement("span",{dangerouslySetInnerHTML:{__html:l(t,{displayMode:n})}})}}]),n}();u.propTypes={children:a.default.string,displayMode:a.default.bool},u.defaultProps={children:"",displayMode:!1},e&&e.exports?e.exports=u:window.Latex=u}).call(this,n(28)(e))},,function(e,t,n){t.hot=function(e){return e}},function(e,t,n){"use strict";function r(e,t){const n=e.module();return n.variable(t()).define(["md"],function(e){return e`# Inputs +
    *a.k.a “The Grand Native Inputs Bazaar”*
    + + + +A collection of assorted fancy inputs, odds and ends — with which to produce values to feed your burgeoning sketches. All inputs support optional **titles** and **descriptions**; where it makes sense, inputs also support a **submit** option, which allows you to prevent the value from updating until the input has been finalized. + +Wares we have on offer: + * [\`slider\`](#sliderDemo) + * [\`button\`](#buttonDemo) + * [\`select\`](#selectDemo) + * [\`color\`](#colorDemo) + * [\`coordinates\`](#coordinatesDemo) + * [\`worldMapCoordinates\`](#worldMapCoordinatesDemo) + * [\`usaMapCoordinates\`](#usaMapCoordinatesDemo) + * [\`date\`](#dateDemo) + * [\`time\`](#timeDemo) + * [\`file\`](#fileDemo) + * [\`text\`](#textDemo) + * [\`textarea\`](#textareaDemo) + * [\`radio\`](#radioDemo) + * [\`checkbox\`](#checkboxDemo) + * [\`number\`](#numberDemo) + * [\`password\`](#passwordDemo) + +#### Friends & Family: + +- For fully custom forms, combining various inputs into a single reactive cell, try [@mbostock/form-input](/@mbostock/form-input). + +- For data-driven range sliders, displaying a histogram of the distribution and allowing you to filter out a range of a dataset along a given attribute, try: [@bumbeishvili/data-driven-range-sliders](/@bumbeishvili/data-driven-range-sliders), or [@trebor/snapping-histogram-slider](/@trebor/snapping-histogram-slider) + +- For a ternary plot input, describing the percentages of a whole composed of exactly three things, give [@yurivish/ternary-slider](/@yurivish/ternary-slider) a try. + +*If you have any improvements for the bazaar, [please make your change in a fork and send it to me as a suggestion.](https://observablehq.com/@observablehq/suggestions-and-comments)*`}),n.variable(t("sliderDemo")).define("sliderDemo",["md"],function(e){return e`--- +## Sliders + +~~~js +import {slider} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof a")).define("viewof a",["slider"],function(e){return e()}),n.variable(t("a")).define("a",["Generators","viewof a"],(e,t)=>e.input(t)),n.variable(t("viewof a1")).define("viewof a1",["slider"],function(e){return e({min:0,max:1,step:.01,format:".0%",description:"Zero to one, formatted as a percentage"})}),n.variable(t("a1")).define("a1",["Generators","viewof a1"],(e,t)=>e.input(t)),n.variable(t("viewof a1_1")).define("viewof a1_1",["slider"],function(e){return e({min:0,max:1,step:.01,format:e=>`${Math.round(100*e)} per cent`,description:"Zero to one, formatted with a custom function"})}),n.variable(t("a1_1")).define("a1_1",["Generators","viewof a1_1"],(e,t)=>e.input(t)),n.variable(t("viewof a2")).define("viewof a2",["slider"],function(e){return e({min:0,max:1e9,step:1e3,value:325e4,format:",",description:"Zero to one billion, in steps of one thousand, formatted as a (US) number"})}),n.variable(t("a2")).define("a2",["Generators","viewof a2"],(e,t)=>e.input(t)),n.variable(t("viewof a3")).define("viewof a3",["slider"],function(e){return e({min:0,max:100,step:1,value:10,title:"Integers",description:"Integers from zero through 100"})}),n.variable(t("a3")).define("a3",["Generators","viewof a3"],(e,t)=>e.input(t)),n.variable(t("viewof a4")).define("viewof a4",["slider"],function(e){return e({min:.9,max:1.1,precision:3,description:"A high precision slider example"})}),n.variable(t("a4")).define("a4",["Generators","viewof a4"],(e,t)=>e.input(t)),n.variable(t("viewof a5")).define("viewof a5",["slider"],function(e){return e({min:.9,max:1.1,precision:3,submit:!0,description:"The same as a4, but only changes value on submit"})}),n.variable(t("a5")).define("a5",["Generators","viewof a5"],(e,t)=>e.input(t)),n.variable(t()).define(["md"],function(e){return e`More [fancy slider techniques](https://beta.observablehq.com/@mootari/prime-numbers-slider).`}),n.variable(t("slider")).define("slider",["input"],function(e){return function(t={}){let{value:n,min:r=0,max:i=1,step:a="any",precision:o=2,title:l,description:u,getValue:s,format:c,display:f,submit:d}=t;return"number"==typeof t&&(n=t),null==n&&(n=(i+r)/2),o=Math.pow(10,o),s||(s=(e=>Math.round(e.valueAsNumber*o)/o)),e({type:"range",title:l,description:u,submit:d,format:c,display:f,attributes:{min:r,max:i,step:a,value:n},getValue:s})}}),n.variable(t("buttonDemo")).define("buttonDemo",["md"],function(e){return e`--- +## Buttons + +~~~js +import {button} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof b")).define("viewof b",["button"],function(e){return e()}),n.variable(t("b")).define("b",["Generators","viewof b"],(e,t)=>e.input(t)),n.variable(t()).define(["b"],function(e){return!this}),n.variable(t("viewof b1")).define("viewof b1",["button"],function(e){return e({value:"Click me",description:"We use a reference to the button below to record the time you pressed it."})}),n.variable(t("b1")).define("b1",["Generators","viewof b1"],(e,t)=>e.input(t)),n.variable(t()).define(["b1"],function(e){return new Date(Date.now()).toUTCString()}),n.variable(t("button")).define("button",["input"],function(e){return function(t={}){let{value:n,title:r,description:i,disabled:a}=t;"string"==typeof t&&(n=t),n||(n="Ok");const o=e({type:"button",title:r,description:i,attributes:{disabled:a,value:n}});return o.output.remove(),o}}),n.variable(t("selectDemo")).define("selectDemo",["md"],function(e){return e`--- +## Dropdown Menus and Multiselects + +~~~js +import {select} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof dd")).define("viewof dd",["select"],function(e){return e(["Spring","Summer","Fall","Winter"])}),n.variable(t("dd")).define("dd",["Generators","viewof dd"],(e,t)=>e.input(t)),n.variable(t()).define(["dd"],function(e){return e}),n.variable(t("viewof dd1")).define("viewof dd1",["select"],function(e){return e({title:"Stooges",description:"Please pick your favorite stooge.",options:["Curly","Larry","Moe","Shemp"],value:"Moe"})}),n.variable(t("dd1")).define("dd1",["Generators","viewof dd1"],(e,t)=>e.input(t)),n.variable(t()).define(["dd1"],function(e){return e}),n.variable(t("viewof dd2")).define("viewof dd2",["select"],function(e){return e({description:"As a child, which vegetables did you refuse to eat?",options:["Spinach","Broccoli","Brussels Sprouts","Cauliflower","Kale","Turnips","Green Beans","Asparagus"],multiple:!0})}),n.variable(t("dd2")).define("dd2",["Generators","viewof dd2"],(e,t)=>e.input(t)),n.variable(t()).define(["dd2"],function(e){return e}),n.variable(t("viewof dd3")).define("viewof dd3",["select"],function(e){const t=e({title:"How are you feeling today?",options:[{label:"🤷",value:"shrug"},{label:"😂",value:"tears-of-joy"},{label:"😍",value:"loving-it"},{label:"🤔",value:"hmmm"},{label:"😱",value:"yikes"},{label:"😈",value:"mischievous"},{label:"💩",value:"poo"}],value:"hmmm"});return t.input.style.fontSize="30px",t.input.style.marginTop="8px",t}),n.variable(t("dd3")).define("dd3",["Generators","viewof dd3"],(e,t)=>e.input(t)),n.variable(t()).define(["dd3"],function(e){return e}),n.variable(t("select")).define("select",["input","html"],function(e,t){return function(n={}){let{value:r,title:i,description:a,submit:o,multiple:l,size:u,options:s}=n;Array.isArray(n)&&(s=n),s=s.map(e=>"object"==typeof e?e:{value:e,label:e});const c=e({type:"select",title:i,description:a,submit:o,getValue:e=>{const t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>e.value);return l?t:t[0]},form:t` +
    + +
    + `});return c.output.remove(),c}}),n.variable(t("colorDemo")).define("colorDemo",["md"],function(e){return e`--- +## Color Pickers + +*value: a hexadecimal string, e.g. * \`"#bada55"\` + +~~~js +import {color} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof c")).define("viewof c",["color"],function(e){return e()}),n.variable(t("c")).define("c",["Generators","viewof c"],(e,t)=>e.input(t)),n.variable(t("viewof c1")).define("viewof c1",["color"],function(e){return e({value:"#0000ff",title:"Background Color",description:"This color picker starts out blue"})}),n.variable(t("c1")).define("c1",["Generators","viewof c1"],(e,t)=>e.input(t)),n.variable(t("color")).define("color",["input"],function(e){return function(t={}){let{value:n,title:r,description:i,submit:a,display:o}=t;"string"==typeof t&&(n=t),null==n&&(n="#000000");const l=e({type:"color",title:r,description:i,submit:a,display:o,attributes:{value:n}});return(r||i)&&(l.input.style.margin="5px 0"),l}}),n.variable(t("coordinatesDemo")).define("coordinatesDemo",["md"],function(e){return e` --- +## Coordinates + +*value: an array pair of \`[longitude, latitude]\`, e.g. * \`[-122.27, 37.87]\` + +~~~js +import {coordinates} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof coords1")).define("viewof coords1",["coordinates"],function(e){return e()}),n.variable(t("coords1")).define("coords1",["Generators","viewof coords1"],(e,t)=>e.input(t)),n.variable(t()).define(["coords1"],function(e){return e}),n.variable(t("viewof coords2")).define("viewof coords2",["coordinates"],function(e){return e({title:"Hometown",description:"Enter the coordinates of where you were born",value:[-122.27,37.87],submit:!0})}),n.variable(t("coords2")).define("coords2",["Generators","viewof coords2"],(e,t)=>e.input(t)),n.variable(t()).define(["coords2"],function(e){return e}),n.variable(t("coordinates")).define("coordinates",["html","input"],function(e,t){return function(n={}){let{value:r=[],title:i,description:a,submit:o}=n;Array.isArray(n)&&(r=n);let[l,u]=r;const s=e``,c=e``,f=t({type:"coordinates",title:i,description:a,submit:o,getValue:()=>{const e=s.valueAsNumber,t=c.valueAsNumber;return[isNaN(e)?null:e,isNaN(t)?null:t]},form:e` +
    + +
    + +
    + `});return f.output.remove(),f}}),n.variable(t("worldMapCoordinatesDemo")).define("worldMapCoordinatesDemo",["md"],function(e){return e` --- +## World Map Coordinates + +*value: an array pair of \`[longitude, latitude]\`, e.g. * \`[-122.27, 37.87]\` + +~~~js +import {worldMapCoordinates} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof worldMap1")).define("viewof worldMap1",["worldMapCoordinates"],function(e){return e([-122.27,37.87])}),n.variable(t("worldMap1")).define("worldMap1",["Generators","viewof worldMap1"],(e,t)=>e.input(t)),n.variable(t()).define(["worldMap1"],function(e){return e}),n.variable(t("worldMapCoordinates")).define("worldMapCoordinates",["html","DOM","d3geo","graticule","land","countries","input"],function(e,t,n,r,i,a,o){return function(l={}){let{value:u=[],title:s,description:c,width:f=400}=l;Array.isArray(l)&&(u=l);const d=Math.round(.525*f);let[p,h]=u;p=null!=p?p:null,h=null!=h?h:null;const m=e`
    `,v=t.context2d(f,d),g=v.canvas;g.style.margin="10px 0 0";const b=n.geoNaturalEarth1().precision(.1).fitSize([f,d],{type:"Sphere"}),y=n.geoPath(b,v).pointRadius(2.5);function w(){if(v.fillStyle="#fff",v.fillRect(0,0,f,d),v.beginPath(),y(r),v.lineWidth=.35,v.strokeStyle="#ddd",v.stroke(),v.beginPath(),y(i),v.fillStyle="#f4f4f4",v.fill(),v.beginPath(),y(a),v.strokeStyle="#aaa",v.stroke(),null!=p&&null!=h){const e={type:"MultiPoint",coordinates:[[p,h]]};v.beginPath(),y(e),v.fillStyle="#f00",v.fill()}}return m.append(g),g.onclick=function(e){const{offsetX:t,offsetY:n}=e;var r=b.invert([t,n]);p=+r[0].toFixed(2),h=+r[1].toFixed(2),w(),g.dispatchEvent(new CustomEvent("input",{bubbles:!0}))},w(),o({type:"worldMapCoordinates",title:s,description:c,display:t=>e`
    + Longitude: ${null!=p?p:""} +     + Latitude: ${null!=h?h:""} +
    `,getValue:()=>[null!=p?p:null,null!=h?h:null],form:m})}}),n.variable(t("usaMapCoordinatesDemo")).define("usaMapCoordinatesDemo",["md"],function(e){return e` --- +## U.S.A. Map Coordinates + +*value: an array pair of \`[longitude, latitude]\`, e.g. * \`[-122.27, 37.87]\` + +~~~js +import {usaMapCoordinates} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof usaMap1")).define("viewof usaMap1",["usaMapCoordinates"],function(e){return e([-122.27,37.87])}),n.variable(t("usaMap1")).define("usaMap1",["Generators","viewof usaMap1"],(e,t)=>e.input(t)),n.variable(t()).define(["usaMap1"],function(e){return e}),n.variable(t("viewof usaMap2")).define("viewof usaMap2",["usaMapCoordinates"],function(e){return e({title:"A Mini Map",description:"Defaults to New York City",width:200,value:[-74,40.71]})}),n.variable(t("usaMap2")).define("usaMap2",["Generators","viewof usaMap2"],(e,t)=>e.input(t)),n.variable(t()).define(["usaMap2"],function(e){return e}),n.variable(t("usaMapCoordinates")).define("usaMapCoordinates",["html","DOM","d3geo","nation","states","input"],function(e,t,n,r,i,a){return function(o={}){let{value:l=[],title:u,description:s,width:c=400}=o;Array.isArray(o)&&(l=o);const f=c/960,d=600*f;let[p,h]=l;p=null!=p?p:null,h=null!=h?h:null;const m=e`
    `,v=t.context2d(c,d),g=v.canvas;g.style.margin="5px 0 0";const b=n.geoAlbersUsa().scale(1280).translate([480,300]),y=n.geoPath().context(v).pointRadius(2.5/f);function w(){if(v.clearRect(0,0,c,d),v.save(),v.scale(f,f),v.lineWidth=.35/f,v.beginPath(),y(r),v.fillStyle="#f4f4f4",v.fill(),v.beginPath(),y(i),v.strokeStyle="#aaa",v.stroke(),null!=p&&null!=h){const e={type:"MultiPoint",coordinates:[b([p,h])]};v.beginPath(),y(e),v.fillStyle="#f00",v.fill()}v.restore()}return m.append(g),g.onclick=function(e){const{offsetX:t,offsetY:n}=e;var r=b.invert([t/f,n/f]);p=+r[0].toFixed(2),h=+r[1].toFixed(2),w(),g.dispatchEvent(new CustomEvent("input",{bubbles:!0}))},w(),a({type:"worldMapCoordinates",title:u,description:s,display:t=>e`
    + Longitude: ${null!=p?p:""} +     + Latitude: ${null!=h?h:""} +
    `,getValue:()=>[null!=p?p:null,null!=h?h:null],form:m})}}),n.variable(t("dateDemo")).define("dateDemo",["md"],function(e){return e` --- +## Dates + +*value: a YYYY-MM-DD formatted string: * \`"2016-11-08"\` + +~~~js +import {date} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof d")).define("viewof d",["date"],function(e){return e()}),n.variable(t("d")).define("d",["Generators","viewof d"],(e,t)=>e.input(t)),n.variable(t("viewof d1")).define("viewof d1",["date"],function(e){return e({title:"2017",min:"2017-01-01",max:"2017-12-31",value:"2017-01-01",description:"Only dates within the 2017 calendar year are allowed"})}),n.variable(t("d1")).define("d1",["Generators","viewof d1"],(e,t)=>e.input(t)),n.variable(t("date")).define("date",["input"],function(e){return function(t={}){let{min:n,max:r,value:i,title:a,description:o,display:l}=t;return"string"==typeof t&&(i=t),e({type:"date",title:a,description:o,display:l,attributes:{min:n,max:r,value:i}})}}),n.variable(t("timeDemo")).define("timeDemo",["md"],function(e){return e` --- +## Times + +*value: a HH:MM:SS formatted string: * \`"09:30:45"\` +
    *(Time values are always in 24-hour format)* + +~~~js +import {time} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof t")).define("viewof t",["time"],function(e){return e()}),n.variable(t("t")).define("t",["Generators","viewof t"],(e,t)=>e.input(t)),n.variable(t()).define(["t"],function(e){return e}),n.variable(t("viewof t1")).define("viewof t1",["time"],function(e){return e({title:"Afternoon",min:"12:00:00",max:"23:59:59",value:"13:00:00",step:1,description:"Only times after noon are allowed, and seconds are included"})}),n.variable(t("t1")).define("t1",["Generators","viewof t1"],(e,t)=>e.input(t)),n.variable(t()).define(["t1"],function(e){return e}),n.variable(t("time")).define("time",["input"],function(e){return function(t={}){let{min:n,max:r,step:i,value:a,title:o,description:l,display:u}=t;"string"==typeof t&&(a=t);const s=e({type:"time",title:o,description:l,display:u,getValue:e=>e.value?e.value:void 0,attributes:{min:n,max:r,step:i,value:a}});return s.output.remove(),s}}),n.variable(t("fileDemo")).define("fileDemo",["md"],function(e){return e`--- +## File Upload +*Use the JavaScript [File API](https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications) to work with uploaded file contents.* + +\`import {file} from "@jashkenas/inputs"\``}),n.variable(t("viewof e")).define("viewof e",["file"],function(e){return e()}),n.variable(t("e")).define("e",["Generators","viewof e"],(e,t)=>e.input(t)),n.variable(t("viewof e1")).define("viewof e1",["file"],function(e){return e({title:"Photographs",description:"Only .jpg files are allowed in this example. Choose some images, and they’ll appear in the cell below.",accept:".jpg",multiple:!0})}),n.variable(t("e1")).define("e1",["Generators","viewof e1"],(e,t)=>e.input(t)),n.variable(t()).define(["html","e1","Files"],async function(e,t,n){const r=e`
    `;for(var i=0;i`;a.src=await n.url(t[i]),r.append(a)}return r}),n.variable(t("file")).define("file",["input"],function(e){return function(t={}){let{multiple:n,accept:r,title:i,description:a}=t;const o=e({type:"file",title:i,description:a,attributes:{multiple:n,accept:r},action:e=>{e.input.onchange=(()=>{e.value=n?e.input.files:e.input.files[0],e.dispatchEvent(new CustomEvent("input"))})}});return o.output.remove(),o.input.onchange(),o}}),n.variable(t("textDemo")).define("textDemo",["md"],function(e){return e`--- +## Text Inputs + +~~~js +import {text} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof f")).define("viewof f",["text"],function(e){return e()}),n.variable(t("f")).define("f",["Generators","viewof f"],(e,t)=>e.input(t)),n.variable(t("viewof f1")).define("viewof f1",["text"],function(e){return e({title:"A Text Input",placeholder:"Placeholder text",description:"Note that text inputs don’t show output on the right"})}),n.variable(t("f1")).define("f1",["Generators","viewof f1"],(e,t)=>e.input(t)),n.variable(t()).define(["f1"],function(e){return e}),n.variable(t("viewof f2")).define("viewof f2",["text"],function(e){return e({placeholder:"Placeholder text",description:"This input only changes value on submit",submit:"Go"})}),n.variable(t("f2")).define("f2",["Generators","viewof f2"],(e,t)=>e.input(t)),n.variable(t()).define(["f2"],function(e){return e}),n.variable(t("text")).define("text",["input"],function(e){return function(t={}){const{value:n,title:r,description:i,autocomplete:a="off",maxlength:o,minlength:l,pattern:u,placeholder:s,size:c,submit:f}=t;"string"==typeof t&&(n=t);const d=e({type:"text",title:r,description:i,submit:f,attributes:{value:n,autocomplete:a,maxlength:o,minlength:l,pattern:u,placeholder:s,size:c}});return d.output.remove(),d.input.style.fontSize="1em",d}}),n.variable(t("textareaDemo")).define("textareaDemo",["md"],function(e){return e`--- +## Textareas + +~~~js +import {textarea} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof g")).define("viewof g",["textarea"],function(e){return e()}),n.variable(t("g")).define("g",["Generators","viewof g"],(e,t)=>e.input(t)),n.variable(t()).define(["g"],function(e){return e}),n.variable(t("viewof g1")).define("viewof g1",["textarea"],function(e){return e({title:"Your Great American Novel",placeholder:"Insert story here...",spellcheck:!0,width:"100%",rows:10,submit:"Publish"})}),n.variable(t("g1")).define("g1",["Generators","viewof g1"],(e,t)=>e.input(t)),n.variable(t()).define(["g1"],function(e){return e}),n.variable(t("textarea")).define("textarea",["input","html"],function(e,t){return function(n={}){let{value:r,title:i,description:a,autocomplete:o,cols:l=45,rows:u=3,width:s,height:c,maxlength:f,placeholder:d,spellcheck:p,wrap:h,submit:m}=n;"string"==typeof n&&(r=n),null==r&&(r="");const v=e({form:t`
    `,title:i,description:a,submit:m,attributes:{autocomplete:o,cols:l,rows:u,maxlength:f,placeholder:d,spellcheck:p,wrap:h}});return v.output.remove(),null!=s&&(v.input.style.width=s),null!=c&&(v.input.style.height=c),m&&(v.submit.style.margin="0"),(i||a)&&(v.input.style.margin="3px 0"),v}}),n.variable(t("radioDemo")).define("radioDemo",["md"],function(e){return e`--- +## Radio Buttons + +~~~js +import {radio} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof r")).define("viewof r",["radio"],function(e){return e(["Lust","Gluttony","Greed","Sloth","Wrath","Envy","Pride"])}),n.variable(t("r")).define("r",["Generators","viewof r"],(e,t)=>e.input(t)),n.variable(t()).define(["r"],function(e){return e}),n.variable(t("viewof r1")).define("viewof r1",["radio"],function(e){return e({title:"Contact Us",description:"Please select your preferred contact method",options:[{label:"By Email",value:"email"},{label:"By Phone",value:"phone"},{label:"By Pager",value:"pager"}],value:"pager"})}),n.variable(t("r1")).define("r1",["Generators","viewof r1"],(e,t)=>e.input(t)),n.variable(t()).define(["r1"],function(e){return e}),n.variable(t("radio")).define("radio",["input","html"],function(e,t){return function(n={}){let{value:r,title:i,description:a,submit:o,options:l}=n;Array.isArray(n)&&(l=n),l=l.map(e=>"string"==typeof e?{value:e,label:e}:e);const u=e({type:"radio",title:i,description:a,submit:o,getValue:e=>{const t=Array.prototype.find.call(e,e=>e.checked);return t?t.value:void 0},form:t` +
    + ${l.map(({value:e,label:n})=>{const i=t``;return i.setAttribute("value",e),t` + `})} +
    + `});return u.output.remove(),u}}),n.variable(t("checkboxDemo")).define("checkboxDemo",["md"],function(e){return e`--- +## Checkboxes + +~~~js +import {checkbox} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof ch")).define("viewof ch",["checkbox"],function(e){return e(["Lust","Gluttony","Greed","Sloth","Wrath","Envy","Pride"])}),n.variable(t("ch")).define("ch",["Generators","viewof ch"],(e,t)=>e.input(t)),n.variable(t()).define(["ch"],function(e){return e}),n.variable(t("viewof ch1")).define("viewof ch1",["checkbox"],function(e){return e({title:"Colors",description:"Please select your favorite colors",options:[{value:"r",label:"Red"},{value:"o",label:"Orange"},{value:"y",label:"Yellow"},{value:"g",label:"Green"},{value:"b",label:"Blue"},{value:"i",label:"Indigo"},{value:"v",label:"Violet"}],value:["r","g","b"],submit:!0})}),n.variable(t("ch1")).define("ch1",["Generators","viewof ch1"],(e,t)=>e.input(t)),n.variable(t()).define(["ch1"],function(e){return e}),n.variable(t("viewof ch3")).define("viewof ch3",["checkbox"],function(e){return e({description:"Just a single checkbox to toggle",options:[{value:"toggle",label:"On"}],value:"toggle"})}),n.variable(t("ch3")).define("ch3",["Generators","viewof ch3"],(e,t)=>e.input(t)),n.variable(t()).define(["ch3"],function(e){return e}),n.variable(t("checkbox")).define("checkbox",["input","html"],function(e,t){return function(n={}){let{value:r,title:i,description:a,submit:o,options:l}=n;Array.isArray(n)&&(l=n),l=l.map(e=>"string"==typeof e?{value:e,label:e}:e);const u=e({type:"checkbox",title:i,description:a,submit:o,getValue:e=>e.length?Array.prototype.filter.call(e,e=>e.checked).map(e=>e.value):!!e.checked&&e.value,form:t` +
    + ${l.map(({value:e,label:n})=>{const i=t`-1?"checked":""} style="vertical-align: baseline;" />`;return i.setAttribute("value",e),t``})} +
    + `});return u.output.remove(),u}}),n.variable(t("numberDemo")).define("numberDemo",["md"],function(e){return e`--- +## Numbers + +~~~js +import {number} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof h")).define("viewof h",["number"],function(e){return e()}),n.variable(t("h")).define("h",["Generators","viewof h"],(e,t)=>e.input(t)),n.variable(t()).define(["h"],function(e){return e}),n.variable(t("viewof h1")).define("viewof h1",["number"],function(e){return e({placeholder:"13+",title:"Your Age",submit:!0})}),n.variable(t("h1")).define("h1",["Generators","viewof h1"],(e,t)=>e.input(t)),n.variable(t()).define(["h1"],function(e){return e}),n.variable(t("number")).define("number",["input"],function(e){return function(t={}){const{value:n,title:r,description:i,placeholder:a,submit:o,step:l="any",min:u,max:s}=t;"number"==typeof t&&(n=t);const c=e({type:"number",title:r,description:i,submit:o,attributes:{value:n,placeholder:a,step:l,min:u,max:s,autocomplete:"off"},getValue:e=>e.valueAsNumber});return c.output.remove(),c.input.style.width="auto",c.input.style.fontSize="1em",c}}),n.variable(t("passwordDemo")).define("passwordDemo",["md"],function(e){return e`--- +## Passwords + +~~~js +import {password} from "@jashkenas/inputs" +~~~`}),n.variable(t("viewof i")).define("viewof i",["password"],function(e){return e({value:"password"})}),n.variable(t("i")).define("i",["Generators","viewof i"],(e,t)=>e.input(t)),n.variable(t()).define(["i"],function(e){return e}),n.variable(t("viewof i1")).define("viewof i1",["password"],function(e){return e({title:"Your super secret password",description:"Less than 12 characters, please.",minlength:6,maxlength:12})}),n.variable(t("i1")).define("i1",["Generators","viewof i1"],(e,t)=>e.input(t)),n.variable(t()).define(["i1"],function(e){return e}),n.variable(t("password")).define("password",["input"],function(e){return function(t={}){const{value:n,title:r,description:i,autocomplete:a="off",maxlength:o,minlength:l,pattern:u,placeholder:s,size:c,submit:f}=t;"string"==typeof t&&(n=t);const d=e({type:"password",title:r,description:i,submit:f,attributes:{value:n,autocomplete:a,maxlength:o,minlength:l,pattern:u,placeholder:s,size:c}});return d.output.remove(),d.input.style.fontSize="1em",d}}),n.variable(t()).define(["md"],function(e){return e`--- +## Wishlist (Send suggestions, please!) + +* Location picker! +* 2D coordinate input (using a <svg>) +* 3D coordinate input (for say, positioning a camera in a WebGL sketch) +* Degrees or radians input, for circular things, or angles. +* A dimensions input, or a box-model input, with margin (and optionally, padding). +* A map-projection-picker input, rendering little thumbnails of all the d3-geo-projections. +* Other useful formatting options. + +---`}),n.variable(t("input")).define("input",["html","d3format"],function(e,t){return function(n){let{form:r,type:i="text",attributes:a={},action:o,getValue:l,title:u,description:s,format:c,display:f,submit:d,options:p}=n;const h=e`
    `;if(r||(r=e`
    + +
    `),Object.keys(a).forEach(e=>{const t=a[e];null!=t&&r.input.setAttribute(e,t)}),d&&r.append(e``),r.append(e``),u&&r.prepend(e`
    ${u}
    `),s&&r.append(e`
    ${s}
    `),c&&(c="function"==typeof c?c:t.format(c)),o)o(r);else{const e=d?"onsubmit":"button"==i?"onclick":"checkbox"==i||"radio"==i?"onchange":"oninput";r[e]=(t=>{t&&t.preventDefault();const n=l?l(r.input):r.input.value;if(r.output){const e=f?f(n):c?c(n):n;if(e instanceof window.Element){for(;r.output.hasChildNodes();)r.output.removeChild(r.output.lastChild);r.output.append(e)}else r.output.value=e}r.value=n,"oninput"!==e&&r.dispatchEvent(new CustomEvent("input",{bubbles:!0}))}),"oninput"!==e&&(h.oninput=(e=>e&&e.stopPropagation()&&e.preventDefault())),"onsubmit"!==e&&(r.onsubmit=(e=>e&&e.preventDefault())),r[e]()}for(;r.childNodes.length;)h.appendChild(r.childNodes[0]);return r.append(h),r}}),n.variable(t("d3geo")).define("d3geo",["require"],function(e){return e("d3-geo@1")}),n.variable(t("d3format")).define("d3format",["require"],function(e){return e("d3-format@1")}),n.variable(t("topojson")).define("topojson",["require"],function(e){return e("topojson-client@3")}),n.variable(t("world")).define("world",async function(){return(await fetch("https://cdn.jsdelivr.net/npm/world-atlas@1/world/110m.json")).json()}),n.variable(t("land")).define("land",["topojson","world"],function(e,t){return e.feature(t,t.objects.land)}),n.variable(t("countries")).define("countries",["topojson","world"],function(e,t){return e.feature(t,t.objects.countries)}),n.variable(t("usa")).define("usa",async function(){return(await fetch("https://cdn.jsdelivr.net/npm/us-atlas@^2.1/us/states-10m.json")).json()}),n.variable(t("nation")).define("nation",["topojson","usa"],function(e,t){return e.feature(t,t.objects.nation)}),n.variable(t("states")).define("states",["topojson","usa"],function(e,t){return e.feature(t,t.objects.states)}),n.variable(t("graticule")).define("graticule",["d3geo"],function(e){return e.geoGraticule10()}),n.variable(t("viewof license")).define("viewof license",["md"],function(e){const t=e`License: [MIT](https://opensource.org/licenses/MIT)`;return t.value="MIT",t}),n.variable(t("license")).define("license",["Generators","viewof license"],(e,t)=>e.input(t)),n.variable(t()).define(["md"],function(e){return e`*Clip art courtesy [ClipArt ETC](https://etc.usf.edu/clipart/), radio buttons and checkboxes courtesy [Amit Sch](https://beta.observablehq.com/@meetamit/multiple-choice-inputs).*`}),n}function i(e,t){const n=e.module();n.variable(t()).define(["md"],function(e){return e`# Status Token Economics: ENS Usernames`}),n.variable(t("viewof numberStatusUsers")).define("viewof numberStatusUsers",["slider"],function(e){return e({min:1e3,max:1e9,step:1e3,value:1e3,title:"Number of current Status users",description:"Increments in 1000 users"})}),n.variable(t("numberStatusUsers")).define("numberStatusUsers",["Generators","viewof numberStatusUsers"],(e,t)=>e.input(t)),n.variable(t("viewof userGrowthRate")).define("viewof userGrowthRate",["slider"],function(e){return e({min:.1,max:10,step:.1,value:3,title:"User growth rate per annum (percent)",description:"percentages from 10% through 1000%"})}),n.variable(t("userGrowthRate")).define("userGrowthRate",["Generators","viewof userGrowthRate"],(e,t)=>e.input(t)),n.variable(t("viewof userChurnRate")).define("viewof userChurnRate",["slider"],function(e){return e({min:.01,max:1,step:.01,value:.1,title:"User churn rate per annum (percent)",description:"percentages from 1% through 100%"})}),n.variable(t("userChurnRate")).define("userChurnRate",["Generators","viewof userChurnRate"],(e,t)=>e.input(t)),n.variable(t("users")).define("users",["numberStatusUsers","userGrowthRate","userChurnRate"],function(e,t,n){let r=[e];for(let e=1;e<10;e++){let i=r[e-1]*t,a=r[e-1]*n;r[e]=Math.round(r[e-1]+(i-a))}return r}),n.variable(t("usersBarData")).define("usersBarData",["users"],function(e){return e.map((e,t)=>({name:`year ${t+1}`,year:t+1,users:e,value:e,tag:"users"}))}),n.variable(t("viewof userbar")).define("viewof userbar",["vegalite","usersBarData","width"],function(e,t,n){return e({data:{values:t},mark:{type:"bar"},autosize:"fit",width:n,encoding:{x:{field:"year",type:"quantitative"},y:{field:"users",type:"quantitative"},color:{field:"tag",legend:{orient:"top-left",title:null}},tooltip:{field:"users",type:"quantitative"}}})}),n.variable(t("userbar")).define("userbar",["Generators","viewof userbar"],(e,t)=>e.input(t)),n.variable(t("viewof percentUsersRegisterName")).define("viewof percentUsersRegisterName",["slider"],function(e){return e({min:0,max:1,step:.01,value:.5,title:"Percentage of users that register a username",description:"Increments in percentages of 1"})}),n.variable(t("percentUsersRegisterName")).define("percentUsersRegisterName",["Generators","viewof percentUsersRegisterName"],(e,t)=>e.input(t)),n.variable(t("viewof removalRate")).define("viewof removalRate",["slider"],function(e){return e({min:0,max:1,step:.01,value:.1,title:"Percentage of people who release their ENS username",description:"Increments in percentages of 1"})}),n.variable(t("removalRate")).define("removalRate",["Generators","viewof removalRate"],(e,t)=>e.input(t)),n.variable(t("ensUsers")).define("ensUsers",["users","percentUsersRegisterName","removalRate"],function(e,t,n){return e.map(e=>e*t*n)}),n.variable(t("ensUsersBarData")).define("ensUsersBarData",["ensUsers","users"],function(e,t){let n=e.map((e,t)=>({name:`year ${t+1}`,year:t+1,users:e,value:e,tag:"ens"})),r=t.map((t,n)=>({name:`year ${n+1}`,year:n+1,users:t-e[n],value:t-e[n],tag:"no ens"}));return n.concat(r)}),n.variable(t("viewof ensUserbar")).define("viewof ensUserbar",["vegalite","ensUsersBarData","width"],function(e,t,n){return e({data:{values:t},mark:"bar",autosize:"fit",width:n,encoding:{x:{field:"year",type:"quantitative"},y:{aggregate:"sum",field:"users",type:"quantitative"},color:{field:"tag",type:"nominal",legend:{title:null,orient:"top-left"},scale:{domain:["no ens","ens"],range:["#d12525","#000000"]}},tooltip:{field:"users",type:"quantitative"}}})}),n.variable(t("ensUserbar")).define("ensUserbar",["Generators","viewof ensUserbar"],(e,t)=>e.input(t)),n.variable(t("viewof amountDepositSnt")).define("viewof amountDepositSnt",["slider"],function(e){return e({min:0,max:1e3,step:1,value:10,title:"Amount of SNT required to register ENS username",description:"Increments by 1"})}),n.variable(t("amountDepositSnt")).define("amountDepositSnt",["Generators","viewof amountDepositSnt"],(e,t)=>e.input(t)),n.variable(t("viewof sntLockupTime")).define("viewof sntLockupTime",["slider"],function(e){return e({min:1,max:10,step:1,value:1,title:"Amount of time SNT is locked up in years",description:"Increments by 1 year"})}),n.variable(t("sntLockupTime")).define("sntLockupTime",["Generators","viewof sntLockupTime"],(e,t)=>e.input(t)),n.variable(t("amountSnt")).define("amountSnt",["ensUsers","amountDepositSnt"],function(e,t){return e.map(e=>e*t)}),n.variable(t("lockedSntBarData")).define("lockedSntBarData",["amountSnt"],function(e){return e.map((e,t)=>({name:`year ${t+1}`,year:t+1,snt:e,value:e,tag:"SNT"}))}),n.variable(t("viewof lockedSntBar")).define("viewof lockedSntBar",["vegalite","lockedSntBarData","width"],function(e,t,n){return e({data:{values:t},mark:"bar",autosize:"fit",width:n,encoding:{x:{field:"year",type:"quantitative"},y:{aggregate:"sum",field:"snt",type:"quantitative"},color:{field:"tag",type:"nominal",legend:{title:null,orient:"top-left"},scale:{domain:["SNT"],range:["#4360DF"]}}}})}),n.variable(t("lockedSntBar")).define("lockedSntBar",["Generators","viewof lockedSntBar"],(e,t)=>e.input(t)),n.variable(t("viewof sntPrice")).define("viewof sntPrice",["slider"],function(e){return e({min:.01,max:100,step:.01,value:.03,title:"Price of SNT in US Dollars",description:"Increments in cents"})}),n.variable(t("sntPrice")).define("sntPrice",["Generators","viewof sntPrice"],(e,t)=>e.input(t)),n.variable(t("amountUsd")).define("amountUsd",["amountSnt","sntPrice"],function(e,t){return e.map(e=>e*t)}),n.variable(t("lockedUsdBarData")).define("lockedUsdBarData",["amountUsd"],function(e){return e.map((e,t)=>({name:`year ${t+1}`,year:t+1,usd:e,value:e,tag:"USD"}))}),n.variable(t("viewof lockedUsdBar")).define("viewof lockedUsdBar",["vegalite","lockedUsdBarData","width"],function(e,t,n){return e({data:{values:t},mark:"bar",autosize:"fit",width:n,encoding:{x:{field:"year",type:"quantitative"},y:{aggregate:"sum",field:"usd",type:"quantitative"},color:{field:"tag",type:"nominal",legend:{title:null,orient:"top-left"},scale:{domain:["USD"],range:["#2ba83e"]}}}})}),n.variable(t("lockedUsdBar")).define("lockedUsdBar",["Generators","viewof lockedUsdBar"],(e,t)=>e.input(t)),n.variable(t()).define(["md"],function(e){return e`## Imports and Utility`});const i=e.module(r);return n.import("slider",i),n.variable(t("vegalite")).define("vegalite",["require"],function(e){return e("@observablehq/vega-lite")}),n.variable(t("width")).define("width",function(){return 375}),n}n.d(t,"a",function(){return i})},function(e,t,n){"use strict";var r=n(8),i=n(9),a=n(4),o=n(10),l=function(e){return function(){throw e}},u=n(6),s=n(2);n.d(t,"a",function(){return f});var c=new Map;function f(e){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map}})}function d(e){return e._name}Object.defineProperties(f.prototype,{_copy:{value:function(e,t,n){var r=new f(this._runtime);return n.set(this,r),this._scope.forEach(function(i,a){var l,u=new s.d(i._type,r);if(l=e.get(a))u.import(l.name,l.alias,t);else if(i._definition===o.a){var f=i._inputs[0],p=f._module,h=n.get(p)||p._copy(c,null,n);u.import(f._name,a,h)}else u.define(a,i._inputs.map(d),i._definition)}),r},writable:!0,configurable:!0},_resolve:{value:function(e){var t,n=this._scope.get(e);if(!n)if(n=new s.d(s.b,this),this._runtime._builtin._scope.has(e))n.import(e,this._runtime._builtin);else if("invalidation"===e)n.define(e,u.b);else if("visibility"===e)n.define(e,u.c);else{try{t=this._runtime._global(e)}catch(t){return n.define(e,l(t))}void 0===t?this._scope.set(n._name=e,n):n.define(e,Object(i.a)(t))}return n},writable:!0,configurable:!0},redefine:{value:function(e){var t=this._scope.get(e);if(!t)throw new a.a(e+" is not defined");if(t._type===s.a)throw new a.a(e+" is defined more than once");return t.define.apply(t,arguments)},writable:!0,configurable:!0},define:{value:function(){var e=new s.d(s.c,this);return e.define.apply(e,arguments)},writable:!0,configurable:!0},derive:{value:function(e,t){var n=new Map;return r.a.call(e,function(e){"object"!=typeof e&&(e={name:e+""}),null==e.alias&&(e.alias=e.name),n.set(e.alias,e)}),this._copy(n,t,new Map)},writable:!0,configurable:!0},import:{value:function(){var e=new s.d(s.c,this);return e.import.apply(e,arguments)},writable:!0,configurable:!0},value:{value:async function(e){var t=this._scope.get(e);if(!t)throw new a.a(e+" is not defined");t._observer===s.e&&(t._observer=!0,this._runtime._dirty.add(t));return await this._runtime._compute(),t._promise},writable:!0,configurable:!0},variable:{value:function(e){return new s.d(s.c,this,e)},writable:!0,configurable:!0}})},function(e,t,n){"use strict"; +/** @license React v16.8.6 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(12),i="function"==typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,o=i?Symbol.for("react.portal"):60106,l=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.concurrent_mode"):60111,p=i?Symbol.for("react.forward_ref"):60112,h=i?Symbol.for("react.suspense"):60113,m=i?Symbol.for("react.memo"):60115,v=i?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rP.length&&P.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,i){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case o:u=!0}}if(u)return r(i,t,""===n?"."+R(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=se,e.release=ce}i(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=oe)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=oe)},persist:function(){this.isPersistent=oe},isPersistent:le,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=le,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var a=new t;return i(a,n.prototype),n.prototype=a,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ue);var de=ue.extend({data:null}),pe=ue.extend({data:null}),he=[9,13,27,32],me=V&&"CompositionEvent"in window,ve=null;V&&"documentMode"in document&&(ve=document.documentMode);var ge=V&&"TextEvent"in window&&!ve,be=V&&(!me||ve&&8=ve),ye=String.fromCharCode(32),we={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function ke(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Se(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Te=!1;var _e={eventTypes:we,extractEvents:function(e,t,n,r){var i=void 0,a=void 0;if(me)e:{switch(e){case"compositionstart":i=we.compositionStart;break e;case"compositionend":i=we.compositionEnd;break e;case"compositionupdate":i=we.compositionUpdate;break e}i=void 0}else Te?ke(e,n)&&(i=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=we.compositionStart);return i?(be&&"ko"!==n.locale&&(Te||i!==we.compositionStart?i===we.compositionEnd&&Te&&(a=ae()):(re="value"in(ne=r)?ne.value:ne.textContent,Te=!0)),i=de.getPooled(i,t,n,r),a?i.data=a:null!==(a=Se(n))&&(i.data=a),$(i),a=i):a=null,(e=ge?function(e,t){switch(e){case"compositionend":return Se(t);case"keypress":return 32!==t.which?null:(xe=!0,ye);case"textInput":return(e=t.data)===ye&&xe?null:e;default:return null}}(e,n):function(e,t){if(Te)return"compositionend"===e||!me&&ke(e,t)?(e=ae(),ie=re=ne=null,Te=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1