From c3969970ce9d92fd278bf48c169efb0fe07218f9 Mon Sep 17 00:00:00 2001 From: t4sk Date: Thu, 28 Sep 2023 20:34:27 +0900 Subject: [PATCH] Updates --- 404.html | 6 +- assets/index-37e33218.js | 1171 -------------------- assets/index-bf55bfed.css | 10 + assets/index-c1942f77.js | 1175 +++++++++++++++++++++ assets/index-cf8e1897.css | 10 - constants/index.html | 6 +- constructor/index.html | 6 +- create-new-contract/index.html | 6 +- default-function/index.html | 6 +- defi/curve-liquidity/index.html | 6 +- defi/curve-swap/index.html | 6 +- delegate-call/index.html | 6 +- dynamic-arrays/index.html | 6 +- error/index.html | 6 +- event/index.html | 6 +- for-loop/index.html | 6 +- function/index.html | 6 +- hash-function/index.html | 6 +- hello-world/index.html | 6 +- if-else/index.html | 6 +- immutable/index.html | 6 +- index.html | 6 +- interface/index.html | 6 +- internal-external-functions/index.html | 6 +- payable/index.html | 6 +- print/index.html | 6 +- private-public-state-variables/index.html | 6 +- raw-call/index.html | 6 +- re-entrancy-lock/index.html | 6 +- references/index.html | 6 +- self-destruct/index.html | 6 +- send-ether/index.html | 6 +- unsafe-math/index.html | 6 +- values/index.html | 6 +- verify-signature/index.html | 6 +- view-pure-functions/index.html | 6 +- 36 files changed, 1281 insertions(+), 1277 deletions(-) delete mode 100644 assets/index-37e33218.js create mode 100644 assets/index-bf55bfed.css create mode 100644 assets/index-c1942f77.js delete mode 100644 assets/index-cf8e1897.css diff --git a/404.html b/404.html index ac8581f..43fde17 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/assets/index-37e33218.js b/assets/index-37e33218.js deleted file mode 100644 index 1431c46..0000000 --- a/assets/index-37e33218.js +++ /dev/null @@ -1,1171 +0,0 @@ -function Qp(e,n){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function t(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(r){if(r.ep)return;r.ep=!0;const l=t(r);fetch(r.href,l)}})();var Ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ru={exports:{}},Or={},lu={exports:{}},L={};/** - * @license React - * 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 vs=Symbol.for("react.element"),Yp=Symbol.for("react.portal"),Kp=Symbol.for("react.fragment"),Xp=Symbol.for("react.strict_mode"),Gp=Symbol.for("react.profiler"),qp=Symbol.for("react.provider"),Zp=Symbol.for("react.context"),Jp=Symbol.for("react.forward_ref"),ed=Symbol.for("react.suspense"),nd=Symbol.for("react.memo"),td=Symbol.for("react.lazy"),Oo=Symbol.iterator;function sd(e){return e===null||typeof e!="object"?null:(e=Oo&&e[Oo]||e["@@iterator"],typeof e=="function"?e:null)}var au={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ou=Object.assign,iu={};function kt(e,n,t){this.props=e,this.context=n,this.refs=iu,this.updater=t||au}kt.prototype.isReactComponent={};kt.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};kt.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uu(){}uu.prototype=kt.prototype;function Aa(e,n,t){this.props=e,this.context=n,this.refs=iu,this.updater=t||au}var Ra=Aa.prototype=new uu;Ra.constructor=Aa;ou(Ra,kt.prototype);Ra.isPureReactComponent=!0;var Ao=Array.isArray,cu=Object.prototype.hasOwnProperty,La={current:null},pu={key:!0,ref:!0,__self:!0,__source:!0};function du(e,n,t){var s,r={},l=null,a=null;if(n!=null)for(s in n.ref!==void 0&&(a=n.ref),n.key!==void 0&&(l=""+n.key),n)cu.call(n,s)&&!pu.hasOwnProperty(s)&&(r[s]=n[s]);var o=arguments.length-2;if(o===1)r.children=t;else if(1>>1,ne=T[X];if(0>>1;Xr(qr,R))Nnr(_s,qr)?(T[X]=_s,T[Nn]=R,X=Nn):(T[X]=qr,T[Pn]=R,X=Pn);else if(Nnr(_s,R))T[X]=_s,T[Nn]=R,X=Nn;else break e}}return A}function r(T,A){var R=T.sortIndex-A.sortIndex;return R!==0?R:T.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var i=[],u=[],c=1,f=null,h=3,v=!1,g=!1,j=!1,P=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(T){for(var A=t(u);A!==null;){if(A.callback===null)s(u);else if(A.startTime<=T)s(u),A.sortIndex=A.expirationTime,n(i,A);else break;A=t(u)}}function w(T){if(j=!1,m(T),!g)if(t(i)!==null)g=!0,Xr(_);else{var A=t(u);A!==null&&Gr(w,A.startTime-T)}}function _(T,A){g=!1,j&&(j=!1,d(N),N=-1),v=!0;var R=h;try{for(m(A),f=t(i);f!==null&&(!(f.expirationTime>A)||T&&!De());){var X=f.callback;if(typeof X=="function"){f.callback=null,h=f.priorityLevel;var ne=X(f.expirationTime<=A);A=e.unstable_now(),typeof ne=="function"?f.callback=ne:f===t(i)&&s(i),m(A)}else s(i);f=t(i)}if(f!==null)var ks=!0;else{var Pn=t(u);Pn!==null&&Gr(w,Pn.startTime-A),ks=!1}return ks}finally{f=null,h=R,v=!1}}var k=!1,E=null,N=-1,$=5,I=-1;function De(){return!(e.unstable_now()-I<$)}function Tt(){if(E!==null){var T=e.unstable_now();I=T;var A=!0;try{A=E(!0,T)}finally{A?Pt():(k=!1,E=null)}}else k=!1}var Pt;if(typeof p=="function")Pt=function(){p(Tt)};else if(typeof MessageChannel<"u"){var No=new MessageChannel,Wp=No.port2;No.port1.onmessage=Tt,Pt=function(){Wp.postMessage(null)}}else Pt=function(){P(Tt,0)};function Xr(T){E=T,k||(k=!0,Pt())}function Gr(T,A){N=P(function(){T(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){g||v||(g=!0,Xr(_))},e.unstable_forceFrameRate=function(T){0>T||125X?(T.sortIndex=R,n(u,T),t(i)===null&&T===t(u)&&(j?(d(N),N=-1):j=!0,Gr(w,R-X))):(T.sortIndex=ne,n(i,T),g||v||(g=!0,Xr(_))),T},e.unstable_shouldYield=De,e.unstable_wrapCallback=function(T){var A=h;return function(){var R=h;h=A;try{return T.apply(this,arguments)}finally{h=R}}}})(yu);mu.exports=yu;var md=mu.exports;/** - * @license React - * react-dom.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 vu=S,Ce=md;function x(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Al=Object.prototype.hasOwnProperty,yd=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Lo={},Io={};function vd(e){return Al.call(Io,e)?!0:Al.call(Lo,e)?!1:yd.test(e)?Io[e]=!0:(Lo[e]=!0,!1)}function gd(e,n,t,s){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jd(e,n,t,s){if(n===null||typeof n>"u"||gd(e,n,t,s))return!0;if(s)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ye(e,n,t,s,r,l,a){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=l,this.removeEmptyString=a}var oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oe[e]=new ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];oe[n]=new ye(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oe[e]=new ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oe[e]=new ye(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){oe[e]=new ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oe[e]=new ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oe[e]=new ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oe[e]=new ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oe[e]=new ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var Da=/[\-:]([a-z])/g;function ba(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Da,ba);oe[n]=new ye(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Da,ba);oe[n]=new ye(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Da,ba);oe[n]=new ye(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oe[e]=new ye(e,1,!1,e.toLowerCase(),null,!1,!1)});oe.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oe[e]=new ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function za(e,n,t,s){var r=oe.hasOwnProperty(n)?oe[n]:null;(r!==null?r.type!==0:s||!(2o||r[a]!==l[o]){var i=` -`+r[a].replace(" at new "," at ");return e.displayName&&i.includes("")&&(i=i.replace("",e.displayName)),i}while(1<=a&&0<=o);break}}}finally{el=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?Mt(e):""}function wd(e){switch(e.tag){case 5:return Mt(e.type);case 16:return Mt("Lazy");case 13:return Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 2:case 15:return e=nl(e.type,!1),e;case 11:return e=nl(e.type.render,!1),e;case 1:return e=nl(e.type,!0),e;default:return""}}function Dl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gn:return"Fragment";case Xn:return"Portal";case Rl:return"Profiler";case Fa:return"StrictMode";case Ll:return"Suspense";case Il:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wu:return(e.displayName||"Context")+".Consumer";case ju:return(e._context.displayName||"Context")+".Provider";case Ma:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ua:return n=e.displayName||null,n!==null?n:Dl(e.type)||"Memo";case on:n=e._payload,e=e._init;try{return Dl(e(n))}catch{}}return null}function xd(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Dl(n);case 8:return n===Fa?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function _n(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ku(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function kd(e){var n=ku(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,l=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return r.call(this)},set:function(a){s=""+a,l.call(this,a)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return s},setValue:function(a){s=""+a},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ts(e){e._valueTracker||(e._valueTracker=kd(e))}function _u(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),s="";return e&&(s=ku(e)?e.checked?"true":"false":e.value),e=s,e!==t?(n.setValue(e),!0):!1}function tr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bl(e,n){var t=n.checked;return Y({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function bo(e,n){var t=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;t=_n(n.value!=null?n.value:t),e._wrapperState={initialChecked:s,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Su(e,n){n=n.checked,n!=null&&za(e,"checked",n,!1)}function zl(e,n){Su(e,n);var t=_n(n.value),s=n.type;if(t!=null)s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Fl(e,n.type,t):n.hasOwnProperty("defaultValue")&&Fl(e,n.type,_n(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function zo(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Fl(e,n,t){(n!=="number"||tr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var Ut=Array.isArray;function ot(e,n,t,s){if(e=e.options,n){n={};for(var r=0;r"+n.valueOf().toString()+"",n=Ps.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Jt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Bt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_d=["Webkit","ms","Moz","O"];Object.keys(Bt).forEach(function(e){_d.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Bt[n]=Bt[e]})});function Pu(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Bt.hasOwnProperty(e)&&Bt[e]?(""+n).trim():n+"px"}function Nu(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var s=t.indexOf("--")===0,r=Pu(t,n[t],s);t==="float"&&(t="cssFloat"),s?e.setProperty(t,r):e[t]=r}}var Sd=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $l(e,n){if(n){if(Sd[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(x(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(x(61))}if(n.style!=null&&typeof n.style!="object")throw Error(x(62))}}function Hl(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bl=null;function $a(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vl=null,it=null,ut=null;function Uo(e){if(e=ws(e)){if(typeof Vl!="function")throw Error(x(280));var n=e.stateNode;n&&(n=Dr(n),Vl(e.stateNode,e.type,n))}}function Ou(e){it?ut?ut.push(e):ut=[e]:it=e}function Au(){if(it){var e=it,n=ut;if(ut=it=null,Uo(e),n)for(e=0;e>>=0,e===0?32:31-(Dd(e)/bd|0)|0}var Ns=64,Os=4194304;function $t(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ar(e,n){var t=e.pendingLanes;if(t===0)return 0;var s=0,r=e.suspendedLanes,l=e.pingedLanes,a=t&268435455;if(a!==0){var o=a&~r;o!==0?s=$t(o):(l&=a,l!==0&&(s=$t(l)))}else a=t&~r,a!==0?s=$t(a):l!==0&&(s=$t(l));if(s===0)return 0;if(n!==0&&n!==s&&!(n&r)&&(r=s&-s,l=n&-n,r>=l||r===16&&(l&4194240)!==0))return n;if(s&4&&(s|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0t;t++)n.push(e);return n}function gs(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-$e(n),e[n]=t}function Ud(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0=Wt),Xo=String.fromCharCode(32),Go=!1;function qu(e,n){switch(e){case"keyup":return mf.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function vf(e,n){switch(e){case"compositionend":return Zu(n);case"keypress":return n.which!==32?null:(Go=!0,Xo);case"textInput":return e=n.data,e===Xo&&Go?null:e;default:return null}}function gf(e,n){if(qn)return e==="compositionend"||!Xa&&qu(e,n)?(e=Xu(),Qs=Qa=dn=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=s}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ei(t)}}function tc(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?tc(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function sc(){for(var e=window,n=tr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=tr(e.document)}return n}function Ga(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Tf(e){var n=sc(),t=e.focusedElem,s=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&tc(t.ownerDocument.documentElement,t)){if(s!==null&&Ga(t)){if(n=s.start,e=s.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var r=t.textContent.length,l=Math.min(s.start,r);s=s.end===void 0?l:Math.min(s.end,r),!e.extend&&l>s&&(r=s,s=l,l=r),r=ni(t,l);var a=ni(t,s);r&&a&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(n=n.createRange(),n.setStart(r.node,r.offset),e.removeAllRanges(),l>s?(e.addRange(n),e.extend(a.node,a.offset)):(n.setEnd(a.node,a.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Zn=null,Gl=null,Yt=null,ql=!1;function ti(e,n,t){var s=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;ql||Zn==null||Zn!==tr(s)||(s=Zn,"selectionStart"in s&&Ga(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Yt&&ls(Yt,s)||(Yt=s,s=ur(Gl,"onSelect"),0nt||(e.current=sa[nt],sa[nt]=null,nt--)}function F(e,n){nt++,sa[nt]=e.current,e.current=n}var Sn={},pe=Cn(Sn),we=Cn(!1),Un=Sn;function mt(e,n){var t=e.type.contextTypes;if(!t)return Sn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var r={},l;for(l in t)r[l]=n[l];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=r),r}function xe(e){return e=e.childContextTypes,e!=null}function pr(){U(we),U(pe)}function ui(e,n,t){if(pe.current!==Sn)throw Error(x(168));F(pe,n),F(we,t)}function dc(e,n,t){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return t;s=s.getChildContext();for(var r in s)if(!(r in n))throw Error(x(108,xd(e)||"Unknown",r));return Y({},t,s)}function dr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Un=pe.current,F(pe,e),F(we,we.current),!0}function ci(e,n,t){var s=e.stateNode;if(!s)throw Error(x(169));t?(e=dc(e,n,Un),s.__reactInternalMemoizedMergedChildContext=e,U(we),U(pe),F(pe,e)):U(we),F(we,t)}var qe=null,br=!1,ml=!1;function fc(e){qe===null?qe=[e]:qe.push(e)}function Mf(e){br=!0,fc(e)}function Tn(){if(!ml&&qe!==null){ml=!0;var e=0,n=z;try{var t=qe;for(z=1;e>=a,r-=a,Ze=1<<32-$e(n)+r|t<N?($=E,E=null):$=E.sibling;var I=h(d,E,m[N],w);if(I===null){E===null&&(E=$);break}e&&E&&I.alternate===null&&n(d,E),p=l(I,p,N),k===null?_=I:k.sibling=I,k=I,E=$}if(N===m.length)return t(d,E),V&&On(d,N),_;if(E===null){for(;NN?($=E,E=null):$=E.sibling;var De=h(d,E,I.value,w);if(De===null){E===null&&(E=$);break}e&&E&&De.alternate===null&&n(d,E),p=l(De,p,N),k===null?_=De:k.sibling=De,k=De,E=$}if(I.done)return t(d,E),V&&On(d,N),_;if(E===null){for(;!I.done;N++,I=m.next())I=f(d,I.value,w),I!==null&&(p=l(I,p,N),k===null?_=I:k.sibling=I,k=I);return V&&On(d,N),_}for(E=s(d,E);!I.done;N++,I=m.next())I=v(E,d,N,I.value,w),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?N:I.key),p=l(I,p,N),k===null?_=I:k.sibling=I,k=I);return e&&E.forEach(function(Tt){return n(d,Tt)}),V&&On(d,N),_}function P(d,p,m,w){if(typeof m=="object"&&m!==null&&m.type===Gn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Cs:e:{for(var _=m.key,k=p;k!==null;){if(k.key===_){if(_=m.type,_===Gn){if(k.tag===7){t(d,k.sibling),p=r(k,m.props.children),p.return=d,d=p;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===on&&vi(_)===k.type){t(d,k.sibling),p=r(k,m.props),p.ref=It(d,k,m),p.return=d,d=p;break e}t(d,k);break}else n(d,k);k=k.sibling}m.type===Gn?(p=zn(m.props.children,d.mode,w,m.key),p.return=d,d=p):(w=er(m.type,m.key,m.props,null,d.mode,w),w.ref=It(d,p,m),w.return=d,d=w)}return a(d);case Xn:e:{for(k=m.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===m.containerInfo&&p.stateNode.implementation===m.implementation){t(d,p.sibling),p=r(p,m.children||[]),p.return=d,d=p;break e}else{t(d,p);break}else n(d,p);p=p.sibling}p=_l(m,d.mode,w),p.return=d,d=p}return a(d);case on:return k=m._init,P(d,p,k(m._payload),w)}if(Ut(m))return g(d,p,m,w);if(Nt(m))return j(d,p,m,w);zs(d,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,p!==null&&p.tag===6?(t(d,p.sibling),p=r(p,m),p.return=d,d=p):(t(d,p),p=kl(m,d.mode,w),p.return=d,d=p),a(d)):t(d,p)}return P}var vt=xc(!0),kc=xc(!1),xs={},Ke=Cn(xs),us=Cn(xs),cs=Cn(xs);function In(e){if(e===xs)throw Error(x(174));return e}function lo(e,n){switch(F(cs,n),F(us,e),F(Ke,xs),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Ul(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Ul(n,e)}U(Ke),F(Ke,n)}function gt(){U(Ke),U(us),U(cs)}function _c(e){In(cs.current);var n=In(Ke.current),t=Ul(n,e.type);n!==t&&(F(us,e),F(Ke,t))}function ao(e){us.current===e&&(U(Ke),U(us))}var W=Cn(0);function gr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var yl=[];function oo(){for(var e=0;et?t:4,e(!0);var s=vl.transition;vl.transition={};try{e(!1),n()}finally{z=t,vl.transition=s}}function Mc(){return Ie().memoizedState}function Bf(e,n,t){var s=xn(e);if(t={lane:s,action:t,hasEagerState:!1,eagerState:null,next:null},Uc(e))$c(n,t);else if(t=vc(e,n,t,s),t!==null){var r=he();He(t,e,s,r),Hc(t,n,s)}}function Vf(e,n,t){var s=xn(e),r={lane:s,action:t,hasEagerState:!1,eagerState:null,next:null};if(Uc(e))$c(n,r);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=n.lastRenderedReducer,l!==null))try{var a=n.lastRenderedState,o=l(a,t);if(r.hasEagerState=!0,r.eagerState=o,Be(o,a)){var i=n.interleaved;i===null?(r.next=r,so(n)):(r.next=i.next,i.next=r),n.interleaved=r;return}}catch{}finally{}t=vc(e,n,r,s),t!==null&&(r=he(),He(t,e,s,r),Hc(t,n,s))}}function Uc(e){var n=e.alternate;return e===Q||n!==null&&n===Q}function $c(e,n){Kt=jr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Hc(e,n,t){if(t&4194240){var s=n.lanes;s&=e.pendingLanes,t|=s,n.lanes=t,Ba(e,t)}}var wr={readContext:Le,useCallback:ie,useContext:ie,useEffect:ie,useImperativeHandle:ie,useInsertionEffect:ie,useLayoutEffect:ie,useMemo:ie,useReducer:ie,useRef:ie,useState:ie,useDebugValue:ie,useDeferredValue:ie,useTransition:ie,useMutableSource:ie,useSyncExternalStore:ie,useId:ie,unstable_isNewReconciler:!1},Wf={readContext:Le,useCallback:function(e,n){return We().memoizedState=[e,n===void 0?null:n],e},useContext:Le,useEffect:ji,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Gs(4194308,4,Ic.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Gs(4194308,4,e,n)},useInsertionEffect:function(e,n){return Gs(4,2,e,n)},useMemo:function(e,n){var t=We();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var s=We();return n=t!==void 0?t(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=Bf.bind(null,Q,e),[s.memoizedState,e]},useRef:function(e){var n=We();return e={current:e},n.memoizedState=e},useState:gi,useDebugValue:fo,useDeferredValue:function(e){return We().memoizedState=e},useTransition:function(){var e=gi(!1),n=e[0];return e=Hf.bind(null,e[1]),We().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var s=Q,r=We();if(V){if(t===void 0)throw Error(x(407));t=t()}else{if(t=n(),se===null)throw Error(x(349));Hn&30||Cc(s,n,t)}r.memoizedState=t;var l={value:t,getSnapshot:n};return r.queue=l,ji(Pc.bind(null,s,l,e),[e]),s.flags|=2048,fs(9,Tc.bind(null,s,l,t,n),void 0,null),t},useId:function(){var e=We(),n=se.identifierPrefix;if(V){var t=Je,s=Ze;t=(s&~(1<<32-$e(s)-1)).toString(32)+t,n=":"+n+"R"+t,t=ps++,0<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=a.createElement(t,{is:s.is}):(e=a.createElement(t),t==="select"&&(a=e,s.multiple?a.multiple=!0:s.size&&(a.size=s.size))):e=a.createElementNS(e,t),e[Qe]=n,e[is]=s,qc(e,n,!1,!1),n.stateNode=e;e:{switch(a=Hl(t,s),t){case"dialog":M("cancel",e),M("close",e),r=s;break;case"iframe":case"object":case"embed":M("load",e),r=s;break;case"video":case"audio":for(r=0;rwt&&(n.flags|=128,s=!0,Dt(l,!1),n.lanes=4194304)}else{if(!s)if(e=gr(a),e!==null){if(n.flags|=128,s=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),Dt(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!V)return ue(n),null}else 2*G()-l.renderingStartTime>wt&&t!==1073741824&&(n.flags|=128,s=!0,Dt(l,!1),n.lanes=4194304);l.isBackwards?(a.sibling=n.child,n.child=a):(t=l.last,t!==null?t.sibling=a:n.child=a,l.last=a)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=G(),n.sibling=null,t=W.current,F(W,s?t&1|2:t&1),n):(ue(n),null);case 22:case 23:return jo(),s=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(n.flags|=8192),s&&n.mode&1?_e&1073741824&&(ue(n),n.subtreeFlags&6&&(n.flags|=8192)):ue(n),null;case 24:return null;case 25:return null}throw Error(x(156,n.tag))}function Jf(e,n){switch(Za(n),n.tag){case 1:return xe(n.type)&&pr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return gt(),U(we),U(pe),oo(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return ao(n),null;case 13:if(U(W),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(x(340));yt()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return U(W),null;case 4:return gt(),null;case 10:return to(n.type._context),null;case 22:case 23:return jo(),null;case 24:return null;default:return null}}var Ms=!1,ce=!1,eh=typeof WeakSet=="function"?WeakSet:Set,C=null;function lt(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(s){K(e,n,s)}else t.current=null}function ma(e,n,t){try{t()}catch(s){K(e,n,s)}}var Pi=!1;function nh(e,n){if(Zl=or,e=sc(),Ga(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var s=t.getSelection&&t.getSelection();if(s&&s.rangeCount!==0){t=s.anchorNode;var r=s.anchorOffset,l=s.focusNode;s=s.focusOffset;try{t.nodeType,l.nodeType}catch{t=null;break e}var a=0,o=-1,i=-1,u=0,c=0,f=e,h=null;n:for(;;){for(var v;f!==t||r!==0&&f.nodeType!==3||(o=a+r),f!==l||s!==0&&f.nodeType!==3||(i=a+s),f.nodeType===3&&(a+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===e)break n;if(h===t&&++u===r&&(o=a),h===l&&++c===s&&(i=a),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}t=o===-1||i===-1?null:{start:o,end:i}}else t=null}t=t||{start:0,end:0}}else t=null;for(Jl={focusedElem:e,selectionRange:t},or=!1,C=n;C!==null;)if(n=C,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,C=e;else for(;C!==null;){n=C;try{var g=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var j=g.memoizedProps,P=g.memoizedState,d=n.stateNode,p=d.getSnapshotBeforeUpdate(n.elementType===n.type?j:ze(n.type,j),P);d.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var m=n.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(w){K(n,n.return,w)}if(e=n.sibling,e!==null){e.return=n.return,C=e;break}C=n.return}return g=Pi,Pi=!1,g}function Xt(e,n,t){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var r=s=s.next;do{if((r.tag&e)===e){var l=r.destroy;r.destroy=void 0,l!==void 0&&ma(n,t,l)}r=r.next}while(r!==s)}}function Mr(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var s=t.create;t.destroy=s()}t=t.next}while(t!==n)}}function ya(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function ep(e){var n=e.alternate;n!==null&&(e.alternate=null,ep(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Qe],delete n[is],delete n[ta],delete n[zf],delete n[Ff])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function np(e){return e.tag===5||e.tag===3||e.tag===4}function Ni(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||np(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function va(e,n,t){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=cr));else if(s!==4&&(e=e.child,e!==null))for(va(e,n,t),e=e.sibling;e!==null;)va(e,n,t),e=e.sibling}function ga(e,n,t){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(ga(e,n,t),e=e.sibling;e!==null;)ga(e,n,t),e=e.sibling}var le=null,Fe=!1;function an(e,n,t){for(t=t.child;t!==null;)tp(e,n,t),t=t.sibling}function tp(e,n,t){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(Ar,t)}catch{}switch(t.tag){case 5:ce||lt(t,n);case 6:var s=le,r=Fe;le=null,an(e,n,t),le=s,Fe=r,le!==null&&(Fe?(e=le,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):le.removeChild(t.stateNode));break;case 18:le!==null&&(Fe?(e=le,t=t.stateNode,e.nodeType===8?hl(e.parentNode,t):e.nodeType===1&&hl(e,t),ss(e)):hl(le,t.stateNode));break;case 4:s=le,r=Fe,le=t.stateNode.containerInfo,Fe=!0,an(e,n,t),le=s,Fe=r;break;case 0:case 11:case 14:case 15:if(!ce&&(s=t.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){r=s=s.next;do{var l=r,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&ma(t,n,a),r=r.next}while(r!==s)}an(e,n,t);break;case 1:if(!ce&&(lt(t,n),s=t.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=t.memoizedProps,s.state=t.memoizedState,s.componentWillUnmount()}catch(o){K(t,n,o)}an(e,n,t);break;case 21:an(e,n,t);break;case 22:t.mode&1?(ce=(s=ce)||t.memoizedState!==null,an(e,n,t),ce=s):an(e,n,t);break;default:an(e,n,t)}}function Oi(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new eh),n.forEach(function(s){var r=ch.bind(null,e,s);t.has(s)||(t.add(s),s.then(r,r))})}}function be(e,n){var t=n.deletions;if(t!==null)for(var s=0;sr&&(r=a),s&=~l}if(s=r,s=G()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*sh(s/1960))-s,10e?16:e,fn===null)var s=!1;else{if(e=fn,fn=null,_r=0,D&6)throw Error(x(331));var r=D;for(D|=4,C=e.current;C!==null;){var l=C,a=l.child;if(C.flags&16){var o=l.deletions;if(o!==null){for(var i=0;iG()-vo?bn(e,0):yo|=t),ke(e,n)}function cp(e,n){n===0&&(e.mode&1?(n=Os,Os<<=1,!(Os&130023424)&&(Os=4194304)):n=1);var t=he();e=sn(e,n),e!==null&&(gs(e,n,t),ke(e,t))}function uh(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),cp(e,t)}function ch(e,n){var t=0;switch(e.tag){case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(t=r.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(x(314))}s!==null&&s.delete(n),cp(e,t)}var pp;pp=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||we.current)je=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return je=!1,qf(e,n,t);je=!!(e.flags&131072)}else je=!1,V&&n.flags&1048576&&hc(n,hr,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;qs(e,n),e=n.pendingProps;var r=mt(n,pe.current);pt(n,t),r=uo(null,n,s,e,r,t);var l=co();return n.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,xe(s)?(l=!0,dr(n)):l=!1,n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,ro(n),r.updater=zr,n.stateNode=r,r._reactInternals=n,ia(n,s,e,t),n=pa(null,n,s,!0,l,t)):(n.tag=0,V&&l&&qa(n),fe(null,n,r,t),n=n.child),n;case 16:s=n.elementType;e:{switch(qs(e,n),e=n.pendingProps,r=s._init,s=r(s._payload),n.type=s,r=n.tag=dh(s),e=ze(s,e),r){case 0:n=ca(null,n,s,e,t);break e;case 1:n=Ei(null,n,s,e,t);break e;case 11:n=_i(null,n,s,e,t);break e;case 14:n=Si(null,n,s,ze(s.type,e),t);break e}throw Error(x(306,s,""))}return n;case 0:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:ze(s,r),ca(e,n,s,r,t);case 1:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:ze(s,r),Ei(e,n,s,r,t);case 3:e:{if(Kc(n),e===null)throw Error(x(387));s=n.pendingProps,l=n.memoizedState,r=l.element,gc(e,n),vr(n,s,null,t);var a=n.memoizedState;if(s=a.element,l.isDehydrated)if(l={element:s,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},n.updateQueue.baseState=l,n.memoizedState=l,n.flags&256){r=jt(Error(x(423)),n),n=Ci(e,n,s,t,r);break e}else if(s!==r){r=jt(Error(x(424)),n),n=Ci(e,n,s,t,r);break e}else for(Se=gn(n.stateNode.containerInfo.firstChild),Ee=n,V=!0,Me=null,t=kc(n,null,s,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(yt(),s===r){n=rn(e,n,t);break e}fe(e,n,s,t)}n=n.child}return n;case 5:return _c(n),e===null&&la(n),s=n.type,r=n.pendingProps,l=e!==null?e.memoizedProps:null,a=r.children,ea(s,r)?a=null:l!==null&&ea(s,l)&&(n.flags|=32),Yc(e,n),fe(e,n,a,t),n.child;case 6:return e===null&&la(n),null;case 13:return Xc(e,n,t);case 4:return lo(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=vt(n,null,s,t):fe(e,n,s,t),n.child;case 11:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:ze(s,r),_i(e,n,s,r,t);case 7:return fe(e,n,n.pendingProps,t),n.child;case 8:return fe(e,n,n.pendingProps.children,t),n.child;case 12:return fe(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(s=n.type._context,r=n.pendingProps,l=n.memoizedProps,a=r.value,F(mr,s._currentValue),s._currentValue=a,l!==null)if(Be(l.value,a)){if(l.children===r.children&&!we.current){n=rn(e,n,t);break e}}else for(l=n.child,l!==null&&(l.return=n);l!==null;){var o=l.dependencies;if(o!==null){a=l.child;for(var i=o.firstContext;i!==null;){if(i.context===s){if(l.tag===1){i=en(-1,t&-t),i.tag=2;var u=l.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?i.next=i:(i.next=c.next,c.next=i),u.pending=i}}l.lanes|=t,i=l.alternate,i!==null&&(i.lanes|=t),aa(l.return,t,n),o.lanes|=t;break}i=i.next}}else if(l.tag===10)a=l.type===n.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(x(341));a.lanes|=t,o=a.alternate,o!==null&&(o.lanes|=t),aa(a,t,n),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===n){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}fe(e,n,r.children,t),n=n.child}return n;case 9:return r=n.type,s=n.pendingProps.children,pt(n,t),r=Le(r),s=s(r),n.flags|=1,fe(e,n,s,t),n.child;case 14:return s=n.type,r=ze(s,n.pendingProps),r=ze(s.type,r),Si(e,n,s,r,t);case 15:return Wc(e,n,n.type,n.pendingProps,t);case 17:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:ze(s,r),qs(e,n),n.tag=1,xe(s)?(e=!0,dr(n)):e=!1,pt(n,t),wc(n,s,r),ia(n,s,r,t),pa(null,n,s,!0,e,t);case 19:return Gc(e,n,t);case 22:return Qc(e,n,t)}throw Error(x(156,n.tag))};function dp(e,n){return Fu(e,n)}function ph(e,n,t,s){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ae(e,n,t,s){return new ph(e,n,t,s)}function xo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dh(e){if(typeof e=="function")return xo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ma)return 11;if(e===Ua)return 14}return 2}function kn(e,n){var t=e.alternate;return t===null?(t=Ae(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function er(e,n,t,s,r,l){var a=2;if(s=e,typeof e=="function")xo(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Gn:return zn(t.children,r,l,n);case Fa:a=8,r|=8;break;case Rl:return e=Ae(12,t,n,r|2),e.elementType=Rl,e.lanes=l,e;case Ll:return e=Ae(13,t,n,r),e.elementType=Ll,e.lanes=l,e;case Il:return e=Ae(19,t,n,r),e.elementType=Il,e.lanes=l,e;case xu:return $r(t,r,l,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ju:a=10;break e;case wu:a=9;break e;case Ma:a=11;break e;case Ua:a=14;break e;case on:a=16,s=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return n=Ae(a,t,n,r),n.elementType=e,n.type=s,n.lanes=l,n}function zn(e,n,t,s){return e=Ae(7,e,s,n),e.lanes=t,e}function $r(e,n,t,s){return e=Ae(22,e,s,n),e.elementType=xu,e.lanes=t,e.stateNode={isHidden:!1},e}function kl(e,n,t){return e=Ae(6,e,null,n),e.lanes=t,e}function _l(e,n,t){return n=Ae(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function fh(e,n,t,s,r){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sl(0),this.expirationTimes=sl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sl(0),this.identifierPrefix=s,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function ko(e,n,t,s,r,l,a,o,i){return e=new fh(e,n,t,o,i),n===1?(n=1,l===!0&&(n|=8)):n=0,l=Ae(3,null,null,n),e.current=l,l.stateNode=e,l.memoizedState={element:s,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},ro(l),e}function hh(e,n,t){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yp)}catch(e){console.error(e)}}yp(),hu.exports=Te;var jh=hu.exports,vp,gp,Fi=jh;gp=Fi.createRoot,vp=Fi.hydrateRoot;const jp={theme:"light",initialized:!1},wp=S.createContext({state:jp,setTheme:e=>{},loadLocalStorage:()=>{}});function xp(){return S.useContext(wp)}function wh(e){try{localStorage.setItem("theme",e)}catch(n){console.error(n)}}const Mi=({children:e})=>{const[n,t]=S.useState(jp);function s(a){a=="dark"?(document.body.classList.remove("light"),document.body.classList.add("dark")):(document.body.classList.remove("dark"),document.body.classList.add("light"))}function r(){try{const a=localStorage.getItem("theme")||"light";s(a),t(o=>({...o,theme:a}))}catch(a){console.error(a)}t(a=>({...a,initialized:!0}))}function l(a){s(a),t({...n,theme:a}),wh(a)}return y.jsx(wp.Provider,{value:S.useMemo(()=>({state:n,loadLocalStorage:r,setTheme:l}),[n]),children:e})};/** - * @remix-run/router v1.8.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var n=1;n"u")throw new Error(n)}function Co(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function kh(){return Math.random().toString(36).substr(2,8)}function $i(e,n){return{usr:e.state,key:e.key,idx:n}}function _a(e,n,t,s){return t===void 0&&(t=null),ms({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?Et(n):n,{state:t,key:n&&n.key||s||kh()})}function kp(e){let{pathname:n="/",search:t="",hash:s=""}=e;return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function Et(e){let n={};if(e){let t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));let s=e.indexOf("?");s>=0&&(n.search=e.substr(s),e=e.substr(0,s)),e&&(n.pathname=e)}return n}function _h(e,n,t,s){s===void 0&&(s={});let{window:r=document.defaultView,v5Compat:l=!1}=s,a=r.history,o=hn.Pop,i=null,u=c();u==null&&(u=0,a.replaceState(ms({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function f(){o=hn.Pop;let P=c(),d=P==null?null:P-u;u=P,i&&i({action:o,location:j.location,delta:d})}function h(P,d){o=hn.Push;let p=_a(j.location,P,d);t&&t(p,P),u=c()+1;let m=$i(p,u),w=j.createHref(p);try{a.pushState(m,"",w)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;r.location.assign(w)}l&&i&&i({action:o,location:j.location,delta:1})}function v(P,d){o=hn.Replace;let p=_a(j.location,P,d);t&&t(p,P),u=c();let m=$i(p,u),w=j.createHref(p);a.replaceState(m,"",w),l&&i&&i({action:o,location:j.location,delta:0})}function g(P){let d=r.location.origin!=="null"?r.location.origin:r.location.href,p=typeof P=="string"?P:kp(P);return ee(d,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,d)}let j={get action(){return o},get location(){return e(r,a)},listen(P){if(i)throw new Error("A history only accepts one active listener");return r.addEventListener(Ui,f),i=P,()=>{r.removeEventListener(Ui,f),i=null}},createHref(P){return n(r,P)},createURL:g,encodeLocation(P){let d=g(P);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:h,replace:v,go(P){return a.go(P)}};return j}var Hi;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hi||(Hi={}));function Sh(e,n,t){t===void 0&&(t="/");let s=typeof n=="string"?Et(n):n,r=Ep(s.pathname||"/",t);if(r==null)return null;let l=_p(e);Eh(l);let a=null;for(let o=0;a==null&&o{let i={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:a,route:l};i.relativePath.startsWith("/")&&(ee(i.relativePath.startsWith(s),'Absolute route path "'+i.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),i.relativePath=i.relativePath.slice(s.length));let u=Fn([s,i.relativePath]),c=t.concat(i);l.children&&l.children.length>0&&(ee(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),_p(l.children,n,c,u)),!(l.path==null&&!l.index)&&n.push({path:u,score:Rh(u,l.index),routesMeta:c})};return e.forEach((l,a)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))r(l,a);else for(let i of Sp(l.path))r(l,a,i)}),n}function Sp(e){let n=e.split("/");if(n.length===0)return[];let[t,...s]=n,r=t.endsWith("?"),l=t.replace(/\?$/,"");if(s.length===0)return r?[l,""]:[l];let a=Sp(s.join("/")),o=[];return o.push(...a.map(i=>i===""?l:[l,i].join("/"))),r&&o.push(...a),o.map(i=>e.startsWith("/")&&i===""?"/":i)}function Eh(e){e.sort((n,t)=>n.score!==t.score?t.score-n.score:Lh(n.routesMeta.map(s=>s.childrenIndex),t.routesMeta.map(s=>s.childrenIndex)))}const Ch=/^:\w+$/,Th=3,Ph=2,Nh=1,Oh=10,Ah=-2,Bi=e=>e==="*";function Rh(e,n){let t=e.split("/"),s=t.length;return t.some(Bi)&&(s+=Ah),n&&(s+=Ph),t.filter(r=>!Bi(r)).reduce((r,l)=>r+(Ch.test(l)?Th:l===""?Nh:Oh),s)}function Lh(e,n){return e.length===n.length&&e.slice(0,-1).every((s,r)=>s===n[r])?e[e.length-1]-n[n.length-1]:0}function Ih(e,n){let{routesMeta:t}=e,s={},r="/",l=[];for(let a=0;a{if(c==="*"){let h=o[f]||"";a=l.slice(0,l.length-h.length).replace(/(.)\/+$/,"$1")}return u[c]=Fh(o[f]||"",c),u},{}),pathname:l,pathnameBase:a,pattern:e}}function bh(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!0),Co(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,o)=>(s.push(o),"/([^\\/]+)"));return e.endsWith("*")?(s.push("*"),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,n?void 0:"i"),s]}function zh(e){try{return decodeURI(e)}catch(n){return Co(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function Fh(e,n){try{return decodeURIComponent(e)}catch(t){return Co(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),e}}function Ep(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let t=n.endsWith("/")?n.length-1:n.length,s=e.charAt(t);return s&&s!=="/"?null:e.slice(t)||"/"}function Mh(e,n){n===void 0&&(n="/");let{pathname:t,search:s="",hash:r=""}=typeof e=="string"?Et(e):e;return{pathname:t?t.startsWith("/")?t:Uh(t,n):n,search:Vh(s),hash:Wh(r)}}function Uh(e,n){let t=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function Sl(e,n,t,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function $h(e){return e.filter((n,t)=>t===0||n.route.path&&n.route.path.length>0)}function Hh(e,n,t,s){s===void 0&&(s=!1);let r;typeof e=="string"?r=Et(e):(r=ms({},e),ee(!r.pathname||!r.pathname.includes("?"),Sl("?","pathname","search",r)),ee(!r.pathname||!r.pathname.includes("#"),Sl("#","pathname","hash",r)),ee(!r.search||!r.search.includes("#"),Sl("#","search","hash",r)));let l=e===""||r.pathname==="",a=l?"/":r.pathname,o;if(s||a==null)o=t;else{let f=n.length-1;if(a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;r.pathname=h.join("/")}o=f>=0?n[f]:"/"}let i=Mh(r,o),u=a&&a!=="/"&&a.endsWith("/"),c=(l||a===".")&&t.endsWith("/");return!i.pathname.endsWith("/")&&(u||c)&&(i.pathname+="/"),i}const Fn=e=>e.join("/").replace(/\/\/+/g,"/"),Bh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Qh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Cp=["post","put","patch","delete"];new Set(Cp);const Yh=["get",...Cp];new Set(Yh);/** - * React Router v6.15.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Cr(){return Cr=Object.assign?Object.assign.bind():function(e){for(var n=1;ni.pathnameBase)),a=S.useRef(!1);return Pp(()=>{a.current=!0}),S.useCallback(function(i,u){if(u===void 0&&(u={}),!a.current)return;if(typeof i=="number"){t.go(i);return}let c=Hh(i,JSON.parse(l),r,u.relative==="path");e==null&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Fn([n,c.pathname])),(u.replace?t.replace:t.push)(c,u.state,u)},[n,t,l,r,e])}function qh(e,n){return Zh(e,n)}function Zh(e,n,t){Kr()||ee(!1);let{navigator:s}=S.useContext(Qr),{matches:r}=S.useContext(Ct),l=r[r.length-1],a=l?l.params:{};l&&l.pathname;let o=l?l.pathnameBase:"/";l&&l.route;let i=Po(),u;if(n){var c;let j=typeof n=="string"?Et(n):n;o==="/"||(c=j.pathname)!=null&&c.startsWith(o)||ee(!1),u=j}else u=i;let f=u.pathname||"/",h=o==="/"?f:f.slice(o.length)||"/",v=Sh(e,{pathname:h}),g=sm(v&&v.map(j=>Object.assign({},j,{params:Object.assign({},a,j.params),pathname:Fn([o,s.encodeLocation?s.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?o:Fn([o,s.encodeLocation?s.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),r,t);return n&&g?S.createElement(Yr.Provider,{value:{location:Cr({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:hn.Pop}},g):g}function Jh(){let e=om(),n=Qh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},l=null;return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},n),t?S.createElement("pre",{style:r},t):null,l)}const em=S.createElement(Jh,null);class nm extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error||t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){console.error("React Router caught the following error during render",n,t)}render(){return this.state.error?S.createElement(Ct.Provider,{value:this.props.routeContext},S.createElement(Tp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tm(e){let{routeContext:n,match:t,children:s}=e,r=S.useContext(To);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Ct.Provider,{value:n},s)}function sm(e,n,t){var s;if(n===void 0&&(n=[]),t===void 0&&(t=null),e==null){var r;if((r=t)!=null&&r.errors)e=t.matches;else return null}let l=e,a=(s=t)==null?void 0:s.errors;if(a!=null){let o=l.findIndex(i=>i.route.id&&(a==null?void 0:a[i.route.id]));o>=0||ee(!1),l=l.slice(0,Math.min(l.length,o+1))}return l.reduceRight((o,i,u)=>{let c=i.route.id?a==null?void 0:a[i.route.id]:null,f=null;t&&(f=i.route.errorElement||em);let h=n.concat(l.slice(0,u+1)),v=()=>{let g;return c?g=f:i.route.Component?g=S.createElement(i.route.Component,null):i.route.element?g=i.route.element:g=o,S.createElement(tm,{match:i,routeContext:{outlet:o,matches:h,isDataRoute:t!=null},children:g})};return t&&(i.route.ErrorBoundary||i.route.errorElement||u===0)?S.createElement(nm,{location:t.location,revalidation:t.revalidation,component:f,error:c,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):v()},null)}var Np=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Np||{}),Tr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Tr||{});function rm(e){let n=S.useContext(To);return n||ee(!1),n}function lm(e){let n=S.useContext(Kh);return n||ee(!1),n}function am(e){let n=S.useContext(Ct);return n||ee(!1),n}function Op(e){let n=am(),t=n.matches[n.matches.length-1];return t.route.id||ee(!1),t.route.id}function om(){var e;let n=S.useContext(Tp),t=lm(Tr.UseRouteError),s=Op(Tr.UseRouteError);return n||((e=t.errors)==null?void 0:e[s])}function im(){let{router:e}=rm(Np.UseNavigateStable),n=Op(Tr.UseNavigateStable),t=S.useRef(!1);return Pp(()=>{t.current=!0}),S.useCallback(function(r,l){l===void 0&&(l={}),t.current&&(typeof r=="number"?e.navigate(r):e.navigate(r,Cr({fromRouteId:n},l)))},[e,n])}function Ap(e){ee(!1)}function um(e){let{basename:n="/",children:t=null,location:s,navigationType:r=hn.Pop,navigator:l,static:a=!1}=e;Kr()&&ee(!1);let o=n.replace(/^\/*/,"/"),i=S.useMemo(()=>({basename:o,navigator:l,static:a}),[o,l,a]);typeof s=="string"&&(s=Et(s));let{pathname:u="/",search:c="",hash:f="",state:h=null,key:v="default"}=s,g=S.useMemo(()=>{let j=Ep(u,o);return j==null?null:{location:{pathname:j,search:c,hash:f,state:h,key:v},navigationType:r}},[o,u,c,f,h,v,r]);return g==null?null:S.createElement(Qr.Provider,{value:i},S.createElement(Yr.Provider,{children:t,value:g}))}function cm(e){let{children:n,location:t}=e;return qh(Sa(n),t)}new Promise(()=>{});function Sa(e,n){n===void 0&&(n=[]);let t=[];return S.Children.forEach(e,(s,r)=>{if(!S.isValidElement(s))return;let l=[...n,r];if(s.type===S.Fragment){t.push.apply(t,Sa(s.props.children,l));return}s.type!==Ap&&ee(!1),!s.props.index||!s.props.children||ee(!1);let a={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(a.children=Sa(s.props.children,l)),t.push(a)}),t}/** - * React Router DOM v6.15.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Ea(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,t)=>{let s=e[t];return n.concat(Array.isArray(s)?s.map(r=>[t,r]):[[t,s]])},[]))}function pm(e,n){let t=Ea(e);return n&&n.forEach((s,r)=>{t.has(r)||n.getAll(r).forEach(l=>{t.append(r,l)})}),t}const dm="startTransition",Vi=id[dm];function fm(e){let{basename:n,children:t,future:s,window:r}=e,l=S.useRef();l.current==null&&(l.current=xh({window:r,v5Compat:!0}));let a=l.current,[o,i]=S.useState({action:a.action,location:a.location}),{v7_startTransition:u}=s||{},c=S.useCallback(f=>{u&&Vi?Vi(()=>i(f)):i(f)},[i,u]);return S.useLayoutEffect(()=>a.listen(c),[a,c]),S.createElement(um,{basename:n,children:t,location:o.location,navigationType:o.action,navigator:a})}var Wi;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Wi||(Wi={}));var Qi;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Qi||(Qi={}));function hm(e){let n=S.useRef(Ea(e)),t=S.useRef(!1),s=Po(),r=S.useMemo(()=>pm(s.search,t.current?null:n.current),[s.search]),l=Xh(),a=S.useCallback((o,i)=>{const u=Ea(typeof o=="function"?o(r):o);t.current=!0,l("?"+u,i)},[l,r]);return[r,a]}const mm="_component_ynf6p_1",ym="_main_ynf6p_7",vm="_footer_ynf6p_23",El={component:mm,main:ym,footer:vm},gm="_component_15xxl_1",jm="_logo_15xxl_10",wm="_header_15xxl_13",xm="_mode_15xxl_17",Hs={component:gm,logo:jm,header:wm,mode:xm},km=({size:e,className:n=""})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#fff",viewBox:"0 0 438.277 438.277",width:e,height:e,className:n,children:y.jsx("path",{d:"M428.756 300.104c-.664-3.81-2.334-7.047-4.996-9.713-5.9-5.903-12.752-7.142-20.554-3.716-20.937 9.708-42.641 14.558-65.097 14.558-28.171 0-54.152-6.94-77.943-20.838-23.791-13.894-42.631-32.736-56.525-56.53-13.899-23.793-20.844-49.773-20.844-77.945 0-21.888 4.333-42.683 12.991-62.384 8.66-19.7 21.176-36.973 37.543-51.82 6.283-5.898 7.713-12.752 4.287-20.557-3.236-7.801-9.041-11.511-17.415-11.132-29.121 1.141-56.72 7.664-82.797 19.556C111.33 31.478 88.917 47.13 70.168 66.548c-18.747 19.414-33.595 42.399-44.54 68.95-10.942 26.553-16.416 54.39-16.416 83.511 0 29.694 5.806 58.054 17.416 85.082 11.613 27.028 27.218 50.344 46.824 69.949 19.604 19.599 42.92 35.207 69.951 46.822 27.028 11.607 55.384 17.415 85.075 17.415 42.64 0 81.987-11.563 118.054-34.69 36.069-23.124 63.05-54.006 80.944-92.645 1.524-3.423 1.951-7.036 1.28-10.838zm-122.191 84.064c-24.646 11.711-50.676 17.562-78.087 17.562-24.743 0-48.39-4.853-70.947-14.558-22.554-9.705-41.971-22.695-58.246-38.972-16.271-16.272-29.259-35.686-38.97-58.241-9.707-22.556-14.561-46.203-14.561-70.948 0-40.922 12.135-77.466 36.403-109.636 24.266-32.165 55.531-53.959 93.788-65.379-19.795 31.405-29.694 65.379-29.694 101.926 0 34.644 8.564 66.715 25.697 96.223 17.128 29.499 40.446 52.811 69.95 69.948 29.499 17.129 61.565 25.694 96.211 25.694 10.656 0 21.129-.855 31.408-2.57-17.318 20.938-38.307 37.255-62.952 48.951z"})}),_m=({size:e,className:n=""})=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 302.4 302.4",width:e,height:e,className:n,children:[y.jsx("path",{d:"M204.8 97.6C191.2 84 172 75.2 151.2 75.2s-40 8.4-53.6 22.4c-13.6 13.6-22.4 32.8-22.4 53.6s8.8 40 22.4 53.6c13.6 13.6 32.8 22.4 53.6 22.4s40-8.4 53.6-22.4c13.6-13.6 22.4-32.8 22.4-53.6s-8.4-40-22.4-53.6zm-14.4 92.8c-10 10-24 16-39.2 16s-29.2-6-39.2-16-16-24-16-39.2 6-29.2 16-39.2 24-16 39.2-16 29.2 6 39.2 16 16 24 16 39.2-6 29.2-16 39.2z",stroke:"#252519",strokeWidth:12}),y.jsx("path",{d:"M292 140.8h-30.8c-5.6 0-10.4 4.8-10.4 10.4 0 5.6 4.8 10.4 10.4 10.4H292c5.6 0 10.4-4.8 10.4-10.4 0-5.6-4.8-10.4-10.4-10.4zm-140.8 110c-5.6 0-10.4 4.8-10.4 10.4V292c0 5.6 4.8 10.4 10.4 10.4 5.6 0 10.4-4.8 10.4-10.4v-30.8c0-5.6-4.8-10.4-10.4-10.4zm106.8-7.2-22-22c-3.6-4-10.4-4-14.4 0s-4 10.4 0 14.4l22 22c4 4 10.4 4 14.4 0s4-10.4 0-14.4zM151.2 0c-5.6 0-10.4 4.8-10.4 10.4v30.8c0 5.6 4.8 10.4 10.4 10.4 5.6 0 10.4-4.8 10.4-10.4V10.4c0-5.6-4.8-10.4-10.4-10.4zm107.2 44.4c-4-4-10.4-4-14.4 0l-22 22c-4 4-4 10.4 0 14.4 3.6 4 10.4 4 14.4 0l22-22c4-4 4-10.4 0-14.4zM41.2 140.8H10.4c-5.6 0-10.4 4.8-10.4 10.4s4.4 10.4 10.4 10.4h30.8c5.6 0 10.4-4.8 10.4-10.4 0-5.6-4.8-10.4-10.4-10.4zm39.2 80.8c-3.6-4-10.4-4-14.4 0l-22 22c-4 4-4 10.4 0 14.4s10.4 4 14.4 0l22-22c4-4 4-10.4 0-14.4zm0-155.2-22-22c-4-4-10.4-4-14.4 0s-4 10.4 0 14.4l22 22c4 4 10.4 4 14.4 0s4-10.4 0-14.4z",stroke:"#252519",strokeWidth:5})]}),Sm=({size:e,className:n="",fill:t})=>y.jsxs("svg",{"data-name":"Transparent Logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2048 1773.62",width:e,height:e,className:n,fill:t,children:[y.jsx("path",{style:{opacity:.8},d:"m1024 886.81-256 443.41 256 443.4 256-443.4-256-443.41z"}),y.jsx("path",{style:{opacity:.6},d:"m1280 443.41-256 443.4 256 443.41 256-443.41-256-443.4zM768 443.41l-256 443.4 256 443.41 256-443.41-256-443.4z"}),y.jsx("path",{style:{opacity:.45},d:"m1536 0-256 443.41 256 443.4 256-443.4L1536 0zM1152 221.7H896L768 443.41l256 443.4 256-443.4-128-221.71zM512 0 256 443.41l256 443.4 256-443.4L512 0z"}),y.jsx("path",{style:{opacity:.3},d:"M1792 443.4 2048 0h-512l256 443.4zM256 443.4 512 0H0l256 443.4z"})]});function Em(){const{state:e,setTheme:n}=xp();function t(){n(e.theme=="light"?"dark":"light")}return y.jsxs("div",{className:Hs.component,children:[y.jsx("a",{href:"/",children:y.jsx(Sm,{className:Hs.logo,size:40,fill:e.theme=="dark"?"rgb(255, 0, 255)":"currentColor"})}),y.jsx("h3",{className:Hs.header,children:y.jsx("a",{href:"/",children:"Vyper by Example"})}),y.jsx("button",{className:Hs.mode,onClick:t,children:e.theme=="dark"?y.jsx(km,{size:20}):y.jsx(_m,{size:20})})]})}const Cm="_component_pb8dz_1",Tm="_row_pb8dz_8",Pm="_bar_pb8dz_13",Nm="_khan_pb8dz_21",Om="_social_pb8dz_24",Am="_sce_pb8dz_29",Rm="_telegram_pb8dz_34",Lm="_discord_pb8dz_38",Im="_youTube_pb8dz_42",re={component:Cm,row:Tm,bar:Pm,khan:Nm,social:Om,sce:Am,telegram:Rm,discord:Lm,youTube:Im},Dm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK0AAADACAYAAAB2xePHAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAAtdEVYdENyZWF0aW9uIFRpbWUARnJpIDE5IEZlYiAyMDIxIDA2OjI5OjE1IEFNIEpTVJ0PYF0AAA5FSURBVHic7Z3Li2RXHce/5956d1dXV/ekk0AmBCQORLIZRSQm2cSJQUwWMiAJJBo3uhAh/huBBCQLXWhMAgnCrBJQ40SQPHyAzia4mOhCbITY8+iurld3Vd17XHTa6a7p6rqP3z3n9zt1Pqt59ONU1bdunfs7n9856r7PPaDh8QgisD0AjyctPrQecfjQesThQ+sRhw+tRxw+tB5x+NB6xOFD6xGHD61HHD60HnH40HrE4UPrEYcPrUccPrQecfjQesRRsj0A04zvGSO+e2x7GPnZC1D9uGZ7FFZYqNDqksb1F/8DBFr8Z0z4aQntF+9E+d8V20MxjvCXLh27z91AdM8Y0ls11Egh6IQYPLFreyhWWJjQRq0I3W/vHPz5rjEQyY1uuFWCgsLk3jH2HxzaHo5xFia0Oz/cAhoHQVWBghb6qar6AYJ++P+/Dx7vQpfkvgGzsBChHd+3j+GF3rF/izYmwMTSgHJQ2jp+GxK3I+w91Lc0GjssRGi3f7wFhMf/TWmFuBnbGVBGgp0QanT7SzZ4tId4KbIwIjs4H9rhV3rYP3/yvE+3YkBK9StWCK/PKPbUNAaP9U7+PwdxPrQ7P7oOpdXM/4/ORNCa/5wwvBFCRbMfx/6XBphsSHkH5sPp0HYvbiM6O+eFrOtTw8ABNVYItsPTvyjAwpTAnA1tXIux+92bib42umsCMJ7ehtdKp35aHDL+/Aij+/cMjMguzoa28/3rB3PWJJQAHfCcIqhhgKA75yp7hMETXbaPhQonQzvZGKP/VCfV90R38iyBhVvpVtqjOyfY/+KgoNHwwMnQ7rywBaRcPFBKIW7wukIFuyGCvfQv0eCxHuIq4/lOTpwL7f4XBhh+NVuxXa9FwJjJTZnG7BLXvG9djjF81N0SmHOh3X7hGpTKHry4PWFRAgu3Q6gcb6C9h/qI2gznOwQ4Fdr+4x1Mzo1y/Qy9rKEmlq+2kUJwI6c1Wj7wElzEmdDGYYzOD26Q/KxoYwId27vahtdKUHH+N87+g0OM7833JuaIM6Htfucm4juI1t+rAGDnanvgytK8LArKyQUHJ0J71JUl+5mWnNtDV5YKF51bJ0J71JWlwoZzO+3KUuGacys+tCe5slSYdm6nXVkqXHNuxYf2JFeWCpPO7SxXlgqXnFvRoT3NlaXCiHN7mitLhUPOrejQznNlqYjbxTq381xZKlxxbsWGNpErS0SRCw6JXFkqAmDwNfkLDiJDm8aVpaKoBYekriwVowf2xC84iAxtKleWigIWHNK6siS/04EFB3GhzeLKUkG94JDWlaVC+oKDuNBmcWWpoFxwyOrKUiF5wUFUaPO4slSQLDjkcGWpkLzgICq0eV1ZCigWHPK6slRIXXAQE1oKV5aKXAsOFK4sFUIXHESEltKVpSLrJh9UriwVEhccRISW1JWlIsMmH5SuLBkCN/lg9gzeThGuLBVpN/mgdmWpkLbJB/vQFuHKkpFik4+iXFkqJG3ywTq0RbqyVCTd5KMoV5YKSZt8sA5tka4sFUk2+SjalaVCyiYfbJ9JE64sFadu8mHClSVCyiYfbENrypWlYtYmH6ZcWSokbPLBMrQmXVkqTnJujbqyVAjY5INdaG24slRMO7emXVkquG/ywS60VlxZKo44tzZcWSq4O7esQmvTlaXi0Lm15cpSwdm5ZfXMDh/vQUUBwPO5SoQCUPmkjvoflm0PJT9VnosNrELbeGcFvW90oBtCpwc4uPlqvXIGpa2y7aE4C6vpQdgJ0by0ansYuVh6p+UDWzCsQgscvOhS54NBJ8Sy8DedBNiFVo0VWj9ftz2MTDTfbCMYsHtKnYPlM1z7yxKqV+q2h5GK0mYZjctN28NYCFiGFgBWXl0HmHnfp7Hy6jqrjgSXYRva8mYFjcsrtoeRiOqVOmpXGraHsTCwDS0ANN9qQ3GfI0affSp4jME6ERJKYI3LKyhvWto9ZEFhHVqAdwlMDQI032rbHsbCwT60aqyw8vqa7WGcSPPSKsKOTClGMuxDCwD1D5dRuVq1PYxjhFslLL3Tsj2MhUREaAFg5Re8bnZWXl9jsbXRIiImtJWrNdQ/4GFOVa5WUf+Qx1gWETGhBYDmG20WVzduV/1FQ1RoS1tl6/PI+gfLqFytWR3DoiMqtACwfGkVgaU7djVWaL7hS1y2ERfaYBCg+aad4HhXlgfiQgsAjctNlDbNhifcKnlXlgkiQ6tiZXy9f+X1Ne/KMkHsq1C70jDm3PoSFy/EhhYw59xyLXHpCs9u2aIRHVoTzi3XElf/67vof1P2HhFZER1aoFjnlmuJK27E6D6zje7FHUQtQe0dRIgPbZHOLdcSV+/iDuJWBN2I0X162/ZwjCM+tEAxzi3XdvCoFaH/5K1pweDCLsZn+W4WVwROhLYI55ZrO3j36W3o8pEbsBDYfZ7XcVVFw+9VyQilc8u1HXx8doTBhdt3M9w/P8TeeRnnJVDgTGgButIU13bw3edvzDyDYvf5G2JOp8mLU6GlcG65toPvnR+cegbF5OwYgwu8d/CmwqnQAjmdW6bt4DrQieat3We2EQvecTIpzoU2j3PLtR18cKGLSYIzKOJWhN5FnqdbUuJcaIFszi3XdvDDhYSk9J/siDugOS1OhjaLc8u1HfxwISEpuqzRfdbtBQcnQwukc265toNPNsbHFhKSMnykh9E5OQc0p8XZ0KZxbrm2g3efnVpISMHu99xdcHA2tEAy55arKzs6t4fhI9mP/Byd28fwYf5HhmbB6dAC851brq4sxZVy97mbma/UnHE+tKc5t1xd2eHDPYzO7ef+OdHGJNOcmDvOhxY4cG6nS2BcXVld1th9ju6YVRed24UIbdgJbyuBcXVl+092EG3QnQLuonO7EKEFjpfAOLuy3QJWtFxzbhcmtEdLYKxd2SLcAcecW36vXIHUrjSw/HYLS+/xO4BklitLhUvO7UKFFvisxMXwvuQ0V5byd7jg3C5caDkyz5WlwhXn1ofWMkldWSpccG59aC2T1JWlIm5F6D8le8HBh9YiaV1ZKnpPdUQvOPjQWiStK0uF9AUHH1pLZHVlqZC84OBDa4k8riwJghccfGgtkNeVpULqgoMPrQU4dRVIXHDwoTUMlStLhcQFBx9ag1C7slRIW3DwoTUItStLhbRNPnxoDVGUK0uFpE0+fGgNUZgrS4SkTT58aA1QtCtLhZRNPnxoDWDClaWCUzluFj60BWPKlaVCwiYfPrQFYtqVpYL7Jh8+tAVi2pWlgvsmHz60BWHLlaWC8yYfPrQFYcuVpYKzc0t7YlxO4uUYe1/u2x5GfqoavYs70DW+88Ik9L/VQeu1Naghr2sbq9AGvQDj+/dFzgOPMrl7DAwVdFvulRYAah822AUWYDg9aPx6BRpyr1BxLUa8EgHQgMzGgANGwOrLG7ZHcSLsQlverKD68ekbIXPmUIhRgUL4X1YfZKlYepvnBn0Aw9ACQOPdJsBPhppL3Iyg67f8Al3SUD1+2+LPQ3UCtH52xvYwZsIytOFOCbWPlmwPIxVaaUR3HH+nKaUQbMu72q78cg3BHstoAGAaWgCov78M1ZdzlYrb0cmrSGUNdVOIeAAg3CyjeYnfZtNHYRvaYD9A4z1+J4GfhA41ovXZlYJgoKBj/jeXWmms/oTvtOAQtqEFgOrfGgi3+H+8RmcmwGnNgSUg/JTnTc1RqlfqqP+Z30k/07AOrYoV+xKYrsSIV5PUY5mXwCKg/RLPEtc0rEMLAJV/VlmXwCYJe764l8Dql5dR/lfV9jASwT60AN8SWLwUQS8lb6FhWwIbKKy+IuMqCwgJLccSmIZO3VnLtQTW/BXPw6xnISK0AL8SWNyKoSsZ5trMSmDBtRDN19ZsDyMVYkLLqQSmg9sXEtIQDBS05nFz2frpOoJITAwACAotwKcEFq9PgDBH6EpgcVNWulrB0u9atoeRGlGhVbFC4zd2r7a6rBERKIcqVlZvLrXWaL98h70B5EBUaAGg8o8ayp9UrP3+6MwEoJhaB0D4qb2rbf2jJVT/3rD2+/MgLrQA0PjtCmBhs5ZbriwNOtTA0MLNJWNXNgkiQ1vaKqP6V/NXCerN45RSCK+bryRwdmWTIDK0AND4/TKwZ+4qNe3KklE+8FdNwd2VTYLY0Ab9EI33zcgdeUtc8wi6AbQyUwLj7somQfToa39cQrBT/EOI1yfF7rhSgpFSXumTCntXNgmiQ6smCo13iz1RnKrENQ81Kta51Vqj/ZLMEtc0okMLANWP6yhtFndTQVbimkdYrHMrucQ1jfjQAsW1nVOXuOZTkHMrvMQ1jROhLart3PT5CEU5t9JLXNM4EVqA3rktrMQ1B2rn1oUS1zTOhJbSuT2pHdwU1M6tCyWuaZx6NFTO7cx2cFMQObcS2sGz4FRoKZzbee3gpsjr3EppB8+CU6EF8ju3c9vBTZHTuZXSDp4F50Kbx7lN3g5uhszOraB28Cw4F1ogu3ObtB3cGBmdW0nt4FlwMrRAeuc2bTu4KVI7t8LawbPgbGjTOLdZ2sFNkda5ldYOngVnQwskd24zt4ObIqFzK7EdPAtOhzaJc1u0K0tFEudWYjt4Fpx/hPOc29zt4KaY49xKbQfPgvOhPc25NeXKUjHLuZXcDp4F50MLzHZujbmyVMxwbl1yZZOwEKEFbnduzbuyVEw5t465sklYmNBOO7dcS1zzUIE6Nrd1zZVNwsKEFrjl3NpyZckoHZTAXHRlk7BQoQ13Sqj9aUlEiWseQTdEy0FXNgnqvs89IKDe4/HcYvHeph7x+NB6xOFD6xGHD61HHD60HnH40HrE4UPrEYcPrUccPrQecfjQesThQ+sRhw+tRxw+tB5x+NB6xOFD6xGHD61HHD60HnH40HrE8T8YG8SKlmk4HgAAAABJRU5ErkJggg==",Rp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEcAAAAyCAYAAAAOX8ZtAAAABmJLR0QA/wD/AP+gvaeTAAADmUlEQVRoge3bT2wUZRjH8c9Ml39S09IC/uFiRBIwabzVE15oiJBwLBcP3npS4E4IBA/EAwmcCInhoCeJNwgQoDGRC8GESMDYhJRyUAQplZa2tBYdD+9suqmsadHO+6J8kzd5Z3Znnt/+9p1ndt593swCKViFV7EWK8vWjpewouyvLLdfLg9rxZKG0ywt39NIOzL8gdE5r42W++uMY6bs/4pJTOARxsr+RHncOO7hbsbjhXzWrNkLBcvxPt5FF97Ga8L+55VR/Ijv8R0u45uM3+d9hoK+gnsFxf+g3S74cD6mrCj4PAHBMdpXRUgLTc35IgGRMduXzYz5OAFxKbSP6p5kpTHtuI22eSem/y4P8UbGaF7u6PXCmDrtgh/q5vTE05IkPcya0x1RSIp0Q1aEy+lhZDEpsirH+tgqEmV9jjdjq0iUt3Ksi60iUdbl6Kw05NatrFlTachnpDPH6kpD7tjBrVscOMCyZZWGXiCrqzcHWlvZv5/r1+ntrTz8POms/rJqZMMGTp7k4kW6uqLJaMLqHB2xVdiyhatXOX48pXzUmQvTmfGp1ejrY2CA3bvDdlyW50grK3Z0cORIyEfbtsVUsjQ9c+ps3MiZM1y4wKZNMRQsS9ecOj09XLvG0aO0VTqrkvDIaWTJEnbtYnAw5KOWliqiPgcjp5HOzpCPrlxh8+bFjrY0R7HYUZ5Tshy/xVYxb4aH2bOH7m4uXVrsaFM1TEvlt04zZmY4dox9+xgbqyrqdN2cdDl9OoyWwcGqI0/nUjVnYIDt28NTfPXGkKQ5IyNhpHR1cfZsTCVTNaF8Iz5PnnDiBHv3hsQbn6kaRmKr0N8fRsuNG7GVNDKcI97XdPMmO3eGR4S0jIHhmhjmjI9z+DCHDjGdVsprIII5p05x8CD371ca9hl4UMODSkOeP19puH/AcI47sVUkys85bsVWkSiDLwoJmtOWZ6H8dCi2ksQYyhir1+dciSolPb5ltnipP6KQFPmaFwWTT+ORUDA5kkMWEvIncTUlw6fZ3OfNgpaCUwnUAcds/QVP/6u1YHnBZwmIjNHOFbOrfJpT8EHBUAKCq2h3i1C9n8/14e+WFLXgPWFJ0TvCkqLXxajn+fd4jJ/wg7Cs6DLOZU1mQ5ua04wi/Am4Fq8Id7lWs4vSVjX0W4W7X17GaZ9zqvriszr19xb++ov9EZ40bD/GVNkfFWYzJ8vjJsp+fWHaJH7BnSzsmzd/AkgxNaTAmykLAAAAAElFTkSuQmCC",bm="/assets/telegram-99da86bc.png",zm="/assets/discord-ebf2e8ca.png",Cl="0x95a647B3d8a3F11176BAdB799b9499C671fa243a";function Fm(){return y.jsxs("div",{className:re.component,children:[y.jsxs("div",{className:re.row,children:[y.jsx("img",{src:Dm,alt:"smart contract engineer",className:re.sce}),y.jsx("a",{href:"https://www.smartcontract.engineer",target:"__blank",children:"Smart Contract Engineer"})]}),y.jsxs("div",{className:re.social,children:[y.jsxs("div",{className:re.row,children:[y.jsx("img",{src:zm,alt:"discord",className:re.discord}),y.jsx("a",{href:"https://discord.gg/bt8FK2wkcW",target:"__blank",children:"Discord"})]}),y.jsxs("div",{className:re.row,children:[y.jsx("img",{src:bm,alt:"telegram",className:re.telegram}),y.jsx("a",{href:"https://t.me/smartcontractprogrammer",target:"__blank",children:"Telegram"})]}),y.jsxs("div",{className:re.row,children:[y.jsx("img",{src:Rp,alt:"youtube",className:re.youTube}),y.jsx("a",{href:"https://www.youtube.com/channel/UCJWh7F3AFyQ_x01VKzr9eyA",target:"__blank",children:"YouTube"})]})]}),y.jsxs("div",{className:re.row,children:["Donate",y.jsx("span",{role:"img","aria-label":"smiley",children:"🙂"})]}),y.jsx("div",{className:re.row,children:y.jsxs("a",{href:`https://etherscan.io/address/${Cl}`,target:"__blank",children:[Cl.slice(0,6),"...",Cl.slice(-6,-1)]})}),y.jsxs("div",{className:re.row,children:["your ETH will directly go to",y.jsx("a",{href:"https://khanacademy.org",target:"__blank",className:re.khan,children:"Khan Academy"})]}),y.jsx("div",{className:re.row,children:y.jsx("a",{href:"mailto:contact@vyper-by-example.org",children:"contact@vyper-by-example.org"})}),y.jsxs("div",{className:re.row,children:[y.jsx("a",{href:"https://github.com/vyper-by-example/vyper-by-example.github.io",target:"__blank",children:"source"}),y.jsx("div",{className:re.bar,children:"|"}),y.jsx("a",{href:"https://github.com/vyper-by-example/vyper-by-example.github.io/blob/gh-pages/LICENSE",target:"__blank",children:"license"})]})]})}var Lp={exports:{}},Mm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Um=Mm,$m=Um;function Ip(){}function Dp(){}Dp.resetWarningCache=Ip;var Hm=function(){function e(s,r,l,a,o,i){if(i!==$m){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function n(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Dp,resetWarningCache:Ip};return t.PropTypes=t,t};Lp.exports=Hm();var Bm=Lp.exports;const H=xt(Bm);function Vm(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var bp=S,Wm=Vm(bp);function Yi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Qm(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}var Ym=!!(typeof window<"u"&&window.document&&window.document.createElement);function Km(e,n,t){if(typeof e!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof n!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof t<"u"&&typeof t!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function s(r){return r.displayName||r.name||"Component"}return function(l){if(typeof l!="function")throw new Error("Expected WrappedComponent to be a React component.");var a=[],o;function i(){o=e(a.map(function(c){return c.props})),u.canUseDOM?n(o):t&&(o=t(o))}var u=function(c){Qm(f,c);function f(){return c.apply(this,arguments)||this}f.peek=function(){return o},f.rewind=function(){if(f.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var g=o;return o=void 0,a=[],g};var h=f.prototype;return h.UNSAFE_componentWillMount=function(){a.push(this),i()},h.componentDidUpdate=function(){i()},h.componentWillUnmount=function(){var g=a.indexOf(this);a.splice(g,1),i()},h.render=function(){return Wm.createElement(l,this.props)},f}(bp.PureComponent);return Yi(u,"displayName","SideEffect("+s(l)+")"),Yi(u,"canUseDOM",Ym),u}}var Xm=Km;const Gm=xt(Xm);var qm=typeof Element<"u",Zm=typeof Map=="function",Jm=typeof Set=="function",ey=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function nr(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var t,s,r;if(Array.isArray(e)){if(t=e.length,t!=n.length)return!1;for(s=t;s--!==0;)if(!nr(e[s],n[s]))return!1;return!0}var l;if(Zm&&e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(l=e.entries();!(s=l.next()).done;)if(!n.has(s.value[0]))return!1;for(l=e.entries();!(s=l.next()).done;)if(!nr(s.value[1],n.get(s.value[0])))return!1;return!0}if(Jm&&e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(l=e.entries();!(s=l.next()).done;)if(!n.has(s.value[0]))return!1;return!0}if(ey&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(t=e.length,t!=n.length)return!1;for(s=t;s--!==0;)if(e[s]!==n[s])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(s=t;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,r[s]))return!1;if(qm&&e instanceof Element)return!1;for(s=t;s--!==0;)if(!((r[s]==="_owner"||r[s]==="__v"||r[s]==="__o")&&e.$$typeof)&&!nr(e[r[s]],n[r[s]]))return!1;return!0}return e!==e&&n!==n}var ny=function(n,t){try{return nr(n,t)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}};const ty=xt(ny);/* -object-assign -(c) Sindre Sorhus -@license MIT -*/var Ki=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable;function ly(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function ay(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;var s=Object.getOwnPropertyNames(n).map(function(l){return n[l]});if(s.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(l){r[l]=l}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var oy=ay()?Object.assign:function(e,n){for(var t,s=ly(e),r,l=1;l=0||Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},my=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e},Ca=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t===!1?String(n):String(n).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},yy=function(n){var t=ft(n,O.TITLE),s=ft(n,ys.TITLE_TEMPLATE);if(s&&t)return s.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var r=ft(n,ys.DEFAULT_TITLE);return t||r||void 0},vy=function(n){return ft(n,ys.ON_CHANGE_CLIENT_STATE)||function(){}},Tl=function(n,t){return t.filter(function(s){return typeof s[n]<"u"}).map(function(s){return s[n]}).reduce(function(s,r){return ve({},s,r)},{})},gy=function(n,t){return t.filter(function(s){return typeof s[O.BASE]<"u"}).map(function(s){return s[O.BASE]}).reverse().reduce(function(s,r){if(!s.length)for(var l=Object.keys(r),a=0;a=0;s--){var r=n[s];if(r.hasOwnProperty(t))return r[t]}return null},jy=function(n){return{baseTag:gy([B.HREF,B.TARGET],n),bodyAttributes:Tl(Mn.BODY,n),defer:ft(n,ys.DEFER),encode:ft(n,ys.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Tl(Mn.HTML,n),linkTags:zt(O.LINK,[B.REL,B.HREF],n),metaTags:zt(O.META,[B.NAME,B.CHARSET,B.HTTPEQUIV,B.PROPERTY,B.ITEM_PROP],n),noscriptTags:zt(O.NOSCRIPT,[B.INNER_HTML],n),onChangeClientState:vy(n),scriptTags:zt(O.SCRIPT,[B.SRC,B.INNER_HTML],n),styleTags:zt(O.STYLE,[B.CSS_TEXT],n),title:yy(n),titleAttributes:Tl(Mn.TITLE,n)}},Ta=function(){var e=Date.now();return function(n){var t=Date.now();t-e>16?(e=t,n(t)):setTimeout(function(){Ta(n)},0)}}(),Gi=function(n){return clearTimeout(n)},wy=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Ta:global.requestAnimationFrame||Ta,xy=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Gi:global.cancelAnimationFrame||Gi,ky=function(n){return console&&typeof console.warn=="function"&&console.warn(n)},Ft=null,_y=function(n){Ft&&xy(Ft),n.defer?Ft=wy(function(){qi(n,function(){Ft=null})}):(qi(n),Ft=null)},qi=function(n,t){var s=n.baseTag,r=n.bodyAttributes,l=n.htmlAttributes,a=n.linkTags,o=n.metaTags,i=n.noscriptTags,u=n.onChangeClientState,c=n.scriptTags,f=n.styleTags,h=n.title,v=n.titleAttributes;Pa(O.BODY,r),Pa(O.HTML,l),Sy(h,v);var g={baseTag:Kn(O.BASE,s),linkTags:Kn(O.LINK,a),metaTags:Kn(O.META,o),noscriptTags:Kn(O.NOSCRIPT,i),scriptTags:Kn(O.SCRIPT,c),styleTags:Kn(O.STYLE,f)},j={},P={};Object.keys(g).forEach(function(d){var p=g[d],m=p.newTags,w=p.oldTags;m.length&&(j[d]=m),w.length&&(P[d]=g[d].oldTags)}),t&&t(),u(n,j,P)},zp=function(n){return Array.isArray(n)?n.join(""):n},Sy=function(n,t){typeof n<"u"&&document.title!==n&&(document.title=zp(n)),Pa(O.TITLE,t)},Pa=function(n,t){var s=document.getElementsByTagName(n)[0];if(s){for(var r=s.getAttribute(Ue),l=r?r.split(","):[],a=[].concat(l),o=Object.keys(t),i=0;i=0;h--)s.removeAttribute(a[h]);l.length===a.length?s.removeAttribute(Ue):s.getAttribute(Ue)!==o.join(",")&&s.setAttribute(Ue,o.join(","))}},Kn=function(n,t){var s=document.head||document.querySelector(O.HEAD),r=s.querySelectorAll(n+"["+Ue+"]"),l=Array.prototype.slice.call(r),a=[],o=void 0;return t&&t.length&&t.forEach(function(i){var u=document.createElement(n);for(var c in i)if(i.hasOwnProperty(c))if(c===B.INNER_HTML)u.innerHTML=i.innerHTML;else if(c===B.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=i.cssText:u.appendChild(document.createTextNode(i.cssText));else{var f=typeof i[c]>"u"?"":i[c];u.setAttribute(c,f)}u.setAttribute(Ue,"true"),l.some(function(h,v){return o=v,u.isEqualNode(h)})?l.splice(o,1):a.push(u)}),l.forEach(function(i){return i.parentNode.removeChild(i)}),a.forEach(function(i){return s.appendChild(i)}),{oldTags:l,newTags:a}},Fp=function(n){return Object.keys(n).reduce(function(t,s){var r=typeof n[s]<"u"?s+'="'+n[s]+'"':""+s;return t?t+" "+r:r},"")},Ey=function(n,t,s,r){var l=Fp(s),a=zp(t);return l?"<"+n+" "+Ue+'="true" '+l+">"+Ca(a,r)+"":"<"+n+" "+Ue+'="true">'+Ca(a,r)+""},Cy=function(n,t,s){return t.reduce(function(r,l){var a=Object.keys(l).filter(function(u){return!(u===B.INNER_HTML||u===B.CSS_TEXT)}).reduce(function(u,c){var f=typeof l[c]>"u"?c:c+'="'+Ca(l[c],s)+'"';return u?u+" "+f:f},""),o=l.innerHTML||l.cssText||"",i=cy.indexOf(n)===-1;return r+"<"+n+" "+Ue+'="true" '+a+(i?"/>":">"+o+"")},"")},Mp=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(n).reduce(function(s,r){return s[Pr[r]||r]=n[r],s},t)},Ty=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(n).reduce(function(s,r){return s[uy[r]||r]=n[r],s},t)},Py=function(n,t,s){var r,l=(r={key:t},r[Ue]=!0,r),a=Mp(s,l);return[Dn.createElement(O.TITLE,a,t)]},Ny=function(n,t){return t.map(function(s,r){var l,a=(l={key:r},l[Ue]=!0,l);return Object.keys(s).forEach(function(o){var i=Pr[o]||o;if(i===B.INNER_HTML||i===B.CSS_TEXT){var u=s.innerHTML||s.cssText;a.dangerouslySetInnerHTML={__html:u}}else a[i]=s[o]}),Dn.createElement(n,a)})},Xe=function(n,t,s){switch(n){case O.TITLE:return{toComponent:function(){return Py(n,t.title,t.titleAttributes)},toString:function(){return Ey(n,t.title,t.titleAttributes,s)}};case Mn.BODY:case Mn.HTML:return{toComponent:function(){return Mp(t)},toString:function(){return Fp(t)}};default:return{toComponent:function(){return Ny(n,t)},toString:function(){return Cy(n,t,s)}}}},Up=function(n){var t=n.baseTag,s=n.bodyAttributes,r=n.encode,l=n.htmlAttributes,a=n.linkTags,o=n.metaTags,i=n.noscriptTags,u=n.scriptTags,c=n.styleTags,f=n.title,h=f===void 0?"":f,v=n.titleAttributes;return{base:Xe(O.BASE,t,r),bodyAttributes:Xe(Mn.BODY,s,r),htmlAttributes:Xe(Mn.HTML,l,r),link:Xe(O.LINK,a,r),meta:Xe(O.META,o,r),noscript:Xe(O.NOSCRIPT,i,r),script:Xe(O.SCRIPT,u,r),style:Xe(O.STYLE,c,r),title:Xe(O.TITLE,{title:h,titleAttributes:v},r)}},Oy=function(n){var t,s;return s=t=function(r){hy(l,r);function l(){return dy(this,l),my(this,r.apply(this,arguments))}return l.prototype.shouldComponentUpdate=function(o){return!ty(this.props,o)},l.prototype.mapNestedChildrenToProps=function(o,i){if(!i)return null;switch(o.type){case O.SCRIPT:case O.NOSCRIPT:return{innerHTML:i};case O.STYLE:return{cssText:i}}throw new Error("<"+o.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},l.prototype.flattenArrayTypeChildren=function(o){var i,u=o.child,c=o.arrayTypeChildren,f=o.newChildProps,h=o.nestedChildren;return ve({},c,(i={},i[u.type]=[].concat(c[u.type]||[],[ve({},f,this.mapNestedChildrenToProps(u,h))]),i))},l.prototype.mapObjectTypeChildren=function(o){var i,u,c=o.child,f=o.newProps,h=o.newChildProps,v=o.nestedChildren;switch(c.type){case O.TITLE:return ve({},f,(i={},i[c.type]=v,i.titleAttributes=ve({},h),i));case O.BODY:return ve({},f,{bodyAttributes:ve({},h)});case O.HTML:return ve({},f,{htmlAttributes:ve({},h)})}return ve({},f,(u={},u[c.type]=ve({},h),u))},l.prototype.mapArrayTypeChildrenToProps=function(o,i){var u=ve({},i);return Object.keys(o).forEach(function(c){var f;u=ve({},u,(f={},f[c]=o[c],f))}),u},l.prototype.warnOnInvalidChildren=function(o,i){return!0},l.prototype.mapChildrenToProps=function(o,i){var u=this,c={};return Dn.Children.forEach(o,function(f){if(!(!f||!f.props)){var h=f.props,v=h.children,g=Xi(h,["children"]),j=Ty(g);switch(u.warnOnInvalidChildren(f,v),f.type){case O.LINK:case O.META:case O.NOSCRIPT:case O.SCRIPT:case O.STYLE:c=u.flattenArrayTypeChildren({child:f,arrayTypeChildren:c,newChildProps:j,nestedChildren:v});break;default:i=u.mapObjectTypeChildren({child:f,newProps:i,newChildProps:j,nestedChildren:v});break}}}),i=this.mapArrayTypeChildrenToProps(c,i),i},l.prototype.render=function(){var o=this.props,i=o.children,u=Xi(o,["children"]),c=ve({},u);return i&&(c=this.mapChildrenToProps(i,c)),Dn.createElement(n,c)},fy(l,null,[{key:"canUseDOM",set:function(o){n.canUseDOM=o}}]),l}(Dn.Component),t.propTypes={base:H.object,bodyAttributes:H.object,children:H.oneOfType([H.arrayOf(H.node),H.node]),defaultTitle:H.string,defer:H.bool,encodeSpecialCharacters:H.bool,htmlAttributes:H.object,link:H.arrayOf(H.object),meta:H.arrayOf(H.object),noscript:H.arrayOf(H.object),onChangeClientState:H.func,script:H.arrayOf(H.object),style:H.arrayOf(H.object),title:H.string,titleAttributes:H.object,titleTemplate:H.string},t.defaultProps={defer:!0,encodeSpecialCharacters:!0},t.peek=n.peek,t.rewind=function(){var r=n.rewind();return r||(r=Up({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),r},s},Ay=function(){return null},Ry=Gm(jy,_y,Up)(Ay),Na=Oy(Ry);Na.renderStatic=Na.rewind;const $p=({title:e,description:n})=>y.jsxs(Na,{children:[y.jsx("title",{children:e}),y.jsx("meta",{name:"Description",content:n})]}),Ly=({html:e})=>(S.useEffect(()=>{if(navigator.userAgent==="ReactSnap")return;const n=s=>{const r=document.createElement("textarea");r.setAttribute("style","width:1px;border:0;opacity:0;"),document.body.appendChild(r),r.value=s.innerText,r.select(),document.execCommand("copy"),document.body.removeChild(r)};document.querySelectorAll("pre").forEach(s=>{const r=document.createElement("div");r.className="buttons";const l=document.createElement("button");l.className="fa fa-copy clip-button",l.title="Copy to clipboard",l.ariaLabel="Copy to clipboard";const a=document.createElement("i");a.className="tooltiptext",l.appendChild(a),r.appendChild(l);const o=s.firstChild;s.insertBefore(r,o),l.addEventListener("click",i=>{i.preventDefault(),n(s.childNodes[1])})})},[]),y.jsx("div",{dangerouslySetInnerHTML:{__html:e}})),Iy="_component_xfooc_1",Dy="_content_xfooc_5",by="_prevNext_xfooc_9",Pl={component:Iy,content:Dy,prevNext:by},b=({title:e,version:n,description:t,html:s,prev:r,next:l})=>y.jsxs("div",{className:Pl.component,children:[y.jsx($p,{title:`${e} | Vyper by Example | ${n}`,description:t}),y.jsxs("div",{className:Pl.content,children:[y.jsx("h2",{children:e}),y.jsx(Ly,{html:s}),y.jsxs("div",{className:Pl.prevNext,children:[r&&y.jsxs("a",{href:r.path,children:["< ",r.title]}),l&&y.jsxs("a",{href:l.path,children:[l.title," >"]})]}),y.jsxs("p",{children:["Try on"," ",y.jsx("a",{href:"https://smartcontract.engineer/challenges?language=vyper",target:"__blank",children:"Smart Contract Engineer"})]})]})]}),zy="0.3.9",Fy="Constants",My="Constants in Vyper",Uy=`

Constants are variables that cannot change.

-
# @version ^0.3.9
-
-MY_CONSTANT: constant(uint256) = 123
-MIN: constant(uint256) = 1
-MAX: constant(uint256) = 10
-ADDR: constant(address) = 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B
-
-
-@external
-@pure
-def getBuiltInConstants() -> (address, uint256, bytes32):
-    # Commonly used constants availabe in Vyper
-    return (ZERO_ADDRESS, MAX_UINT256, EMPTY_BYTES32)
-
-
-@external
-@pure
-def getMyConstants() -> (uint256, uint256, address):
-    return (MIN, MAX, ADDR)
-
`,$y=({prev:e,next:n})=>y.jsx(b,{version:zy,title:Fy,description:My,html:Uy,prev:e,next:n}),Hy="0.3.9",By="Constructor",Vy="Constructor in Vyper",Wy=`

__init__ is a special function that is executed only once when the contract is deployed.

-
# @version ^0.3.9
-
-owner: public(address)
-name: public(String[10])
-createdAt: public(uint256)
-expiresAt: public(uint256)
-
-
-@external
-def __init__(name: String[10], duration: uint256):
-    # set owner to caller
-    self.owner = msg.sender
-    # set name from input
-    self.name = name
-    self.createdAt = block.timestamp
-    self.expiresAt = block.timestamp + duration
-
`,Qy=({prev:e,next:n})=>y.jsx(b,{version:Hy,title:By,description:Vy,html:Wy,prev:e,next:n}),Yy="0.3.9",Ky="Create New Contract",Xy="Create new contract in Vyper",Gy=`

Vyper contracts can deploy new contracts using the function create_forwarder_to.

-

create_forwarder_to is also known as "minimal proxy contract". How it works, we won't explain it here.

-

Here we will focus on how to use it to deploy new contracts.

-

How to use create_forwarder_to

-
    -
  1. Deploy ContractToDeploy. This is the "master copy." All deployed contracts will execute code from this master copy.
  2. -
  3. Call deploy() passing the address of the master copy and any other arguments needed to setup the new contract
  4. -
-

Here is ContractToDeploy

-

ContractToDeploy.vy

-
# @version ^0.3.9
-
-
-owner: public(address)
-
-
-# __init__ is not called when deployed from create_forwarder_to
-@external
-def __init__():
-  self.owner = msg.sender
-
-
-# call once after create_forwarder_to
-@external
-def setup(owner: address):
-  assert self.owner == ZERO_ADDRESS, "owner != zero address"
-  self.owner = owner
-
-
-# DANGER: never have selfdestruct in original contract used by create_forwarder_to
-@external
-def kill():
-  selfdestruct(msg.sender)
-

Create.vy

-
# @version ^0.3.9
-
-
-interface ContractToDeploy:
-    def setup(owner: address): nonpayable
-
-
-event Log:
-    addr: address
-
-
-@external
-def deploy(_masterCopy: address, owner: address):
-    addr: address = create_forwarder_to(_masterCopy)
-    ContractToDeploy(addr).setup(owner)
-    log Log(addr)
-
-
-@external
-def deployTest(_masterCopy: address):
-    addr: address = create_forwarder_to(_masterCopy)
-    ContractToDeploy(addr).setup(self)
-    log Log(addr)
-
`,qy=({prev:e,next:n})=>y.jsx(b,{version:Yy,title:Ky,description:Xy,html:Gy,prev:e,next:n}),Zy="0.3.9",Jy="Default Function",ev="Default function in Vyper",nv=`

A contract can have a default function, executed when a function that does not exist is called. This is the same function as the fallback function in Solidity.

-

This function is named __default__ and it is commonly used to receive Ether.

-
# @version ^0.3.9
-
-
-event Payment:
-    sender: indexed(address)
-    amount: uint256
-
-
-@external
-@payable
-def __default__():
-    log Payment(msg.sender, msg.value)
-
`,tv=({prev:e,next:n})=>y.jsx(b,{version:Zy,title:Jy,description:ev,html:nv,prev:e,next:n}),sv="0.3.9",rv="Curve Add and Remove Liquidity",lv="Curve Add and Remove Liquidity",av=`

Add and remove liquidity from Curve pools

-
# @version ^0.3.9
-
-from vyper.interfaces import ERC20
-
-
-interface IStableSwap:
-    def add_liquidity(amounts: uint256[3], min_shares: uint256): nonpayable
-    def remove_liquidity(shares: uint256, min_amounts: uint256[3]): nonpayable
-    def remove_liquidity_one_coin(shares: uint256, i: int128, min_amount: uint256): nonpayable
-    def get_virtual_price() -> uint256: view
-
-
-DAI: constant(address) = 0x6B175474E89094C44Da98b954EedeAC495271d0F
-USDC: constant(address) = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
-USDT: constant(address) = 0xdAC17F958D2ee523a2206206994597C13D831ec7
-
-POOL: constant(address) = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7
-COINS: constant(address[3]) = [DAI, USDC, USDT]
-
-
-@internal
-def _safeTransfer(coin: address, to: address, amount: uint256):
-    res: Bytes[32] = raw_call(
-        coin,
-        concat(
-            method_id("transfer(address,uint256)"),
-            convert(to, bytes32),
-            convert(amount, bytes32),
-        ),
-        max_outsize=32,
-    )
-
-    if len(res) > 0:
-        assert convert(res, bool)
-
-
-@internal
-def _safeTransferFrom(coin: address, _from: address, to: address, amount: uint256):
-    res: Bytes[32] = raw_call(
-        coin,
-        concat(
-            method_id("transferFrom(address,address,uint256)"),
-            convert(_from, bytes32),
-            convert(to, bytes32),
-            convert(amount, bytes32),
-        ),
-        max_outsize=32,
-    )
-
-    if len(res) > 0:
-        assert convert(res, bool)
-
-
-@internal
-def _safeApprove(coin: address, to: address, amount: uint256):
-    res: Bytes[32] = raw_call(
-        coin,
-        concat(
-            method_id("approve(address,uint256)"),
-            convert(to, bytes32),
-            convert(amount, bytes32),
-        ),
-        max_outsize=32,
-    )
-
-    if len(res) > 0:
-        assert convert(res, bool)
-
-
-@external
-def addLiquidity(amounts: uint256[3], min_shares: uint256):
-    for i in range(3):
-        if amounts[i] > 0:
-            self._safeTransferFrom(COINS[i], msg.sender, self, amounts[i])
-            self._safeApprove(COINS[i], POOL, amounts[i])
-
-    IStableSwap(POOL).add_liquidity(amounts, min_shares)
-
-
-@external
-@view
-def calculateValueOfShares(shares: uint256) -> uint256:
-    return shares * IStableSwap(POOL).get_virtual_price() / 10**18
-
-
-@external
-def removeLiquidity(shares: uint256, min_amounts: uint256[3]):
-    IStableSwap(POOL).remove_liquidity(shares, min_amounts)
-
-    for coin in COINS:
-        bal: uint256 = ERC20(coin).balanceOf(self)
-        self._safeTransfer(coin, msg.sender, bal)
-
-
-@external
-def removeLiquidityOneCoin(shares: uint256, i: int128, min_amount: uint256):
-    IStableSwap(POOL).remove_liquidity_one_coin(shares, i, min_amount)
-
-    bal: uint256 = ERC20(COINS[i]).balanceOf(self)
-    self._safeTransfer(COINS[i], msg.sender, bal)
-
`,ov=({prev:e,next:n})=>y.jsx(b,{version:sv,title:rv,description:lv,html:av,prev:e,next:n}),iv="0.3.9",uv="Curve Swap",cv="Curve Swap",pv=`

Swap tokens on Curve

-
# @version ^0.3.9
-
-from vyper.interfaces import ERC20
-
-
-interface IStableSwap:
-    def exchange(i: int128, j: int128, dx: uint256, min_dy: uint256): nonpayable
-
-
-DAI: constant(address) = 0x6B175474E89094C44Da98b954EedeAC495271d0F
-USDC: constant(address) = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
-USDT: constant(address) = 0xdAC17F958D2ee523a2206206994597C13D831ec7
-
-POOL: constant(address) = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7
-COINS: constant(address[3]) = [DAI, USDC, USDT]
-
-
-@internal
-def _safeTransfer(coin: address, to: address, amount: uint256):
-    res: Bytes[32] = raw_call(
-        coin,
-        concat(
-            method_id("transfer(address,uint256)"),
-            convert(to, bytes32),
-            convert(amount, bytes32),
-        ),
-        max_outsize=32,
-    )
-
-    if len(res) > 0:
-        assert convert(res, bool)
-
-
-@internal
-def _safeTransferFrom(coin: address, _from: address, to: address, amount: uint256):
-    res: Bytes[32] = raw_call(
-        coin,
-        concat(
-            method_id("transferFrom(address,address,uint256)"),
-            convert(_from, bytes32),
-            convert(to, bytes32),
-            convert(amount, bytes32),
-        ),
-        max_outsize=32,
-    )
-
-    if len(res) > 0:
-        assert convert(res, bool)
-
-
-@internal
-def _safeApprove(coin: address, to: address, amount: uint256):
-    res: Bytes[32] = raw_call(
-        coin,
-        concat(
-            method_id("approve(address,uint256)"),
-            convert(to, bytes32),
-            convert(amount, bytes32),
-        ),
-        max_outsize=32,
-    )
-
-    if len(res) > 0:
-        assert convert(res, bool)
-
-
-@external
-def swap(i: int128, j: int128, dx: uint256, min_dy: uint256):
-    self._safeTransferFrom(COINS[i], msg.sender, self, dx)
-    self._safeApprove(COINS[i], POOL, dx)
-
-    IStableSwap(POOL).exchange(i, j, dx, min_dy)
-
-    bal: uint256 = ERC20(COINS[j]).balanceOf(self)
-    self._safeTransfer(COINS[j], msg.sender, bal)
-
`,dv=({prev:e,next:n})=>y.jsx(b,{version:iv,title:uv,description:cv,html:pv,prev:e,next:n}),fv="0.3.9",hv="Delegate Call",mv="Delegate call in Vyper",yv=`

When contract A delegates call to contract B, B's code will be executed inside contract A. This will update state variables and Ether balance inside contract A and not B.

-

Delegate call is commonly used to create an upgradable contract.

-

Here is the contract that we will delegate call to.

-

TestDelegateCall.vy

-
# @version ^0.3.9
-
-# State variables must be declared in the same order
-# as contract making the call
-x: public(uint256)
-y: public(uint256)
-
-
-@external
-def updateX(x: uint256):
-    # when this function is called with delegate call
-    # this will update self.x inside the calling contract
-    self.x = x + 1
-
-
-@external
-def updateY(y: uint256):
-    self.y = y * y
-

DelegateCall.vy

-
# @version ^0.3.9
-
-
-x: public(uint256)
-y: public(uint256)
-
-
-@external
-def updateX(to: address, x: uint256):
-    raw_call(
-        to,
-        concat(
-            method_id("updateX(uint256)"),
-            convert(x, bytes32)
-        ),
-        is_delegate_call=True
-    )
-
-
-@external
-def updateY(to: address, y: uint256):
-    raw_call(
-        to,
-        concat(
-            method_id("updateY(uint256)"),
-            convert(y, bytes32)
-        ),
-        is_delegate_call=True
-    )
-
`,vv=({prev:e,next:n})=>y.jsx(b,{version:fv,title:hv,description:mv,html:yv,prev:e,next:n}),gv="0.3.9",jv="Dynamic Arrays",wv="Dynamic arrays in Vyper",xv=`

Dynamic arrays are bounded arrays whose length can change. The length of the array cannot exceed the maximum length set where the array is declared.

-
# @version ^0.3.9
-
-# Dynamic array of type uint256, max 3 elements
-nums: DynArray[uint256, 3]
-
-@external
-def __init__():
-    self.nums.append(11)
-    self.nums.append(22)
-    self.nums.append(33)
-    # This will revert (Appending to array with max 3 elements)
-    # self.nums.append(44)
-
-    # Remove last element
-    self.nums.pop()
-
-    # Delete all elements
-    self.nums = []
-    # Set values
-    self.nums = [1,2,3]
-
-
-@external
-@pure
-def examples(xs: DynArray[uint256, 5]) -> DynArray[uint256, 8]:
-    ys: DynArray[uint256, 5] = [1,2,3]
-    # Copy xs into ys
-    for x in xs:
-        ys.append(x)
-    return ys
-
-
-@external
-@pure
-def filter(addrs: DynArray[address, 5]) -> DynArray[address, 5]:
-    nonzeros: DynArray[address, 5] = []
-    for addr in addrs:
-        if addr != ZERO_ADDRESS:
-            nonzeros.append(addr)
-    return nonzeros
-
`,kv=({prev:e,next:n})=>y.jsx(b,{version:gv,title:jv,description:wv,html:xv,prev:e,next:n}),_v="0.3.9",Sv="Error",Ev="Error in Vyper",Cv=`

Use assert and raise to check inputs and validate state.

-

When an error occurs, it will halt the entire function call, undoing any changes.

-

You will still need to pay gas for the failed transaction.

-
# @version ^0.3.9
-
-x: public(uint256)
-owner: public(address)
-
-
-@external
-def __init__():
-    self.owner = msg.sender
-
-
-@external
-def testAssert(x: uint256):
-    assert x >= 1, "x < 1"
-    # self.x will not be updated if there is an error from line above
-    self.x = x
-
-
-@external
-def testRaise(x: uint256):
-    # same check as above using "raise"
-    if x <= 1:
-        raise "x < 1"
-    self.x = x
-
-
-@internal
-def _testErrorBubblesUp(x: uint256):
-    assert x >= 1, "x < 1"
-    self.x = x
-
-
-@external
-def testErrorBubblesUp(x: uint256):
-    self._testErrorBubblesUp(x)
-    # self.x = 123 will not be executed if there is an error
-    # from function above
-    self.x = 123
-
-
-@external
-def setOwner(owner: address):
-    assert msg.sender == self.owner, "!owner"
-    assert owner != ZERO_ADDRESS, "owner = zero"
-    self.owner = owner
-
`,Tv=({prev:e,next:n})=>y.jsx(b,{version:_v,title:Sv,description:Ev,html:Cv,prev:e,next:n}),Pv="0.3.9",Nv="Event",Ov="Event in Vyper",Av=`

Events write logs to the blockchain, commonly used by application to monitor blockchain state and as a cheaper alternative to store data on the blockchain without using state variables.

-

Events can be efficiently searched by indexing their arguments. Up to 3 parameters can be indexed.

-
# @version ^0.3.9
-
-# up to 3 index
-event Transfer:
-    # enables quick search of all Transfer events where sender is a certain address
-    sender: indexed(address)
-    # enables quick search of all Transfer events where receiver is a certain address
-    receiver: indexed(address)
-    amount: uint256
-
-
-@external
-def transfer(receiver: address, amount: uint256):
-    # some code ...
-    log Transfer(msg.sender, receiver, amount)
-
-
-@external
-def mint(amount: uint256):
-    # some code ...
-    log Transfer(ZERO_ADDRESS, msg.sender, amount)
-
-
-@external
-def burn(amount: uint256):
-    # some code ...
-    log Transfer(msg.sender, ZERO_ADDRESS, amount)
-
`,Rv=({prev:e,next:n})=>y.jsx(b,{version:Pv,title:Nv,description:Ov,html:Av,prev:e,next:n}),Lv="0.3.9",Iv="For Loop",Dv="For loop in Vyper",bv=`

There are 2 ways to loop through an array, using range and directly looping through array elements.

-
# @version ^0.3.9
-
-
-@external
-@pure
-def forLoop():
-    # for loop through range
-    # sum from 0 to 9
-    s: uint256 = 0
-    for i in range(10):
-        s += i
-
-    # for loop through array elements
-    # find minimum of nums
-    nums: uint256[5] = [4, 5, 1, 9, 0]
-    x: uint256 = MAX_UINT256
-    for num in nums:
-        if x < num:
-            x = num
-
-    # continue - skip current iteration
-    # break - exit for loop
-    c: uint256 = 0
-    for i in [1, 2, 3, 4, 5]:
-        # skip 2
-        if i == 2:
-            continue
-        # end loop at i = 4
-        if i == 4:
-            break
-        # otherwise increment c by 1
-        c += 1
-    # c = 2 (incremented at i = 1 and 3)
-
-
-@external
-@pure
-def sum(nums: uint256[10]) -> uint256:
-    s: uint256 = 0
-    for n in nums:
-        s += n
-    return s
-
`,zv=({prev:e,next:n})=>y.jsx(b,{version:Lv,title:Iv,description:Dv,html:bv,prev:e,next:n}),Fv="0.3.9",Mv="Function",Uv="Function in Vyper",$v=`
# @version ^0.3.9
-
-
-@external
-@pure
-def multiply(x: uint256, y: uint256) -> uint256:
-    return x * y
-
-
-@external
-@pure
-def divide(x: uint256, y: uint256) -> uint256:
-    return x / y
-
-
-# A funciton that does nothing
-@external
-def doNothing():
-    # pass is useful when you want to compile the contract now,
-    # write the code later
-    pass
-
-
-# Functions can return multiple outputs
-@external
-@pure
-def multiOut() -> (uint256, bool):
-    return (1, True)
-
-
-@external
-@pure
-def addAndSub(x: uint256, y: uint256) -> (uint256, uint256):
-    return (x + y, x - y)
-
`,Hv=({prev:e,next:n})=>y.jsx(b,{version:Fv,title:Mv,description:Uv,html:$v,prev:e,next:n}),Bv="0.3.9",Vv="Hash Function",Wv="Hash function in Vyper",Qv=`

Vyper supports the same hash function available in Solidity, keccack256.

-
# @version ^0.3.9
-
-
-@external
-@pure
-def getHash(addr: address, num: uint256, ) -> bytes32:
-    # input of keccak256 can be String, Bytes or bytes32
-    return keccak256(
-        # convert different data into Bytes
-        concat(
-            convert(addr, bytes32),
-            convert(num, bytes32),
-            convert("THIS IS A STRING", Bytes[16])
-        )
-    )
-
-
-@external
-@pure
-def getMessageHash(_str: String[100]) -> bytes32:
-    return keccak256(_str)
-
`,Yv=({prev:e,next:n})=>y.jsx(b,{version:Bv,title:Vv,description:Wv,html:Qv,prev:e,next:n}),Kv="0.3.9",Xv="Hello World",Gv="Hello world in Vyper",qv=`

@version specifies the compiler version of Vyper.

-
# @version ^0.3.0
-
-# Create a string variable that can store maximum 100 characters
-greet: public(String[100])
-
-@external
-def __init__():
-    self.greet = "Hello World"
-
`,Zv=({prev:e,next:n})=>y.jsx(b,{version:Kv,title:Xv,description:Gv,html:qv,prev:e,next:n}),Jv="0.3.9",eg="If Else Conditional Statement",ng="If else conditional statement in Vyper",tg=`
# @version ^0.3.9
-
-
-@external
-def ifElse(x: uint256) -> uint256:
-    if x <= 10:
-        return 1
-    elif x <= 20:
-        return 2
-    else:
-        return 3
-
-
-@external
-@pure
-def absoluteValue(x: uint256, y: uint256) -> uint256:
-    if x >= y:
-        return x - y
-    return y - x
-
`,sg=({prev:e,next:n})=>y.jsx(b,{version:Jv,title:eg,description:ng,html:tg,prev:e,next:n}),rg="0.3.9",lg="Immutable",ag="Immutable in Vyper",og=`

Immutable variables are like constants except value are assigned when the contract is deployed.

-

When to use immutable variables?

-
    -
  • You have a variable that needs to be set when the contract is deployed, -for example like setting contract owner to msg.sender
  • -
  • and this variable will never change after deployment
  • -
-

Why declare variables as immutable?

-

Like constants, immutable variables save run time gas

-
# @version ^0.3.9
-
-OWNER: immutable(address)
-MY_IMMUTABLE: immutable(uint256)
-
-@external
-def __init__(_val: uint256):
-    OWNER = msg.sender
-    MY_IMMUTABLE = _val
-
-
-@external
-@pure
-def getMyImmutable() -> uint256:
-  return MY_IMMUTABLE
-
`,ig=({prev:e,next:n})=>y.jsx(b,{version:rg,title:lg,description:ag,html:og,prev:e,next:n}),ug="0.3.9",cg="Interface",pg="Interface in Vyper",dg=`

Use interface to call other smart contracts.

-

Here is the TestInterface self.contract that we will call.

-

TestInterface.vy

-
# @version ^0.3.9
-
-
-owner: public(address)
-eth: public(uint256)
-
-
-@external
-def setOwner(owner: address):
-    self.owner = owner
-
-
-@external
-@payable
-def sendEth():
-    self.eth = msg.value
-
-
-@external
-@payable
-def setOwnerAndSendEth(owner: address):
-    self.owner = owner
-    self.eth = msg.value
-

Interface.vy

-
# @version ^0.3.9
-
-
-interface TestInterface:
-    # get address of owner
-    def owner() -> address: view
-    # set new owner
-    def setOwner(owner: address): nonpayable
-    # send ETH
-    def sendEth(): payable
-    # set owner and send ETH
-    def setOwnerAndSendEth(owner: address): payable
-
-
-# store contract having the above interface
-test: public(TestInterface)
-
-
-@external
-def __init__(test: address):
-    # store contract instance
-    self.test = TestInterface(test)
-    # if you need to get address from self.test
-    addr: address = self.test.address
-
-
-@external
-@view
-def getOwner() -> address:
-    return self.test.owner()
-
-
-@external
-@view
-def getOwnerFromAddress(test: address) -> address:
-    # you can also call functions by passing in the address of the interface
-    return TestInterface(test).owner()
-
-
-@external
-def setOwner(owner: address):
-    self.test.setOwner(owner)
-
-
-@external
-@payable
-def sendEth():
-    self.test.sendEth(value=msg.value)
-
-
-@external
-@payable
-def setOwnerAndSendEth(owner: address):
-    self.test.setOwnerAndSendEth(owner, value=msg.value)
-
`,fg=({prev:e,next:n})=>y.jsx(b,{version:ug,title:cg,description:pg,html:dg,prev:e,next:n}),hg="0.3.9",mg="Internal and External Functions",yg="Internal and external functions in Vyper",vg=`

@internal functions can only be called inside the contract.

-

@external functions can only be called from outside the contract.

-
# @version ^0.3.9
-
-# Internal functions can only be called inside this contract
-@internal
-@pure
-def _add(x: uint256, y: uint256) -> uint256:
-    return x + y
-
-
-@external
-@view
-def extFunc() -> bool:
-    return True
-
-
-# External functions can only be called from outside this contract
-@external
-@view
-def avg(x: uint256, y: uint256) -> uint256:
-    # cannot call other external function
-    # self.extFunc()
-
-    # can call internal functions
-    z: uint256 = self._add(x, y)
-
-    return (x + y) / 2
-
-
-@internal
-@pure
-def _sqr(x: uint256) -> uint256:
-    return x * x
-
-
-@external
-@view
-def sumOfSquares(x: uint256, y: uint256) -> uint256:
-    return self._sqr(x) + self._sqr(y)
-
`,gg=({prev:e,next:n})=>y.jsx(b,{version:hg,title:mg,description:yg,html:vg,prev:e,next:n}),jg="0.3.9",wg="Payable",xg="Payable in Vyper",kg=`

Functions declared with @payable can receive Ether.

-
# @version ^0.3.9
-
-
-event Deposit:
-    sender: indexed(address)
-    amount: uint256
-
-
-@external
-@payable
-def deposit():
-    log Deposit(msg.sender, msg.value)
-
-
-@external
-@view
-def getBalance() -> uint256:
-    # Get balance of Ether stored in this contract
-    return self.balance
-
-
-owner: public(address)
-
-
-@external
-@payable
-def pay():
-    assert msg.value > 0, "msg.value = 0"
-    self.owner = msg.sender
-
`,_g=({prev:e,next:n})=>y.jsx(b,{version:jg,title:wg,description:xg,html:kg,prev:e,next:n}),Sg="0.3.9",Eg="Debug with Print",Cg="Debug with Print",Tg=`

Use the built-in function print to debug smart contracts.

-

-
`,Pg=({prev:e,next:n})=>y.jsx(b,{version:Sg,title:Eg,description:Cg,html:Tg,prev:e,next:n}),Ng="0.3.9",Og="Private and Public State Variables",Ag="Private and public state variables in Vyper",Rg=`

Private state variables cannot be accessed from outside the contract.

-

Public state variables can be read by anyone, including users and other contracts.

-
# @version ^0.3.9
-
-# publis state variable
-owner: public(address)
-# private state variable
-foo: uint256
-bar: public(bool)
-
-
-@external
-def __init__():
-    self.owner = msg.sender
-    self.foo = 123
-    self.bar = True
-
`,Lg=({prev:e,next:n})=>y.jsx(b,{version:Ng,title:Og,description:Ag,html:Rg,prev:e,next:n}),Ig="0.3.9",Dg="Raw Call",bg="Raw call in Vyper",zg=`

raw_call is a low level function. It is used to call and send Ether to other functions.

-

For this example, we will write a contract that calls this contract below.

-

TestRawCall.vy

-
# @version ^0.3.9
-
-
-sender: public(address)
-
-
-@external
-def testAdd(x: uint256, y: uint256) -> uint256:
-    self.sender = msg.sender
-    return x + y
-
-
-@external
-def testSub(x: uint256, y: uint256) -> uint256:
-    self.sender = msg.sender
-    return x - y
-

RawCall.vy

-
# @version ^0.3.9
-
-
-@external
-def testRawCall(to: address, x: uint256, y: uint256):
-    res: Bytes[32] = raw_call(
-        to, # address to call
-        # data to send in Bytes
-        concat(
-            method_id("testAdd(uint256,uint256)"), # function to call
-            convert(x, bytes32), # first input
-            convert(y, bytes32), # secode input
-        ),
-        max_outsize=32, # max size of ouput, default 0
-        gas=100000, # optional, amount of gas to send, default forwards all gas
-        value=0, # optional, amount of ETH to send, default 0
-    )
-
-    z: uint256 = convert(res, uint256)
-
-
-@external
-@payable
-def sendEth(to: address):
-    # Example to send ETH
-    # data = b"", empty data
-    # value = msg.value, all of ETH that was sent to this function
-    raw_call(to, b"", value=msg.value)
-
-
-diff: public(uint256)
-
-
-@external
-def testRawCallSub(to: address, x: uint256, y: uint256):
-    res: Bytes[32] = raw_call(
-        to,
-        concat(
-            method_id("testSub(uint256,uint256)"),
-            convert(x, bytes32),
-            convert(y, bytes32)
-        ),
-        max_outsize=32,
-    )
-
-    self.diff = convert(res, uint256)
-
`,Fg=({prev:e,next:n})=>y.jsx(b,{version:Ig,title:Dg,description:bg,html:zg,prev:e,next:n}),Mg="0.3.9",Ug="Re-Entrancy Lock",$g="Re-entrancy lock in Vyper",Hg=`

Vyper has a handy way to secure your contract from re-entrancy.

-

A re-entrancy lock can be created on a function with @nonreentrant("lock").

-

Functions can be locked together by using the same name for the locks.

-
# @version ^0.3.9
-
-
-@external
-@nonreentrant("lock")
-def func0():
-    # call back msg.sender
-    raw_call(msg.sender, b"", value=0)
-
-
-@external
-@nonreentrant("lock-2")
-def func1():
-    raw_call(msg.sender, b"", value=0)
-
-
-@external
-@nonreentrant("lock-2")
-def func2():
-    raw_call(msg.sender, b"", value=0)
-
`,Bg=({prev:e,next:n})=>y.jsx(b,{version:Mg,title:Ug,description:$g,html:Hg,prev:e,next:n}),Vg="0.3.9",Wg="Data Types - References",Qg="References in Vyper",Yg=`

References types are data types that are passed by their reference, pointer to where the actual data is stored.

-
# @version ^0.3.9
-
-
-struct Person:
-    name: String[100]
-    age: uint256
-
-
-# Fixed sized list
-nums: public(uint256[10])  # must be bounded
-myMap: public(HashMap[address, uint256])
-person: public(Person)
-
-
-@external
-def __init__():
-    # This updates self.nums[0]
-    self.nums[0] = 123
-    self.nums[9] = 456
-    # Copies self.nums to array in memory.
-    # Does not modify referenced variable (self.nums)
-    arr: uint256[10] = self.nums
-    arr[0] = 123
-
-    # This updates self.myMap
-    self.myMap[msg.sender] = 1
-    self.myMap[msg.sender] = 11
-
-    # This updates self.person
-    self.person.age = 11
-    self.person.name = "Vyper"
-    # Person struct is copied into memory.
-    # Does not modify referenced variable (self.person)
-    p: Person = self.person
-    p.name = "Solidity"
-
`,Kg=({prev:e,next:n})=>y.jsx(b,{version:Vg,title:Wg,description:Qg,html:Yg,prev:e,next:n}),Xg="0.3.9",Gg="Self Destruct",qg="Self destruct in Vyper",Zg=`

selfdestruct deletes the contract from the blockchain. It takes a single input, an address to send all of Ether stored in the contract.

-
# @version ^0.3.9
-
-
-@external
-@payable
-def __default__():
-    pass
-
-
-@external
-def kill():
-    selfdestruct(msg.sender)
-
-
-@external
-def burn():
-    selfdestruct(ZERO_ADDRESS)
-
`,Jg=({prev:e,next:n})=>y.jsx(b,{version:Xg,title:Gg,description:qg,html:Zg,prev:e,next:n}),e0="0.3.9",n0="Send Ether",t0="Send ETH in Vyper",s0=`

There are two ways to send Ether from a contract, send and raw_call. Here we introduce the simpler function to use, send.

-
# @version ^0.3.9
-
-
-# Receive Ether into this contract
-@external
-@payable
-def __default__():
-    pass
-
-
-@external
-def sendEther(to: address, amount: uint256):
-    # when Ether is sent to a contract it will call 
-    # __default__ inside the receiving contract
-    # forwards 2300 gas
-    send(to, amount)
-
-
-@external
-def sendAll(to: address):
-    send(to, self.balance)
-
`,r0=({prev:e,next:n})=>y.jsx(b,{version:e0,title:n0,description:t0,html:s0,prev:e,next:n}),l0="0.3.9",a0="Unsafe Math",o0="Unsafe math in Vyper",i0=`

Critical math checks such as overflow, underflow and division by 0 can be skipped using unsafe functions

-
# @version ^0.3.9
-
-
-@external
-def test_add(x: uint256, y: uint256) -> uint256:
-    # 21510 gas
-    # return x + y
-
-    # 21472 gas
-    return unsafe_add(x, y)
-
-
-@external
-def test_sub(x: uint256, y: uint256) -> uint256:
-    # 21533 gas
-    # return x - y
-
-    # 21495 gas
-    return unsafe_sub(x, y)
-
-
-@external
-def test_mul(x: uint256, y: uint256) -> uint256:
-    # 21578 gas
-    # return x * y
-
-    # 21520 gas
-    return unsafe_mul(x, y)
-
-
-@external
-def test_div(x: uint256, y: uint256) -> uint256:
-    # 21578 gas
-    # return x / y
-
-    # 21543 gas
-    return unsafe_div(x, y)
-
`,u0=({prev:e,next:n})=>y.jsx(b,{version:l0,title:a0,description:o0,html:i0,prev:e,next:n}),c0="0.3.9",p0="Data Types - Values",d0="Values in Vyper",f0=`

Some values available in Vyper

-
    -
  • bool
  • -
  • int128
  • -
  • uint256
  • -
  • decimals
  • -
  • address
  • -
  • bytes32
  • -
  • Bytes
  • -
  • String
  • -
-
# @version ^0.3.9
-
-b: public(bool)
-i: public(int128)  # -2 ** 127 to (2 ** 127 - 1)
-u: public(uint256)  # 0 to 2 ** 256 - 1
-dec: public(decimal)  # -2 ** 127 to (2 ** 127 - 1), 10 decimal places
-addr: public(address)
-b32: public(bytes32)
-bs: public(Bytes[100])
-s: public(String[100])
-
-
-@external
-def __init__():
-    self.b = False
-    self.i = -1
-    self.u = 123
-    self.dec = 3.14
-    self.addr = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
-    self.b32 = 0xada1b75f8ae9a65dcc16f95678ac203030505c6b465c8206e26ae84b525cdacb
-    self.bs = b"\\x01"
-    self.s = "Hello Vyper"
-
`,h0=({prev:e,next:n})=>y.jsx(b,{version:c0,title:p0,description:d0,html:f0,prev:e,next:n}),m0="0.3.9",y0="Verify Signature",v0="Verify signature in Vyper",g0=`

Signing and verifying signature takes 3 steps.

-
    -
  1. Hash the data to sign. This can be done with and without a smart contract.
  2. -
  3. Sign the hash. This must be done off chain.
  4. -
  5. Verify the signature. This is done using a smart contract.
  6. -
-
# @version ^0.3.9
-
-
-# hash = getHash("Hello Vyper!")
-# 0x5436c86f18e3d25a10e557ae125450118dd0a481ca22112b1977d55a676e4c91
-@external
-@pure
-def getHash(_str: String[100]) -> bytes32:
-    return keccak256(_str)
-
-
-# getEthSignedHash(hash)
-# 0x045b623a8e8fb7b4fcfbd1ae07e7326d55303d7de4085c69b346bd130c1936da
-@external
-@pure
-def getEthSignedHash(_hash: bytes32) -> bytes32:
-    return keccak256(
-        concat(
-            b'\\x19Ethereum Signed Message:\\n32',
-            _hash
-        )
-    )
-
-
-# account = your account
-# hash = getHash("Hello Vyper!")
-# signature = await ethereum.request({ method: "personal_sign", params: [account, hash]})
-@external
-@pure
-def recoverSigner(ethSignedHash: bytes32, sig: Bytes[65]) -> address:
-    r: uint256 = convert(slice(sig, 0, 32), uint256)
-    s: uint256 = convert(slice(sig, 32, 32), uint256)
-    v: uint256 = convert(slice(sig, 64, 1), uint256)
-    return ecrecover(ethSignedHash, v, r, s)
-
-
-@external
-@pure
-def verify(sig: Bytes[65], _str: String[100], _signer: address) -> bool:
-    _hash: bytes32 = keccak256(_str)
-    ethSignedHash: bytes32 = keccak256(
-        concat(
-            b'\\x19Ethereum Signed Message:\\n32',
-            _hash
-        )
-    )
-    r: uint256 = convert(slice(sig, 0, 32), uint256)
-    s: uint256 = convert(slice(sig, 32, 32), uint256)
-    v: uint256 = convert(slice(sig, 64, 1), uint256)
-    signer: address = ecrecover(ethSignedHash, v, r, s)
-
-    return _signer == signer
-
`,j0=({prev:e,next:n})=>y.jsx(b,{version:m0,title:y0,description:v0,html:g0,prev:e,next:n}),w0="0.3.9",x0="View and Pure Functions",k0="View and pure functions in Vyper",_0=`

Both pure and view functions are read only function, they cannot write anything to the blockchain.

-

pure functions do not read any state or global variables

-

view functions can read state variables, global variables and call internal functions.

-
# @version ^0.3.9
-
-num: public(uint256)
-
-# Pure functions does not read any state or global variables
-@external
-@pure
-def pureFunc(x: uint256) -> uint256:
-    return x
-
-
-# View functions might read state or global state, or call an internal function
-@external
-@view
-def viewFunc(x: uint256) -> bool:
-    return x > self.num
-
-
-@external
-@pure
-def sum(x: uint256, y: uint256, z: uint256) -> uint256:
-    return x + y + z
-
-
-@external
-@view
-def addNum(x: uint256) -> uint256:
-    return x + self.num
-
`,S0=({prev:e,next:n})=>y.jsx(b,{version:w0,title:x0,description:k0,html:_0,prev:e,next:n}),E0=({size:e,className:n=""})=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",width:e,height:e,className:n,children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),C0="_component_tg7cx_1",T0="_icon_tg7cx_8",P0="_input_tg7cx_12",Nl={component:C0,icon:T0,input:P0},N0=({value:e,onChange:n})=>{function t(s){n(s.target.value)}return y.jsxs("div",{className:Nl.component,children:[y.jsx(E0,{size:18,className:Nl.icon}),y.jsx("input",{className:Nl.input,placeholder:"Search",value:e,onChange:t})]})};var O0="Expected a function",Zi=0/0,A0="[object Symbol]",R0=/^\s+|\s+$/g,L0=/^[-+]0x[0-9a-f]+$/i,I0=/^0b[01]+$/i,D0=/^0o[0-7]+$/i,b0=parseInt,z0=typeof Ss=="object"&&Ss&&Ss.Object===Object&&Ss,F0=typeof self=="object"&&self&&self.Object===Object&&self,M0=z0||F0||Function("return this")(),U0=Object.prototype,$0=U0.toString,H0=Math.max,B0=Math.min,Ol=function(){return M0.Date.now()};function V0(e,n,t){var s,r,l,a,o,i,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(O0);n=Ji(n)||0,Oa(t)&&(c=!!t.leading,f="maxWait"in t,l=f?H0(Ji(t.maxWait)||0,n):l,h="trailing"in t?!!t.trailing:h);function v(k){var E=s,N=r;return s=r=void 0,u=k,a=e.apply(N,E),a}function g(k){return u=k,o=setTimeout(d,n),c?v(k):a}function j(k){var E=k-i,N=k-u,$=n-E;return f?B0($,l-N):$}function P(k){var E=k-i,N=k-u;return i===void 0||E>=n||E<0||f&&N>=l}function d(){var k=Ol();if(P(k))return p(k);o=setTimeout(d,j(k))}function p(k){return o=void 0,h&&s?v(k):(s=r=void 0,a)}function m(){o!==void 0&&clearTimeout(o),u=0,s=i=r=o=void 0}function w(){return o===void 0?a:p(Ol())}function _(){var k=Ol(),E=P(k);if(s=arguments,r=this,i=k,E){if(o===void 0)return g(i);if(f)return o=setTimeout(d,n),v(i)}return o===void 0&&(o=setTimeout(d,n)),a}return _.cancel=m,_.flush=w,_}function Oa(e){var n=typeof e;return!!e&&(n=="object"||n=="function")}function W0(e){return!!e&&typeof e=="object"}function Q0(e){return typeof e=="symbol"||W0(e)&&$0.call(e)==A0}function Ji(e){if(typeof e=="number")return e;if(Q0(e))return Zi;if(Oa(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Oa(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=e.replace(R0,"");var t=I0.test(e);return t||D0.test(e)?b0(e.slice(2),t?2:8):L0.test(e)?Zi:+e}var Y0=V0;const K0=xt(Y0),X0={leading:!1,trailing:!0};function G0(e,n,t){return S.useCallback(K0(e,n,X0),t)}function q0(e,n){let t=e;for(let s=0;s0;){const[l,a,o]=n.pop();r&&(s=s.slice(0,a-1),r=!1),s+=l;const i=Object.keys(o);if(i.length>0)for(let u=0;un+r)}const e1=["/view-pure-functions"],n1=["/view-pure-functions"],t1=["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],s1=["/verify-signature"],r1=["/verify-signature"],l1=["/verify-signature"],a1=["/values","/references"],o1=["/values","/references"],i1=["/values","/references"],u1=["/values"],c1=["/values"],p1=["/values","/references","/private-public-state-variables"],d1=["/values","/references","/private-public-state-variables"],f1=["/values"],h1=["/values"],m1=["/values"],y1=["/values"],v1=["/values"],g1=["/values"],j1=["/values"],w1=["/unsafe-math"],x1=["/unsafe-math"],k1=["/unsafe-math"],_1=["/send-ether"],S1=["/send-ether"],E1=["/send-ether","/raw-call"],C1=["/send-ether","/payable","/default-function"],T1=["/self-destruct"],P1=["/self-destruct"],N1=["/self-destruct"],O1=["/references"],A1=["/references"],R1=["/references","/dynamic-arrays"],L1=["/references","/dynamic-arrays"],I1=["/references"],D1=["/references"],b1=["/references"],z1=["/references"],F1=["/re-entrancy-lock"],M1=["/re-entrancy-lock"],U1=["/raw-call"],$1=["/raw-call","/delegate-call"],H1=["/private-public-state-variables"],B1=["/print"],V1=["/print"],W1=["/internal-external-functions"],Q1=["/internal-external-functions"],Y1=["/interface"],K1=["/immutable"],X1=["/immutable"],G1=["/immutable","/constants"],q1=["/immutable","/constants"],Z1=["/if-else"],J1=["/if-else"],ej=["/hello-world"],nj=["/hello-world"],tj=["/hello-world"],sj=["/hash-function"],rj=["/hash-function"],lj=["/for-loop"],aj=["/for-loop"],oj=["/for-loop"],ij=["/event"],uj=["/event"],cj=["/error"],pj=["/error"],dj=["/dynamic-arrays"],fj=["/delegate-call"],hj=["/defi/curve-swap","/defi/curve-liquidity"],mj=["/defi/curve-swap"],yj=["/defi/curve-swap","/defi/curve-liquidity"],vj=["/defi/curve-swap","/defi/curve-liquidity"],gj=["/defi/curve-liquidity"],jj=["/default-function"],wj=["/default-function"],xj=["/create-new-contract"],kj=["/create-new-contract"],_j=["/create-new-contract"],Sj=["/constructor"],eu={view:e1,pure:n1,function:["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],functions:t1,verify:s1,signature:r1,ecrecover:l1,data:a1,type:o1,types:i1,value:u1,values:c1,variable:p1,variables:d1,bool:f1,int128:h1,uint256:m1,decimals:y1,address:v1,bytes32:g1,Bytes:j1,String:["/values"],gas:w1,unsafe:x1,math:k1,send:_1,ether:S1,raw_call:E1,payable:C1,selfdestruct:T1,self:P1,destruct:N1,reference:O1,references:A1,array:R1,arrays:L1,struct:I1,structs:D1,HashMap:b1,mapping:z1,"re-entrancy":["/re-entrancy-lock"],lock:F1,nonreentrant:M1,raw:U1,call:$1,private:["/private-public-state-variables"],public:["/private-public-state-variables"],state:H1,debug:B1,print:V1,internal:W1,external:Q1,interface:["/interface"],interfaces:Y1,immutable:K1,immutables:X1,constant:G1,constants:q1,if:["/if-else"],else:["/if-else"],conditional:Z1,statement:J1,hello:ej,world:nj,version:tj,hash:sj,keccack256:rj,for:["/for-loop"],loop:lj,loops:aj,range:oj,event:ij,events:uj,error:cj,errors:pj,dynamic:dj,delegate:fj,curve:hj,swap:mj,defi:yj,amm:vj,add:gj,"remove liquidity":["/defi/curve-liquidity"],default:["/default-function"],__default__:jj,fallback:wj,create:xj,new:["/create-new-contract"],contract:kj,create_forwarder_to:_j,constructor:Sj},nu={"/view-pure-functions":["view","pure","function","functions"],"/verify-signature":["verify","signature","ecrecover"],"/values":["data","type","types","value","values","variable","variables","bool","int128","uint256","decimals","address","bytes32","Bytes","String"],"/unsafe-math":["gas","unsafe","math"],"/send-ether":["send","ether","raw_call","payable"],"/self-destruct":["selfdestruct","self","destruct"],"/references":["data","type","types","reference","references","variable","variables","array","arrays","struct","structs","HashMap","mapping"],"/re-entrancy-lock":["re-entrancy","lock","nonreentrant"],"/raw-call":["raw","call","raw_call"],"/private-public-state-variables":["private","public","state","variable","variables"],"/print":["debug","print"],"/payable":["payable","function","functions"],"/internal-external-functions":["internal","external","function","functions"],"/interface":["interface","interfaces"],"/immutable":["immutable","immutables","constant","constants"],"/if-else":["if","else","conditional","statement"],"/hello-world":["hello","world","version"],"/hash-function":["hash","keccack256","function","functions"],"/function":["function","functions"],"/for-loop":["for","loop","loops","range"],"/event":["event","events"],"/error":["error","errors"],"/dynamic-arrays":["dynamic","arrays","array"],"/delegate-call":["delegate","call"],"/defi/curve-swap":["curve","swap","defi","amm"],"/defi/curve-liquidity":["curve","add","remove liquidity","defi","amm"],"/default-function":["default","function","functions","__default__","fallback","payable"],"/create-new-contract":["create","new","contract","create_forwarder_to"],"/constructor":["constructor"],"/constants":["constant","constants"]},Hp=[];for(const e of Object.keys(nu))Hp.push(...nu[e]);const Bp={};for(const e of Hp)q0(Bp,e);function Ej(e){return Array.from(new Set(e))}function Cj(e){const n=[],t=J0(Bp,e.toLowerCase());for(const s of t)eu[s]&&n.push(...eu[s]);return n}const Tj="_component_w8h7o_1",Pj="_updates_w8h7o_8",Nj="_category_w8h7o_13",Oj="_search_w8h7o_16",Aj="_listItem_w8h7o_20",Rj="_label_w8h7o_28",Lj="_header_w8h7o_31",Ij="_youTube_w8h7o_34",Dj="_youTubeLogo_w8h7o_40",de={component:Tj,updates:Pj,category:Nj,search:Oj,listItem:Aj,label:Rj,header:Lj,youTube:Ij,youTubeLogo:Dj},bj=["2023/08/20 - Vyper 0.3.9","2023/06/19 - Chinese translations","2023/03/04 - Unsafe math"],zj=[{lang:"Simplified Chinese",url:"https://github.com/Web3-Club/vyper-by-example_Chinese"}],Fj=[{path:"hello-world",title:"Hello World"},{path:"values",title:"Data Types - Values"},{path:"references",title:"Data Types - References"},{path:"dynamic-arrays",title:"Dynamic Arrays"},{path:"function",title:"Function"},{path:"internal-external-functions",title:"Internal and External Functions"},{path:"view-pure-functions",title:"View and Pure Functions"},{path:"constructor",title:"Constructor"},{path:"private-public-state-variables",title:"Private and Public State Variables"},{path:"constants",title:"Constants"},{path:"immutable",title:"Immutable"},{path:"if-else",title:"If Else"},{path:"for-loop",title:"For Loop"},{path:"error",title:"Error"},{path:"event",title:"Event"},{path:"payable",title:"Payable"},{path:"default-function",title:"Default Function"},{path:"send-ether",title:"Send Ether"},{path:"raw-call",title:"Raw Call"},{path:"delegate-call",title:"Delegate Call"},{path:"interface",title:"Interface"},{path:"hash-function",title:"Hash Function"},{path:"verify-signature",title:"Verify Signature"},{path:"create-new-contract",title:"Create New Contract"},{path:"re-entrancy-lock",title:"Re-entrancy Lock"},{path:"self-destruct",title:"Self Destruct"},{path:"print",title:"Debug with Print"},{path:"unsafe-math",title:"Unsafe Math"}],Mj=[{path:"curve-swap",title:"Curve Swap"},{path:"curve-liquidity",title:"Curve Add and Remove Liquidity"}],Vp=[{title:"",routes:Fj.map(e=>({...e,path:`/${e.path}`}))},{title:"DeFi",routes:Mj.map(e=>({...e,path:`/defi/${e.path}`}))}],Nr=Vp.map(({routes:e})=>e).flat(),Uj=Nr.reduce((e,n,t)=>(e[n.path]=t,e),{});function $j(e){const n=Uj[e];if(n>=0){const t=Nr[n-1]||null,s=Nr[n+1]||null;return{prev:t,next:s}}return{prev:null,next:null}}function Hj(){const[e,n]=S.useState(""),[t,s]=hm(),[r,l]=S.useState(null);S.useEffect(()=>{const c=t.get("q");c!=null&&c.length>0&&(n(c),a(c,!1))},[]);function a(c,f){const h=c.trim();if(h.length==0){l(null),f&&s({q:""});return}const v=Ej(h.split(" ")),g={};for(const j of v){const P=Cj(j);for(const d of P)g[d]=!0}l(g),f&&s({q:h})}const o=G0(c=>a(c,!0),500,[]);function i(c){n(c),o(c)}function u(){return r?Object.keys(r).length==0?y.jsx("div",{children:"No results"}):y.jsx("ul",{className:de.list,children:Nr.filter(({path:c})=>r[c]).map(({path:c,title:f})=>y.jsx("li",{className:de.listItem,children:y.jsx("a",{href:c,children:f})},c))}):y.jsxs(y.Fragment,{children:[Vp.map(({routes:c,title:f},h)=>y.jsxs("div",{children:[f&&y.jsx("h3",{className:de.category,children:f}),y.jsx("ul",{className:de.list,children:c.map(({path:v,title:g})=>y.jsx("li",{className:de.listItem,children:y.jsx("a",{href:v,children:g})},v))})]},h)),y.jsxs("div",{children:[y.jsx("h3",{className:de.category,children:"Translations"}),zj.map(({lang:c,url:f})=>y.jsx("li",{className:de.listItem,children:y.jsx("a",{href:f,target:"__blank",children:c})},f))]})]})}return y.jsxs("div",{className:de.component,children:[y.jsx($p,{title:"Vyper by Example | 0.3.9",description:"Learn smart contract programming using Vyper"}),y.jsx("h1",{className:de.header,children:y.jsx("a",{href:"/",children:"Vyper by Example"})}),y.jsx("div",{className:de.subHeader,children:"v 0.3.9"}),y.jsxs("div",{className:de.main,children:[y.jsxs("p",{children:["an introduction to ",y.jsx("a",{href:"https://vyper.readthedocs.io",children:"Vyper"})," ","with simple examples"]}),y.jsxs("div",{className:de.youTube,children:[y.jsx("img",{src:Rp,alt:"logo",className:de.youTubeLogo}),y.jsx("a",{href:"https://www.youtube.com/channel/UCJWh7F3AFyQ_x01VKzr9eyA",target:"__blank",children:"Most code are explained here"})]}),y.jsx("div",{className:de.updates,children:bj.map((c,f)=>y.jsx("div",{children:c},f))}),y.jsx("div",{className:de.search,children:y.jsx(N0,{value:e,onChange:i})}),u()]})]})}const Bj=[{path:"/constants",component:$y},{path:"/constructor",component:Qy},{path:"/create-new-contract",component:qy},{path:"/default-function",component:tv},{path:"/defi/curve-liquidity",component:ov},{path:"/defi/curve-swap",component:dv},{path:"/delegate-call",component:vv},{path:"/dynamic-arrays",component:kv},{path:"/error",component:Tv},{path:"/event",component:Rv},{path:"/for-loop",component:zv},{path:"/function",component:Hv},{path:"/hash-function",component:Yv},{path:"/hello-world",component:Zv},{path:"/if-else",component:sg},{path:"/immutable",component:ig},{path:"/interface",component:fg},{path:"/internal-external-functions",component:gg},{path:"/payable",component:_g},{path:"/print",component:Pg},{path:"/private-public-state-variables",component:Lg},{path:"/raw-call",component:Fg},{path:"/re-entrancy-lock",component:Bg},{path:"/references",component:Kg},{path:"/self-destruct",component:Jg},{path:"/send-ether",component:r0},{path:"/unsafe-math",component:u0},{path:"/values",component:h0},{path:"/verify-signature",component:j0},{path:"/view-pure-functions",component:S0},{path:"",component:Hj}];function tu(){const{state:e,loadLocalStorage:n}=xp();return S.useEffect(()=>{n()},[]),e.initialized?y.jsx(fm,{basename:"",children:y.jsxs("div",{className:El.component,children:[y.jsx(Em,{}),y.jsx("div",{className:El.main,children:y.jsx(cm,{children:Bj.map(t=>{const{prev:s,next:r}=$j(t.path);return y.jsx(Ap,{path:t.path,element:Dn.createElement(t.component,{prev:s,next:r})},t.path)})})}),y.jsx("div",{className:El.footer,children:y.jsx(Fm,{})})]})}):null}const Vj=document.getElementById("root"),Wj=gp(Vj),su=document.getElementById("root");su.hasChildNodes()?vp(su,y.jsx(Mi,{children:y.jsx(tu,{})})):Wj.render(y.jsx(Mi,{children:y.jsx(tu,{})})); diff --git a/assets/index-bf55bfed.css b/assets/index-bf55bfed.css new file mode 100644 index 0000000..1191c26 --- /dev/null +++ b/assets/index-bf55bfed.css @@ -0,0 +1,10 @@ +:root{--black: #252519;--side-nav-width: 240px}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-thumb{background-color:#ccc}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;line-height:20px;background-color:var(--bg-color);color:var(--color)}body.light{--bg-color: white;--color: #252519;--code-bg: #f5f5f5;--link-color: #261a3b;--input-bg: #f1f1f1;--side-nav-color: #f1f1f1;--link-active-color: #ff00fc54}body.dark{--bg-color: #161b22;--color: rgb(201, 209, 217);--code-bg: #0d1117;--link-color: #f6f6f6;--input-bg: white;--side-nav-color: #292c2f;--link-active-color: #ff00fc54}pre{padding:15px;margin:0;font-size:14px;overflow-x:scroll}pre .buttons{color:var(--color);cursor:pointer;display:flex;flex-direction:row;justify-content:flex-end}pre .buttons button{color:inherit;background:transparent;border:none;cursor:inherit}pre .buttons button:hover{color:#008cff}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace;color:#e74c3c}.language-vyper{display:block;color:var(--color)}a,a:visited{color:var(--link-color)}h2{font-size:32px;line-height:40px}em{font-style:italic}pre{background-color:var(--code-bg)}body.light .hljs{background:#eee;color:#000}body.light .hljs-link,body.light .hljs-emphasis,body.light .hljs-attribute,body.light .hljs-addition{color:#070}body.light .hljs-emphasis{font-style:italic}body.light .hljs-strong,body.light .hljs-string,body.light .hljs-deletion{color:#d14}body.light .hljs-strong{font-weight:700}body.light .hljs-quote,body.light .hljs-comment{color:#5f5f55;font-style:italic}body.light .hljs-section,body.light .hljs-title{color:#900}body.light .hljs-class .hljs-title,body.light .hljs-title.class_,body.light .hljs-type{color:#458}body.light .hljs-variable,body.light .hljs-template-variable{color:#369}body.light .hljs-bullet{color:#970}body.light .hljs-meta{color:#34b}body.light .hljs-code,body.light .hljs-number,body.light .hljs-literal,body.light .hljs-keyword,body.light .hljs-selector-tag{color:#0758fc}body.light .hljs-regexp{background-color:#fff0ff;color:#808}body.light .hljs-symbol{color:#990073}body.light .hljs-tag,body.light .hljs-name,body.light .hljs-selector-id,body.light .hljs-selector-class{color:#070}/*! + Theme: GitHub Dark + Description: Dark theme as seen on github.com + Author: github.com + Maintainer: @Hirse + Updated: 2021-05-15 + + Outdated base version: https://github.com/primer/github-syntax-dark + Current colors taken from GitHub's CSS +*/body.dark .hljs{color:#c9d1d9;background:#0d1117}body.dark .hljs-doctag,body.dark .hljs-keyword,body.dark .hljs-meta .hljs-keyword,body.dark .hljs-template-tag,body.dark .hljs-template-variable,body.dark .hljs-type,body.dark .hljs-variable.language_{color:#ff7b72}body.dak .hljs-title,body.dak .hljs-title.class_,body.dak .hljs-title.class_.inherited__,body.dak .hljs-title.function_{color:#d2a8ff}body.dark .hljs-attr,body.dark .hljs-attribute,body.dark .hljs-literal,body.dark .hljs-meta,body.dark .hljs-number,body.dark .hljs-operator,body.dark .hljs-variable,body.dark .hljs-selector-attr,body.dark .hljs-selector-class,body.dark .hljs-selector-id{color:#79c0ff}body.dark .hljs-regexp,body.dark .hljs-string,body.dark .hljs-meta .hljs-string{color:#a5d6ff}body.dark .hljs-built_in,body.dark .hljs-symbol{color:#ffa657}body.dary .hljs-comment,body.dary .hljs-code,body.dary .hljs-formula{color:#8b949e}body.dark .hljs-name,body.dark .hljs-quote,body.dark .hljs-selector-tag,body.dark .hljs-selector-pseudo{color:#7ee787}body.dark .hljs-subst{color:#c9d1d9}body.dark .hljs-section{color:#1f6feb;font-weight:700}body.dark .hljs-bullet{color:#f2cc60}body.dark .hljs-emphasis{color:#c9d1d9;font-style:italic}body.dark .hljs-strong{color:#c9d1d9;font-weight:700}body.dark .hljs-addition{color:#aff5b4;background-color:#033a16}body.dark .hljs-deletion{color:#ffdcd7;background-color:#67060c}._component_19dyb_1{display:flex;flex-direction:row;height:100vh}._sideNav_19dyb_6{max-height:100vh;overflow-y:auto;background-color:var(--side-nav-color);transition:width .3s;transition-timing-function:ease}._main_19dyb_13{max-height:100vh;width:100%;display:flex;flex-direction:column;overflow-y:auto}._children_19dyb_20{padding-top:54px;display:flex;flex-direction:column;align-items:center}._list_1ltry_1{list-style:none;padding:0;margin:0}._title_1ltry_6{color:var(--link-color);padding:0;margin:0}._listItem_1ltry_11{display:flex;flex-direction:row;align-items:center;margin:10px 0;padding-left:10px}._listItemActive_1ltry_18{display:flex;flex-direction:row;align-items:center;margin:10px 0;padding-left:10px;background-color:var(--link-active-color)}._link_1ltry_26{font-size:.9rem;text-decoration:none;overflow-x:hidden;white-space:nowrap;text-overflow:ellipsis}._component_iyhkn_1{position:sticky;top:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:10px 20px;background-color:var(--bg-color)}._a_iyhkn_11{text-decoration:none}._center_iyhkn_14{display:flex;flex-direction:row;align-items:center}._logo_iyhkn_19{margin:0 5px}._header_iyhkn_22{margin:0 auto 0 0}._mode_iyhkn_26{background-color:transparent;border:0px;cursor:pointer}._hamburger_iyhkn_31{cursor:pointer}._component_h47vh_1{margin:15px;color:var(--color);display:flex;flex-direction:column;align-items:center}._row_h47vh_8{display:flex;flex-direction:row;align-items:center}._row_h47vh_8 ._bar_h47vh_13{margin-left:5px;margin-right:5px}._row_h47vh_8 a,._row_h47vh_8 a:visited{color:var(--link-color)}._to_h47vh_21{margin:0 5px}._social_h47vh_24{display:flex;flex-direction:row;align-items:center}._sce_h47vh_29{width:20px;margin:5px;border-radius:4px}._telegram_h47vh_34,._discord_h47vh_38,._youTube_h47vh_42{width:20px;margin:5px}._component_ni5i2_1{width:100%;max-width:1000px}._content_ni5i2_5{margin:15px 10px}._prevNext_ni5i2_8{margin:20px;display:flex;flex-direction:row;justify-content:space-between}._component_efeb7_1{display:flex;flex-direction:row;align-items:center;background-color:var(--input-bg);border-radius:4px}._icon_efeb7_8{margin:8px;color:var(--black)}._input_efeb7_12{width:100%;height:24px;max-width:300px;padding:5px;border:0;border-radius:4px;background-color:var(--input-bg)}._input_efeb7_12:focus{outline:none;box-shadow:none}._component_1rb7l_1{max-width:420px}._component_1rb7l_1 ul{list-style:none;padding:0}._updates_1rb7l_8{padding:5px 5px 5px 15px;border-radius:5px}._search_1rb7l_13{margin-top:10px;margin-bottom:10px}._category_1rb7l_17{color:var(--link-color)}._listItem_1rb7l_20{display:flex;flex-direction:row;align-items:center;margin-top:10px;margin-bottom:10px;white-space:nowrap}._label_1rb7l_28{margin-left:10px}._header_1rb7l_31 a{text-decoration:none}._youTube_1rb7l_34{display:flex;flex-direction:row;align-items:center;margin:10px 0}._youTubeLogo_1rb7l_40{width:30px;padding-right:10px} diff --git a/assets/index-c1942f77.js b/assets/index-c1942f77.js new file mode 100644 index 0000000..2aa0b21 --- /dev/null +++ b/assets/index-c1942f77.js @@ -0,0 +1,1175 @@ +function vp(e,n){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function t(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(r){if(r.ep)return;r.ep=!0;const l=t(r);fetch(r.href,l)}})();var ds=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fi={exports:{}},yr={},Mi={exports:{}},O={};/** + * @license React + * 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 ls=Symbol.for("react.element"),gp=Symbol.for("react.portal"),jp=Symbol.for("react.fragment"),wp=Symbol.for("react.strict_mode"),xp=Symbol.for("react.profiler"),kp=Symbol.for("react.provider"),_p=Symbol.for("react.context"),Sp=Symbol.for("react.forward_ref"),Ep=Symbol.for("react.suspense"),Cp=Symbol.for("react.memo"),Pp=Symbol.for("react.lazy"),po=Symbol.iterator;function Np(e){return e===null||typeof e!="object"?null:(e=po&&e[po]||e["@@iterator"],typeof e=="function"?e:null)}var $i={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ui=Object.assign,bi={};function ft(e,n,t){this.props=e,this.context=n,this.refs=bi,this.updater=t||$i}ft.prototype.isReactComponent={};ft.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};ft.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Vi(){}Vi.prototype=ft.prototype;function da(e,n,t){this.props=e,this.context=n,this.refs=bi,this.updater=t||$i}var fa=da.prototype=new Vi;fa.constructor=da;Ui(fa,ft.prototype);fa.isPureReactComponent=!0;var fo=Array.isArray,Bi=Object.prototype.hasOwnProperty,ha={current:null},Hi={key:!0,ref:!0,__self:!0,__source:!0};function Wi(e,n,t){var s,r={},l=null,a=null;if(n!=null)for(s in n.ref!==void 0&&(a=n.ref),n.key!==void 0&&(l=""+n.key),n)Bi.call(n,s)&&!Hi.hasOwnProperty(s)&&(r[s]=n[s]);var o=arguments.length-2;if(o===1)r.children=t;else if(1>>1,q=P[Q];if(0>>1;Qr(Mr,R))Snr(ps,Mr)?(P[Q]=ps,P[Sn]=R,Q=Sn):(P[Q]=Mr,P[_n]=R,Q=_n);else if(Snr(ps,R))P[Q]=ps,P[Sn]=R,Q=Sn;else break e}}return L}function r(P,L){var R=P.sortIndex-L.sortIndex;return R!==0?R:P.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var i=[],u=[],d=1,h=null,y=3,g=!1,j=!1,w=!1,T=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(P){for(var L=t(u);L!==null;){if(L.callback===null)s(u);else if(L.startTime<=P)s(u),L.sortIndex=L.expirationTime,n(i,L);else break;L=t(u)}}function v(P){if(w=!1,f(P),!j)if(t(i)!==null)j=!0,Ar(_);else{var L=t(u);L!==null&&Fr(v,L.startTime-P)}}function _(P,L){j=!1,w&&(w=!1,p(N),N=-1),g=!0;var R=y;try{for(f(L),h=t(i);h!==null&&(!(h.expirationTime>L)||P&&!Re());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,y=h.priorityLevel;var q=Q(h.expirationTime<=L);L=e.unstable_now(),typeof q=="function"?h.callback=q:h===t(i)&&s(i),f(L)}else s(i);h=t(i)}if(h!==null)var cs=!0;else{var _n=t(u);_n!==null&&Fr(v,_n.startTime-L),cs=!1}return cs}finally{h=null,y=R,g=!1}}var k=!1,E=null,N=-1,U=5,I=-1;function Re(){return!(e.unstable_now()-IP||125Q?(P.sortIndex=R,n(u,P),t(i)===null&&P===t(u)&&(w?(p(N),N=-1):w=!0,Fr(v,R-Q))):(P.sortIndex=q,n(i,P),j||g||(j=!0,Ar(_))),P},e.unstable_shouldYield=Re,e.unstable_wrapCallback=function(P){var L=y;return function(){var R=y;y=L;try{return P.apply(this,arguments)}finally{y=R}}}})(Gi);Xi.exports=Gi;var Up=Xi.exports;/** + * @license React + * react-dom.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 Zi=S,ke=Up;function x(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yl=Object.prototype.hasOwnProperty,bp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,mo={},yo={};function Vp(e){return yl.call(yo,e)?!0:yl.call(mo,e)?!1:bp.test(e)?yo[e]=!0:(mo[e]=!0,!1)}function Bp(e,n,t,s){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Hp(e,n,t,s){if(n===null||typeof n>"u"||Bp(e,n,t,s))return!0;if(s)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function fe(e,n,t,s,r,l,a){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=l,this.removeEmptyString=a}var se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){se[e]=new fe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];se[n]=new fe(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){se[e]=new fe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){se[e]=new fe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){se[e]=new fe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){se[e]=new fe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){se[e]=new fe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){se[e]=new fe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){se[e]=new fe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ya=/[\-:]([a-z])/g;function va(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(ya,va);se[n]=new fe(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(ya,va);se[n]=new fe(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(ya,va);se[n]=new fe(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){se[e]=new fe(e,1,!1,e.toLowerCase(),null,!1,!1)});se.xlinkHref=new fe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){se[e]=new fe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ga(e,n,t,s){var r=se.hasOwnProperty(n)?se[n]:null;(r!==null?r.type!==0:s||!(2o||r[a]!==l[o]){var i=` +`+r[a].replace(" at new "," at ");return e.displayName&&i.includes("")&&(i=i.replace("",e.displayName)),i}while(1<=a&&0<=o);break}}}finally{br=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?Nt(e):""}function Wp(e){switch(e.tag){case 5:return Nt(e.type);case 16:return Nt("Lazy");case 13:return Nt("Suspense");case 19:return Nt("SuspenseList");case 0:case 2:case 15:return e=Vr(e.type,!1),e;case 11:return e=Vr(e.type.render,!1),e;case 1:return e=Vr(e.type,!0),e;default:return""}}function wl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bn:return"Fragment";case Vn:return"Portal";case vl:return"Profiler";case ja:return"StrictMode";case gl:return"Suspense";case jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case eu:return(e.displayName||"Context")+".Consumer";case Ji:return(e._context.displayName||"Context")+".Provider";case wa:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xa:return n=e.displayName||null,n!==null?n:wl(e.type)||"Memo";case tn:n=e._payload,e=e._init;try{return wl(e(n))}catch{}}return null}function Qp(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wl(n);case 8:return n===ja?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tu(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Kp(e){var n=tu(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,l=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return r.call(this)},set:function(a){s=""+a,l.call(this,a)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return s},setValue:function(a){s=""+a},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ms(e){e._valueTracker||(e._valueTracker=Kp(e))}function su(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),s="";return e&&(s=tu(e)?e.checked?"true":"false":e.value),e=s,e!==t?(n.setValue(e),!0):!1}function Bs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xl(e,n){var t=n.checked;return H({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function go(e,n){var t=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;t=gn(n.value!=null?n.value:t),e._wrapperState={initialChecked:s,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ru(e,n){n=n.checked,n!=null&&ga(e,"checked",n,!1)}function kl(e,n){ru(e,n);var t=gn(n.value),s=n.type;if(t!=null)s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?_l(e,n.type,t):n.hasOwnProperty("defaultValue")&&_l(e,n.type,gn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function jo(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function _l(e,n,t){(n!=="number"||Bs(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var Tt=Array.isArray;function et(e,n,t,s){if(e=e.options,n){n={};for(var r=0;r"+n.valueOf().toString()+"",n=ys.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Vt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Ot={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yp=["Webkit","ms","Moz","O"];Object.keys(Ot).forEach(function(e){Yp.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Ot[n]=Ot[e]})});function iu(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Ot.hasOwnProperty(e)&&Ot[e]?(""+n).trim():n+"px"}function uu(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var s=t.indexOf("--")===0,r=iu(t,n[t],s);t==="float"&&(t="cssFloat"),s?e.setProperty(t,r):e[t]=r}}var Xp=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cl(e,n){if(n){if(Xp[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(x(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(x(61))}if(n.style!=null&&typeof n.style!="object")throw Error(x(62))}}function Pl(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Nl=null;function ka(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tl=null,nt=null,tt=null;function ko(e){if(e=is(e)){if(typeof Tl!="function")throw Error(x(280));var n=e.stateNode;n&&(n=xr(n),Tl(e.stateNode,e.type,n))}}function cu(e){nt?tt?tt.push(e):tt=[e]:nt=e}function pu(){if(nt){var e=nt,n=tt;if(tt=nt=null,ko(e),n)for(e=0;e>>=0,e===0?32:31-(ad(e)/od|0)|0}var vs=64,gs=4194304;function Lt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ks(e,n){var t=e.pendingLanes;if(t===0)return 0;var s=0,r=e.suspendedLanes,l=e.pingedLanes,a=t&268435455;if(a!==0){var o=a&~r;o!==0?s=Lt(o):(l&=a,l!==0&&(s=Lt(l)))}else a=t&~r,a!==0?s=Lt(a):l!==0&&(s=Lt(l));if(s===0)return 0;if(n!==0&&n!==s&&!(n&r)&&(r=s&-s,l=n&-n,r>=l||r===16&&(l&4194240)!==0))return n;if(s&4&&(s|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0t;t++)n.push(e);return n}function as(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Ae(n),e[n]=t}function pd(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0=Dt),Ro=String.fromCharCode(32),Oo=!1;function Ru(e,n){switch(e){case"keyup":return $d.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hn=!1;function bd(e,n){switch(e){case"compositionend":return Ou(n);case"keypress":return n.which!==32?null:(Oo=!0,Ro);case"textInput":return e=n.data,e===Ro&&Oo?null:e;default:return null}}function Vd(e,n){if(Hn)return e==="compositionend"||!La&&Ru(e,n)?(e=Tu(),Ds=Pa=an=null,Hn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=s}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=Ao(t)}}function Au(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Au(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Fu(){for(var e=window,n=Bs();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Bs(e.document)}return n}function Ra(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Zd(e){var n=Fu(),t=e.focusedElem,s=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Au(t.ownerDocument.documentElement,t)){if(s!==null&&Ra(t)){if(n=s.start,e=s.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var r=t.textContent.length,l=Math.min(s.start,r);s=s.end===void 0?l:Math.min(s.end,r),!e.extend&&l>s&&(r=s,s=l,l=r),r=Fo(t,l);var a=Fo(t,s);r&&a&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(n=n.createRange(),n.setStart(r.node,r.offset),e.removeAllRanges(),l>s?(e.addRange(n),e.extend(a.node,a.offset)):(n.setEnd(a.node,a.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Wn=null,zl=null,At=null,Al=!1;function Mo(e,n,t){var s=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Al||Wn==null||Wn!==Bs(s)||(s=Wn,"selectionStart"in s&&Ra(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),At&&Yt(At,s)||(At=s,s=Gs(zl,"onSelect"),0Yn||(e.current=Vl[Yn],Vl[Yn]=null,Yn--)}function F(e,n){Yn++,Vl[Yn]=e.current,e.current=n}var jn={},ie=xn(jn),ye=xn(!1),In=jn;function ot(e,n){var t=e.type.contextTypes;if(!t)return jn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var r={},l;for(l in t)r[l]=n[l];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=r),r}function ve(e){return e=e.childContextTypes,e!=null}function qs(){$(ye),$(ie)}function Wo(e,n,t){if(ie.current!==jn)throw Error(x(168));F(ie,n),F(ye,t)}function Qu(e,n,t){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return t;s=s.getChildContext();for(var r in s)if(!(r in n))throw Error(x(108,Qp(e)||"Unknown",r));return H({},t,s)}function Js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jn,In=ie.current,F(ie,e),F(ye,ye.current),!0}function Qo(e,n,t){var s=e.stateNode;if(!s)throw Error(x(169));t?(e=Qu(e,n,In),s.__reactInternalMemoizedMergedChildContext=e,$(ye),$(ie),F(ie,e)):$(ye),F(ye,t)}var We=null,kr=!1,tl=!1;function Ku(e){We===null?We=[e]:We.push(e)}function cf(e){kr=!0,Ku(e)}function kn(){if(!tl&&We!==null){tl=!0;var e=0,n=A;try{var t=We;for(A=1;e>=a,r-=a,Qe=1<<32-Ae(n)+r|t<N?(U=E,E=null):U=E.sibling;var I=y(p,E,f[N],v);if(I===null){E===null&&(E=U);break}e&&E&&I.alternate===null&&n(p,E),c=l(I,c,N),k===null?_=I:k.sibling=I,k=I,E=U}if(N===f.length)return t(p,E),b&&En(p,N),_;if(E===null){for(;NN?(U=E,E=null):U=E.sibling;var Re=y(p,E,I.value,v);if(Re===null){E===null&&(E=U);break}e&&E&&Re.alternate===null&&n(p,E),c=l(Re,c,N),k===null?_=Re:k.sibling=Re,k=Re,E=U}if(I.done)return t(p,E),b&&En(p,N),_;if(E===null){for(;!I.done;N++,I=f.next())I=h(p,I.value,v),I!==null&&(c=l(I,c,N),k===null?_=I:k.sibling=I,k=I);return b&&En(p,N),_}for(E=s(p,E);!I.done;N++,I=f.next())I=g(E,p,N,I.value,v),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?N:I.key),c=l(I,c,N),k===null?_=I:k.sibling=I,k=I);return e&&E.forEach(function(gt){return n(p,gt)}),b&&En(p,N),_}function T(p,c,f,v){if(typeof f=="object"&&f!==null&&f.type===Bn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case hs:e:{for(var _=f.key,k=c;k!==null;){if(k.key===_){if(_=f.type,_===Bn){if(k.tag===7){t(p,k.sibling),c=r(k,f.props.children),c.return=p,p=c;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===tn&&Jo(_)===k.type){t(p,k.sibling),c=r(k,f.props),c.ref=Et(p,k,f),c.return=p,p=c;break e}t(p,k);break}else n(p,k);k=k.sibling}f.type===Bn?(c=Rn(f.props.children,p.mode,v,f.key),c.return=p,p=c):(v=Vs(f.type,f.key,f.props,null,p.mode,v),v.ref=Et(p,c,f),v.return=p,p=v)}return a(p);case Vn:e:{for(k=f.key;c!==null;){if(c.key===k)if(c.tag===4&&c.stateNode.containerInfo===f.containerInfo&&c.stateNode.implementation===f.implementation){t(p,c.sibling),c=r(c,f.children||[]),c.return=p,p=c;break e}else{t(p,c);break}else n(p,c);c=c.sibling}c=cl(f,p.mode,v),c.return=p,p=c}return a(p);case tn:return k=f._init,T(p,c,k(f._payload),v)}if(Tt(f))return j(p,c,f,v);if(wt(f))return w(p,c,f,v);Es(p,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,c!==null&&c.tag===6?(t(p,c.sibling),c=r(c,f),c.return=p,p=c):(t(p,c),c=ul(f,p.mode,v),c.return=p,p=c),a(p)):t(p,c)}return T}var ut=nc(!0),tc=nc(!1),us={},Be=xn(us),qt=xn(us),Jt=xn(us);function Tn(e){if(e===us)throw Error(x(174));return e}function Ua(e,n){switch(F(Jt,n),F(qt,e),F(Be,us),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:El(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=El(n,e)}$(Be),F(Be,n)}function ct(){$(Be),$(qt),$(Jt)}function sc(e){Tn(Jt.current);var n=Tn(Be.current),t=El(n,e.type);n!==t&&(F(qt,e),F(Be,t))}function ba(e){qt.current===e&&($(Be),$(qt))}var V=xn(0);function lr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var sl=[];function Va(){for(var e=0;et?t:4,e(!0);var s=rl.transition;rl.transition={};try{e(!1),n()}finally{A=t,rl.transition=s}}function jc(){return Le().memoizedState}function hf(e,n,t){var s=yn(e);if(t={lane:s,action:t,hasEagerState:!1,eagerState:null,next:null},wc(e))xc(n,t);else if(t=Zu(e,n,t,s),t!==null){var r=pe();Fe(t,e,s,r),kc(t,n,s)}}function mf(e,n,t){var s=yn(e),r={lane:s,action:t,hasEagerState:!1,eagerState:null,next:null};if(wc(e))xc(n,r);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=n.lastRenderedReducer,l!==null))try{var a=n.lastRenderedState,o=l(a,t);if(r.hasEagerState=!0,r.eagerState=o,Me(o,a)){var i=n.interleaved;i===null?(r.next=r,Ma(n)):(r.next=i.next,i.next=r),n.interleaved=r;return}}catch{}finally{}t=Zu(e,n,r,s),t!==null&&(r=pe(),Fe(t,e,s,r),kc(t,n,s))}}function wc(e){var n=e.alternate;return e===B||n!==null&&n===B}function xc(e,n){Ft=ar=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function kc(e,n,t){if(t&4194240){var s=n.lanes;s&=e.pendingLanes,t|=s,n.lanes=t,Sa(e,t)}}var or={readContext:Te,useCallback:re,useContext:re,useEffect:re,useImperativeHandle:re,useInsertionEffect:re,useLayoutEffect:re,useMemo:re,useReducer:re,useRef:re,useState:re,useDebugValue:re,useDeferredValue:re,useTransition:re,useMutableSource:re,useSyncExternalStore:re,useId:re,unstable_isNewReconciler:!1},yf={readContext:Te,useCallback:function(e,n){return Ue().memoizedState=[e,n===void 0?null:n],e},useContext:Te,useEffect:ni,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Ms(4194308,4,hc.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Ms(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ms(4,2,e,n)},useMemo:function(e,n){var t=Ue();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var s=Ue();return n=t!==void 0?t(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=hf.bind(null,B,e),[s.memoizedState,e]},useRef:function(e){var n=Ue();return e={current:e},n.memoizedState=e},useState:ei,useDebugValue:Ka,useDeferredValue:function(e){return Ue().memoizedState=e},useTransition:function(){var e=ei(!1),n=e[0];return e=ff.bind(null,e[1]),Ue().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var s=B,r=Ue();if(b){if(t===void 0)throw Error(x(407));t=t()}else{if(t=n(),ee===null)throw Error(x(349));zn&30||ac(s,n,t)}r.memoizedState=t;var l={value:t,getSnapshot:n};return r.queue=l,ni(ic.bind(null,s,l,e),[e]),s.flags|=2048,ts(9,oc.bind(null,s,l,t,n),void 0,null),t},useId:function(){var e=Ue(),n=ee.identifierPrefix;if(b){var t=Ke,s=Qe;t=(s&~(1<<32-Ae(s)-1)).toString(32)+t,n=":"+n+"R"+t,t=es++,0<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=a.createElement(t,{is:s.is}):(e=a.createElement(t),t==="select"&&(a=e,s.multiple?a.multiple=!0:s.size&&(a.size=s.size))):e=a.createElementNS(e,t),e[be]=n,e[Zt]=s,Rc(e,n,!1,!1),n.stateNode=e;e:{switch(a=Pl(t,s),t){case"dialog":M("cancel",e),M("close",e),r=s;break;case"iframe":case"object":case"embed":M("load",e),r=s;break;case"video":case"audio":for(r=0;rdt&&(n.flags|=128,s=!0,Ct(l,!1),n.lanes=4194304)}else{if(!s)if(e=lr(a),e!==null){if(n.flags|=128,s=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),Ct(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!b)return le(n),null}else 2*K()-l.renderingStartTime>dt&&t!==1073741824&&(n.flags|=128,s=!0,Ct(l,!1),n.lanes=4194304);l.isBackwards?(a.sibling=n.child,n.child=a):(t=l.last,t!==null?t.sibling=a:n.child=a,l.last=a)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=K(),n.sibling=null,t=V.current,F(V,s?t&1|2:t&1),n):(le(n),null);case 22:case 23:return Ja(),s=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(n.flags|=8192),s&&n.mode&1?je&1073741824&&(le(n),n.subtreeFlags&6&&(n.flags|=8192)):le(n),null;case 24:return null;case 25:return null}throw Error(x(156,n.tag))}function Sf(e,n){switch(Ia(n),n.tag){case 1:return ve(n.type)&&qs(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ct(),$(ye),$(ie),Va(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return ba(n),null;case 13:if($(V),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(x(340));it()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return $(V),null;case 4:return ct(),null;case 10:return Fa(n.type._context),null;case 22:case 23:return Ja(),null;case 24:return null;default:return null}}var Ps=!1,oe=!1,Ef=typeof WeakSet=="function"?WeakSet:Set,C=null;function qn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(s){W(e,n,s)}else t.current=null}function ea(e,n,t){try{t()}catch(s){W(e,n,s)}}var ci=!1;function Cf(e,n){if(Fl=Ys,e=Fu(),Ra(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var s=t.getSelection&&t.getSelection();if(s&&s.rangeCount!==0){t=s.anchorNode;var r=s.anchorOffset,l=s.focusNode;s=s.focusOffset;try{t.nodeType,l.nodeType}catch{t=null;break e}var a=0,o=-1,i=-1,u=0,d=0,h=e,y=null;n:for(;;){for(var g;h!==t||r!==0&&h.nodeType!==3||(o=a+r),h!==l||s!==0&&h.nodeType!==3||(i=a+s),h.nodeType===3&&(a+=h.nodeValue.length),(g=h.firstChild)!==null;)y=h,h=g;for(;;){if(h===e)break n;if(y===t&&++u===r&&(o=a),y===l&&++d===s&&(i=a),(g=h.nextSibling)!==null)break;h=y,y=h.parentNode}h=g}t=o===-1||i===-1?null:{start:o,end:i}}else t=null}t=t||{start:0,end:0}}else t=null;for(Ml={focusedElem:e,selectionRange:t},Ys=!1,C=n;C!==null;)if(n=C,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,C=e;else for(;C!==null;){n=C;try{var j=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(j!==null){var w=j.memoizedProps,T=j.memoizedState,p=n.stateNode,c=p.getSnapshotBeforeUpdate(n.elementType===n.type?w:Ie(n.type,w),T);p.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var f=n.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(v){W(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,C=e;break}C=n.return}return j=ci,ci=!1,j}function Mt(e,n,t){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var r=s=s.next;do{if((r.tag&e)===e){var l=r.destroy;r.destroy=void 0,l!==void 0&&ea(n,t,l)}r=r.next}while(r!==s)}}function Er(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var s=t.create;t.destroy=s()}t=t.next}while(t!==n)}}function na(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Dc(e){var n=e.alternate;n!==null&&(e.alternate=null,Dc(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[be],delete n[Zt],delete n[bl],delete n[of],delete n[uf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zc(e){return e.tag===5||e.tag===3||e.tag===4}function pi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ta(e,n,t){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Zs));else if(s!==4&&(e=e.child,e!==null))for(ta(e,n,t),e=e.sibling;e!==null;)ta(e,n,t),e=e.sibling}function sa(e,n,t){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(sa(e,n,t),e=e.sibling;e!==null;)sa(e,n,t),e=e.sibling}var ne=null,De=!1;function en(e,n,t){for(t=t.child;t!==null;)Ac(e,n,t),t=t.sibling}function Ac(e,n,t){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(vr,t)}catch{}switch(t.tag){case 5:oe||qn(t,n);case 6:var s=ne,r=De;ne=null,en(e,n,t),ne=s,De=r,ne!==null&&(De?(e=ne,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):ne.removeChild(t.stateNode));break;case 18:ne!==null&&(De?(e=ne,t=t.stateNode,e.nodeType===8?nl(e.parentNode,t):e.nodeType===1&&nl(e,t),Qt(e)):nl(ne,t.stateNode));break;case 4:s=ne,r=De,ne=t.stateNode.containerInfo,De=!0,en(e,n,t),ne=s,De=r;break;case 0:case 11:case 14:case 15:if(!oe&&(s=t.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){r=s=s.next;do{var l=r,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&ea(t,n,a),r=r.next}while(r!==s)}en(e,n,t);break;case 1:if(!oe&&(qn(t,n),s=t.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=t.memoizedProps,s.state=t.memoizedState,s.componentWillUnmount()}catch(o){W(t,n,o)}en(e,n,t);break;case 21:en(e,n,t);break;case 22:t.mode&1?(oe=(s=oe)||t.memoizedState!==null,en(e,n,t),oe=s):en(e,n,t);break;default:en(e,n,t)}}function di(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new Ef),n.forEach(function(s){var r=zf.bind(null,e,s);t.has(s)||(t.add(s),s.then(r,r))})}}function Oe(e,n){var t=n.deletions;if(t!==null)for(var s=0;sr&&(r=a),s&=~l}if(s=r,s=K()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Nf(s/1960))-s,10e?16:e,on===null)var s=!1;else{if(e=on,on=null,cr=0,D&6)throw Error(x(331));var r=D;for(D|=4,C=e.current;C!==null;){var l=C,a=l.child;if(C.flags&16){var o=l.deletions;if(o!==null){for(var i=0;iK()-Za?Ln(e,0):Ga|=t),ge(e,n)}function Hc(e,n){n===0&&(e.mode&1?(n=gs,gs<<=1,!(gs&130023424)&&(gs=4194304)):n=1);var t=pe();e=Ze(e,n),e!==null&&(as(e,n,t),ge(e,t))}function Df(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Hc(e,t)}function zf(e,n){var t=0;switch(e.tag){case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(t=r.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(x(314))}s!==null&&s.delete(n),Hc(e,t)}var Wc;Wc=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||ye.current)me=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return me=!1,kf(e,n,t);me=!!(e.flags&131072)}else me=!1,b&&n.flags&1048576&&Yu(n,nr,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;$s(e,n),e=n.pendingProps;var r=ot(n,ie.current);rt(n,t),r=Ha(null,n,s,e,r,t);var l=Wa();return n.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ve(s)?(l=!0,Js(n)):l=!1,n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,$a(n),r.updater=_r,n.stateNode=r,r._reactInternals=n,Kl(n,s,e,t),n=Gl(null,n,s,!0,l,t)):(n.tag=0,b&&l&&Oa(n),ce(null,n,r,t),n=n.child),n;case 16:s=n.elementType;e:{switch($s(e,n),e=n.pendingProps,r=s._init,s=r(s._payload),n.type=s,r=n.tag=Ff(s),e=Ie(s,e),r){case 0:n=Xl(null,n,s,e,t);break e;case 1:n=oi(null,n,s,e,t);break e;case 11:n=li(null,n,s,e,t);break e;case 14:n=ai(null,n,s,Ie(s.type,e),t);break e}throw Error(x(306,s,""))}return n;case 0:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:Ie(s,r),Xl(e,n,s,r,t);case 1:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:Ie(s,r),oi(e,n,s,r,t);case 3:e:{if(Nc(n),e===null)throw Error(x(387));s=n.pendingProps,l=n.memoizedState,r=l.element,qu(e,n),rr(n,s,null,t);var a=n.memoizedState;if(s=a.element,l.isDehydrated)if(l={element:s,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},n.updateQueue.baseState=l,n.memoizedState=l,n.flags&256){r=pt(Error(x(423)),n),n=ii(e,n,s,t,r);break e}else if(s!==r){r=pt(Error(x(424)),n),n=ii(e,n,s,t,r);break e}else for(we=fn(n.stateNode.containerInfo.firstChild),xe=n,b=!0,ze=null,t=tc(n,null,s,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(it(),s===r){n=qe(e,n,t);break e}ce(e,n,s,t)}n=n.child}return n;case 5:return sc(n),e===null&&Hl(n),s=n.type,r=n.pendingProps,l=e!==null?e.memoizedProps:null,a=r.children,$l(s,r)?a=null:l!==null&&$l(s,l)&&(n.flags|=32),Pc(e,n),ce(e,n,a,t),n.child;case 6:return e===null&&Hl(n),null;case 13:return Tc(e,n,t);case 4:return Ua(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=ut(n,null,s,t):ce(e,n,s,t),n.child;case 11:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:Ie(s,r),li(e,n,s,r,t);case 7:return ce(e,n,n.pendingProps,t),n.child;case 8:return ce(e,n,n.pendingProps.children,t),n.child;case 12:return ce(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(s=n.type._context,r=n.pendingProps,l=n.memoizedProps,a=r.value,F(tr,s._currentValue),s._currentValue=a,l!==null)if(Me(l.value,a)){if(l.children===r.children&&!ye.current){n=qe(e,n,t);break e}}else for(l=n.child,l!==null&&(l.return=n);l!==null;){var o=l.dependencies;if(o!==null){a=l.child;for(var i=o.firstContext;i!==null;){if(i.context===s){if(l.tag===1){i=Ye(-1,t&-t),i.tag=2;var u=l.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?i.next=i:(i.next=d.next,d.next=i),u.pending=i}}l.lanes|=t,i=l.alternate,i!==null&&(i.lanes|=t),Wl(l.return,t,n),o.lanes|=t;break}i=i.next}}else if(l.tag===10)a=l.type===n.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(x(341));a.lanes|=t,o=a.alternate,o!==null&&(o.lanes|=t),Wl(a,t,n),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===n){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}ce(e,n,r.children,t),n=n.child}return n;case 9:return r=n.type,s=n.pendingProps.children,rt(n,t),r=Te(r),s=s(r),n.flags|=1,ce(e,n,s,t),n.child;case 14:return s=n.type,r=Ie(s,n.pendingProps),r=Ie(s.type,r),ai(e,n,s,r,t);case 15:return Ec(e,n,n.type,n.pendingProps,t);case 17:return s=n.type,r=n.pendingProps,r=n.elementType===s?r:Ie(s,r),$s(e,n),n.tag=1,ve(s)?(e=!0,Js(n)):e=!1,rt(n,t),ec(n,s,r),Kl(n,s,r,t),Gl(null,n,s,!0,e,t);case 19:return Lc(e,n,t);case 22:return Cc(e,n,t)}throw Error(x(156,n.tag))};function Qc(e,n){return gu(e,n)}function Af(e,n,t,s){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pe(e,n,t,s){return new Af(e,n,t,s)}function no(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ff(e){if(typeof e=="function")return no(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wa)return 11;if(e===xa)return 14}return 2}function vn(e,n){var t=e.alternate;return t===null?(t=Pe(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Vs(e,n,t,s,r,l){var a=2;if(s=e,typeof e=="function")no(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Bn:return Rn(t.children,r,l,n);case ja:a=8,r|=8;break;case vl:return e=Pe(12,t,n,r|2),e.elementType=vl,e.lanes=l,e;case gl:return e=Pe(13,t,n,r),e.elementType=gl,e.lanes=l,e;case jl:return e=Pe(19,t,n,r),e.elementType=jl,e.lanes=l,e;case nu:return Pr(t,r,l,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ji:a=10;break e;case eu:a=9;break e;case wa:a=11;break e;case xa:a=14;break e;case tn:a=16,s=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return n=Pe(a,t,n,r),n.elementType=e,n.type=s,n.lanes=l,n}function Rn(e,n,t,s){return e=Pe(7,e,s,n),e.lanes=t,e}function Pr(e,n,t,s){return e=Pe(22,e,s,n),e.elementType=nu,e.lanes=t,e.stateNode={isHidden:!1},e}function ul(e,n,t){return e=Pe(6,e,null,n),e.lanes=t,e}function cl(e,n,t){return n=Pe(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Mf(e,n,t,s,r){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hr(0),this.expirationTimes=Hr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hr(0),this.identifierPrefix=s,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function to(e,n,t,s,r,l,a,o,i){return e=new Mf(e,n,t,o,i),n===1?(n=1,l===!0&&(n|=8)):n=0,l=Pe(3,null,null,n),e.current=l,l.stateNode=e,l.memoizedState={element:s,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},$a(l),e}function $f(e,n,t){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gc)}catch(e){console.error(e)}}Gc(),Yi.exports=_e;var Hf=Yi.exports,Zc,qc,wi=Hf;qc=wi.createRoot,Zc=wi.hydrateRoot;const Jc={theme:"light",sideNav:!0,initialized:!1},ep=S.createContext({state:Jc,init:e=>{},setTheme:e=>{},toggleSideNav:()=>{}});function ao(){return S.useContext(ep)}function xi(e,n){try{localStorage.setItem(e,n)}catch(t){console.error(t)}}const ki=({children:e})=>{const[n,t]=S.useState(Jc);function s(o){o=="dark"?(document.body.classList.remove("light"),document.body.classList.add("dark")):(document.body.classList.remove("dark"),document.body.classList.add("light"))}function r(o){try{const i=localStorage.getItem("theme")||"light";let u=o.width>=500;{const d=localStorage.getItem("sideNav");d&&(u=d=="true")}s(i),t(d=>({...d,theme:i,sideNav:u}))}catch(i){console.error(i)}t(i=>({...i,initialized:!0}))}function l(o){s(o),t({...n,theme:o}),xi("theme",o)}function a(){const o=!n.sideNav;t({...n,sideNav:o}),xi("sideNav",o)}return m.jsx(ep.Provider,{value:S.useMemo(()=>({state:n,init:r,setTheme:l,toggleSideNav:a}),[n]),children:e})};/** + * @remix-run/router v1.8.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var n=1;n"u")throw new Error(n)}function oo(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Qf(){return Math.random().toString(36).substr(2,8)}function Si(e,n){return{usr:e.state,key:e.key,idx:n}}function ia(e,n,t,s){return t===void 0&&(t=null),rs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?yt(n):n,{state:t,key:n&&n.key||s||Qf()})}function np(e){let{pathname:n="/",search:t="",hash:s=""}=e;return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function yt(e){let n={};if(e){let t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));let s=e.indexOf("?");s>=0&&(n.search=e.substr(s),e=e.substr(0,s)),e&&(n.pathname=e)}return n}function Kf(e,n,t,s){s===void 0&&(s={});let{window:r=document.defaultView,v5Compat:l=!1}=s,a=r.history,o=un.Pop,i=null,u=d();u==null&&(u=0,a.replaceState(rs({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){o=un.Pop;let T=d(),p=T==null?null:T-u;u=T,i&&i({action:o,location:w.location,delta:p})}function y(T,p){o=un.Push;let c=ia(w.location,T,p);t&&t(c,T),u=d()+1;let f=Si(c,u),v=w.createHref(c);try{a.pushState(f,"",v)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;r.location.assign(v)}l&&i&&i({action:o,location:w.location,delta:1})}function g(T,p){o=un.Replace;let c=ia(w.location,T,p);t&&t(c,T),u=d();let f=Si(c,u),v=w.createHref(c);a.replaceState(f,"",v),l&&i&&i({action:o,location:w.location,delta:0})}function j(T){let p=r.location.origin!=="null"?r.location.origin:r.location.href,c=typeof T=="string"?T:np(T);return Z(p,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,p)}let w={get action(){return o},get location(){return e(r,a)},listen(T){if(i)throw new Error("A history only accepts one active listener");return r.addEventListener(_i,h),i=T,()=>{r.removeEventListener(_i,h),i=null}},createHref(T){return n(r,T)},createURL:j,encodeLocation(T){let p=j(T);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:y,replace:g,go(T){return a.go(T)}};return w}var Ei;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ei||(Ei={}));function Yf(e,n,t){t===void 0&&(t="/");let s=typeof n=="string"?yt(n):n,r=lp(s.pathname||"/",t);if(r==null)return null;let l=tp(e);Xf(l);let a=null;for(let o=0;a==null&&o{let i={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:a,route:l};i.relativePath.startsWith("/")&&(Z(i.relativePath.startsWith(s),'Absolute route path "'+i.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),i.relativePath=i.relativePath.slice(s.length));let u=On([s,i.relativePath]),d=t.concat(i);l.children&&l.children.length>0&&(Z(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),tp(l.children,n,d,u)),!(l.path==null&&!l.index)&&n.push({path:u,score:th(u,l.index),routesMeta:d})};return e.forEach((l,a)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))r(l,a);else for(let i of sp(l.path))r(l,a,i)}),n}function sp(e){let n=e.split("/");if(n.length===0)return[];let[t,...s]=n,r=t.endsWith("?"),l=t.replace(/\?$/,"");if(s.length===0)return r?[l,""]:[l];let a=sp(s.join("/")),o=[];return o.push(...a.map(i=>i===""?l:[l,i].join("/"))),r&&o.push(...a),o.map(i=>e.startsWith("/")&&i===""?"/":i)}function Xf(e){e.sort((n,t)=>n.score!==t.score?t.score-n.score:sh(n.routesMeta.map(s=>s.childrenIndex),t.routesMeta.map(s=>s.childrenIndex)))}const Gf=/^:\w+$/,Zf=3,qf=2,Jf=1,eh=10,nh=-2,Ci=e=>e==="*";function th(e,n){let t=e.split("/"),s=t.length;return t.some(Ci)&&(s+=nh),n&&(s+=qf),t.filter(r=>!Ci(r)).reduce((r,l)=>r+(Gf.test(l)?Zf:l===""?Jf:eh),s)}function sh(e,n){return e.length===n.length&&e.slice(0,-1).every((s,r)=>s===n[r])?e[e.length-1]-n[n.length-1]:0}function rh(e,n){let{routesMeta:t}=e,s={},r="/",l=[];for(let a=0;a{if(d==="*"){let y=o[h]||"";a=l.slice(0,l.length-y.length).replace(/(.)\/+$/,"$1")}return u[d]=oh(o[h]||"",d),u},{}),pathname:l,pathnameBase:a,pattern:e}}function lh(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!0),oo(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,o)=>(s.push(o),"/([^\\/]+)"));return e.endsWith("*")?(s.push("*"),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,n?void 0:"i"),s]}function ah(e){try{return decodeURI(e)}catch(n){return oo(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function oh(e,n){try{return decodeURIComponent(e)}catch(t){return oo(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),e}}function lp(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let t=n.endsWith("/")?n.length-1:n.length,s=e.charAt(t);return s&&s!=="/"?null:e.slice(t)||"/"}function ih(e,n){n===void 0&&(n="/");let{pathname:t,search:s="",hash:r=""}=typeof e=="string"?yt(e):e;return{pathname:t?t.startsWith("/")?t:uh(t,n):n,search:fh(s),hash:hh(r)}}function uh(e,n){let t=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function pl(e,n,t,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function ch(e){return e.filter((n,t)=>t===0||n.route.path&&n.route.path.length>0)}function ph(e,n,t,s){s===void 0&&(s=!1);let r;typeof e=="string"?r=yt(e):(r=rs({},e),Z(!r.pathname||!r.pathname.includes("?"),pl("?","pathname","search",r)),Z(!r.pathname||!r.pathname.includes("#"),pl("#","pathname","hash",r)),Z(!r.search||!r.search.includes("#"),pl("#","search","hash",r)));let l=e===""||r.pathname==="",a=l?"/":r.pathname,o;if(s||a==null)o=t;else{let h=n.length-1;if(a.startsWith("..")){let y=a.split("/");for(;y[0]==="..";)y.shift(),h-=1;r.pathname=y.join("/")}o=h>=0?n[h]:"/"}let i=ih(r,o),u=a&&a!=="/"&&a.endsWith("/"),d=(l||a===".")&&t.endsWith("/");return!i.pathname.endsWith("/")&&(u||d)&&(i.pathname+="/"),i}const On=e=>e.join("/").replace(/\/\/+/g,"/"),dh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function mh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ap=["post","put","patch","delete"];new Set(ap);const yh=["get",...ap];new Set(yh);/** + * React Router v6.15.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var n=1;ni.pathnameBase)),a=S.useRef(!1);return ip(()=>{a.current=!0}),S.useCallback(function(i,u){if(u===void 0&&(u={}),!a.current)return;if(typeof i=="number"){t.go(i);return}let d=ph(i,JSON.parse(l),r,u.relative==="path");e==null&&n!=="/"&&(d.pathname=d.pathname==="/"?n:On([n,d.pathname])),(u.replace?t.replace:t.push)(d,u.state,u)},[n,t,l,r,e])}function wh(e,n){return xh(e,n)}function xh(e,n,t){Dr()||Z(!1);let{navigator:s}=S.useContext(Or),{matches:r}=S.useContext(vt),l=r[r.length-1],a=l?l.params:{};l&&l.pathname;let o=l?l.pathnameBase:"/";l&&l.route;let i=zr(),u;if(n){var d;let w=typeof n=="string"?yt(n):n;o==="/"||(d=w.pathname)!=null&&d.startsWith(o)||Z(!1),u=w}else u=i;let h=u.pathname||"/",y=o==="/"?h:h.slice(o.length)||"/",g=Yf(e,{pathname:y}),j=Ch(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:On([o,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?o:On([o,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),r,t);return n&&j?S.createElement(Ir.Provider,{value:{location:fr({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:un.Pop}},j):j}function kh(){let e=Lh(),n=mh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},l=null;return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},n),t?S.createElement("pre",{style:r},t):null,l)}const _h=S.createElement(kh,null);class Sh extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error||t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){console.error("React Router caught the following error during render",n,t)}render(){return this.state.error?S.createElement(vt.Provider,{value:this.props.routeContext},S.createElement(op.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Eh(e){let{routeContext:n,match:t,children:s}=e,r=S.useContext(io);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(vt.Provider,{value:n},s)}function Ch(e,n,t){var s;if(n===void 0&&(n=[]),t===void 0&&(t=null),e==null){var r;if((r=t)!=null&&r.errors)e=t.matches;else return null}let l=e,a=(s=t)==null?void 0:s.errors;if(a!=null){let o=l.findIndex(i=>i.route.id&&(a==null?void 0:a[i.route.id]));o>=0||Z(!1),l=l.slice(0,Math.min(l.length,o+1))}return l.reduceRight((o,i,u)=>{let d=i.route.id?a==null?void 0:a[i.route.id]:null,h=null;t&&(h=i.route.errorElement||_h);let y=n.concat(l.slice(0,u+1)),g=()=>{let j;return d?j=h:i.route.Component?j=S.createElement(i.route.Component,null):i.route.element?j=i.route.element:j=o,S.createElement(Eh,{match:i,routeContext:{outlet:o,matches:y,isDataRoute:t!=null},children:j})};return t&&(i.route.ErrorBoundary||i.route.errorElement||u===0)?S.createElement(Sh,{location:t.location,revalidation:t.revalidation,component:h,error:d,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):g()},null)}var up=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(up||{}),hr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(hr||{});function Ph(e){let n=S.useContext(io);return n||Z(!1),n}function Nh(e){let n=S.useContext(vh);return n||Z(!1),n}function Th(e){let n=S.useContext(vt);return n||Z(!1),n}function cp(e){let n=Th(),t=n.matches[n.matches.length-1];return t.route.id||Z(!1),t.route.id}function Lh(){var e;let n=S.useContext(op),t=Nh(hr.UseRouteError),s=cp(hr.UseRouteError);return n||((e=t.errors)==null?void 0:e[s])}function Rh(){let{router:e}=Ph(up.UseNavigateStable),n=cp(hr.UseNavigateStable),t=S.useRef(!1);return ip(()=>{t.current=!0}),S.useCallback(function(r,l){l===void 0&&(l={}),t.current&&(typeof r=="number"?e.navigate(r):e.navigate(r,fr({fromRouteId:n},l)))},[e,n])}function pp(e){Z(!1)}function Oh(e){let{basename:n="/",children:t=null,location:s,navigationType:r=un.Pop,navigator:l,static:a=!1}=e;Dr()&&Z(!1);let o=n.replace(/^\/*/,"/"),i=S.useMemo(()=>({basename:o,navigator:l,static:a}),[o,l,a]);typeof s=="string"&&(s=yt(s));let{pathname:u="/",search:d="",hash:h="",state:y=null,key:g="default"}=s,j=S.useMemo(()=>{let w=lp(u,o);return w==null?null:{location:{pathname:w,search:d,hash:h,state:y,key:g},navigationType:r}},[o,u,d,h,y,g,r]);return j==null?null:S.createElement(Or.Provider,{value:i},S.createElement(Ir.Provider,{children:t,value:j}))}function Ih(e){let{children:n,location:t}=e;return wh(ua(n),t)}new Promise(()=>{});function ua(e,n){n===void 0&&(n=[]);let t=[];return S.Children.forEach(e,(s,r)=>{if(!S.isValidElement(s))return;let l=[...n,r];if(s.type===S.Fragment){t.push.apply(t,ua(s.props.children,l));return}s.type!==pp&&Z(!1),!s.props.index||!s.props.children||Z(!1);let a={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(a.children=ua(s.props.children,l)),t.push(a)}),t}/** + * React Router DOM v6.15.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ca(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,t)=>{let s=e[t];return n.concat(Array.isArray(s)?s.map(r=>[t,r]):[[t,s]])},[]))}function Dh(e,n){let t=ca(e);return n&&n.forEach((s,r)=>{t.has(r)||n.getAll(r).forEach(l=>{t.append(r,l)})}),t}const zh="startTransition",Pi=Ip[zh];function Ah(e){let{basename:n,children:t,future:s,window:r}=e,l=S.useRef();l.current==null&&(l.current=Wf({window:r,v5Compat:!0}));let a=l.current,[o,i]=S.useState({action:a.action,location:a.location}),{v7_startTransition:u}=s||{},d=S.useCallback(h=>{u&&Pi?Pi(()=>i(h)):i(h)},[i,u]);return S.useLayoutEffect(()=>a.listen(d),[a,d]),S.createElement(Oh,{basename:n,children:t,location:o.location,navigationType:o.action,navigator:a})}var Ni;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Ni||(Ni={}));var Ti;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ti||(Ti={}));function Fh(e){let n=S.useRef(ca(e)),t=S.useRef(!1),s=zr(),r=S.useMemo(()=>Dh(s.search,t.current?null:n.current),[s.search]),l=gh(),a=S.useCallback((o,i)=>{const u=ca(typeof o=="function"?o(r):o);t.current=!0,l("?"+u,i)},[l,r]);return[r,a]}const Mh="_component_19dyb_1",$h="_sideNav_19dyb_6",Uh="_main_19dyb_13",bh="_children_19dyb_20",Ls={component:Mh,sideNav:$h,main:Uh,children:bh},Vh="_list_1ltry_1",Bh="_title_1ltry_6",Hh="_listItem_1ltry_11",Wh="_listItemActive_1ltry_18",Qh="_link_1ltry_26",bn={list:Vh,title:Bh,listItem:Hh,listItemActive:Wh,link:Qh},Kh=[{lang:"Simplified Chinese",url:"https://github.com/Web3-Club/vyper-by-example_Chinese"}],Yh=[{path:"hello-world",title:"Hello World"},{path:"values",title:"Data Types - Values"},{path:"references",title:"Data Types - References"},{path:"dynamic-arrays",title:"Dynamic Arrays"},{path:"function",title:"Function"},{path:"internal-external-functions",title:"Internal and External Functions"},{path:"view-pure-functions",title:"View and Pure Functions"},{path:"constructor",title:"Constructor"},{path:"private-public-state-variables",title:"Private and Public State Variables"},{path:"constants",title:"Constants"},{path:"immutable",title:"Immutable"},{path:"if-else",title:"If Else"},{path:"for-loop",title:"For Loop"},{path:"error",title:"Error"},{path:"event",title:"Event"},{path:"payable",title:"Payable"},{path:"default-function",title:"Default Function"},{path:"send-ether",title:"Send Ether"},{path:"raw-call",title:"Raw Call"},{path:"delegate-call",title:"Delegate Call"},{path:"interface",title:"Interface"},{path:"hash-function",title:"Hash Function"},{path:"verify-signature",title:"Verify Signature"},{path:"create-new-contract",title:"Create New Contract"},{path:"re-entrancy-lock",title:"Re-entrancy Lock"},{path:"self-destruct",title:"Self Destruct"},{path:"print",title:"Debug with Print"},{path:"unsafe-math",title:"Unsafe Math"}],Xh=[{path:"curve-swap",title:"Curve Swap"},{path:"curve-liquidity",title:"Curve Add and Remove Liquidity"}],uo=[{title:"",routes:Yh.map(e=>({...e,path:`/${e.path}`}))},{title:"DeFi",routes:Xh.map(e=>({...e,path:`/defi/${e.path}`}))}],mr=uo.map(({routes:e})=>e).flat(),Gh=mr.reduce((e,n,t)=>(e[n.path]=t,e),{});function Zh(e){const n=Gh[e];if(n>=0){const t=mr[n-1]||null,s=mr[n+1]||null;return{prev:t,next:s}}return{prev:null,next:null}}const qh=({onClick:e})=>{const n=zr();function t(s,r){s.preventDefault(),e(r)}return m.jsxs(m.Fragment,{children:[m.jsx("h3",{className:bn.category,children:"Basic"}),uo.map(({routes:s,title:r},l)=>m.jsxs("div",{children:[r&&m.jsx("h3",{className:bn.title,children:r}),m.jsx("ul",{className:bn.list,children:s.map(({path:a,title:o})=>{const i=!!rp(a,n.pathname);return m.jsx("li",{className:i?bn.listItemActive:bn.listItem,children:m.jsx("a",{className:bn.link,href:a,onClick:u=>t(u,a),children:o})},a)})})]},l))]})},Jh=({size:e,className:n="",onClick:t})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",strokeWidth:2,stroke:"currentColor",className:n,width:e,height:e,onClick:t,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),em="_component_iyhkn_1",nm="_a_iyhkn_11",tm="_center_iyhkn_14",sm="_logo_iyhkn_19",rm="_header_iyhkn_22",lm="_mode_iyhkn_26",am="_hamburger_iyhkn_31",nn={component:em,a:nm,center:tm,logo:sm,header:rm,mode:lm,hamburger:am},om=({size:e,className:n=""})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#fff",viewBox:"0 0 438.277 438.277",width:e,height:e,className:n,children:m.jsx("path",{d:"M428.756 300.104c-.664-3.81-2.334-7.047-4.996-9.713-5.9-5.903-12.752-7.142-20.554-3.716-20.937 9.708-42.641 14.558-65.097 14.558-28.171 0-54.152-6.94-77.943-20.838-23.791-13.894-42.631-32.736-56.525-56.53-13.899-23.793-20.844-49.773-20.844-77.945 0-21.888 4.333-42.683 12.991-62.384 8.66-19.7 21.176-36.973 37.543-51.82 6.283-5.898 7.713-12.752 4.287-20.557-3.236-7.801-9.041-11.511-17.415-11.132-29.121 1.141-56.72 7.664-82.797 19.556C111.33 31.478 88.917 47.13 70.168 66.548c-18.747 19.414-33.595 42.399-44.54 68.95-10.942 26.553-16.416 54.39-16.416 83.511 0 29.694 5.806 58.054 17.416 85.082 11.613 27.028 27.218 50.344 46.824 69.949 19.604 19.599 42.92 35.207 69.951 46.822 27.028 11.607 55.384 17.415 85.075 17.415 42.64 0 81.987-11.563 118.054-34.69 36.069-23.124 63.05-54.006 80.944-92.645 1.524-3.423 1.951-7.036 1.28-10.838zm-122.191 84.064c-24.646 11.711-50.676 17.562-78.087 17.562-24.743 0-48.39-4.853-70.947-14.558-22.554-9.705-41.971-22.695-58.246-38.972-16.271-16.272-29.259-35.686-38.97-58.241-9.707-22.556-14.561-46.203-14.561-70.948 0-40.922 12.135-77.466 36.403-109.636 24.266-32.165 55.531-53.959 93.788-65.379-19.795 31.405-29.694 65.379-29.694 101.926 0 34.644 8.564 66.715 25.697 96.223 17.128 29.499 40.446 52.811 69.95 69.948 29.499 17.129 61.565 25.694 96.211 25.694 10.656 0 21.129-.855 31.408-2.57-17.318 20.938-38.307 37.255-62.952 48.951z"})}),im=({size:e,className:n=""})=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 302.4 302.4",width:e,height:e,className:n,children:[m.jsx("path",{d:"M204.8 97.6C191.2 84 172 75.2 151.2 75.2s-40 8.4-53.6 22.4c-13.6 13.6-22.4 32.8-22.4 53.6s8.8 40 22.4 53.6c13.6 13.6 32.8 22.4 53.6 22.4s40-8.4 53.6-22.4c13.6-13.6 22.4-32.8 22.4-53.6s-8.4-40-22.4-53.6zm-14.4 92.8c-10 10-24 16-39.2 16s-29.2-6-39.2-16-16-24-16-39.2 6-29.2 16-39.2 24-16 39.2-16 29.2 6 39.2 16 16 24 16 39.2-6 29.2-16 39.2z",stroke:"#252519",strokeWidth:12}),m.jsx("path",{d:"M292 140.8h-30.8c-5.6 0-10.4 4.8-10.4 10.4 0 5.6 4.8 10.4 10.4 10.4H292c5.6 0 10.4-4.8 10.4-10.4 0-5.6-4.8-10.4-10.4-10.4zm-140.8 110c-5.6 0-10.4 4.8-10.4 10.4V292c0 5.6 4.8 10.4 10.4 10.4 5.6 0 10.4-4.8 10.4-10.4v-30.8c0-5.6-4.8-10.4-10.4-10.4zm106.8-7.2-22-22c-3.6-4-10.4-4-14.4 0s-4 10.4 0 14.4l22 22c4 4 10.4 4 14.4 0s4-10.4 0-14.4zM151.2 0c-5.6 0-10.4 4.8-10.4 10.4v30.8c0 5.6 4.8 10.4 10.4 10.4 5.6 0 10.4-4.8 10.4-10.4V10.4c0-5.6-4.8-10.4-10.4-10.4zm107.2 44.4c-4-4-10.4-4-14.4 0l-22 22c-4 4-4 10.4 0 14.4 3.6 4 10.4 4 14.4 0l22-22c4-4 4-10.4 0-14.4zM41.2 140.8H10.4c-5.6 0-10.4 4.8-10.4 10.4s4.4 10.4 10.4 10.4h30.8c5.6 0 10.4-4.8 10.4-10.4 0-5.6-4.8-10.4-10.4-10.4zm39.2 80.8c-3.6-4-10.4-4-14.4 0l-22 22c-4 4-4 10.4 0 14.4s10.4 4 14.4 0l22-22c4-4 4-10.4 0-14.4zm0-155.2-22-22c-4-4-10.4-4-14.4 0s-4 10.4 0 14.4l22 22c4 4 10.4 4 14.4 0s4-10.4 0-14.4z",stroke:"#252519",strokeWidth:5})]}),um=({size:e,className:n="",fill:t})=>m.jsxs("svg",{"data-name":"Transparent Logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2048 1773.62",width:e,height:e,className:n,fill:t,children:[m.jsx("path",{style:{opacity:.8},d:"m1024 886.81-256 443.41 256 443.4 256-443.4-256-443.41z"}),m.jsx("path",{style:{opacity:.6},d:"m1280 443.41-256 443.4 256 443.41 256-443.41-256-443.4zM768 443.41l-256 443.4 256 443.41 256-443.41-256-443.4z"}),m.jsx("path",{style:{opacity:.45},d:"m1536 0-256 443.41 256 443.4 256-443.4L1536 0zM1152 221.7H896L768 443.41l256 443.4 256-443.4-128-221.71zM512 0 256 443.41l256 443.4 256-443.4L512 0z"}),m.jsx("path",{style:{opacity:.3},d:"M1792 443.4 2048 0h-512l256 443.4zM256 443.4 512 0H0l256 443.4z"})]});function cm(){const{state:e,setTheme:n,toggleSideNav:t}=ao();function s(){n(e.theme=="light"?"dark":"light")}return m.jsxs("div",{className:nn.component,children:[m.jsx(Jh,{size:20,className:nn.hamburger,onClick:t}),m.jsxs("div",{className:nn.center,children:[m.jsx("a",{href:"/",className:nn.a,children:m.jsx(um,{className:nn.logo,size:30,fill:e.theme=="dark"?"rgb(255, 0, 255)":"currentColor"})}),m.jsx("h3",{className:nn.header,children:m.jsx("a",{href:"/",className:nn.a,children:"Vyper by Example"})})]}),m.jsx("button",{className:nn.mode,onClick:s,children:e.theme=="dark"?m.jsx(om,{size:20}):m.jsx(im,{size:20})})]})}const pm="_component_h47vh_1",dm="_row_h47vh_8",fm="_bar_h47vh_13",hm="_to_h47vh_21",mm="_social_h47vh_24",ym="_sce_h47vh_29",vm="_telegram_h47vh_34",gm="_discord_h47vh_38",jm="_youTube_h47vh_42",ae={component:pm,row:dm,bar:fm,to:hm,social:mm,sce:ym,telegram:vm,discord:gm,youTube:jm},wm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK0AAADACAYAAAB2xePHAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAAtdEVYdENyZWF0aW9uIFRpbWUARnJpIDE5IEZlYiAyMDIxIDA2OjI5OjE1IEFNIEpTVJ0PYF0AAA5FSURBVHic7Z3Li2RXHce/5956d1dXV/ekk0AmBCQORLIZRSQm2cSJQUwWMiAJJBo3uhAh/huBBCQLXWhMAgnCrBJQ40SQPHyAzia4mOhCbITY8+iurld3Vd17XHTa6a7p6rqP3z3n9zt1Pqt59ONU1bdunfs7n9856r7PPaDh8QgisD0AjyctPrQecfjQesThQ+sRhw+tRxw+tB5x+NB6xOFD6xGHD61HHD60HnH40HrE4UPrEYcPrUccPrQecfjQesRRsj0A04zvGSO+e2x7GPnZC1D9uGZ7FFZYqNDqksb1F/8DBFr8Z0z4aQntF+9E+d8V20MxjvCXLh27z91AdM8Y0ls11Egh6IQYPLFreyhWWJjQRq0I3W/vHPz5rjEQyY1uuFWCgsLk3jH2HxzaHo5xFia0Oz/cAhoHQVWBghb6qar6AYJ++P+/Dx7vQpfkvgGzsBChHd+3j+GF3rF/izYmwMTSgHJQ2jp+GxK3I+w91Lc0GjssRGi3f7wFhMf/TWmFuBnbGVBGgp0QanT7SzZ4tId4KbIwIjs4H9rhV3rYP3/yvE+3YkBK9StWCK/PKPbUNAaP9U7+PwdxPrQ7P7oOpdXM/4/ORNCa/5wwvBFCRbMfx/6XBphsSHkH5sPp0HYvbiM6O+eFrOtTw8ABNVYItsPTvyjAwpTAnA1tXIux+92bib42umsCMJ7ehtdKp35aHDL+/Aij+/cMjMguzoa28/3rB3PWJJQAHfCcIqhhgKA75yp7hMETXbaPhQonQzvZGKP/VCfV90R38iyBhVvpVtqjOyfY/+KgoNHwwMnQ7rywBaRcPFBKIW7wukIFuyGCvfQv0eCxHuIq4/lOTpwL7f4XBhh+NVuxXa9FwJjJTZnG7BLXvG9djjF81N0SmHOh3X7hGpTKHry4PWFRAgu3Q6gcb6C9h/qI2gznOwQ4Fdr+4x1Mzo1y/Qy9rKEmlq+2kUJwI6c1Wj7wElzEmdDGYYzOD26Q/KxoYwId27vahtdKUHH+N87+g0OM7833JuaIM6Htfucm4juI1t+rAGDnanvgytK8LArKyQUHJ0J71JUl+5mWnNtDV5YKF51bJ0J71JWlwoZzO+3KUuGacys+tCe5slSYdm6nXVkqXHNuxYf2JFeWCpPO7SxXlgqXnFvRoT3NlaXCiHN7mitLhUPOrejQznNlqYjbxTq381xZKlxxbsWGNpErS0SRCw6JXFkqAmDwNfkLDiJDm8aVpaKoBYekriwVowf2xC84iAxtKleWigIWHNK6siS/04EFB3GhzeLKUkG94JDWlaVC+oKDuNBmcWWpoFxwyOrKUiF5wUFUaPO4slSQLDjkcGWpkLzgICq0eV1ZCigWHPK6slRIXXAQE1oKV5aKXAsOFK4sFUIXHESEltKVpSLrJh9UriwVEhccRISW1JWlIsMmH5SuLBkCN/lg9gzeThGuLBVpN/mgdmWpkLbJB/vQFuHKkpFik4+iXFkqJG3ywTq0RbqyVCTd5KMoV5YKSZt8sA5tka4sFUk2+SjalaVCyiYfbJ9JE64sFadu8mHClSVCyiYfbENrypWlYtYmH6ZcWSokbPLBMrQmXVkqTnJujbqyVAjY5INdaG24slRMO7emXVkquG/ywS60VlxZKo44tzZcWSq4O7esQmvTlaXi0Lm15cpSwdm5ZfXMDh/vQUUBwPO5SoQCUPmkjvoflm0PJT9VnosNrELbeGcFvW90oBtCpwc4uPlqvXIGpa2y7aE4C6vpQdgJ0by0ansYuVh6p+UDWzCsQgscvOhS54NBJ8Sy8DedBNiFVo0VWj9ftz2MTDTfbCMYsHtKnYPlM1z7yxKqV+q2h5GK0mYZjctN28NYCFiGFgBWXl0HmHnfp7Hy6jqrjgSXYRva8mYFjcsrtoeRiOqVOmpXGraHsTCwDS0ANN9qQ3GfI0affSp4jME6ERJKYI3LKyhvWto9ZEFhHVqAdwlMDQI032rbHsbCwT60aqyw8vqa7WGcSPPSKsKOTClGMuxDCwD1D5dRuVq1PYxjhFslLL3Tsj2MhUREaAFg5Re8bnZWXl9jsbXRIiImtJWrNdQ/4GFOVa5WUf+Qx1gWETGhBYDmG20WVzduV/1FQ1RoS1tl6/PI+gfLqFytWR3DoiMqtACwfGkVgaU7djVWaL7hS1y2ERfaYBCg+aad4HhXlgfiQgsAjctNlDbNhifcKnlXlgkiQ6tiZXy9f+X1Ne/KMkHsq1C70jDm3PoSFy/EhhYw59xyLXHpCs9u2aIRHVoTzi3XElf/67vof1P2HhFZER1aoFjnlmuJK27E6D6zje7FHUQtQe0dRIgPbZHOLdcSV+/iDuJWBN2I0X162/ZwjCM+tEAxzi3XdvCoFaH/5K1pweDCLsZn+W4WVwROhLYI55ZrO3j36W3o8pEbsBDYfZ7XcVVFw+9VyQilc8u1HXx8doTBhdt3M9w/P8TeeRnnJVDgTGgButIU13bw3edvzDyDYvf5G2JOp8mLU6GlcG65toPvnR+cegbF5OwYgwu8d/CmwqnQAjmdW6bt4DrQieat3We2EQvecTIpzoU2j3PLtR18cKGLSYIzKOJWhN5FnqdbUuJcaIFszi3XdvDDhYSk9J/siDugOS1OhjaLc8u1HfxwISEpuqzRfdbtBQcnQwukc265toNPNsbHFhKSMnykh9E5OQc0p8XZ0KZxbrm2g3efnVpISMHu99xdcHA2tEAy55arKzs6t4fhI9mP/Byd28fwYf5HhmbB6dAC851brq4sxZVy97mbma/UnHE+tKc5t1xd2eHDPYzO7ef+OdHGJNOcmDvOhxY4cG6nS2BcXVld1th9ju6YVRed24UIbdgJbyuBcXVl+092EG3QnQLuonO7EKEFjpfAOLuy3QJWtFxzbhcmtEdLYKxd2SLcAcecW36vXIHUrjSw/HYLS+/xO4BklitLhUvO7UKFFvisxMXwvuQ0V5byd7jg3C5caDkyz5WlwhXn1ofWMkldWSpccG59aC2T1JWlIm5F6D8le8HBh9YiaV1ZKnpPdUQvOPjQWiStK0uF9AUHH1pLZHVlqZC84OBDa4k8riwJghccfGgtkNeVpULqgoMPrQU4dRVIXHDwoTUMlStLhcQFBx9ag1C7slRIW3DwoTUItStLhbRNPnxoDVGUK0uFpE0+fGgNUZgrS4SkTT58aA1QtCtLhZRNPnxoDWDClaWCUzluFj60BWPKlaVCwiYfPrQFYtqVpYL7Jh8+tAVi2pWlgvsmHz60BWHLlaWC8yYfPrQFYcuVpYKzc0t7YlxO4uUYe1/u2x5GfqoavYs70DW+88Ik9L/VQeu1Naghr2sbq9AGvQDj+/dFzgOPMrl7DAwVdFvulRYAah822AUWYDg9aPx6BRpyr1BxLUa8EgHQgMzGgANGwOrLG7ZHcSLsQlverKD68ekbIXPmUIhRgUL4X1YfZKlYepvnBn0Aw9ACQOPdJsBPhppL3Iyg67f8Al3SUD1+2+LPQ3UCtH52xvYwZsIytOFOCbWPlmwPIxVaaUR3HH+nKaUQbMu72q78cg3BHstoAGAaWgCov78M1ZdzlYrb0cmrSGUNdVOIeAAg3CyjeYnfZtNHYRvaYD9A4z1+J4GfhA41ovXZlYJgoKBj/jeXWmms/oTvtOAQtqEFgOrfGgi3+H+8RmcmwGnNgSUg/JTnTc1RqlfqqP+Z30k/07AOrYoV+xKYrsSIV5PUY5mXwCKg/RLPEtc0rEMLAJV/VlmXwCYJe764l8Dql5dR/lfV9jASwT60AN8SWLwUQS8lb6FhWwIbKKy+IuMqCwgJLccSmIZO3VnLtQTW/BXPw6xnISK0AL8SWNyKoSsZ5trMSmDBtRDN19ZsDyMVYkLLqQSmg9sXEtIQDBS05nFz2frpOoJITAwACAotwKcEFq9PgDBH6EpgcVNWulrB0u9atoeRGlGhVbFC4zd2r7a6rBERKIcqVlZvLrXWaL98h70B5EBUaAGg8o8ayp9UrP3+6MwEoJhaB0D4qb2rbf2jJVT/3rD2+/MgLrQA0PjtCmBhs5ZbriwNOtTA0MLNJWNXNgkiQ1vaKqP6V/NXCerN45RSCK+bryRwdmWTIDK0AND4/TKwZ+4qNe3KklE+8FdNwd2VTYLY0Ab9EI33zcgdeUtc8wi6AbQyUwLj7somQfToa39cQrBT/EOI1yfF7rhSgpFSXumTCntXNgmiQ6smCo13iz1RnKrENQ81Kta51Vqj/ZLMEtc0okMLANWP6yhtFndTQVbimkdYrHMrucQ1jfjQAsW1nVOXuOZTkHMrvMQ1jROhLart3PT5CEU5t9JLXNM4EVqA3rktrMQ1B2rn1oUS1zTOhJbSuT2pHdwU1M6tCyWuaZx6NFTO7cx2cFMQObcS2sGz4FRoKZzbee3gpsjr3EppB8+CU6EF8ju3c9vBTZHTuZXSDp4F50Kbx7lN3g5uhszOraB28Cw4F1ogu3ObtB3cGBmdW0nt4FlwMrRAeuc2bTu4KVI7t8LawbPgbGjTOLdZ2sFNkda5ldYOngVnQwskd24zt4ObIqFzK7EdPAtOhzaJc1u0K0tFEudWYjt4Fpx/hPOc29zt4KaY49xKbQfPgvOhPc25NeXKUjHLuZXcDp4F50MLzHZujbmyVMxwbl1yZZOwEKEFbnduzbuyVEw5t465sklYmNBOO7dcS1zzUIE6Nrd1zZVNwsKEFrjl3NpyZckoHZTAXHRlk7BQoQ13Sqj9aUlEiWseQTdEy0FXNgnqvs89IKDe4/HcYvHeph7x+NB6xOFD6xGHD61HHD60HnH40HrE4UPrEYcPrUccPrQecfjQesThQ+sRhw+tRxw+tB5x+NB6xOFD6xGHD61HHD60HnH40HrE8T8YG8SKlmk4HgAAAABJRU5ErkJggg==",dp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEcAAAAyCAYAAAAOX8ZtAAAABmJLR0QA/wD/AP+gvaeTAAADmUlEQVRoge3bT2wUZRjH8c9Ml39S09IC/uFiRBIwabzVE15oiJBwLBcP3npS4E4IBA/EAwmcCInhoCeJNwgQoDGRC8GESMDYhJRyUAQplZa2tBYdD+9suqmsadHO+6J8kzd5Z3Znnt/+9p1ndt593swCKViFV7EWK8vWjpewouyvLLdfLg9rxZKG0ywt39NIOzL8gdE5r42W++uMY6bs/4pJTOARxsr+RHncOO7hbsbjhXzWrNkLBcvxPt5FF97Ga8L+55VR/Ijv8R0u45uM3+d9hoK+gnsFxf+g3S74cD6mrCj4PAHBMdpXRUgLTc35IgGRMduXzYz5OAFxKbSP6p5kpTHtuI22eSem/y4P8UbGaF7u6PXCmDrtgh/q5vTE05IkPcya0x1RSIp0Q1aEy+lhZDEpsirH+tgqEmV9jjdjq0iUt3Ksi60iUdbl6Kw05NatrFlTachnpDPH6kpD7tjBrVscOMCyZZWGXiCrqzcHWlvZv5/r1+ntrTz8POms/rJqZMMGTp7k4kW6uqLJaMLqHB2xVdiyhatXOX48pXzUmQvTmfGp1ejrY2CA3bvDdlyW50grK3Z0cORIyEfbtsVUsjQ9c+ps3MiZM1y4wKZNMRQsS9ecOj09XLvG0aO0VTqrkvDIaWTJEnbtYnAw5KOWliqiPgcjp5HOzpCPrlxh8+bFjrY0R7HYUZ5Tshy/xVYxb4aH2bOH7m4uXVrsaFM1TEvlt04zZmY4dox9+xgbqyrqdN2cdDl9OoyWwcGqI0/nUjVnYIDt28NTfPXGkKQ5IyNhpHR1cfZsTCVTNaF8Iz5PnnDiBHv3hsQbn6kaRmKr0N8fRsuNG7GVNDKcI97XdPMmO3eGR4S0jIHhmhjmjI9z+DCHDjGdVsprIII5p05x8CD371ca9hl4UMODSkOeP19puH/AcI47sVUkys85bsVWkSiDLwoJmtOWZ6H8dCi2ksQYyhir1+dciSolPb5ltnipP6KQFPmaFwWTT+ORUDA5kkMWEvIncTUlw6fZ3OfNgpaCUwnUAcds/QVP/6u1YHnBZwmIjNHOFbOrfJpT8EHBUAKCq2h3i1C9n8/14e+WFLXgPWFJ0TvCkqLXxajn+fd4jJ/wg7Cs6DLOZU1mQ5ua04wi/Am4Fq8Id7lWs4vSVjX0W4W7X17GaZ9zqvriszr19xb++ov9EZ40bD/GVNkfFWYzJ8vjJsp+fWHaJH7BnSzsmzd/AkgxNaTAmykLAAAAAElFTkSuQmCC",xm="/assets/telegram-99da86bc.png",km="/assets/discord-ebf2e8ca.png",dl="0x95a647B3d8a3F11176BAdB799b9499C671fa243a";function _m(){return m.jsxs("div",{className:ae.component,children:[m.jsxs("div",{className:ae.row,children:[m.jsx("img",{src:wm,alt:"smart contract engineer",className:ae.sce}),m.jsx("a",{href:"https://www.smartcontract.engineer",target:"__blank",children:"Smart Contract Engineer"})]}),m.jsxs("div",{className:ae.social,children:[m.jsxs("div",{className:ae.row,children:[m.jsx("img",{src:km,alt:"discord",className:ae.discord}),m.jsx("a",{href:"https://discord.gg/bt8FK2wkcW",target:"__blank",children:"Discord"})]}),m.jsxs("div",{className:ae.row,children:[m.jsx("img",{src:xm,alt:"telegram",className:ae.telegram}),m.jsx("a",{href:"https://t.me/smartcontractprogrammer",target:"__blank",children:"Telegram"})]}),m.jsxs("div",{className:ae.row,children:[m.jsx("img",{src:dp,alt:"youtube",className:ae.youTube}),m.jsx("a",{href:"https://www.youtube.com/channel/UCJWh7F3AFyQ_x01VKzr9eyA",target:"__blank",children:"YouTube"})]})]}),m.jsxs("div",{className:ae.row,children:["Donate",m.jsx("span",{children:"🙂"}),m.jsxs("a",{href:`https://etherscan.io/address/${dl}`,target:"__blank",children:[dl.slice(0,6),"...",dl.slice(-6,-1)]}),m.jsx("span",{className:ae.to,children:"to"}),m.jsx("a",{href:"https://khanacademy.org",target:"__blank",className:ae.khan,children:"Khan Academy"})]}),m.jsx("div",{className:ae.row,children:m.jsx("a",{href:"mailto:contact@vyper-by-example.org",children:"contact@vyper-by-example.org"})}),m.jsxs("div",{className:ae.row,children:[m.jsx("a",{href:"https://github.com/vyper-by-example/vyper-by-example.github.io",target:"__blank",children:"source"}),m.jsx("div",{className:ae.bar,children:"|"}),m.jsx("a",{href:"https://github.com/vyper-by-example/vyper-by-example.github.io/blob/gh-pages/LICENSE",target:"__blank",children:"license"})]})]})}const Sm=({children:e})=>{const{state:n}=ao(),t=S.useRef(null);S.useLayoutEffect(()=>{t.current&&(t.current.scrollTop=sessionStorage.getItem("scroll")||0)},[]);function s(r){var l;sessionStorage.setItem("scroll",(l=t.current)==null?void 0:l.scrollTop),window.location.href=r}return m.jsxs("div",{className:Ls.component,children:[m.jsx("div",{ref:t,className:Ls.sideNav,style:n.sideNav?{width:"var(--side-nav-width)",padding:"20px 10px 60px 10px"}:{width:0},children:n.sideNav?m.jsx(qh,{onClick:s}):null}),m.jsxs("div",{className:Ls.main,children:[m.jsx(cm,{}),m.jsxs("div",{className:Ls.children,children:[e,m.jsx(_m,{})]})]})]})},fp=({title:e,description:n})=>(S.useEffect(()=>{document.title=e;const t=document.querySelector("meta[name='description']");t&&t.setAttribute("content",n)},[]),null),Em=({html:e})=>(S.useEffect(()=>{if(navigator.userAgent==="ReactSnap")return;const n=s=>{const r=document.createElement("textarea");r.setAttribute("style","width:1px;border:0;opacity:0;"),document.body.appendChild(r),r.value=s.innerText,r.select(),document.execCommand("copy"),document.body.removeChild(r)};document.querySelectorAll("pre").forEach(s=>{const r=document.createElement("div");r.className="buttons";const l=document.createElement("button");l.className="fa fa-copy clip-button",l.title="Copy to clipboard",l.ariaLabel="Copy to clipboard";const a=document.createElement("i");a.className="tooltiptext",l.appendChild(a),r.appendChild(l);const o=s.firstChild;s.insertBefore(r,o),l.addEventListener("click",i=>{i.preventDefault(),n(s.childNodes[1])})})},[]),m.jsx("div",{dangerouslySetInnerHTML:{__html:e}})),Cm="_component_ni5i2_1",Pm="_content_ni5i2_5",Nm="_prevNext_ni5i2_8",fl={component:Cm,content:Pm,prevNext:Nm},z=({title:e,version:n,description:t,html:s,prev:r,next:l})=>m.jsxs("div",{className:fl.component,children:[m.jsx(fp,{title:`${e} | Vyper by Example | ${n}`,description:t}),m.jsxs("div",{className:fl.content,children:[m.jsx("h2",{children:e}),m.jsx(Em,{html:s}),m.jsxs("div",{className:fl.prevNext,children:[r&&m.jsxs("a",{href:r.path,children:["< ",r.title]}),l&&m.jsxs("a",{href:l.path,children:[l.title," >"]})]}),m.jsxs("p",{children:["Try on"," ",m.jsx("a",{href:"https://smartcontract.engineer/challenges?language=vyper",target:"__blank",children:"Smart Contract Engineer"})]})]})]}),Tm="0.3.9",Lm="Constants",Rm="Constants in Vyper",Om=`

Constants are variables that cannot change.

+
# @version ^0.3.9
+
+MY_CONSTANT: constant(uint256) = 123
+MIN: constant(uint256) = 1
+MAX: constant(uint256) = 10
+ADDR: constant(address) = 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B
+
+
+@external
+@pure
+def getBuiltInConstants() -> (address, uint256, bytes32):
+    # Commonly used constants availabe in Vyper
+    return (ZERO_ADDRESS, MAX_UINT256, EMPTY_BYTES32)
+
+
+@external
+@pure
+def getMyConstants() -> (uint256, uint256, address):
+    return (MIN, MAX, ADDR)
+
`,Im=({prev:e,next:n})=>m.jsx(z,{version:Tm,title:Lm,description:Rm,html:Om,prev:e,next:n}),Dm="0.3.9",zm="Constructor",Am="Constructor in Vyper",Fm=`

__init__ is a special function that is executed only once when the contract is deployed.

+
# @version ^0.3.9
+
+owner: public(address)
+name: public(String[10])
+createdAt: public(uint256)
+expiresAt: public(uint256)
+
+
+@external
+def __init__(name: String[10], duration: uint256):
+    # set owner to caller
+    self.owner = msg.sender
+    # set name from input
+    self.name = name
+    self.createdAt = block.timestamp
+    self.expiresAt = block.timestamp + duration
+
`,Mm=({prev:e,next:n})=>m.jsx(z,{version:Dm,title:zm,description:Am,html:Fm,prev:e,next:n}),$m="0.3.9",Um="Create New Contract",bm="Create new contract in Vyper",Vm=`

Vyper contracts can deploy new contracts using the function create_forwarder_to.

+

create_forwarder_to is also known as "minimal proxy contract". How it works, we won't explain it here.

+

Here we will focus on how to use it to deploy new contracts.

+

How to use create_forwarder_to

+
    +
  1. Deploy ContractToDeploy. This is the "master copy." All deployed contracts will execute code from this master copy.
  2. +
  3. Call deploy() passing the address of the master copy and any other arguments needed to setup the new contract
  4. +
+

Here is ContractToDeploy

+

ContractToDeploy.vy

+
# @version ^0.3.9
+
+
+owner: public(address)
+
+
+# __init__ is not called when deployed from create_forwarder_to
+@external
+def __init__():
+  self.owner = msg.sender
+
+
+# call once after create_forwarder_to
+@external
+def setup(owner: address):
+  assert self.owner == ZERO_ADDRESS, "owner != zero address"
+  self.owner = owner
+
+
+# DANGER: never have selfdestruct in original contract used by create_forwarder_to
+@external
+def kill():
+  selfdestruct(msg.sender)
+

Create.vy

+
# @version ^0.3.9
+
+
+interface ContractToDeploy:
+    def setup(owner: address): nonpayable
+
+
+event Log:
+    addr: address
+
+
+@external
+def deploy(_masterCopy: address, owner: address):
+    addr: address = create_forwarder_to(_masterCopy)
+    ContractToDeploy(addr).setup(owner)
+    log Log(addr)
+
+
+@external
+def deployTest(_masterCopy: address):
+    addr: address = create_forwarder_to(_masterCopy)
+    ContractToDeploy(addr).setup(self)
+    log Log(addr)
+
`,Bm=({prev:e,next:n})=>m.jsx(z,{version:$m,title:Um,description:bm,html:Vm,prev:e,next:n}),Hm="0.3.9",Wm="Default Function",Qm="Default function in Vyper",Km=`

A contract can have a default function, executed when a function that does not exist is called. This is the same function as the fallback function in Solidity.

+

This function is named __default__ and it is commonly used to receive Ether.

+
# @version ^0.3.9
+
+
+event Payment:
+    sender: indexed(address)
+    amount: uint256
+
+
+@external
+@payable
+def __default__():
+    log Payment(msg.sender, msg.value)
+
`,Ym=({prev:e,next:n})=>m.jsx(z,{version:Hm,title:Wm,description:Qm,html:Km,prev:e,next:n}),Xm="0.3.9",Gm="Curve Add and Remove Liquidity",Zm="Curve Add and Remove Liquidity",qm=`

Add and remove liquidity from Curve pools

+
# @version ^0.3.9
+
+from vyper.interfaces import ERC20
+
+
+interface IStableSwap:
+    def add_liquidity(amounts: uint256[3], min_shares: uint256): nonpayable
+    def remove_liquidity(shares: uint256, min_amounts: uint256[3]): nonpayable
+    def remove_liquidity_one_coin(shares: uint256, i: int128, min_amount: uint256): nonpayable
+    def get_virtual_price() -> uint256: view
+
+
+DAI: constant(address) = 0x6B175474E89094C44Da98b954EedeAC495271d0F
+USDC: constant(address) = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
+USDT: constant(address) = 0xdAC17F958D2ee523a2206206994597C13D831ec7
+
+POOL: constant(address) = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7
+COINS: constant(address[3]) = [DAI, USDC, USDT]
+
+
+@internal
+def _safeTransfer(coin: address, to: address, amount: uint256):
+    res: Bytes[32] = raw_call(
+        coin,
+        concat(
+            method_id("transfer(address,uint256)"),
+            convert(to, bytes32),
+            convert(amount, bytes32),
+        ),
+        max_outsize=32,
+    )
+
+    if len(res) > 0:
+        assert convert(res, bool)
+
+
+@internal
+def _safeTransferFrom(coin: address, _from: address, to: address, amount: uint256):
+    res: Bytes[32] = raw_call(
+        coin,
+        concat(
+            method_id("transferFrom(address,address,uint256)"),
+            convert(_from, bytes32),
+            convert(to, bytes32),
+            convert(amount, bytes32),
+        ),
+        max_outsize=32,
+    )
+
+    if len(res) > 0:
+        assert convert(res, bool)
+
+
+@internal
+def _safeApprove(coin: address, to: address, amount: uint256):
+    res: Bytes[32] = raw_call(
+        coin,
+        concat(
+            method_id("approve(address,uint256)"),
+            convert(to, bytes32),
+            convert(amount, bytes32),
+        ),
+        max_outsize=32,
+    )
+
+    if len(res) > 0:
+        assert convert(res, bool)
+
+
+@external
+def addLiquidity(amounts: uint256[3], min_shares: uint256):
+    for i in range(3):
+        if amounts[i] > 0:
+            self._safeTransferFrom(COINS[i], msg.sender, self, amounts[i])
+            self._safeApprove(COINS[i], POOL, amounts[i])
+
+    IStableSwap(POOL).add_liquidity(amounts, min_shares)
+
+
+@external
+@view
+def calculateValueOfShares(shares: uint256) -> uint256:
+    return shares * IStableSwap(POOL).get_virtual_price() / 10**18
+
+
+@external
+def removeLiquidity(shares: uint256, min_amounts: uint256[3]):
+    IStableSwap(POOL).remove_liquidity(shares, min_amounts)
+
+    for coin in COINS:
+        bal: uint256 = ERC20(coin).balanceOf(self)
+        self._safeTransfer(coin, msg.sender, bal)
+
+
+@external
+def removeLiquidityOneCoin(shares: uint256, i: int128, min_amount: uint256):
+    IStableSwap(POOL).remove_liquidity_one_coin(shares, i, min_amount)
+
+    bal: uint256 = ERC20(COINS[i]).balanceOf(self)
+    self._safeTransfer(COINS[i], msg.sender, bal)
+
`,Jm=({prev:e,next:n})=>m.jsx(z,{version:Xm,title:Gm,description:Zm,html:qm,prev:e,next:n}),ey="0.3.9",ny="Curve Swap",ty="Curve Swap",sy=`

Swap tokens on Curve

+
# @version ^0.3.9
+
+from vyper.interfaces import ERC20
+
+
+interface IStableSwap:
+    def exchange(i: int128, j: int128, dx: uint256, min_dy: uint256): nonpayable
+
+
+DAI: constant(address) = 0x6B175474E89094C44Da98b954EedeAC495271d0F
+USDC: constant(address) = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
+USDT: constant(address) = 0xdAC17F958D2ee523a2206206994597C13D831ec7
+
+POOL: constant(address) = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7
+COINS: constant(address[3]) = [DAI, USDC, USDT]
+
+
+@internal
+def _safeTransfer(coin: address, to: address, amount: uint256):
+    res: Bytes[32] = raw_call(
+        coin,
+        concat(
+            method_id("transfer(address,uint256)"),
+            convert(to, bytes32),
+            convert(amount, bytes32),
+        ),
+        max_outsize=32,
+    )
+
+    if len(res) > 0:
+        assert convert(res, bool)
+
+
+@internal
+def _safeTransferFrom(coin: address, _from: address, to: address, amount: uint256):
+    res: Bytes[32] = raw_call(
+        coin,
+        concat(
+            method_id("transferFrom(address,address,uint256)"),
+            convert(_from, bytes32),
+            convert(to, bytes32),
+            convert(amount, bytes32),
+        ),
+        max_outsize=32,
+    )
+
+    if len(res) > 0:
+        assert convert(res, bool)
+
+
+@internal
+def _safeApprove(coin: address, to: address, amount: uint256):
+    res: Bytes[32] = raw_call(
+        coin,
+        concat(
+            method_id("approve(address,uint256)"),
+            convert(to, bytes32),
+            convert(amount, bytes32),
+        ),
+        max_outsize=32,
+    )
+
+    if len(res) > 0:
+        assert convert(res, bool)
+
+
+@external
+def swap(i: int128, j: int128, dx: uint256, min_dy: uint256):
+    self._safeTransferFrom(COINS[i], msg.sender, self, dx)
+    self._safeApprove(COINS[i], POOL, dx)
+
+    IStableSwap(POOL).exchange(i, j, dx, min_dy)
+
+    bal: uint256 = ERC20(COINS[j]).balanceOf(self)
+    self._safeTransfer(COINS[j], msg.sender, bal)
+
`,ry=({prev:e,next:n})=>m.jsx(z,{version:ey,title:ny,description:ty,html:sy,prev:e,next:n}),ly="0.3.9",ay="Delegate Call",oy="Delegate call in Vyper",iy=`

When contract A delegates call to contract B, B's code will be executed inside contract A. This will update state variables and Ether balance inside contract A and not B.

+

Delegate call is commonly used to create an upgradable contract.

+

Here is the contract that we will delegate call to.

+

TestDelegateCall.vy

+
# @version ^0.3.9
+
+# State variables must be declared in the same order
+# as contract making the call
+x: public(uint256)
+y: public(uint256)
+
+
+@external
+def updateX(x: uint256):
+    # when this function is called with delegate call
+    # this will update self.x inside the calling contract
+    self.x = x + 1
+
+
+@external
+def updateY(y: uint256):
+    self.y = y * y
+

DelegateCall.vy

+
# @version ^0.3.9
+
+
+x: public(uint256)
+y: public(uint256)
+
+
+@external
+def updateX(to: address, x: uint256):
+    raw_call(
+        to,
+        concat(
+            method_id("updateX(uint256)"),
+            convert(x, bytes32)
+        ),
+        is_delegate_call=True
+    )
+
+
+@external
+def updateY(to: address, y: uint256):
+    raw_call(
+        to,
+        concat(
+            method_id("updateY(uint256)"),
+            convert(y, bytes32)
+        ),
+        is_delegate_call=True
+    )
+
`,uy=({prev:e,next:n})=>m.jsx(z,{version:ly,title:ay,description:oy,html:iy,prev:e,next:n}),cy="0.3.9",py="Dynamic Arrays",dy="Dynamic arrays in Vyper",fy=`

Dynamic arrays are bounded arrays whose length can change. The length of the array cannot exceed the maximum length set where the array is declared.

+
# @version ^0.3.9
+
+# Dynamic array of type uint256, max 3 elements
+nums: DynArray[uint256, 3]
+
+@external
+def __init__():
+    self.nums.append(11)
+    self.nums.append(22)
+    self.nums.append(33)
+    # This will revert (Appending to array with max 3 elements)
+    # self.nums.append(44)
+
+    # Remove last element
+    self.nums.pop()
+
+    # Delete all elements
+    self.nums = []
+    # Set values
+    self.nums = [1,2,3]
+
+
+@external
+@pure
+def examples(xs: DynArray[uint256, 5]) -> DynArray[uint256, 8]:
+    ys: DynArray[uint256, 5] = [1,2,3]
+    # Copy xs into ys
+    for x in xs:
+        ys.append(x)
+    return ys
+
+
+@external
+@pure
+def filter(addrs: DynArray[address, 5]) -> DynArray[address, 5]:
+    nonzeros: DynArray[address, 5] = []
+    for addr in addrs:
+        if addr != ZERO_ADDRESS:
+            nonzeros.append(addr)
+    return nonzeros
+
`,hy=({prev:e,next:n})=>m.jsx(z,{version:cy,title:py,description:dy,html:fy,prev:e,next:n}),my="0.3.9",yy="Error",vy="Error in Vyper",gy=`

Use assert and raise to check inputs and validate state.

+

When an error occurs, it will halt the entire function call, undoing any changes.

+

You will still need to pay gas for the failed transaction.

+
# @version ^0.3.9
+
+x: public(uint256)
+owner: public(address)
+
+
+@external
+def __init__():
+    self.owner = msg.sender
+
+
+@external
+def testAssert(x: uint256):
+    assert x >= 1, "x < 1"
+    # self.x will not be updated if there is an error from line above
+    self.x = x
+
+
+@external
+def testRaise(x: uint256):
+    # same check as above using "raise"
+    if x <= 1:
+        raise "x < 1"
+    self.x = x
+
+
+@internal
+def _testErrorBubblesUp(x: uint256):
+    assert x >= 1, "x < 1"
+    self.x = x
+
+
+@external
+def testErrorBubblesUp(x: uint256):
+    self._testErrorBubblesUp(x)
+    # self.x = 123 will not be executed if there is an error
+    # from function above
+    self.x = 123
+
+
+@external
+def setOwner(owner: address):
+    assert msg.sender == self.owner, "!owner"
+    assert owner != ZERO_ADDRESS, "owner = zero"
+    self.owner = owner
+
`,jy=({prev:e,next:n})=>m.jsx(z,{version:my,title:yy,description:vy,html:gy,prev:e,next:n}),wy="0.3.9",xy="Event",ky="Event in Vyper",_y=`

Events write logs to the blockchain, commonly used by application to monitor blockchain state and as a cheaper alternative to store data on the blockchain without using state variables.

+

Events can be efficiently searched by indexing their arguments. Up to 3 parameters can be indexed.

+
# @version ^0.3.9
+
+# up to 3 index
+event Transfer:
+    # enables quick search of all Transfer events where sender is a certain address
+    sender: indexed(address)
+    # enables quick search of all Transfer events where receiver is a certain address
+    receiver: indexed(address)
+    amount: uint256
+
+
+@external
+def transfer(receiver: address, amount: uint256):
+    # some code ...
+    log Transfer(msg.sender, receiver, amount)
+
+
+@external
+def mint(amount: uint256):
+    # some code ...
+    log Transfer(ZERO_ADDRESS, msg.sender, amount)
+
+
+@external
+def burn(amount: uint256):
+    # some code ...
+    log Transfer(msg.sender, ZERO_ADDRESS, amount)
+
`,Sy=({prev:e,next:n})=>m.jsx(z,{version:wy,title:xy,description:ky,html:_y,prev:e,next:n}),Ey="0.3.9",Cy="For Loop",Py="For loop in Vyper",Ny=`

There are 2 ways to loop through an array, using range and directly looping through array elements.

+
# @version ^0.3.9
+
+
+@external
+@pure
+def forLoop():
+    # for loop through range
+    # sum from 0 to 9
+    s: uint256 = 0
+    for i in range(10):
+        s += i
+
+    # for loop through array elements
+    # find minimum of nums
+    nums: uint256[5] = [4, 5, 1, 9, 0]
+    x: uint256 = MAX_UINT256
+    for num in nums:
+        if x < num:
+            x = num
+
+    # continue - skip current iteration
+    # break - exit for loop
+    c: uint256 = 0
+    for i in [1, 2, 3, 4, 5]:
+        # skip 2
+        if i == 2:
+            continue
+        # end loop at i = 4
+        if i == 4:
+            break
+        # otherwise increment c by 1
+        c += 1
+    # c = 2 (incremented at i = 1 and 3)
+
+
+@external
+@pure
+def sum(nums: uint256[10]) -> uint256:
+    s: uint256 = 0
+    for n in nums:
+        s += n
+    return s
+
`,Ty=({prev:e,next:n})=>m.jsx(z,{version:Ey,title:Cy,description:Py,html:Ny,prev:e,next:n}),Ly="0.3.9",Ry="Function",Oy="Function in Vyper",Iy=`
# @version ^0.3.9
+
+
+@external
+@pure
+def multiply(x: uint256, y: uint256) -> uint256:
+    return x * y
+
+
+@external
+@pure
+def divide(x: uint256, y: uint256) -> uint256:
+    return x / y
+
+
+# A funciton that does nothing
+@external
+def doNothing():
+    # pass is useful when you want to compile the contract now,
+    # write the code later
+    pass
+
+
+# Functions can return multiple outputs
+@external
+@pure
+def multiOut() -> (uint256, bool):
+    return (1, True)
+
+
+@external
+@pure
+def addAndSub(x: uint256, y: uint256) -> (uint256, uint256):
+    return (x + y, x - y)
+
`,Dy=({prev:e,next:n})=>m.jsx(z,{version:Ly,title:Ry,description:Oy,html:Iy,prev:e,next:n}),zy="0.3.9",Ay="Hash Function",Fy="Hash function in Vyper",My=`

Vyper supports the same hash function available in Solidity, keccack256.

+
# @version ^0.3.9
+
+
+@external
+@pure
+def getHash(addr: address, num: uint256, ) -> bytes32:
+    # input of keccak256 can be String, Bytes or bytes32
+    return keccak256(
+        # convert different data into Bytes
+        concat(
+            convert(addr, bytes32),
+            convert(num, bytes32),
+            convert("THIS IS A STRING", Bytes[16])
+        )
+    )
+
+
+@external
+@pure
+def getMessageHash(_str: String[100]) -> bytes32:
+    return keccak256(_str)
+
`,$y=({prev:e,next:n})=>m.jsx(z,{version:zy,title:Ay,description:Fy,html:My,prev:e,next:n}),Uy="0.3.9",by="Hello World",Vy="Hello world in Vyper",By=`

@version specifies the compiler version of Vyper.

+
# @version ^0.3.0
+
+# Create a string variable that can store maximum 100 characters
+greet: public(String[100])
+
+@external
+def __init__():
+    self.greet = "Hello World"
+
`,Hy=({prev:e,next:n})=>m.jsx(z,{version:Uy,title:by,description:Vy,html:By,prev:e,next:n}),Wy="0.3.9",Qy="If Else Conditional Statement",Ky="If else conditional statement in Vyper",Yy=`
# @version ^0.3.9
+
+
+@external
+def ifElse(x: uint256) -> uint256:
+    if x <= 10:
+        return 1
+    elif x <= 20:
+        return 2
+    else:
+        return 3
+
+
+@external
+@pure
+def absoluteValue(x: uint256, y: uint256) -> uint256:
+    if x >= y:
+        return x - y
+    return y - x
+
`,Xy=({prev:e,next:n})=>m.jsx(z,{version:Wy,title:Qy,description:Ky,html:Yy,prev:e,next:n}),Gy="0.3.9",Zy="Immutable",qy="Immutable in Vyper",Jy=`

Immutable variables are like constants except value are assigned when the contract is deployed.

+

When to use immutable variables?

+
    +
  • You have a variable that needs to be set when the contract is deployed, +for example like setting contract owner to msg.sender
  • +
  • and this variable will never change after deployment
  • +
+

Why declare variables as immutable?

+

Like constants, immutable variables save run time gas

+
# @version ^0.3.9
+
+OWNER: immutable(address)
+MY_IMMUTABLE: immutable(uint256)
+
+@external
+def __init__(_val: uint256):
+    OWNER = msg.sender
+    MY_IMMUTABLE = _val
+
+
+@external
+@pure
+def getMyImmutable() -> uint256:
+  return MY_IMMUTABLE
+
`,ev=({prev:e,next:n})=>m.jsx(z,{version:Gy,title:Zy,description:qy,html:Jy,prev:e,next:n}),nv="0.3.9",tv="Interface",sv="Interface in Vyper",rv=`

Use interface to call other smart contracts.

+

Here is the TestInterface self.contract that we will call.

+

TestInterface.vy

+
# @version ^0.3.9
+
+
+owner: public(address)
+eth: public(uint256)
+
+
+@external
+def setOwner(owner: address):
+    self.owner = owner
+
+
+@external
+@payable
+def sendEth():
+    self.eth = msg.value
+
+
+@external
+@payable
+def setOwnerAndSendEth(owner: address):
+    self.owner = owner
+    self.eth = msg.value
+

Interface.vy

+
# @version ^0.3.9
+
+
+interface TestInterface:
+    # get address of owner
+    def owner() -> address: view
+    # set new owner
+    def setOwner(owner: address): nonpayable
+    # send ETH
+    def sendEth(): payable
+    # set owner and send ETH
+    def setOwnerAndSendEth(owner: address): payable
+
+
+# store contract having the above interface
+test: public(TestInterface)
+
+
+@external
+def __init__(test: address):
+    # store contract instance
+    self.test = TestInterface(test)
+    # if you need to get address from self.test
+    addr: address = self.test.address
+
+
+@external
+@view
+def getOwner() -> address:
+    return self.test.owner()
+
+
+@external
+@view
+def getOwnerFromAddress(test: address) -> address:
+    # you can also call functions by passing in the address of the interface
+    return TestInterface(test).owner()
+
+
+@external
+def setOwner(owner: address):
+    self.test.setOwner(owner)
+
+
+@external
+@payable
+def sendEth():
+    self.test.sendEth(value=msg.value)
+
+
+@external
+@payable
+def setOwnerAndSendEth(owner: address):
+    self.test.setOwnerAndSendEth(owner, value=msg.value)
+
`,lv=({prev:e,next:n})=>m.jsx(z,{version:nv,title:tv,description:sv,html:rv,prev:e,next:n}),av="0.3.9",ov="Internal and External Functions",iv="Internal and external functions in Vyper",uv=`

@internal functions can only be called inside the contract.

+

@external functions can only be called from outside the contract.

+
# @version ^0.3.9
+
+# Internal functions can only be called inside this contract
+@internal
+@pure
+def _add(x: uint256, y: uint256) -> uint256:
+    return x + y
+
+
+@external
+@view
+def extFunc() -> bool:
+    return True
+
+
+# External functions can only be called from outside this contract
+@external
+@view
+def avg(x: uint256, y: uint256) -> uint256:
+    # cannot call other external function
+    # self.extFunc()
+
+    # can call internal functions
+    z: uint256 = self._add(x, y)
+
+    return (x + y) / 2
+
+
+@internal
+@pure
+def _sqr(x: uint256) -> uint256:
+    return x * x
+
+
+@external
+@view
+def sumOfSquares(x: uint256, y: uint256) -> uint256:
+    return self._sqr(x) + self._sqr(y)
+
`,cv=({prev:e,next:n})=>m.jsx(z,{version:av,title:ov,description:iv,html:uv,prev:e,next:n}),pv="0.3.9",dv="Payable",fv="Payable in Vyper",hv=`

Functions declared with @payable can receive Ether.

+
# @version ^0.3.9
+
+
+event Deposit:
+    sender: indexed(address)
+    amount: uint256
+
+
+@external
+@payable
+def deposit():
+    log Deposit(msg.sender, msg.value)
+
+
+@external
+@view
+def getBalance() -> uint256:
+    # Get balance of Ether stored in this contract
+    return self.balance
+
+
+owner: public(address)
+
+
+@external
+@payable
+def pay():
+    assert msg.value > 0, "msg.value = 0"
+    self.owner = msg.sender
+
`,mv=({prev:e,next:n})=>m.jsx(z,{version:pv,title:dv,description:fv,html:hv,prev:e,next:n}),yv="0.3.9",vv="Debug with Print",gv="Debug with Print",jv=`

Use the built-in function print to debug smart contracts.

+
# @version ^0.3.9
+
+@external
+def test_print():
+    x: uint256 = 123
+    # Set hardhat_compat = True when testing with Hardhat
+    print("print something here", x, hardhat_compat=True)
+
+
+
`,wv=({prev:e,next:n})=>m.jsx(z,{version:yv,title:vv,description:gv,html:jv,prev:e,next:n}),xv="0.3.9",kv="Private and Public State Variables",_v="Private and public state variables in Vyper",Sv=`

Private state variables cannot be accessed from outside the contract.

+

Public state variables can be read by anyone, including users and other contracts.

+
# @version ^0.3.9
+
+# publis state variable
+owner: public(address)
+# private state variable
+foo: uint256
+bar: public(bool)
+
+
+@external
+def __init__():
+    self.owner = msg.sender
+    self.foo = 123
+    self.bar = True
+
`,Ev=({prev:e,next:n})=>m.jsx(z,{version:xv,title:kv,description:_v,html:Sv,prev:e,next:n}),Cv="0.3.9",Pv="Raw Call",Nv="Raw call in Vyper",Tv=`

raw_call is a low level function. It is used to call and send Ether to other functions.

+

For this example, we will write a contract that calls this contract below.

+

TestRawCall.vy

+
# @version ^0.3.9
+
+
+sender: public(address)
+
+
+@external
+def testAdd(x: uint256, y: uint256) -> uint256:
+    self.sender = msg.sender
+    return x + y
+
+
+@external
+def testSub(x: uint256, y: uint256) -> uint256:
+    self.sender = msg.sender
+    return x - y
+

RawCall.vy

+
# @version ^0.3.9
+
+
+@external
+def testRawCall(to: address, x: uint256, y: uint256):
+    res: Bytes[32] = raw_call(
+        to, # address to call
+        # data to send in Bytes
+        concat(
+            method_id("testAdd(uint256,uint256)"), # function to call
+            convert(x, bytes32), # first input
+            convert(y, bytes32), # secode input
+        ),
+        max_outsize=32, # max size of ouput, default 0
+        gas=100000, # optional, amount of gas to send, default forwards all gas
+        value=0, # optional, amount of ETH to send, default 0
+    )
+
+    z: uint256 = convert(res, uint256)
+
+
+@external
+@payable
+def sendEth(to: address):
+    # Example to send ETH
+    # data = b"", empty data
+    # value = msg.value, all of ETH that was sent to this function
+    raw_call(to, b"", value=msg.value)
+
+
+diff: public(uint256)
+
+
+@external
+def testRawCallSub(to: address, x: uint256, y: uint256):
+    res: Bytes[32] = raw_call(
+        to,
+        concat(
+            method_id("testSub(uint256,uint256)"),
+            convert(x, bytes32),
+            convert(y, bytes32)
+        ),
+        max_outsize=32,
+    )
+
+    self.diff = convert(res, uint256)
+
`,Lv=({prev:e,next:n})=>m.jsx(z,{version:Cv,title:Pv,description:Nv,html:Tv,prev:e,next:n}),Rv="0.3.9",Ov="Re-Entrancy Lock",Iv="Re-entrancy lock in Vyper",Dv=`

Vyper has a handy way to secure your contract from re-entrancy.

+

A re-entrancy lock can be created on a function with @nonreentrant("lock").

+

Functions can be locked together by using the same name for the locks.

+
# @version ^0.3.9
+
+
+@external
+@nonreentrant("lock")
+def func0():
+    # call back msg.sender
+    raw_call(msg.sender, b"", value=0)
+
+
+@external
+@nonreentrant("lock-2")
+def func1():
+    raw_call(msg.sender, b"", value=0)
+
+
+@external
+@nonreentrant("lock-2")
+def func2():
+    raw_call(msg.sender, b"", value=0)
+
`,zv=({prev:e,next:n})=>m.jsx(z,{version:Rv,title:Ov,description:Iv,html:Dv,prev:e,next:n}),Av="0.3.9",Fv="Data Types - References",Mv="References in Vyper",$v=`

References types are data types that are passed by their reference, pointer to where the actual data is stored.

+
# @version ^0.3.9
+
+
+struct Person:
+    name: String[100]
+    age: uint256
+
+
+# Fixed sized list
+nums: public(uint256[10])  # must be bounded
+myMap: public(HashMap[address, uint256])
+person: public(Person)
+
+
+@external
+def __init__():
+    # This updates self.nums[0]
+    self.nums[0] = 123
+    self.nums[9] = 456
+    # Copies self.nums to array in memory.
+    # Does not modify referenced variable (self.nums)
+    arr: uint256[10] = self.nums
+    arr[0] = 123
+
+    # This updates self.myMap
+    self.myMap[msg.sender] = 1
+    self.myMap[msg.sender] = 11
+
+    # This updates self.person
+    self.person.age = 11
+    self.person.name = "Vyper"
+    # Person struct is copied into memory.
+    # Does not modify referenced variable (self.person)
+    p: Person = self.person
+    p.name = "Solidity"
+
`,Uv=({prev:e,next:n})=>m.jsx(z,{version:Av,title:Fv,description:Mv,html:$v,prev:e,next:n}),bv="0.3.9",Vv="Self Destruct",Bv="Self destruct in Vyper",Hv=`

selfdestruct deletes the contract from the blockchain. It takes a single input, an address to send all of Ether stored in the contract.

+
# @version ^0.3.9
+
+
+@external
+@payable
+def __default__():
+    pass
+
+
+@external
+def kill():
+    selfdestruct(msg.sender)
+
+
+@external
+def burn():
+    selfdestruct(ZERO_ADDRESS)
+
`,Wv=({prev:e,next:n})=>m.jsx(z,{version:bv,title:Vv,description:Bv,html:Hv,prev:e,next:n}),Qv="0.3.9",Kv="Send Ether",Yv="Send ETH in Vyper",Xv=`

There are two ways to send Ether from a contract, send and raw_call. Here we introduce the simpler function to use, send.

+
# @version ^0.3.9
+
+
+# Receive Ether into this contract
+@external
+@payable
+def __default__():
+    pass
+
+
+@external
+def sendEther(to: address, amount: uint256):
+    # when Ether is sent to a contract it will call 
+    # __default__ inside the receiving contract
+    # forwards 2300 gas
+    send(to, amount)
+
+
+@external
+def sendAll(to: address):
+    send(to, self.balance)
+
`,Gv=({prev:e,next:n})=>m.jsx(z,{version:Qv,title:Kv,description:Yv,html:Xv,prev:e,next:n}),Zv="0.3.9",qv="Unsafe Math",Jv="Unsafe math in Vyper",e0=`

Critical math checks such as overflow, underflow and division by 0 can be skipped using unsafe functions

+
# @version ^0.3.9
+
+
+@external
+def test_add(x: uint256, y: uint256) -> uint256:
+    # 21510 gas
+    # return x + y
+
+    # 21472 gas
+    return unsafe_add(x, y)
+
+
+@external
+def test_sub(x: uint256, y: uint256) -> uint256:
+    # 21533 gas
+    # return x - y
+
+    # 21495 gas
+    return unsafe_sub(x, y)
+
+
+@external
+def test_mul(x: uint256, y: uint256) -> uint256:
+    # 21578 gas
+    # return x * y
+
+    # 21520 gas
+    return unsafe_mul(x, y)
+
+
+@external
+def test_div(x: uint256, y: uint256) -> uint256:
+    # 21578 gas
+    # return x / y
+
+    # 21543 gas
+    return unsafe_div(x, y)
+
`,n0=({prev:e,next:n})=>m.jsx(z,{version:Zv,title:qv,description:Jv,html:e0,prev:e,next:n}),t0="0.3.9",s0="Data Types - Values",r0="Values in Vyper",l0=`

Some values available in Vyper

+
    +
  • bool
  • +
  • int128
  • +
  • uint256
  • +
  • decimals
  • +
  • address
  • +
  • bytes32
  • +
  • Bytes
  • +
  • String
  • +
+
# @version ^0.3.9
+
+b: public(bool)
+i: public(int128)  # -2 ** 127 to (2 ** 127 - 1)
+u: public(uint256)  # 0 to 2 ** 256 - 1
+dec: public(decimal)  # -2 ** 127 to (2 ** 127 - 1), 10 decimal places
+addr: public(address)
+b32: public(bytes32)
+bs: public(Bytes[100])
+s: public(String[100])
+
+
+@external
+def __init__():
+    self.b = False
+    self.i = -1
+    self.u = 123
+    self.dec = 3.14
+    self.addr = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
+    self.b32 = 0xada1b75f8ae9a65dcc16f95678ac203030505c6b465c8206e26ae84b525cdacb
+    self.bs = b"\\x01"
+    self.s = "Hello Vyper"
+
`,a0=({prev:e,next:n})=>m.jsx(z,{version:t0,title:s0,description:r0,html:l0,prev:e,next:n}),o0="0.3.9",i0="Verify Signature",u0="Verify signature in Vyper",c0=`

Signing and verifying signature takes 3 steps.

+
    +
  1. Hash the data to sign. This can be done with and without a smart contract.
  2. +
  3. Sign the hash. This must be done off chain.
  4. +
  5. Verify the signature. This is done using a smart contract.
  6. +
+
# @version ^0.3.9
+
+
+# hash = getHash("Hello Vyper!")
+# 0x5436c86f18e3d25a10e557ae125450118dd0a481ca22112b1977d55a676e4c91
+@external
+@pure
+def getHash(_str: String[100]) -> bytes32:
+    return keccak256(_str)
+
+
+# getEthSignedHash(hash)
+# 0x045b623a8e8fb7b4fcfbd1ae07e7326d55303d7de4085c69b346bd130c1936da
+@external
+@pure
+def getEthSignedHash(_hash: bytes32) -> bytes32:
+    return keccak256(
+        concat(
+            b'\\x19Ethereum Signed Message:\\n32',
+            _hash
+        )
+    )
+
+
+# account = your account
+# hash = getHash("Hello Vyper!")
+# signature = await ethereum.request({ method: "personal_sign", params: [account, hash]})
+@external
+@pure
+def recoverSigner(ethSignedHash: bytes32, sig: Bytes[65]) -> address:
+    r: uint256 = convert(slice(sig, 0, 32), uint256)
+    s: uint256 = convert(slice(sig, 32, 32), uint256)
+    v: uint256 = convert(slice(sig, 64, 1), uint256)
+    return ecrecover(ethSignedHash, v, r, s)
+
+
+@external
+@pure
+def verify(sig: Bytes[65], _str: String[100], _signer: address) -> bool:
+    _hash: bytes32 = keccak256(_str)
+    ethSignedHash: bytes32 = keccak256(
+        concat(
+            b'\\x19Ethereum Signed Message:\\n32',
+            _hash
+        )
+    )
+    r: uint256 = convert(slice(sig, 0, 32), uint256)
+    s: uint256 = convert(slice(sig, 32, 32), uint256)
+    v: uint256 = convert(slice(sig, 64, 1), uint256)
+    signer: address = ecrecover(ethSignedHash, v, r, s)
+
+    return _signer == signer
+
`,p0=({prev:e,next:n})=>m.jsx(z,{version:o0,title:i0,description:u0,html:c0,prev:e,next:n}),d0="0.3.9",f0="View and Pure Functions",h0="View and pure functions in Vyper",m0=`

Both pure and view functions are read only function, they cannot write anything to the blockchain.

+

pure functions do not read any state or global variables

+

view functions can read state variables, global variables and call internal functions.

+
# @version ^0.3.9
+
+num: public(uint256)
+
+# Pure functions does not read any state or global variables
+@external
+@pure
+def pureFunc(x: uint256) -> uint256:
+    return x
+
+
+# View functions might read state or global state, or call an internal function
+@external
+@view
+def viewFunc(x: uint256) -> bool:
+    return x > self.num
+
+
+@external
+@pure
+def sum(x: uint256, y: uint256, z: uint256) -> uint256:
+    return x + y + z
+
+
+@external
+@view
+def addNum(x: uint256) -> uint256:
+    return x + self.num
+
`,y0=({prev:e,next:n})=>m.jsx(z,{version:d0,title:f0,description:h0,html:m0,prev:e,next:n}),v0=({size:e,className:n=""})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",width:e,height:e,className:n,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),g0="_component_efeb7_1",j0="_icon_efeb7_8",w0="_input_efeb7_12",hl={component:g0,icon:j0,input:w0},x0=({value:e,onChange:n})=>{function t(s){n(s.target.value)}return m.jsxs("div",{className:hl.component,children:[m.jsx(v0,{size:18,className:hl.icon}),m.jsx("input",{className:hl.input,placeholder:"Search",value:e,onChange:t})]})};var k0="Expected a function",Li=0/0,_0="[object Symbol]",S0=/^\s+|\s+$/g,E0=/^[-+]0x[0-9a-f]+$/i,C0=/^0b[01]+$/i,P0=/^0o[0-7]+$/i,N0=parseInt,T0=typeof ds=="object"&&ds&&ds.Object===Object&&ds,L0=typeof self=="object"&&self&&self.Object===Object&&self,R0=T0||L0||Function("return this")(),O0=Object.prototype,I0=O0.toString,D0=Math.max,z0=Math.min,ml=function(){return R0.Date.now()};function A0(e,n,t){var s,r,l,a,o,i,u=0,d=!1,h=!1,y=!0;if(typeof e!="function")throw new TypeError(k0);n=Ri(n)||0,pa(t)&&(d=!!t.leading,h="maxWait"in t,l=h?D0(Ri(t.maxWait)||0,n):l,y="trailing"in t?!!t.trailing:y);function g(k){var E=s,N=r;return s=r=void 0,u=k,a=e.apply(N,E),a}function j(k){return u=k,o=setTimeout(p,n),d?g(k):a}function w(k){var E=k-i,N=k-u,U=n-E;return h?z0(U,l-N):U}function T(k){var E=k-i,N=k-u;return i===void 0||E>=n||E<0||h&&N>=l}function p(){var k=ml();if(T(k))return c(k);o=setTimeout(p,w(k))}function c(k){return o=void 0,y&&s?g(k):(s=r=void 0,a)}function f(){o!==void 0&&clearTimeout(o),u=0,s=i=r=o=void 0}function v(){return o===void 0?a:c(ml())}function _(){var k=ml(),E=T(k);if(s=arguments,r=this,i=k,E){if(o===void 0)return j(i);if(h)return o=setTimeout(p,n),g(i)}return o===void 0&&(o=setTimeout(p,n)),a}return _.cancel=f,_.flush=v,_}function pa(e){var n=typeof e;return!!e&&(n=="object"||n=="function")}function F0(e){return!!e&&typeof e=="object"}function M0(e){return typeof e=="symbol"||F0(e)&&I0.call(e)==_0}function Ri(e){if(typeof e=="number")return e;if(M0(e))return Li;if(pa(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=pa(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=e.replace(S0,"");var t=C0.test(e);return t||P0.test(e)?N0(e.slice(2),t?2:8):E0.test(e)?Li:+e}var $0=A0;const U0=Ai($0),b0={leading:!1,trailing:!0};function V0(e,n,t){return S.useCallback(U0(e,n,b0),t)}function B0(e,n){let t=e;for(let s=0;s0;){const[l,a,o]=n.pop();r&&(s=s.slice(0,a-1),r=!1),s+=l;const i=Object.keys(o);if(i.length>0)for(let u=0;un+r)}const Q0=["/view-pure-functions"],K0=["/view-pure-functions"],Y0=["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],X0=["/verify-signature"],G0=["/verify-signature"],Z0=["/verify-signature"],q0=["/values","/references"],J0=["/values","/references"],eg=["/values","/references"],ng=["/values"],tg=["/values"],sg=["/values","/references","/private-public-state-variables"],rg=["/values","/references","/private-public-state-variables"],lg=["/values"],ag=["/values"],og=["/values"],ig=["/values"],ug=["/values"],cg=["/values"],pg=["/values"],dg=["/unsafe-math"],fg=["/unsafe-math"],hg=["/unsafe-math"],mg=["/send-ether"],yg=["/send-ether"],vg=["/send-ether","/raw-call"],gg=["/send-ether","/payable","/default-function"],jg=["/self-destruct"],wg=["/self-destruct"],xg=["/self-destruct"],kg=["/references"],_g=["/references"],Sg=["/references","/dynamic-arrays"],Eg=["/references","/dynamic-arrays"],Cg=["/references"],Pg=["/references"],Ng=["/references"],Tg=["/references"],Lg=["/re-entrancy-lock"],Rg=["/re-entrancy-lock"],Og=["/raw-call"],Ig=["/raw-call","/delegate-call"],Dg=["/private-public-state-variables"],zg=["/print"],Ag=["/print"],Fg=["/internal-external-functions"],Mg=["/internal-external-functions"],$g=["/interface"],Ug=["/immutable"],bg=["/immutable"],Vg=["/immutable","/constants"],Bg=["/immutable","/constants"],Hg=["/if-else"],Wg=["/if-else"],Qg=["/hello-world"],Kg=["/hello-world"],Yg=["/hello-world"],Xg=["/hash-function"],Gg=["/hash-function"],Zg=["/for-loop"],qg=["/for-loop"],Jg=["/for-loop"],e1=["/event"],n1=["/event"],t1=["/error"],s1=["/error"],r1=["/dynamic-arrays"],l1=["/delegate-call"],a1=["/defi/curve-swap","/defi/curve-liquidity"],o1=["/defi/curve-swap"],i1=["/defi/curve-swap","/defi/curve-liquidity"],u1=["/defi/curve-swap","/defi/curve-liquidity"],c1=["/defi/curve-liquidity"],p1=["/default-function"],d1=["/default-function"],f1=["/create-new-contract"],h1=["/create-new-contract"],m1=["/create-new-contract"],y1=["/constructor"],Oi={view:Q0,pure:K0,function:["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],functions:Y0,verify:X0,signature:G0,ecrecover:Z0,data:q0,type:J0,types:eg,value:ng,values:tg,variable:sg,variables:rg,bool:lg,int128:ag,uint256:og,decimals:ig,address:ug,bytes32:cg,Bytes:pg,String:["/values"],gas:dg,unsafe:fg,math:hg,send:mg,ether:yg,raw_call:vg,payable:gg,selfdestruct:jg,self:wg,destruct:xg,reference:kg,references:_g,array:Sg,arrays:Eg,struct:Cg,structs:Pg,HashMap:Ng,mapping:Tg,"re-entrancy":["/re-entrancy-lock"],lock:Lg,nonreentrant:Rg,raw:Og,call:Ig,private:["/private-public-state-variables"],public:["/private-public-state-variables"],state:Dg,debug:zg,print:Ag,internal:Fg,external:Mg,interface:["/interface"],interfaces:$g,immutable:Ug,immutables:bg,constant:Vg,constants:Bg,if:["/if-else"],else:["/if-else"],conditional:Hg,statement:Wg,hello:Qg,world:Kg,version:Yg,hash:Xg,keccack256:Gg,for:["/for-loop"],loop:Zg,loops:qg,range:Jg,event:e1,events:n1,error:t1,errors:s1,dynamic:r1,delegate:l1,curve:a1,swap:o1,defi:i1,amm:u1,add:c1,"remove liquidity":["/defi/curve-liquidity"],default:["/default-function"],__default__:p1,fallback:d1,create:f1,new:["/create-new-contract"],contract:h1,create_forwarder_to:m1,constructor:y1},Ii={"/view-pure-functions":["view","pure","function","functions"],"/verify-signature":["verify","signature","ecrecover"],"/values":["data","type","types","value","values","variable","variables","bool","int128","uint256","decimals","address","bytes32","Bytes","String"],"/unsafe-math":["gas","unsafe","math"],"/send-ether":["send","ether","raw_call","payable"],"/self-destruct":["selfdestruct","self","destruct"],"/references":["data","type","types","reference","references","variable","variables","array","arrays","struct","structs","HashMap","mapping"],"/re-entrancy-lock":["re-entrancy","lock","nonreentrant"],"/raw-call":["raw","call","raw_call"],"/private-public-state-variables":["private","public","state","variable","variables"],"/print":["debug","print"],"/payable":["payable","function","functions"],"/internal-external-functions":["internal","external","function","functions"],"/interface":["interface","interfaces"],"/immutable":["immutable","immutables","constant","constants"],"/if-else":["if","else","conditional","statement"],"/hello-world":["hello","world","version"],"/hash-function":["hash","keccack256","function","functions"],"/function":["function","functions"],"/for-loop":["for","loop","loops","range"],"/event":["event","events"],"/error":["error","errors"],"/dynamic-arrays":["dynamic","arrays","array"],"/delegate-call":["delegate","call"],"/defi/curve-swap":["curve","swap","defi","amm"],"/defi/curve-liquidity":["curve","add","remove liquidity","defi","amm"],"/default-function":["default","function","functions","__default__","fallback","payable"],"/create-new-contract":["create","new","contract","create_forwarder_to"],"/constructor":["constructor"],"/constants":["constant","constants"]},hp=[];for(const e of Object.keys(Ii))hp.push(...Ii[e]);const mp={};for(const e of hp)B0(mp,e);function v1(e){return Array.from(new Set(e))}function g1(e){const n=[],t=W0(mp,e.toLowerCase());for(const s of t)Oi[s]&&n.push(...Oi[s]);return n}const j1="_component_1rb7l_1",w1="_updates_1rb7l_8",x1="_search_1rb7l_13",k1="_category_1rb7l_17",_1="_listItem_1rb7l_20",S1="_label_1rb7l_28",E1="_header_1rb7l_31",C1="_youTube_1rb7l_34",P1="_youTubeLogo_1rb7l_40",ue={component:j1,updates:w1,search:x1,category:k1,listItem:_1,label:S1,header:E1,youTube:C1,youTubeLogo:P1},N1=["2023/08/20 - Vyper 0.3.9","2023/06/19 - Chinese translations","2023/03/04 - Unsafe math"];function T1(){const[e,n]=S.useState(""),[t,s]=Fh(),[r,l]=S.useState(null);S.useEffect(()=>{const d=t.get("q");d!=null&&d.length>0&&(n(d),a(d,!1))},[]);function a(d,h){const y=d.trim();if(y.length==0){l(null),h&&s({q:""});return}const g=v1(y.split(" ")),j={};for(const w of g){const T=g1(w);for(const p of T)j[p]=!0}l(j),h&&s({q:y})}const o=V0(d=>a(d,!0),500,[]);function i(d){n(d),o(d)}function u(){return r?Object.keys(r).length==0?m.jsx("div",{children:"No results"}):m.jsx("ul",{className:ue.list,children:mr.filter(({path:d})=>r[d]).map(({path:d,title:h})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:d,children:h})},d))}):m.jsxs(m.Fragment,{children:[uo.map(({routes:d,title:h},y)=>m.jsxs("div",{children:[h&&m.jsx("h3",{className:ue.category,children:h}),m.jsx("ul",{className:ue.list,children:d.map(({path:g,title:j})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:g,children:j})},g))})]},y)),m.jsxs("div",{children:[m.jsx("h3",{className:ue.category,children:"Translations"}),Kh.map(({lang:d,url:h})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:h,target:"__blank",children:d})},h))]})]})}return m.jsxs("div",{className:ue.component,children:[m.jsx(fp,{title:"Vyper by Example | 0.3.9",description:"Learn smart contract programming using Vyper"}),m.jsx("h1",{className:ue.header,children:m.jsx("a",{href:"/",children:"Vyper by Example"})}),m.jsx("div",{className:ue.subHeader,children:"v 0.3.9"}),m.jsxs("div",{className:ue.main,children:[m.jsxs("p",{children:["an introduction to ",m.jsx("a",{href:"https://vyper.readthedocs.io",children:"Vyper"})," with simple examples"]}),m.jsxs("div",{className:ue.youTube,children:[m.jsx("img",{src:dp,alt:"logo",className:ue.youTubeLogo}),m.jsx("a",{href:"https://www.youtube.com/channel/UCJWh7F3AFyQ_x01VKzr9eyA",target:"__blank",children:"Most code are explained here"})]}),m.jsx("div",{className:ue.updates,children:N1.map((d,h)=>m.jsx("div",{children:d},h))}),m.jsx("div",{className:ue.search,children:m.jsx(x0,{value:e,onChange:i})}),u()]})]})}const L1=[{path:"/constants",component:Im},{path:"/constructor",component:Mm},{path:"/create-new-contract",component:Bm},{path:"/default-function",component:Ym},{path:"/defi/curve-liquidity",component:Jm},{path:"/defi/curve-swap",component:ry},{path:"/delegate-call",component:uy},{path:"/dynamic-arrays",component:hy},{path:"/error",component:jy},{path:"/event",component:Sy},{path:"/for-loop",component:Ty},{path:"/function",component:Dy},{path:"/hash-function",component:$y},{path:"/hello-world",component:Hy},{path:"/if-else",component:Xy},{path:"/immutable",component:ev},{path:"/interface",component:lv},{path:"/internal-external-functions",component:cv},{path:"/payable",component:mv},{path:"/print",component:wv},{path:"/private-public-state-variables",component:Ev},{path:"/raw-call",component:Lv},{path:"/re-entrancy-lock",component:zv},{path:"/references",component:Uv},{path:"/self-destruct",component:Wv},{path:"/send-ether",component:Gv},{path:"/unsafe-math",component:n0},{path:"/values",component:a0},{path:"/verify-signature",component:p0},{path:"/view-pure-functions",component:y0},{path:"",component:T1}];function Di(){const{state:e,init:n}=ao();return S.useLayoutEffect(()=>{n({width:window.document.body.clientWidth})},[]),e.initialized?m.jsx(Ah,{basename:"",children:m.jsx(Sm,{children:m.jsx(Ih,{children:L1.map(t=>{const{prev:s,next:r}=Zh(t.path);return m.jsx(pp,{path:t.path,element:Qi.createElement(t.component,{prev:s,next:r})},t.path)})})})}):null}const R1=document.getElementById("root"),O1=qc(R1),zi=document.getElementById("root");zi.hasChildNodes()?Zc(zi,m.jsx(ki,{children:m.jsx(Di,{})})):O1.render(m.jsx(ki,{children:m.jsx(Di,{})})); diff --git a/assets/index-cf8e1897.css b/assets/index-cf8e1897.css deleted file mode 100644 index 4b6fa80..0000000 --- a/assets/index-cf8e1897.css +++ /dev/null @@ -1,10 +0,0 @@ -:root{--black: #252519}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-thumb{background-color:#ccc}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;line-height:20px;background-color:var(--bg-color);color:var(--color)}body.light{--bg-color: white;--color: #252519;--code-bg: #f5f5f5;--link-color: #261a3b;--input-bg: #f1f1f1}body.dark{--bg-color: #161b22;--color: rgb(201, 209, 217);--code-bg: #0d1117;--link-color: #f6f6f6;--input-bg: white}pre{padding:15px;margin:0;font-size:14px;overflow-x:scroll}pre .buttons{color:var(--color);cursor:pointer;display:flex;flex-direction:row;justify-content:flex-end}pre .buttons button{color:inherit;background:transparent;border:none;cursor:inherit}pre .buttons button:hover{color:#008cff}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace;color:#e74c3c}.language-vyper{display:block;color:var(--color)}a,a:visited{color:var(--link-color)}h2{font-size:32px;line-height:40px}em{font-style:italic}pre{background-color:var(--code-bg)}body.light .hljs{background:#eee;color:#000}body.light .hljs-link,body.light .hljs-emphasis,body.light .hljs-attribute,body.light .hljs-addition{color:#070}body.light .hljs-emphasis{font-style:italic}body.light .hljs-strong,body.light .hljs-string,body.light .hljs-deletion{color:#d14}body.light .hljs-strong{font-weight:700}body.light .hljs-quote,body.light .hljs-comment{color:#5f5f55;font-style:italic}body.light .hljs-section,body.light .hljs-title{color:#900}body.light .hljs-class .hljs-title,body.light .hljs-title.class_,body.light .hljs-type{color:#458}body.light .hljs-variable,body.light .hljs-template-variable{color:#369}body.light .hljs-bullet{color:#970}body.light .hljs-meta{color:#34b}body.light .hljs-code,body.light .hljs-number,body.light .hljs-literal,body.light .hljs-keyword,body.light .hljs-selector-tag{color:#0758fc}body.light .hljs-regexp{background-color:#fff0ff;color:#808}body.light .hljs-symbol{color:#990073}body.light .hljs-tag,body.light .hljs-name,body.light .hljs-selector-id,body.light .hljs-selector-class{color:#070}/*! - Theme: GitHub Dark - Description: Dark theme as seen on github.com - Author: github.com - Maintainer: @Hirse - Updated: 2021-05-15 - - Outdated base version: https://github.com/primer/github-syntax-dark - Current colors taken from GitHub's CSS -*/body.dark .hljs{color:#c9d1d9;background:#0d1117}body.dark .hljs-doctag,body.dark .hljs-keyword,body.dark .hljs-meta .hljs-keyword,body.dark .hljs-template-tag,body.dark .hljs-template-variable,body.dark .hljs-type,body.dark .hljs-variable.language_{color:#ff7b72}body.dak .hljs-title,body.dak .hljs-title.class_,body.dak .hljs-title.class_.inherited__,body.dak .hljs-title.function_{color:#d2a8ff}body.dark .hljs-attr,body.dark .hljs-attribute,body.dark .hljs-literal,body.dark .hljs-meta,body.dark .hljs-number,body.dark .hljs-operator,body.dark .hljs-variable,body.dark .hljs-selector-attr,body.dark .hljs-selector-class,body.dark .hljs-selector-id{color:#79c0ff}body.dark .hljs-regexp,body.dark .hljs-string,body.dark .hljs-meta .hljs-string{color:#a5d6ff}body.dark .hljs-built_in,body.dark .hljs-symbol{color:#ffa657}body.dary .hljs-comment,body.dary .hljs-code,body.dary .hljs-formula{color:#8b949e}body.dark .hljs-name,body.dark .hljs-quote,body.dark .hljs-selector-tag,body.dark .hljs-selector-pseudo{color:#7ee787}body.dark .hljs-subst{color:#c9d1d9}body.dark .hljs-section{color:#1f6feb;font-weight:700}body.dark .hljs-bullet{color:#f2cc60}body.dark .hljs-emphasis{color:#c9d1d9;font-style:italic}body.dark .hljs-strong{color:#c9d1d9;font-weight:700}body.dark .hljs-addition{color:#aff5b4;background-color:#033a16}body.dark .hljs-deletion{color:#ffdcd7;background-color:#67060c}._component_ynf6p_1{display:flex;flex-direction:column;min-height:100vh}._main_ynf6p_7{display:flex;flex:1;flex-direction:column;margin:auto;padding:10px}._footer_ynf6p_23{display:flex;flex-direction:column;align-items:center;padding-top:10px;padding-bottom:20px}._component_15xxl_1{text-align:left;display:flex;flex-direction:row;align-items:center}._component_15xxl_1 a{text-decoration:none}._logo_15xxl_10{margin:10px}._header_15xxl_13{margin:0 auto 0 0}._mode_15xxl_17{background-color:transparent;border:0px;margin-right:20px;cursor:pointer}._component_pb8dz_1{margin:15px;color:var(--color);display:flex;flex-direction:column;align-items:center}._row_pb8dz_8{display:flex;flex-direction:row;align-items:center}._row_pb8dz_8 ._bar_pb8dz_13{margin-left:5px;margin-right:5px}._row_pb8dz_8 a,._row_pb8dz_8 a:visited{color:var(--link-color)}._khan_pb8dz_21{margin-left:10px}._social_pb8dz_24{display:flex;flex-direction:row;align-items:center}._sce_pb8dz_29{width:30px;margin:5px;border-radius:4px}._telegram_pb8dz_34,._discord_pb8dz_38,._youTube_pb8dz_42{width:30px;margin:5px}._component_xfooc_1{width:min(100vw - 20px,1000px)}._content_xfooc_5{margin-top:15px;margin-bottom:15px}._prevNext_xfooc_9{margin:20px;display:flex;flex-direction:row;justify-content:space-between}._component_tg7cx_1{display:flex;flex-direction:row;align-items:center;background-color:var(--input-bg);border-radius:4px}._icon_tg7cx_8{margin:8px;color:var(--black)}._input_tg7cx_12{width:100%;height:24px;max-width:300px;padding:5px;border:0;border-radius:4px;background-color:var(--input-bg)}._input_tg7cx_12:focus{outline:none;box-shadow:none}._component_w8h7o_1{max-width:420px}._component_w8h7o_1 ul{list-style:none;padding:0}._updates_w8h7o_8{padding:5px 5px 5px 15px;border-radius:5px}._category_w8h7o_13{color:var(--link-color)}._search_w8h7o_16{margin-top:10px;margin-bottom:10px}._listItem_w8h7o_20{display:flex;flex-direction:row;align-items:center;margin-top:10px;margin-bottom:10px;white-space:nowrap}._label_w8h7o_28{margin-left:10px}._header_w8h7o_31 a{text-decoration:none}._youTube_w8h7o_34{display:flex;flex-direction:row;align-items:center;margin:10px 0}._youTubeLogo_w8h7o_40{width:30px;padding-right:10px} diff --git a/constants/index.html b/constants/index.html index ac8581f..43fde17 100644 --- a/constants/index.html +++ b/constants/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/constructor/index.html b/constructor/index.html index ac8581f..43fde17 100644 --- a/constructor/index.html +++ b/constructor/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/create-new-contract/index.html b/create-new-contract/index.html index ac8581f..43fde17 100644 --- a/create-new-contract/index.html +++ b/create-new-contract/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/default-function/index.html b/default-function/index.html index ac8581f..43fde17 100644 --- a/default-function/index.html +++ b/default-function/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/defi/curve-liquidity/index.html b/defi/curve-liquidity/index.html index ac8581f..43fde17 100644 --- a/defi/curve-liquidity/index.html +++ b/defi/curve-liquidity/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/defi/curve-swap/index.html b/defi/curve-swap/index.html index ac8581f..43fde17 100644 --- a/defi/curve-swap/index.html +++ b/defi/curve-swap/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/delegate-call/index.html b/delegate-call/index.html index ac8581f..43fde17 100644 --- a/delegate-call/index.html +++ b/delegate-call/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/dynamic-arrays/index.html b/dynamic-arrays/index.html index ac8581f..43fde17 100644 --- a/dynamic-arrays/index.html +++ b/dynamic-arrays/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/error/index.html b/error/index.html index ac8581f..43fde17 100644 --- a/error/index.html +++ b/error/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/event/index.html b/event/index.html index ac8581f..43fde17 100644 --- a/event/index.html +++ b/event/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/for-loop/index.html b/for-loop/index.html index ac8581f..43fde17 100644 --- a/for-loop/index.html +++ b/for-loop/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/function/index.html b/function/index.html index ac8581f..43fde17 100644 --- a/function/index.html +++ b/function/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/hash-function/index.html b/hash-function/index.html index ac8581f..43fde17 100644 --- a/hash-function/index.html +++ b/hash-function/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/hello-world/index.html b/hello-world/index.html index ac8581f..43fde17 100644 --- a/hello-world/index.html +++ b/hello-world/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/if-else/index.html b/if-else/index.html index ac8581f..43fde17 100644 --- a/if-else/index.html +++ b/if-else/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/immutable/index.html b/immutable/index.html index ac8581f..43fde17 100644 --- a/immutable/index.html +++ b/immutable/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/index.html b/index.html index ac8581f..43fde17 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/interface/index.html b/interface/index.html index ac8581f..43fde17 100644 --- a/interface/index.html +++ b/interface/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/internal-external-functions/index.html b/internal-external-functions/index.html index ac8581f..43fde17 100644 --- a/internal-external-functions/index.html +++ b/internal-external-functions/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/payable/index.html b/payable/index.html index ac8581f..43fde17 100644 --- a/payable/index.html +++ b/payable/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/print/index.html b/print/index.html index ac8581f..43fde17 100644 --- a/print/index.html +++ b/print/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/private-public-state-variables/index.html b/private-public-state-variables/index.html index ac8581f..43fde17 100644 --- a/private-public-state-variables/index.html +++ b/private-public-state-variables/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/raw-call/index.html b/raw-call/index.html index ac8581f..43fde17 100644 --- a/raw-call/index.html +++ b/raw-call/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/re-entrancy-lock/index.html b/re-entrancy-lock/index.html index ac8581f..43fde17 100644 --- a/re-entrancy-lock/index.html +++ b/re-entrancy-lock/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/references/index.html b/references/index.html index ac8581f..43fde17 100644 --- a/references/index.html +++ b/references/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/self-destruct/index.html b/self-destruct/index.html index ac8581f..43fde17 100644 --- a/self-destruct/index.html +++ b/self-destruct/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/send-ether/index.html b/send-ether/index.html index ac8581f..43fde17 100644 --- a/send-ether/index.html +++ b/send-ether/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/unsafe-math/index.html b/unsafe-math/index.html index ac8581f..43fde17 100644 --- a/unsafe-math/index.html +++ b/unsafe-math/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/values/index.html b/values/index.html index ac8581f..43fde17 100644 --- a/values/index.html +++ b/values/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/verify-signature/index.html b/verify-signature/index.html index ac8581f..43fde17 100644 --- a/verify-signature/index.html +++ b/verify-signature/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + + diff --git a/view-pure-functions/index.html b/view-pure-functions/index.html index ac8581f..43fde17 100644 --- a/view-pure-functions/index.html +++ b/view-pure-functions/index.html @@ -1,4 +1,4 @@ - + @@ -31,8 +31,8 @@ gtag("config", "G-KTVFSR7C2H") - - + +