diff --git a/.tool-versions b/.tool-versions index 15e4ee59..557ea46d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -nodejs 15.10.0 +nodejs 20.11.0 diff --git a/README.md b/README.md index 56d6dcdd..e9682ee8 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ For nonprofits — the simplest way to give your supporters a beautiful donation See some demos at https://embeds.every.org/0.4. And see this in production helping raise funds at https://www.goodjobbub.org/. +## Publishing + +Run `yarn build` and check in the latest version of `/docs/dist` to publish the +latest version of the donate button. + ## Use Here is an example html file with a donate button for https://www.every.org/lilbubsbigfund. You can copy diff --git a/docs/dist/donate-button/0.4/8798fcc6fd2d5d3aeccea6ee3fcfec89.svg b/docs/dist/donate-button/0.4/8798fcc6fd2d5d3aeccea6ee3fcfec89.svg new file mode 100644 index 00000000..886da02e --- /dev/null +++ b/docs/dist/donate-button/0.4/8798fcc6fd2d5d3aeccea6ee3fcfec89.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/ad80427b5a2980f1d19884ede42b29de.svg b/docs/dist/donate-button/0.4/ad80427b5a2980f1d19884ede42b29de.svg new file mode 100644 index 00000000..7b3af7d7 --- /dev/null +++ b/docs/dist/donate-button/0.4/ad80427b5a2980f1d19884ede42b29de.svg @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/asset-manifest.json b/docs/dist/donate-button/0.4/asset-manifest.json new file mode 100644 index 00000000..8d220f3d --- /dev/null +++ b/docs/dist/donate-button/0.4/asset-manifest.json @@ -0,0 +1,35 @@ +{ + "bundle.js": "bundle.7b695.esm.js", + "bundle.js.map": "bundle.7b695.esm.js.map", + "filecoin.svg": "03c114f6e014588a4bde815d9bc85821.svg", + "basic-attention-token.svg": "26c9b1d3d7943e6e67cf13e039ba5ac8.svg", + "chainlink.svg": "3a5177b76709819ba4663556e60222f8.svg", + "polygon.svg": "3e1eb932bdbaa2318584813bf468be53.svg", + "uniswap.svg": "45bcde5a98dbbdf2a4e0769eca2154f1.svg", + "dogecoin.svg": "4d81ee51fa2520df58ae092aeb3d0bd4.svg", + "graph.svg": "5450d3cada4fd0370ab8d885765f5cc3.svg", + "algorand.svg": "58f20393bf2b41f944c6229c2af785b9.svg", + "apecoin.svg": "5982461fe2304c26f3a3cf4c50806dad.svg", + "tezos.svg": "6214ae0b42d798a0c9a51503a27a66bf.svg", + "shiba-inu.svg": "743324f8e09d34a894c21e91c396f289.svg", + "stellar.svg": "7ab9396038b4befda4354b2a476d9064.svg", + "ethereum.svg": "8098252f28e93069c75d6010d3ac6bc1.svg", + "usd-coin.svg": "8798fcc6fd2d5d3aeccea6ee3fcfec89.svg", + "zcash.svg": "88611c6e2f9450f29ece8d2b36641670.svg", + "mobilecoin.svg": "8f22b294629293d29895fddef0a8baea.svg", + "bitcoin.svg": "9052c75387065f76bb3436b7e4ce12cd.svg", + "bitcoin-cash.svg": "ad80427b5a2980f1d19884ede42b29de.svg", + "assets/close.svg": "assets/close.svg", + "assets/logo.svg": "assets/logo.svg", + "avalanche.svg": "b31a89ce5555412a0c8a4c6463286584.svg", + "solana.svg": "b9021bb757262a32de6d8931015051d9.svg", + "raydium.svg": "badb98080214485db486794fb59a95cc.svg", + "tether.svg": "bc2c9e9d67b73656a6da5dd177aa10a2.svg", + "litecoin.svg": "cc9ce389e9a4e0f518e3caeb7b60912d.svg", + "binance.svg": "ddb1f3b63e33585263e5905706d6ff6d.svg", + "samoyed.svg": "e4bfa8eb04696d4fd5ea04ca4c35469b.svg", + "polkadot.svg": "f588feb3cbbcc0fb259a3630ec7e34ba.svg", + "dai.svg": "f8f4253f02d1fbc4bf04d0959a6e614c.svg", + "saber.svg": "fc9295a4651c56d5b4e8c3aa13a93208.svg", + "index.html": "index.html" +} \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/bundle.7b695.esm.js b/docs/dist/donate-button/0.4/bundle.7b695.esm.js new file mode 100644 index 00000000..d71dec21 --- /dev/null +++ b/docs/dist/donate-button/0.4/bundle.7b695.esm.js @@ -0,0 +1,2 @@ +!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(t){return e[t]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="https://assets.every.org/dist/donate-button/0.4/",t(t.s="Pq/i")}({"/hs+":function(e,t,n){"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}function i(e){return Object.entries(e).filter((([,e])=>Boolean(e))).map((e=>e.map((e=>encodeURIComponent(e))).join("="))).join("&")}function a({fundraiserSlug:e,nonprofitSlug:t}){let n=Re+t;return e&&(n+="/f/"+e),n}function c({methods:e,nonprofitSlug:t,noExit:n,privateNote:o,utmSource:r}){return{method:null==e?void 0:e.join(","),utm_campaign:"donate-button",utm_source:null!=r?r:t,utm_medium:We,no_exit:null!=n?n:1,private_note:o}}function l(e){var t,n;const o=new URL(e),r=o.pathname.split("/f/")[1],i=o.pathname.split("/")[1],a=new URLSearchParams(o.search),c=function(e){if(e)return e.split(",").filter((e=>nt.includes(e)))}(a.get(it.METHOD)),l=function(e){if(e)return Object.values(Je).find((t=>t.toUpperCase()===e.toUpperCase()))}(a.get(it.FREQUENCY)),s=function(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t}(a.get(it.AMOUNT)),u=null!=(t=a.get(it.MONTHLY_TITLE))?t:void 0,d=function(e){if(e)return e.split(",").map(Number.parseFloat).filter(Boolean).slice(0,rt)}(a.get(it.SUGGESTED_AMOUNTS)),p=null!=(n=a.get(it.UTM_SOURCE))?n:void 0;if(i)return{fundraiserSlug:r,nonprofitSlug:i,defaultFrequency:l,methods:c,lockMonthlyFrequency:l===Je.Monthly,monthlyTitle:u,addAmounts:d,utmSource:p,defaultDonationAmount:s}}function s(e,t){Se.options.__h&&Se.options.__h(ht,e,yt||t),yt=0;var n=ht.__H||(ht.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:gt}),n.__[e]}function u(e){return yt=1,d(C,e)}function d(e,t,n){var o=s(ft++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):C(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=ht,!ht.u)){var r=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&o.__c.props===e)&&(!i||i.call(this,e,t,n))};ht.u=!0;var i=ht.shouldComponentUpdate,a=ht.componentWillUpdate;ht.componentWillUpdate=function(e,t,n){if(this.__e){var o=i;i=void 0,r(e,t,n),i=o}a&&a.call(this,e,t,n)},ht.shouldComponentUpdate=r}return o.__N||o.__}function p(e,t){var n=s(ft++,3);!Se.options.__s&&O(n.__H,t)&&(n.__=e,n.i=t,ht.__H.__h.push(n))}function f(e){return yt=5,h((function(){return{current:e}}),[])}function h(e,t){var n=s(ft++,7);return O(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function b(e,t){return yt=8,h((function(){return e}),t)}function m(e){var t=ht.context[e.__c],n=s(ft++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ht)),t.props.value):e.__}function y(){for(var e;e=vt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(g),e.__H.__h.forEach(_),e.__H.__h=[]}catch(t){e.__H.__h=[],Se.options.__e(t,e.__v)}}function v(e){var t,n=function(){clearTimeout(o),kt&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);kt&&(t=requestAnimationFrame(n))}function g(e){var t=ht,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ht=t}function _(e){var t=ht;e.__c=e.__(),ht=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function C(e,t){return"function"==typeof t?t(e):t}function j(){const e=function(){const[e,t]=u(null);return p((()=>{(async()=>{try{const e=await Xt(qt,{apiVersion:Gt});t(e)}catch(e){}})()}),[]),e}(),[t,n]=u(!1),[o,r]=u(!1),i=b((async e=>{const t=Boolean(window.ApplePaySession);if(r(t),!e)return;const o=null==e?void 0:e.paymentRequest({country:"US",currency:"usd",total:{label:"test",amount:0},requestPayerName:!1,requestPayerEmail:!1}),i=Boolean(await(null==o?void 0:o.canMakePayment()));n(i)}),[]);return p((()=>{i(e)}),[i,e]),{googlePay:t,applePay:o}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{try{return[e,t].map(encodeURIComponent).join("=")}catch(e){return null}})).filter(E).join("&");return n?[e,n].join("?"):e}(`mailto:${null!=(t=e.address)?t:""}`,T({},e.subject?{subject:e.subject}:{},e.body?{body:e.body}:{}))}function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t=5||2===n&&(r[0]>5||5===r[0]&&(o||r[1]!==Bo))),r.length=1,o?(e.e=e.e-t+1,r[0]=1):r[0]=e.e=0;else if(t=5||2===n&&(r[t]>5||5===r[t]&&(o||r[t+1]!==Bo||1&r[t-1]))||3===n&&(o||!!r[0]),r.length=t,o)for(;++r[--t]>9;)if(r[t]=0,0===t){++e.e,r.unshift(1);break}for(t=r.length;!r[--t];)r.pop()}return e}function P(e,t,n){var o=e.e,r=e.c.join(""),i=r.length;if(t)r=r.charAt(0)+(i>1?"."+r.slice(1):"")+(o<0?"e":"e+")+o;else if(o<0){for(;++o;)r="0"+r;r="0."+r}else if(o>0)if(++o>i)for(o-=i;o--;)r+="0";else o1&&(r=r.charAt(0)+"."+r.slice(1));return e.s<0&&n?"-"+r:r}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;te.cssText)).join("\n"),r=document.createElement("style");r.id="every-shadow-styles",r.innerHTML=yl+o,Ol.append(r)}}function we(e){let{element:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,vl);if(!t.parentNode)return;const o=t.parentNode;Object(Se.render)(Object(Se.h)(Qe,n),o,t)}function ke(){document.querySelectorAll("*[href^='https://www.every.org/']").forEach((e=>{const t=e.getAttribute("href");if(null!=t&&t.includes("#/donate")){var n;const o=l(t);if(!o)return;const r=null!=(n=Cl.get(t))?n:function(e,t){Ol||je();const n=document.createElement("div");Ol.append(n);const o=new jl(e,n);return Cl.set(t,o),o}(o,t);null===e.getAttribute("data-every-style")?e.addEventListener("click",(e=>{e.preventDefault(),r.show()})):we(Oe({element:e,onClick:()=>{r.show()}},o,{url:t}))}}))}function xe(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function Ne(){return Ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{withLogo:t=!0,textColor:n="#fff",bgColor:o="#00a380",borderRadius:r="100px",fontSize:l="16px",padding:s="12px 20px",className:u,onClick:d,target:p="_blank",url:f,label:h="Donate"}=e,b=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,Ye);const m=f||`${a(y=b)}?${i(c(y))}#/${Ze}`;var y;return Object(Se.h)("a",{href:m,style:{background:o,color:n,borderRadius:r,fontSize:l,padding:s},className:[Ie,u].filter(Boolean).join(" "),target:p,onClick:d?e=>{e.preventDefault(),d()}:void 0},t&&Object(Se.h)("svg",{className:Le,style:{color:n,height:l,width:l},width:"64",height:"56",viewBox:"0 0 64 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ke||(Ke=Object(Se.h)("path",{d:"M48.3746 20.9558C48.3746 9.03877 38.4374 0 25.6754 0C11.4001 0 0 12.0685 0 27.0153C0 43.1235 12.8125 56 30.0639 56C47.3153 56 62.7508 42.3156 63.9614 24.3895H56.0924C54.6295 37.8215 43.2799 48.1226 30.0639 48.1226C17.3523 48.1226 7.91952 38.7809 7.91952 27.0153C7.91952 16.4112 15.7886 7.87737 25.6754 7.87737C33.948 7.87737 40.4551 13.5329 40.4551 20.9558C40.4551 27.1163 36.0161 32.2669 30.1143 32.2669V40.1443C40.556 40.1443 48.3746 31.4085 48.3746 20.9558Z"}))),Object(Se.h)("span",{className:Me},h))};let Je=function(e){return e.Monthly="monthly",e.OneTime="once",e.Unselected="",e}({}),et=function(e){return e.CREDIT_CARD="card",e.BANK="bank",e.PAYPAL="paypal",e.VENMO="venmo",e.PAYMENT_REQUEST="pay",e.CRYPTO="crypto",e.STOCKS="stocks",e.DAF="daf",e.GIFT_CARD="gift",e}({});const tt=[et.VENMO,et.DAF,et.CRYPTO,et.STOCKS],nt=Object.values(et),ot=nt.filter((e=>e!==et.GIFT_CARD)),rt=5;var it=function(e){return e.METHOD="method",e.FREQUENCY="frequency",e.MONTHLY_TITLE="monthlyTitle",e.SUGGESTED_AMOUNTS="suggestedAmounts",e.AMOUNT="amount",e.UTM_SOURCE="utm_source",e}(it||{});const at=()=>{const e=document.createElement("style");e.innerHTML='\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format("woff2");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n ',document.head.append(e)};var ct=n("nr9d"),lt=n.n(ct);const st={methods:Object.values(ot),show:!1,addAmounts:[10,50,100],defaultFrequency:Je.OneTime,minDonationAmount:5,primaryColor:"#018669",showGiftCardOption:!1},ut={arrayMerge:(e,t)=>t},dt=Object(Se.createContext)({}),pt=({options:e,children:t})=>{const n=(e=>{var t;const n=null==(t=e.methods)?void 0:t.filter((e=>nt.includes(e))),o=(n&&n.length>0?n:ot).concat(e.showGiftCardOption?[et.GIFT_CARD]:[]);return lt.a.all([st,e,{methods:o}],ut)})(e);return Object(Se.h)(dt.Provider,{value:n},t)};var ft,ht,bt,mt,yt=0,vt=[],gt=[],_t=Se.options.__b,Ot=Se.options.__r,Ct=Se.options.diffed,jt=Se.options.__c,wt=Se.options.unmount;Se.options.__b=function(e){ht=null,_t&&_t(e)},Se.options.__r=function(e){Ot&&Ot(e),ft=0;var t=(ht=e.__c).__H;t&&(bt===ht?(t.__h=[],ht.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=gt,e.__N=e.i=void 0}))):(t.__h.forEach(g),t.__h.forEach(_),t.__h=[],ft=0)),bt=ht},Se.options.diffed=function(e){Ct&&Ct(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==vt.push(t)&&mt===Se.options.requestAnimationFrame||((mt=Se.options.requestAnimationFrame)||v)(y)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==gt&&(e.__=e.__V),e.i=void 0,e.__V=gt}))),bt=ht=null},Se.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(g),e.__h=e.__h.filter((function(e){return!e.__||_(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Se.options.__e(n,e.__v)}})),jt&&jt(e,t)},Se.options.unmount=function(e){wt&&wt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{g(e)}catch(e){t=e}})),n.__H=void 0,t&&Se.options.__e(t,n.__v))};var kt="function"==typeof requestAnimationFrame;const xt=()=>m(dt),Nt=Symbol("FundraiserFetchError"),St=Symbol("FundraiserFetching"),At=Object(Se.createContext)({fundraiser:St}),Tt=({children:e})=>{const{fundraiserSlug:t,nonprofitSlug:n}=xt(),[o,r]=u(St),i=b((async()=>{if(t)try{const e=await async function(e,t){const n=`${Pe}/${e}/fundraiser/${t}`;return(await fetch(n).then((async e=>e.json()))).data.fundraiser}(n,t);r(e)}catch(e){r(Nt)}else r(void 0)}),[n,t]);return p((()=>{i()}),[i]),Object(Se.h)(At.Provider,{value:{fundraiser:o}},e)},Et=Symbol("NonprofitFetchError"),It=Symbol("NonprofitFetching"),Lt=Object(Se.createContext)({nonprofit:It}),Mt=({children:e})=>{const{nonprofitSlug:t}=xt(),[n,o]=u(It),r=b((async()=>{try{const e=await async function(e){return(await fetch(`${Pe}/${e}`).then((async e=>e.json()))).data.nonprofit}(t);o(e)}catch(e){o(Et)}}),[t]);return p((()=>{r()}),[r]),Object(Se.h)(Lt.Provider,{value:{nonprofit:n}},e)};var Rt="https://js.stripe.com/v3",Pt=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Dt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Bt=null,Ut=function(e){return null!==Bt||(Bt=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(Dt),window.Stripe)t(window.Stripe);else try{var o=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Rt,'"]')),t=0;t element.");return o.appendChild(n),n}(e)),o.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),o.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))),Bt},Ht=Promise.resolve().then((function(){return Ut(null)})),Ft=!1;Ht.catch((function(e){Ft||console.warn(e)}));var Xt=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=xt(),[o,r]=u(n.defaultFrequency),[i,a]=u(n.defaultDonationAmount),[c,l]=u(null),[s,d]=u(n.methods[0]),[p,f]=u(),[h,b]=u(),[m,y]=u(),[v,g]=u(),_=j(),[O,C]=u();return Object(Se.h)($t.Provider,{value:{frequency:o,setFrequency:r,donationAmount:i,setDonationAmount:a,hideWidget:t,submitError:c,setSubmitError:l,selectedPaymentMethod:s,setSelectedPaymentMethod:d,stockAmount:p,setStockAmount:f,stockSymbol:h,setStockSymbol:b,cryptoAmount:m,setCryptoAmount:y,cryptoCurrency:v,setCryptoCurrency:g,paymentRequestAvailable:_,privateNote:O,setPrivateNote:C}},e)},Vt=({options:e,hide:t,children:n})=>Object(Se.h)(pt,{options:e},Object(Se.h)(zt,{hide:t},Object(Se.h)(Mt,null,Object(Se.h)(Tt,null,n))));let Wt=function(e){return e.PhoneOnly="@media only screen and (max-width: 37.44em)",e.TabletUp="@media only screen and (min-width: 37.5em)",e.TabletLandscapeUp="@media only screen and (min-width: 56.25em)",e.DesktopUp="@media only screen and (min-width: 75em)",e.BigDesktopUp="@media only screen and (min-width: 112.5em)",e}({}),Zt=function(e){return e.LightGray="#EAEDED",e.Gray="#f3f6f6",e.DarkGray="#868A8A",e.Black="#272727",e.Text="#2E3434",e.TextGray="#868383",e.TextOpaque="rgba(46, 52, 52, 0.6)",e.Error="#D95C35",e.ErrorShadow="rgba(217, 92, 53, 0.2)",e.Transparent="transparent",e.White="#fff",e}({});const Kt={fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.01em"},Yt={fontSize:"24px",lineHeight:"32px"},Qt={fontSize:"20px",lineHeight:"24px"},Jt={fontSize:"16px",lineHeight:"24px"},en={fontSize:"14px",lineHeight:"20px"};let tn=function(e){return e.Empty="0",e.XXS="4px",e.XS="8px",e.S="12px",e.M="16px",e.L="20px",e.XL="24px",e.XXL="32px",e.Stack_XXS="0 0 4px 0",e.Stack_XS="0 0 8px 0",e.Stack_S="0 0 12px 0",e.Stack_M="0 0 16px 0",e.Stack_L="0 0 20px 0",e.Stack_XL="0 0 24px 0",e.Stack_XXL="0 0 32px 0",e.Inset_XXS="4px 4px 4px 4px",e.Inset_XS="8px 8px 8px 8px",e.Inset_S="12px 12px 12px 12px",e.Inset_M="16px 16px 16px 16px",e.Inset_L="20px 20px 20px 20px",e.Inset_XL="24px 24px 24px 24px",e.Inset_XXL="32px 32px 32px 32px",e.InsetSquish_XS="8px 16px",e.InsetSquish_S="12px 24px",e.InsetSquish_M="16px 32px",e.InsetSquish_L="20px 40px",e.InsetSquish_XL="24px 48px",e.Inline_XS="0 8px 0 0",e.Inline_S="0 12px 0 0",e.Inline_M="0 16px 0 0",e.Inline_L="0 20px 0 0",e.Inline_XL="0 24px 0 0",e.Inline_XXL="0 24px 0 0",e}({});const nn=e=>({display:"flex",flexDirection:"column","> *:not(:last-child)":{marginBottom:"number"==typeof e?`${e}px`:e}}),on=e=>({display:"flex",flexDirection:"row","> *:not(:last-child)":{marginRight:"number"==typeof e?`${e}px`:e}}),rn=e=>Te()(nn(e)),an=e=>nn(e),cn=e=>on(e),ln=Te()({display:"flex",flexDirection:"column",gap:tn.M}),sn={position:"relative",top:"-1px",transform:"rotate(180deg)"},un={"> p":{marginBottom:tn.XS}},dn=Te()(w({},un,{maxHeight:"1000px",transition:"all 1s",opacity:"1"})),pn=Te()(w({},un,{opacity:"0",overflow:"hidden",maxHeight:"0",transition:"all 0.5s"})),fn=e=>Te()(w({},cn(tn.S),en,{alignItems:"center",justifyContent:"space-between",width:"100%",border:"none",background:"transparent",textAlign:"start",padding:0,":hover":{cursor:"pointer"},"> svg":w({width:"16px",height:"16px"},e?sn:{})},e?{fontWeight:700}:{fontWeight:500,color:Zt.TextGray})),hn=Te()({color:Zt.Text,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var bn,mn,yn,vn,gn,_n,On,Cn;const jn=(e,t)=>{const n=`100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${k(e)} on your behalf. \n As a legal matter, Every.org must provide any donations to ${k(e)} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`,o=t&&!function(e){return e.nonprofitId===e.creatorNonprofitId}(t);let r="";return e.hasAdmin&&o?r=`Please note ${e.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`:e.hasAdmin||o?!e.hasAdmin&&o&&(r=`Please note ${e.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`):r=`Please note ${e.name} has not provided permission for this solicitation.`,Object(Se.h)("span",null,n," ",r)},wn=Te()({backgroundColor:"white",padding:`${tn.XL} ${tn.XL} 0px`,borderRadius:"unset",overflow:"hidden",[Wt.TabletLandscapeUp]:{borderRadius:"16px",padding:tn.M}});var kn=e=>e.filter((e=>Boolean(e))).join(" ");const xn=({children:e,className:t})=>Object(Se.h)("div",{className:kn([wn,t])},e),Nn=()=>m(At).fundraiser,Sn=()=>{const e=Nn();if(e!==Nt&&e!==St)return e},An=()=>m(Lt).nonprofit,Tn=()=>{const e=An();if(e===Et||e===It)throw new Error("Nonprofit error");return e},En=()=>m($t);var In;const Ln=()=>In||(In=Object(Se.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Object(Se.h)("path",{d:"M6 9l6 6 6-6"})));var Mn,Rn;const Pn=({faqData:e})=>{var t;const[n,o]=u(!1),{nonprofitSlug:r}=xt();return null!=(t=e.hideSlugList)&&t.includes(r)?null:Object(Se.h)("div",{className:(i=e.mobileOnly,Te()(w({},en,i?{[Wt.TabletLandscapeUp]:{padding:"none"}}:{})))},Object(Se.h)("button",{type:"button",className:fn(n),onClick:()=>{o(!n)}},Object(Se.h)("span",null,e.title),Mn||(Mn=Object(Se.h)(Ln,null))),Object(Se.h)("div",{className:n?dn:pn},e.description));var i},Dn=()=>{const e=Tn(),t=Sn(),{selectedPaymentMethod:n}=En(),o=[{id:"intro",title:"How does Every.org accept my donation?",description:Object(Se.h)(Se.Fragment,null,Object(Se.h)("p",null,"Your donation is made to Every.org, a US 501(c)(3) public charity. Every.org will immediately send you a receipt by email. On a weekly basis, Every.org sends funds to ",k(e),"."),Object(Se.h)("p",null,"This process ensures your eligibility for a tax deduction, enables you to consolidate your gift records, and reduces the burden on"," ",k(e),"."))},{id:"fees",title:"Are there any fees?",description:S(n,e)},{id:"tax",title:"Is this donation tax-deductible?",description:Object(Se.h)("p",null,"Yes, ",jn(e,t))},{id:"receipt",title:"Will I receive a receipt for my donation?",description:Rn||(Rn=Object(Se.h)(Se.Fragment,null,Object(Se.h)("p",null,"Yes, after your donation payment is confirmed, you will immediately get a receipt emailed to you."),Object(Se.h)("p",null,"Additionally, if you have an Every.org account, you can always get a single itemized receipt that shows all your donations in a given year.")))},{id:"p2p",mobileOnly:!0,hideSlugList:["irc"],title:`How else can I support ${e.name}?`,description:Object(Se.h)("p",null,"You can also rally your friends, family, and social networks to support this nonprofit by starting your own fundraiser for them."," ",Object(Se.h)("a",{className:hn,href:Re+e.primarySlug+"/"+Ue},"Start a fundraiser for ",e.name))}];return Object(Se.h)(xn,null,Object(Se.h)("div",{className:ln},o.map((e=>Object(Se.h)(Pn,{key:e.id,faqData:e})))))},Bn=Te()(A({padding:`${tn.XL} ${tn.XL} 0px`,backgroundColor:"unset",display:"flex",flexDirection:"column"},en,{color:Zt.TextGray,[Wt.TabletLandscapeUp]:{padding:`0px ${tn.L}`},"> p":{margin:0},"> p:not(:last-child)":{marginBottom:tn.XS}})),Un=Te()({color:Zt.TextGray,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}});var Hn,Fn,Xn,qn;const Gn=["children"],$n=I({address:"support@every.org"}),zn=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,Gn);return Object(Se.h)("a",L({className:Un},n),t)},Vn=()=>{const e=Tn(),t=Sn();return Object(Se.h)(xn,{className:Bn},Object(Se.h)("p",null,jn(e,t)," ",Hn||(Hn=Object(Se.h)(zn,{href:He},"See Terms"))),Fn||(Fn=Object(Se.h)("p",null,"Need help? See FAQs or contact us at our"," ",Object(Se.h)(zn,{href:Fe},"Help Center"),".")),Xn||(Xn=Object(Se.h)("p",null,"Have ideas for how we can build a better donation experience?"," ",Object(Se.h)(zn,{href:$n},"Send us feedback"),".")),qn||(qn=Object(Se.h)("p",null,"We respect your privacy. To learn more, check out our"," ",Object(Se.h)(zn,{href:Xe},"Privacy Policy"),".")))},Wn=e=>Te()({color:e,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),Zn=Te()({display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}),Kn=()=>{var e;const{primaryColor:t,nonprofitSlug:n}=xt();if(null!=(e=Tn().metadata)&&e.hideFundraiseButton)return null;const o=Re+n+"/"+Ue;return Object(Se.h)(xn,{className:Zn},Object(Se.h)("p",null,Object(Se.h)("a",{className:Wn(t),href:o},"Start a fundraiser")," ","to rally your friends and family"))},Yn=Te()({display:"grid",gridGap:0,gridTemplateColumns:"1fr",gridTemplateAreas:'"header"\n "promoBanners"\n "nonprofitInfo"\n "paymentProcess"\n "fundraiserLink"\n "faq"\n "footer"',[Wt.TabletLandscapeUp]:{gridColumnGap:tn.XL,gridTemplateColumns:"1fr 2fr",gridTemplateRows:"auto auto auto auto auto 1fr",gridTemplateAreas:'"header header"\n "promoBanners promoBanners"\n "nonprofitInfo paymentProcess"\n "fundraiserLink paymentProcess"\n "faq paymentProcess"\n "faq footer"',"& > div:not(:last-child):not(:empty)":{marginBottom:tn.XL}},"& > #every-header":{gridArea:"header",display:"block",[Wt.TabletLandscapeUp]:{display:"none"}},"& > #every-promoBanners":{gridArea:"promoBanners"},"& > #every-nonprofitInfo":{gridArea:"nonprofitInfo"},"& > #every-paymentProcess":{gridArea:"paymentProcess"},"& > #every-faq":{gridArea:"faq"},"& > #every-fundraiserLink":{gridArea:"fundraiserLink"},"& > #every-footer":{gridArea:"footer"}}),Qn=({children:e})=>Object(Se.h)("div",{className:Yn},e),Jn=Te()({cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",fontFamily:Ee.BasisGrotesque}),eo=Te()({display:"block",[Wt.TabletLandscapeUp]:{display:"none"}}),to=Te()({position:"absolute",right:tn.XL,top:tn.XL,padding:tn.XXS,background:"white",borderRadius:"8px",display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}),no=()=>{const{primaryColor:e}=xt();return Object(Se.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M18 6L6 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(Se.h)("path",{d:"M6 6L18 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))};var oo;const ro=({className:e})=>{const{hideWidget:t}=En();return Object(Se.h)("button",{type:"button",className:kn([Jn,e]),onClick:t},oo||(oo=Object(Se.h)(no,null)))},io=Te()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:`${tn.M} ${tn.XL}`,[Wt.TabletLandscapeUp]:{padding:0}});var ao;const co=()=>ao||(ao=Object(Se.h)("div",{className:io},Object(Se.h)(ro,{className:eo})));let lo=function(e){return e.Small="4px",e.Default="8px",e.Medium="24px",e.Big="100px",e.Circle="100%",e}({});const so=Te()({lineHeight:"20px",fontWeight:"unset","> span":{fontWeight:700}}),uo=(Te()({lineHeight:"20px",fontWeight:"unset","> span":{fontWeight:700}}),e=>Te()({borderRadius:lo.Circle,overflow:"hidden",display:"block",backgroundImage:`url(${e})`,backgroundSize:"contain",width:"40px",height:"40px",flexShrink:0,[Wt.TabletLandscapeUp]:{width:"64px",height:"64px"}})),po=e=>kn([uo(e),Te()({width:"32px",height:"32px",flexShrink:0,[Wt.TabletLandscapeUp]:{width:"40px",height:"40px"}})]),fo=Te()({padding:`${tn.XL}`,[Wt.TabletLandscapeUp]:M({},an(tn.S),{padding:`${tn.L}`})}),ho=Te()({display:"none",overflow:"hidden",[Wt.TabletLandscapeUp]:{display:"flex",gap:`${tn.S}`,flexDirection:"column",padding:`${tn.L}`}}),bo=Te()({display:"flex",gap:`${tn.S}`,padding:`${tn.XL}`,overflow:"hidden",[Wt.TabletLandscapeUp]:{display:"none",flexDirection:"column",padding:`${tn.L}`}}),mo=Te()(M({},cn(tn.S),{alignItems:"center"})),yo=Te()({display:"flex",gap:`${tn.S}`,alignItems:"center","& > .every-embedded-fundraiser-card__nonprofit-name":{display:"none",[Wt.TabletLandscapeUp]:{display:"block"}}}),vo=Te()(M({},en,{color:"rgba(0, 0, 0, 0.7)",display:"none",[Wt.TabletLandscapeUp]:{display:"block"}})),go=e=>Te()({overflow:"hidden",overflowWrap:"anywhere",wordBreak:"break-word",textOverflow:"ellipsis",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":e,alignItems:"start"}),_o="NonprofitAvatarPlaceholder",Oo=(e,t)=>`https://res.cloudinary.com/everydotorg/image/upload/f_auto,q_auto${t?`,${function(e){var t;if(0===e.width||0===e.height)throw new Error("dimensions cannot be 0");return[`c_${null!=(t=e.fillMode)?t:"lfill"}`,e.width?`w_${Math.floor(e.width)}`:void 0,e.height?`h_${Math.floor(e.height)}`:void 0].filter((e=>void 0!==e)).join(",")}(t)}`:""}/${e}`;var Co;const jo=({fundraiser:e})=>Object(Se.h)(Se.Fragment,null,Object(Se.h)(wo,{fundraiser:e}),Object(Se.h)(ko,{fundraiser:e})),wo=({fundraiser:e})=>{const{name:t,logoCloudinaryId:n,coverImageCloudinaryId:o}=Tn(),r=Oo(null!=n?n:_o),i=o&&Oo(o,{width:320});return Object(Se.h)(xn,{className:ho},Object(Se.h)("div",{className:yo},Object(Se.h)("div",{alt:"nonprofit logo",className:po(r)}),Object(Se.h)("div",{className:"every-embedded-fundraiser-card__nonprofit-name"},Object(Se.h)("h2",{className:go(1)},t),e.creatorNonprofitId===e.nonprofitId&&(Co||(Co=Object(Se.h)("p",{className:vo},"Official fundraiser"))))),i&&Object(Se.h)("div",{className:(a=i,Te()({backgroundImage:`url(${a})`,backgroundSize:"cover",width:"calc(100% + 25px + 25px)",height:"160px",position:"relative",left:"-25px"}))}),Object(Se.h)("h1",{className:so},Object(Se.h)("span",null,e.title)),e.description&&Object(Se.h)("p",{className:kn([vo,go(3)])},e.description));var a},ko=({fundraiser:e})=>{const{logoCloudinaryId:t,coverImageCloudinaryId:n}=Tn(),o=Oo(null!=t?t:_o);n&&Oo(n);return Object(Se.h)(xn,{className:bo},Object(Se.h)("div",{className:yo},Object(Se.h)("div",{alt:"nonprofit logo",className:po(o)}),Object(Se.h)("h1",{className:so},Object(Se.h)("span",null,e.title))))};var xo;const No=()=>{const{name:e,logoCloudinaryId:t,hasAdmin:n}=Tn(),o=Oo(null!=t?t:_o);return Object(Se.h)(xn,{className:fo},Object(Se.h)("div",{className:mo},Object(Se.h)("div",{alt:"nonprofit logo",className:uo(o)}),Object(Se.h)("h1",{className:so},n?Object(Se.h)(Se.Fragment,null,Object(Se.h)("span",null,e)," is using Every.org to accept this donation"):Object(Se.h)(Se.Fragment,null,"Every.org created this page for ",Object(Se.h)("span",null,e)))),xo||(xo=Object(Se.h)("p",{className:vo},"Every.org is a 501(c)(3) nonprofit inspiring generosity and philanthropy for everyone.")))};var So;const Ao=()=>{const e=Sn();return e?Object(Se.h)(jo,{fundraiser:e}):So||(So=Object(Se.h)(No,null))};var To=1e6,Eo=1e6,Io="[big.js] ",Lo=Io+"Invalid ",Mo=Lo+"decimal places",Ro=Lo+"rounding mode",Po=Io+"Division by zero",Do={},Bo=void 0,Uo=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;Do.abs=function(){var e=new this.constructor(this);return e.s=1,e},Do.cmp=function(e){var t,n=this,o=n.c,r=(e=new n.constructor(e)).c,i=n.s,a=e.s,c=n.e,l=e.e;if(!o[0]||!r[0])return o[0]?i:r[0]?-a:0;if(i!=a)return i;if(t=i<0,c!=l)return c>l^t?1:-1;for(a=(c=o.length)<(l=r.length)?c:l,i=-1;++ir[i]^t?1:-1;return c==l?0:c>l^t?1:-1},Do.div=function(e){var t=this,n=t.constructor,o=t.c,r=(e=new n(e)).c,i=t.s==e.s?1:-1,a=n.DP;if(a!==~~a||a<0||a>To)throw Error(Mo);if(!r[0])throw Error(Po);if(!o[0])return e.s=i,e.c=[e.e=0],e;var c,l,s,u,d,p=r.slice(),f=c=r.length,h=o.length,b=o.slice(0,c),m=b.length,y=e,v=y.c=[],g=0,_=a+(y.e=t.e-e.e)+1;for(y.s=i,i=_<0?0:_,p.unshift(0);m++m?1:-1;else for(d=-1,u=0;++db[d]?1:-1;break}if(!(u<0))break;for(l=m==c?r:p;m;){if(b[--m]_&&R(y,_,n.RM,b[0]!==Bo),y},Do.eq=function(e){return 0===this.cmp(e)},Do.gt=function(e){return this.cmp(e)>0},Do.gte=function(e){return this.cmp(e)>-1},Do.lt=function(e){return this.cmp(e)<0},Do.lte=function(e){return this.cmp(e)<1},Do.minus=Do.sub=function(e){var t,n,o,r,i=this,a=i.constructor,c=i.s,l=(e=new a(e)).s;if(c!=l)return e.s=-l,i.plus(e);var s=i.c.slice(),u=i.e,d=e.c,p=e.e;if(!s[0]||!d[0])return d[0]?e.s=-l:s[0]?e=new a(i):e.s=1,e;if(c=u-p){for((r=c<0)?(c=-c,o=s):(p=u,o=d),o.reverse(),l=c;l--;)o.push(0);o.reverse()}else for(n=((r=s.length0)for(;l--;)s[t++]=0;for(l=t;n>c;){if(s[--n]0?(l=a,o=s):(t=-t,o=c),o.reverse();t--;)o.push(0);o.reverse()}for(c.length-s.length<0&&(o=s,s=c,c=o),t=s.length,n=0;t;c[t]%=10)n=(c[--t]=c[t]+s[t]+n)/10|0;for(n&&(c.unshift(n),++l),t=c.length;0===c[--t];)c.pop();return e.c=c,e.e=l,e},Do.pow=function(e){var t=this,n=new t.constructor("1"),o=n,r=e<0;if(e!==~~e||e<-1e6||e>Eo)throw Error(Lo+"exponent");for(r&&(e=-e);1&e&&(o=o.times(t)),e>>=1;)t=t.times(t);return r?n.div(o):o},Do.prec=function(e,t){if(e!==~~e||e<1||e>To)throw Error(Lo+"precision");return R(new this.constructor(this),e,t)},Do.round=function(e,t){if(e===Bo)e=0;else if(e!==~~e||e<-To||e>To)throw Error(Mo);return R(new this.constructor(this),e+this.e+1,t)},Do.sqrt=function(){var e,t,n,o=this,r=o.constructor,i=o.s,a=o.e,c=new r("0.5");if(!o.c[0])return new r(o);if(i<0)throw Error(Io+"No square root");0===(i=Math.sqrt(o+""))||i===1/0?((t=o.c.join("")).length+a&1||(t+="0"),a=((a+1)/2|0)-(a<0||1&a),e=new r(((i=Math.sqrt(t))==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+a)):e=new r(i+""),a=e.e+(r.DP+=4);do{e=c.times((n=e).plus(o.div(n)))}while(n.c.slice(0,a).join("")!==e.c.slice(0,a).join(""));return R(e,(r.DP-=4)+e.e+1,r.RM)},Do.times=Do.mul=function(e){var t,n=this,o=n.c,r=(e=new(0,n.constructor)(e)).c,i=o.length,a=r.length,c=n.e,l=e.e;if(e.s=n.s==e.s?1:-1,!o[0]||!r[0])return e.c=[e.e=0],e;for(e.e=c+l,ic;)a=t[l]+r[c]*o[l-c-1]+a,t[l--]=a%10,a=a/10|0;t[l]=a}for(a?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},Do.toExponential=function(e,t){var n=this,o=n.c[0];if(e!==Bo){if(e!==~~e||e<0||e>To)throw Error(Mo);for(n=R(new n.constructor(n),++e,t);n.c.lengthTo)throw Error(Mo);for(e=e+(n=R(new n.constructor(n),e+n.e+1,t)).e+1;n.c.length=t.PE,!!e.c[0])},Do.toNumber=function(){var e=Number(P(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(Io+"Imprecise conversion");return e},Do.toPrecision=function(e,t){var n=this,o=n.constructor,r=n.c[0];if(e!==Bo){if(e!==~~e||e<1||e>To)throw Error(Lo+"precision");for(n=R(new o(n),e,t);n.c.length=o.PE,!!r)},Do.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(Io+"valueOf disallowed");return P(e,e.e<=t.NE||e.e>=t.PE,!0)};var Ho=function e(){function t(n){var o=this;if(!(o instanceof t))return n===Bo?e():new t(n);if(n instanceof t)o.s=n.s,o.e=n.e,o.c=n.c.slice();else{if("string"!=typeof n){if(!0===t.strict&&"bigint"!=typeof n)throw TypeError(Lo+"value");n=0===n&&1/n<0?"-0":String(n)}!function(e,t){var n,o,r;if(!Uo.test(t))throw Error(Lo+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(o=t.search(/e/i))>0?(n<0&&(n=o),n+=+t.slice(o+1),t=t.substring(0,o)):n<0&&(n=t.length);for(r=t.length,o=0;o0&&"0"==t.charAt(--r););for(e.e=n-o-1,e.c=[],n=0;o<=r;)e.c[n++]=+t.charAt(o++)}}(o,n)}o.constructor=t}return t.prototype=Do,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=false,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),Fo=n("kPAj");let Xo=function(e){return e.Normal="1px solid",e.Big="4px solid",e}({});const qo=(e,t)=>`${e} ${t}`,Go=(Te()({border:qo(Xo.Normal,Zt.Error)}),e=>Te()({position:"relative",padding:tn.M,display:"flex",flexDirection:"row",alignItems:"center",borderRadius:lo.Default,color:Zt.Text,backgroundColor:Zt.Gray,border:qo(Xo.Normal,Zt.LightGray),cursor:"text",":focus-within":{backgroundColor:"white",borderColor:e}})),$o=Te()({fontSize:Jt.fontSize,lineHeight:Jt.fontSize,fontFamily:"inherit",flex:1,border:"none",outline:"none",background:"transparent",width:"100%",minWidth:"unset",padding:0,margin:0,"::placeholder":{fontWeight:400},"::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield"}),zo=Te()({maxHeight:"250px","& input":{fontSize:Jt.fontSize,lineHeight:Jt.fontSize,fontWeight:400}}),Vo=Te()({background:Zt.White,borderRadius:`0 0 ${lo.Default} ${lo.Default}`,border:qo(Xo.Normal,Zt.LightGray),borderTop:"none"}),Wo=Te()({display:"flex",alignItems:"center",gap:tn.XXS}),Zo=Te()({overflowY:"scroll",height:"100%",maxHeight:"200px"}),Ko=Te()({borderBottom:qo(Xo.Normal,Zt.LightGray)}),Yo=Te()(D({border:"none",background:"none",padding:`${tn.S} ${tn.M}`},Jt,{width:"100%",display:"flex",alignItems:"center",gap:tn.XS,":hover":{cursor:"pointer"},"> span:last-of-type":D({marginLeft:"auto"},en,{color:Zt.TextGray})})),Qo=(e,t)=>Te()(D({marginLeft:"auto"},en,{color:Zt.TextGray,display:"flex",gap:tn.XS,alignItems:"center","> svg":D({color:e},t?sn:{})})),Jo=Te()({borderRadius:`${lo.Default} ${lo.Default} 0 0 `}),er=e=>kn([Go(e)]),tr=Te()({display:"flex",width:"100%",gap:tn.S,alignItems:"flex-end",fontWeight:500}),nr=Te()({display:"flex",flexDirection:"column",width:"100%",gap:tn.XXS,"> input":D({width:"100%",textAlign:"right",fontWeight:700},Yt),textAlign:"right"}),or=Te()({gap:tn.XXS,display:"flex",flexDirection:"column"}),rr=Te()(D({},Kt,{outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",padding:tn.XXS,transform:"rotate(90deg)",color:Zt.TextGray,"> svg":{strokeWidth:"2px"}})),ir=Te()({border:qo(Xo.Normal,Zt.Error)}),ar=Te()({fontSize:Yt.fontSize,lineHeight:Yt.fontSize,fontWeight:700}),cr=Te()(B({},Yt,{fontWeight:700,display:"inline-flex",marginRight:tn.XXS})),lr=e=>Te()(B({},Qt,{fontWeight:700,color:e,display:"inline-flex",marginLeft:tn.XXS})),sr=Te()(B({},cn(tn.M),{justifyContent:"center"})),ur=e=>Te()(B({},Jt,{color:e,borderRadius:lo.Big,fontWeight:500,border:"none",padding:0,fontFamily:"inherit",cursor:"pointer",background:"unset",[Wt.TabletLandscapeUp]:{border:`1px solid ${Zt.DarkGray}`,padding:`${tn.XS} ${tn.L}`}}));(F.prototype=new Se.Component).isPureReactComponent=!0,F.prototype.shouldComponentUpdate=function(e,t){return H(this.props,e)||H(this.state,t)};var dr=Se.options.__b;Se.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),dr&&dr(e)};var pr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,fr=Se.options.__e;Se.options.__e=function(e,t,n,o){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);fr(e,t,n,o)};var hr=Se.options.unmount;Se.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),hr&&hr(e)},($.prototype=new Se.Component).__c=function(e,t){var n=t.__c,o=this;null==o.t&&(o.t=[]),o.t.push(n);var r=z(o.__v),i=!1,a=function(){i||(i=!0,n.__R=null,r?r(c):c())};n.__R=a;var c=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=G(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.t.pop();)t.forceUpdate()}},l=!0===t.__h;o.__u++||l||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},$.prototype.componentWillUnmount=function(){this.t=[]},$.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=q(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&Object(Se.createElement)(Se.Fragment,null,e.fallback);return r&&(r.__h=null),[Object(Se.createElement)(Se.Fragment,null,t.__a?null:e.children),r]};var br=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]{const n=f(),{primaryColor:o}=xt(),{containerClassName:r,inputClassName:i}=e,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,Nr);return Object(Se.h)("div",{className:kn([Go(o),r]),onClick:()=>{var e;null==(e=n.current)||e.focus()}},Object(Se.h)("textarea",Y({ref:e=>{e&&(n.current=e,t&&(t.current=e))},className:kn([$o,i])},a)))}));const Ar=["sufix","sufixClassName","prefix","prefixClassName","containerClassName","inputClassName","containerOnClick"];var Tr=X(((e,t)=>{const{sufix:n,sufixClassName:o,prefix:r,prefixClassName:i,containerClassName:a,inputClassName:c,containerOnClick:l}=e,s=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,Ar),u=f(),{primaryColor:d}=xt();return Object(Se.h)("div",{className:kn([Go(d),a]),onClick:()=>{var e;l?l():null==(e=u.current)||e.focus()}},r&&Object(Se.h)("div",{className:i},r),Object(Se.h)("input",Q({ref:e=>{e&&(u.current=e,t&&(t.current=e))},className:kn([$o,c])},s)),n&&Object(Se.h)("div",{className:o},n))})),Er=n.p+"58f20393bf2b41f944c6229c2af785b9.svg",Ir=n.p+"5982461fe2304c26f3a3cf4c50806dad.svg",Lr=n.p+"b31a89ce5555412a0c8a4c6463286584.svg",Mr=n.p+"26c9b1d3d7943e6e67cf13e039ba5ac8.svg",Rr=n.p+"ddb1f3b63e33585263e5905706d6ff6d.svg",Pr=n.p+"ad80427b5a2980f1d19884ede42b29de.svg",Dr=n.p+"9052c75387065f76bb3436b7e4ce12cd.svg",Br=n.p+"3a5177b76709819ba4663556e60222f8.svg",Ur=n.p+"f8f4253f02d1fbc4bf04d0959a6e614c.svg",Hr=n.p+"4d81ee51fa2520df58ae092aeb3d0bd4.svg",Fr=n.p+"8098252f28e93069c75d6010d3ac6bc1.svg",Xr=n.p+"03c114f6e014588a4bde815d9bc85821.svg",qr=n.p+"5450d3cada4fd0370ab8d885765f5cc3.svg",Gr=n.p+"cc9ce389e9a4e0f518e3caeb7b60912d.svg",$r=n.p+"8f22b294629293d29895fddef0a8baea.svg",zr=n.p+"f588feb3cbbcc0fb259a3630ec7e34ba.svg",Vr=n.p+"3e1eb932bdbaa2318584813bf468be53.svg",Wr=n.p+"badb98080214485db486794fb59a95cc.svg",Zr=n.p+"fc9295a4651c56d5b4e8c3aa13a93208.svg",Kr=n.p+"e4bfa8eb04696d4fd5ea04ca4c35469b.svg",Yr=n.p+"743324f8e09d34a894c21e91c396f289.svg",Qr=n.p+"b9021bb757262a32de6d8931015051d9.svg",Jr=n.p+"7ab9396038b4befda4354b2a476d9064.svg",ei=n.p+"bc2c9e9d67b73656a6da5dd177aa10a2.svg",ti=n.p+"6214ae0b42d798a0c9a51503a27a66bf.svg",ni=n.p+"45bcde5a98dbbdf2a4e0769eca2154f1.svg",oi=n.p+"8798fcc6fd2d5d3aeccea6ee3fcfec89.svg",ri=n.p+"88611c6e2f9450f29ece8d2b36641670.svg";let ii=function(e){return e.AAVE="AAVE",e.ALCX="ALCX",e.ALGO="ALGO",e.AMP="AMP",e.ANKR="ANKR",e.APE="APE",e.API3="API3",e.AUDIO="AUDIO",e.AVAX="AVAX",e.AXS="AXS",e.BAT="BAT",e.BCH="BCH",e.BNB="BNB",e.BNT="BNT",e.BOND="BOND",e.BTC="BTC",e.CHZ="CHZ",e.COMP="COMP",e.CRV="CRV",e.CUBE="CUBE",e.CVC="CVC",e.DAI="DAI",e.DOGE="DOGE",e.DOT="DOT",e.ELON="ELON",e.ENS="ENS",e.ETH="ETH",e.FET="FET",e.FIL="FIL",e.FTM="FTM",e.GAL="GAL",e.GALA="GALA",e.GMT="GMT",e.GRT="GRT",e.GUSD="GUSD",e.INJ="INJ",e.JAM="JAM",e.KNC="KNC",e.KP3R="KP3R",e.LDO="LDO",e.LINK="LINK",e.LPT="LPT",e.LRC="LRC",e.LTC="LTC",e.MANA="MANA",e.MASK="MASK",e.MATIC="MATIC",e.MCO2="MCO2",e.MKR="MKR",e.MOB="MOB",e.NMR="NMR",e.OXT="OXT",e.PAXG="PAXG",e.QNT="QNT",e.QRDO="QRDO",e.RAY="RAY",e.REN="REN",e.RNDR="RNDR",e.SAMO="SAMO",e.SAND="SAND",e.SBR="SBR",e.SHIB="SHIB",e.SKL="SKL",e.SLP="SLP",e.SNX="SNX",e.SOL="SOL",e.STORJ="STORJ",e.SUSHI="SUSHI",e.UMA="UMA",e.UNI="UNI",e.USDC="USDC",e.USDT="USDT",e.XLM="XLM",e.XRP="XRP",e.XTZ="XTZ",e.YFI="YFI",e.ZBC="ZBC",e.ZEC="ZEC",e.ZRX="ZRX",e}({}),ai=function(e){return e.ERC20="ERC-20",e.SPL="SPL",e}({});const ci=[ii.ALGO,ii.MOB,ii.XLM,ii.BNB],li={[ii.AAVE]:{displayName:"Aave",abbreviation:"AAVE",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"aave"},[ii.ALCX]:{displayName:"Alchemix",abbreviation:"ALCX",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"alchemix"},[ii.ALGO]:{displayName:"Algorand",abbreviation:"ALGO",decimalOffset:6,coingeckoId:"algorand"},[ii.AMP]:{displayName:"Amp",abbreviation:"AMP",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"amp-token"},[ii.ANKR]:{displayName:"Ankr",abbreviation:"ANKR",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"ankr"},[ii.APE]:{displayName:"Apecoin",abbreviation:"APE",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"apecoin"},[ii.API3]:{displayName:"API3",abbreviation:"API3",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"api3"},[ii.AUDIO]:{displayName:"Audius",abbreviation:"AUDIO",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"audius"},[ii.AVAX]:{displayName:"Avalanche",abbreviation:"AVAX",decimalOffset:9,coingeckoId:"avalanche-2"},[ii.AXS]:{displayName:"Axie Infinity",abbreviation:"AXS",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"axs"},[ii.BAT]:{displayName:"Basic Attention Token",abbreviation:"BAT",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"basic-attention-token"},[ii.BCH]:{displayName:"Bitcoin Cash",abbreviation:"BCH",decimalOffset:8,coingeckoId:"bitcoin-cash"},[ii.BNB]:{displayName:"Binance Coin",abbreviation:"BNB",decimalOffset:8,coingeckoId:"binancecoin"},[ii.BNT]:{displayName:"Bancor",abbreviation:"BNT",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"bancor"},[ii.BOND]:{displayName:"BarnBridge",abbreviation:"BOND",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"barnbridge"},[ii.BTC]:{displayName:"Bitcoin",abbreviation:"BTC",decimalOffset:8,coingeckoId:"bitcoin"},[ii.CHZ]:{displayName:"Chiliz",abbreviation:"CHZ",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"chiliz"},[ii.COMP]:{displayName:"Compound",abbreviation:"COMP",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"compound-governance-token"},[ii.CRV]:{displayName:"Curve DAO Token",abbreviation:"CRV",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"curve-dao-token"},[ii.CUBE]:{displayName:"Cube",abbreviation:"CUBE",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"somnium-space-cubes"},[ii.CVC]:{displayName:"Civic",abbreviation:"CVC",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"civic"},[ii.DAI]:{displayName:"Dai",abbreviation:"DAI",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"dai"},[ii.DOGE]:{displayName:"DogeCoin",abbreviation:"DOGE",decimalOffset:8,coingeckoId:"dogecoin"},[ii.DOT]:{displayName:"Polkadot",abbreviation:"DOT",decimalOffset:10,coingeckoId:"polkadot"},[ii.ELON]:{displayName:"Dogelon Mars",abbreviation:"ELON",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"dogelon-mars"},[ii.ENS]:{displayName:"Ethereum Name Service",abbreviation:"ENS",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"ethereum-name-service"},[ii.ETH]:{displayName:"Ethereum",abbreviation:"ETH",decimalOffset:18,coingeckoId:"ethereum"},[ii.FET]:{displayName:"Fetch.ai",abbreviation:"FET",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"fetch-ai"},[ii.FIL]:{displayName:"Filecoin",abbreviation:"FIL",decimalOffset:18,coingeckoId:"filecoin"},[ii.FTM]:{displayName:"Fantom",abbreviation:"FTM",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"fantom"},[ii.GAL]:{displayName:"Galaxe",abbreviation:"GAL",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"project-galaxy"},[ii.GALA]:{displayName:"Gala",abbreviation:"GALA",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"gala"},[ii.GMT]:{displayName:"STEPN",abbreviation:"GMT",contractType:ai.SPL,decimalOffset:9,coingeckoId:"stepn"},[ii.GRT]:{displayName:"The Graph",abbreviation:"GRT",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"the-graph"},[ii.GUSD]:{displayName:"Gemini Dollar",abbreviation:"GUSD",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"gemini-dollar"},[ii.INJ]:{displayName:"Injective Protocol",abbreviation:"INJ",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"injective-protocol"},[ii.JAM]:{displayName:"Geojam",abbreviation:"JAM",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"geojam"},[ii.KNC]:{displayName:"Kyber types.Network",abbreviation:"KNC",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"kyber-network-crystal"},[ii.KP3R]:{displayName:"Keep3rV1",abbreviation:"KP3R",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"keep3rv1"},[ii.LDO]:{displayName:"Lido DAO",abbreviation:"LDO",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"lido-dao"},[ii.LINK]:{displayName:"Chainlink",abbreviation:"LINK",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"chainlink"},[ii.LPT]:{displayName:"Livepeer",abbreviation:"LPT",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"livepeer"},[ii.LRC]:{displayName:"Loopring",abbreviation:"LRC",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"loopring"},[ii.LTC]:{displayName:"Litecoin",abbreviation:"LTC",decimalOffset:8,coingeckoId:"litecoin"},[ii.MANA]:{displayName:"Mana",abbreviation:"MANA",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"decentraland"},[ii.MASK]:{displayName:"Mask Network",abbreviation:"MASK",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"mask-network"},[ii.MATIC]:{displayName:"Polygon",abbreviation:"MATIC",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"matic-network"},[ii.MCO2]:{displayName:"Moss Carbon Credit",abbreviation:"MCO2",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"moss-carbon-credit"},[ii.MKR]:{displayName:"Maker",abbreviation:"MKR",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"maker"},[ii.MOB]:{displayName:"MobileCoin",abbreviation:"MOB",decimalOffset:12,coingeckoId:"mobilecoin"},[ii.NMR]:{displayName:"Numeraire",abbreviation:"NMR",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"numeraire"},[ii.OXT]:{displayName:"Orchid",abbreviation:"OXT",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"orchid-protocol"},[ii.PAXG]:{displayName:"PAX Gold",abbreviation:"PAXG",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"pax-gold"},[ii.QNT]:{displayName:"Quant",abbreviation:"QNT",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"quant-network"},[ii.QRDO]:{displayName:"Qredo",abbreviation:"QRDO",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"qredo"},[ii.RAY]:{displayName:"Raydium",abbreviation:"RAY",decimalOffset:6,contractType:ai.SPL,coingeckoId:"raydium"},[ii.REN]:{displayName:"Ren",abbreviation:"REN",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"republic-protocol"},[ii.RNDR]:{displayName:"Render Token",abbreviation:"RNDR",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"render-token"},[ii.SAMO]:{displayName:"Samoyed",abbreviation:"SAMO",decimalOffset:9,contractType:ai.SPL,coingeckoId:"samoyedcoin"},[ii.SAND]:{displayName:"Sandbox",abbreviation:"SAND",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"the-sandbox"},[ii.SBR]:{displayName:"Saber",abbreviation:"SBR",decimalOffset:6,contractType:ai.SPL,coingeckoId:"saber"},[ii.SHIB]:{displayName:"Shiba Inu",abbreviation:"SHIB",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"shiba-inu"},[ii.SKL]:{displayName:"Skale",abbreviation:"SKL",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"skale"},[ii.SLP]:{displayName:"Smooth Love Potion",abbreviation:"SLP",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"smooth-love-potion"},[ii.SNX]:{displayName:"Synthetix",abbreviation:"SNX",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"havven"},[ii.SOL]:{displayName:"Solana",abbreviation:"SOL",decimalOffset:9,coingeckoId:"solana"},[ii.STORJ]:{displayName:"Storj",abbreviation:"STORJ",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"storj"},[ii.SUSHI]:{displayName:"SushiSwap",abbreviation:"SUSHI",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"sushi"},[ii.UMA]:{displayName:"UMA",abbreviation:"UMA",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"uma"},[ii.UNI]:{displayName:"Uniswap",abbreviation:"UNI",decimalOffset:18,contractType:ai.ERC20,coingeckoId:"uniswap"},[ii.USDC]:{displayName:"USD Coin",abbreviation:"USDC",decimalOffset:6,contractType:ai.ERC20,coingeckoId:"usd-coin"},[ii.USDT]:{displayName:"Tether",abbreviation:"USDT",decimalOffset:6,coingeckoId:"tether"},[ii.XLM]:{displayName:"Stellar",abbreviation:"XLM",decimalOffset:7,coingeckoId:"stellar"},[ii.XRP]:{displayName:"XRP",abbreviation:"XRP",decimalOffset:6,coingeckoId:"ripple"},[ii.XTZ]:{displayName:"Tezos",abbreviation:"XTZ",decimalOffset:6,coingeckoId:"tezos"},[ii.YFI]:{displayName:"Yearn Finance",abbreviation:"YFI",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"yearn-finance"},[ii.ZBC]:{displayName:"Zebec Protocol",abbreviation:"ZBC",contractType:ai.SPL,decimalOffset:9,coingeckoId:"zebec-protocol"},[ii.ZEC]:{displayName:"ZCash",abbreviation:"ZEC",decimalOffset:8,coingeckoId:"zcash"},[ii.ZRX]:{displayName:"0x",abbreviation:"ZRX",contractType:ai.ERC20,decimalOffset:18,coingeckoId:"0x"}},si={[ii.AAVE]:{iconCloudinaryId:"crypto/aave_oszkzj"},[ii.ALCX]:{iconCloudinaryId:"crypto/alcx_agfvh3"},[ii.AMP]:{iconCloudinaryId:"crypto/amp_zrgutx"},[ii.ANKR]:{iconCloudinaryId:"crypto/ankr_vipelu"},[ii.ALGO]:{icon:Er},[ii.APE]:{icon:Ir},[ii.AVAX]:{icon:Lr},[ii.AXS]:{iconCloudinaryId:"crypto/axs_vdwbc0"},[ii.BAT]:{icon:Mr},[ii.BCH]:{icon:Pr},[ii.BNB]:{icon:Rr},[ii.BTC]:{icon:Dr},[ii.CHZ]:{iconCloudinaryId:"crypto/chiliz_j11blm"},[ii.DAI]:{icon:Ur},[ii.DOGE]:{icon:Hr},[ii.DOT]:{icon:zr},[ii.ETH]:{icon:Fr},[ii.FIL]:{icon:Xr},[ii.GRT]:{icon:qr},[ii.LINK]:{icon:Br},[ii.LTC]:{icon:Gr},[ii.MATIC]:{icon:Vr},[ii.MOB]:{icon:$r},[ii.RAY]:{icon:Wr},[ii.SAMO]:{icon:Kr},[ii.SBR]:{icon:Zr},[ii.SHIB]:{icon:Yr},[ii.SLP]:{iconCloudinaryId:"crypto/slp_clp71c"},[ii.SOL]:{icon:Qr},[ii.UNI]:{icon:ni},[ii.USDC]:{icon:oi},[ii.USDT]:{icon:ei},[ii.XLM]:{icon:Jr},[ii.XRP]:{iconCloudinaryId:"crypto/xrp_uwcehg"},[ii.XTZ]:{icon:ti},[ii.ZEC]:{icon:ri},[ii.API3]:{iconCloudinaryId:"crypto/xb8xoz6kxev0uytaejlo"},[ii.AUDIO]:{iconCloudinaryId:"crypto/ucctvvgwedku9hexplp7"},[ii.BNT]:{iconCloudinaryId:"crypto/jgb6ub5gckohghdrt1ig"},[ii.BOND]:{iconCloudinaryId:"crypto/cidlkxmdqdoi2ezygfjj"},[ii.COMP]:{iconCloudinaryId:"crypto/ayjushqknohuz9x3hcx5"},[ii.CRV]:{iconCloudinaryId:"crypto/txyb4aa9a0skuhoyjcti"},[ii.CUBE]:{iconCloudinaryId:"crypto/n8su92fe1atqx79hrhqf"},[ii.CVC]:{iconCloudinaryId:"crypto/cw8ahifxtnfw8pbgh5o9"},[ii.ELON]:{iconCloudinaryId:"crypto/fvsarijyyz1v9j5w1sh2"},[ii.ENS]:{iconCloudinaryId:"crypto/naiw9tgamtvxcxctwxog"},[ii.FET]:{iconCloudinaryId:"crypto/mwfznnuw28qqeia4uwov"},[ii.FTM]:{iconCloudinaryId:"crypto/laq3m7el5wdfmlhwwtk0"},[ii.GAL]:{iconCloudinaryId:"crypto/a5km5rat7dpiz6ckkvfi"},[ii.GALA]:{iconCloudinaryId:"crypto/rifljrw1ry9wu1i7mxji"},[ii.GMT]:{iconCloudinaryId:"crypto/uyyddnskoabbpei7olin"},[ii.GUSD]:{iconCloudinaryId:"crypto/w8zltgl5ngsz1lqch17g"},[ii.INJ]:{iconCloudinaryId:"crypto/gi0voz42gn33azwaa11a"},[ii.JAM]:{iconCloudinaryId:"crypto/xmn1xxzccz84xiej1esw"},[ii.KNC]:{iconCloudinaryId:"crypto/mqdyhpc07mle6dkfomye"},[ii.KP3R]:{iconCloudinaryId:"crypto/eoabgtxyhpqqfhv1bxud"},[ii.LDO]:{iconCloudinaryId:"crypto/thmvnuxks9z3gthhypwb"},[ii.LPT]:{iconCloudinaryId:"crypto/setl154mkwd9kpfly7om"},[ii.LRC]:{iconCloudinaryId:"crypto/sazpx9zyfsgbmprmfag9"},[ii.MANA]:{iconCloudinaryId:"crypto/ekefdi1p3jgoeb08oszc"},[ii.MASK]:{iconCloudinaryId:"crypto/ykwym7djaofb2q6lcn5n"},[ii.MCO2]:{iconCloudinaryId:"crypto/ysuyysfrukryu1jw2wrh"},[ii.MKR]:{iconCloudinaryId:"crypto/tpdipvaap6m150j2hdec"},[ii.NMR]:{iconCloudinaryId:"crypto/bqecgq3rawel0k99tohj"},[ii.OXT]:{iconCloudinaryId:"crypto/ietkmjcp0yj71vlg0zjy"},[ii.PAXG]:{iconCloudinaryId:"crypto/yb5x1aizhhdn8mprrn2m"},[ii.QNT]:{iconCloudinaryId:"crypto/dwdx02ifn9fsvbw1pgfz"},[ii.QRDO]:{iconCloudinaryId:"crypto/jzbmlpvwoogroaaazkxz"},[ii.REN]:{iconCloudinaryId:"crypto/ili8nkjwnifmbfra20ly"},[ii.RNDR]:{iconCloudinaryId:"crypto/tm0klwno0hqjbcxsuvrp"},[ii.SAND]:{iconCloudinaryId:"crypto/w6g6ep4ghqpsz54vqzmy"},[ii.SKL]:{iconCloudinaryId:"crypto/zccvwa5yin8r32s4sfqy"},[ii.SNX]:{iconCloudinaryId:"crypto/sxvudvsjujuhdupwssvz"},[ii.STORJ]:{iconCloudinaryId:"crypto/le1ikh3apsrxyttjxg64"},[ii.SUSHI]:{iconCloudinaryId:"crypto/iivxx5mfdz1bckmhom1f"},[ii.UMA]:{iconCloudinaryId:"crypto/imxydvsf4mydmyjukbel"},[ii.YFI]:{iconCloudinaryId:"crypto/mal5muwn4fcsbuuyhohz"},[ii.ZBC]:{iconCloudinaryId:"crypto/hhiopvuac8qbpcnupgle"},[ii.ZRX]:{iconCloudinaryId:"crypto/ge5jqonw89ffg200z0in"}},ui=Object.fromEntries(Object.values(ii).map((e=>[e,J({},li[e],si[e])]))),di=({currency:e})=>Object(Se.h)("img",{src:ee(e),alt:e+"_icon",width:24,height:24});var pi;const fi=()=>pi||(pi=Object(Se.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-search"},Object(Se.h)("circle",{cx:"11",cy:"11",r:"8"}),Object(Se.h)("path",{d:"M21 21l-4.35-4.35"})));var hi,bi,mi;const yi=new Set([ii.BTC,ii.ETH,ii.USDC]),vi=[],gi=[],_i=[];Object.values(ii).forEach((e=>{const t={value:n=e,label:te(n),contractType:ne(n)};var n;ci.includes(e)||(vi.push(t),yi.has(e)?gi.push(t):_i.push(t))}));const Oi=({onClick:e,option:t})=>Object(Se.h)("li",{key:t.value,role:"option"},Object(Se.h)("button",{type:"button",className:Yo,onClick:()=>{e(t)}},Object(Se.h)(di,{currency:t.value}),Object(Se.h)("span",null,t.label),Object(Se.h)("span",null,t.contractType))),Ci=()=>{const e=Tn(),{primaryColor:t}=xt(),n=`Contents: I would like to make a crypto donation to support https://www.every.org/${e.primarySlug}.\n\nMy name:\nToken name:\nToken symbol:\nToken quantity:\n\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;return Object(Se.h)("a",{className:Wn(t),href:I({address:Be,subject:`Crypto donation for ${e.name}`,body:n})},Be)},ji=()=>{const{submitError:e,cryptoCurrency:t,setCryptoCurrency:n}=En(),{primaryColor:o}=xt(),r=f(null),[i,a]=u(vi.find((e=>e.value===t))),[c,l]=u(null==i?void 0:i.label),[s,d]=u(!i),p=e=>{a(e),n(e.value),l(e.label),d(!1)},h=()=>{a(void 0),n(void 0),d(!0),l("")},b=kn([Wo,...e?[ir]:[],...s?[Jo]:[]]),m=e=>Object(Se.h)(Oi,{option:e,onClick:p}),y=c?Object(Fo.filter)(c,vi,{extract:e=>{const t=li[e.value];return[t.displayName,t.abbreviation].join(" ")}}).map((e=>e.original)):void 0;return Object(Se.h)("div",{className:zo},Object(Se.h)(Tr,{ref:r,inputClassName:ar,containerOnClick:()=>{var e;null==(e=r.current)||e.focus(),h()},value:c,prefix:i?Object(Se.h)(di,{currency:i.value}):hi||(hi=Object(Se.h)(fi,null)),prefixClassName:Te()({display:"inline-flex"}),sufixClassName:Qo(o,s),containerClassName:b,sufix:Object(Se.h)(Se.Fragment,null,Object(Se.h)("span",null,null==i?void 0:i.contractType)," ",bi||(bi=Object(Se.h)(Ln,null))),onInput:e=>{l(e.currentTarget.value),a(void 0),n(void 0),d(!0)},onFocus:h}),s&&Object(Se.h)("div",{className:Vo},Object(Se.h)("div",{className:Zo},y?0===y.length?Object(Se.h)("div",{className:Te()({padding:"20px"})},"We don't currently support this coin on our site, but for donations worth over $5,000 USD we can do it manually. Please email ",mi||(mi=Object(Se.h)(Ci,null))," to arrange."):Object(Se.h)("ul",null,y.map((e=>m(e)))):Object(Se.h)(Se.Fragment,null,Object(Se.h)("ul",{className:Ko},gi.map((e=>m(e)))),Object(Se.h)("ul",null,_i.map((e=>m(e))))))))},wi="data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A",ki=Te()({display:"inline-block",verticalAlign:"middle",maskImage:`url("${wi}")`,"-webkit-mask-image":`url("${wi}")`,"-webkit-mask-size":"cover",maskSize:"cover"}),xi=({size:e=72,color:t=Zt.LightGray})=>{return Object(Se.h)("svg",{width:e,height:e,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:ki},Object(Se.h)("path",{className:(n=t,Te()({fill:n})),d:"M51.147 28.97C51.147 17.614 41.667 9 29.493 9C15.875 9 5 20.5 5 34.744C5 50.094 17.223 62.365 33.68 62.365C50.137 62.365 64.862 49.325 66.017 32.242H58.51C57.114 45.042 46.287 54.859 33.68 54.859C21.553 54.859 12.555 45.956 12.555 34.744C12.555 24.639 20.062 16.507 29.493 16.507C37.385 16.507 43.593 21.897 43.593 28.97C43.593 34.84 39.358 39.749 33.728 39.749V47.256C43.688 47.256 51.148 38.931 51.148 28.97"}));var n};var Ni;const Si=({})=>Ni||(Ni=Object(Se.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-repeat"},Object(Se.h)("path",{d:"M17 1l4 4-4 4"}),Object(Se.h)("path",{d:"M3 11V9a4 4 0 014-4h14M7 23l-4-4 4-4"}),Object(Se.h)("path",{d:"M21 13v2a4 4 0 01-4 4H3"})));var Ai,Ti;const Ei=({cryptoTokenLoading:e,cryptoTokenRate:t})=>{const[n,o]=u(""),{cryptoAmount:r,setCryptoAmount:i,cryptoCurrency:a,submitError:c}=En(),{primaryColor:l}=xt(),s=kn([er(l),...c?[ir]:[]]),[d,h]=u(void 0),[m,y]=u(!0),v=f(null);p((()=>{a&&v&&v.current&&v.current.focus()}),[a]);const g=b((e=>{const n=e&&""!==e?new Ho(e):void 0;if(m){var r,a;o(null!=(r=null==n?void 0:n.toString())?r:""),i(null!=(a=null==n?void 0:n.toNumber())?a:0)}else{const e=n&&t?n.div(t).round(7):new Ho(0);o(e.toString()),i(e.toNumber())}}),[i,m,t]),_=t&&r&&new Ho(r).times(t).round(2).toString();p((()=>{if(!d)return;const e=setTimeout((()=>{h(void 0)}),1e3);return()=>{clearTimeout(e)}}),[d]);const O=b((e=>{if(h(void 0),""===e)return g(""),!1;h(void 0);try{const t=new Ho(e);if(t.lt(0))return!1;if(t.gt(Number.MAX_SAFE_INTEGER))return h("Amount is too large"),!1}catch(e){return!1}return g(e),!0}),[g]),C=0===t;return Object(Se.h)("div",{className:s},Object(Se.h)("div",{className:tr},Object(Se.h)("div",{className:nr},Object(Se.h)("input",{ref:v,className:$o,value:m?n:null!=_?_:"",type:"text",pattern:"[+-]?(\\d*\\.)?\\d+",name:"donateAmountInput",id:"donateAmountInput",inputMode:"decimal",onChange:e=>O(e.currentTarget.value)}),!C&&Object(Se.h)("div",{className:Te()({color:Zt.TextGray})},null===t&&e?Ai||(Ai=Object(Se.h)(xi,{size:16})):m?oe(null!=_?_:0,"USD",{showCurrency:!1}):null!=r?r:0)),Object(Se.h)("div",{className:or},Object(Se.h)("div",null,m?a:"USD"),!C&&Object(Se.h)("div",{className:Te()({color:Zt.TextGray})},m?"USD":a,"*"))),!C&&Object(Se.h)("button",{className:rr,type:"button",disabled:void 0===t,onClick:()=>{y(!m)}},Ti||(Ti=Object(Se.h)(Si,null))))};var Ii;const Li=()=>Ii||(Ii=Object(Se.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M14.9384 5.2052C15.6282 4.34238 16.0964 3.18386 15.9729 2C14.9631 2.05021 13.7308 2.6662 13.0174 3.5297C12.3768 4.26915 11.8098 5.47617 11.9576 6.61041C13.0912 6.70874 14.2237 6.04381 14.9384 5.2052Z",fill:"#2E3434"}),Object(Se.h)("path",{d:"M15.9595 6.83176C14.3133 6.73371 12.9136 7.76606 12.1275 7.76606C11.3409 7.76606 10.1371 6.88118 8.83501 6.90503C7.14031 6.92992 5.56781 7.88812 4.70782 9.41211C2.93897 12.4608 4.24102 16.9832 5.96114 19.4662C6.79647 20.6946 7.80318 22.0472 9.12968 21.9986C10.383 21.9494 10.8743 21.1871 12.3977 21.1871C13.9201 21.1871 14.3626 21.9986 15.6893 21.974C17.0651 21.9494 17.9253 20.745 18.7606 19.5154C19.7189 18.115 20.1111 16.7629 20.1358 16.6887C20.1111 16.6641 17.4828 15.6558 17.4584 12.6324C17.4336 10.1009 19.522 8.89672 19.6203 8.82205C18.441 7.07785 16.5983 6.88118 15.9595 6.83176Z",fill:"#2E3434"})));var Mi;var Ri;const Pi=({className:e})=>Object(Se.h)("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ri||(Ri=Object(Se.h)("path",{d:"M20 12v10H4V12M22 7H2v5h20V7zM12 22V7M12 7H7.5a2.5 2.5 0 110-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",stroke:"#00A37F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})));var Di;const Bi=()=>Di||(Di=Object(Se.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M22 12.2296C22 11.5499 21.9438 10.8665 21.8238 10.1978H12.2013V14.0483H17.7117C17.483 15.2902 16.7483 16.3887 15.6725 17.0868V19.5853H18.9599C20.8904 17.8437 22 15.2718 22 12.2296Z",fill:"#4285F4"}),Object(Se.h)("path",{d:"M12.2013 21.9998C14.9528 21.9998 17.2731 21.1143 18.9637 19.5859L15.6762 17.0874C14.7616 17.6974 13.5808 18.0427 12.2051 18.0427C9.5436 18.0427 7.28697 16.2828 6.47728 13.9166H3.08484V16.4922C4.81667 19.8688 8.34406 21.9998 12.2013 21.9998Z",fill:"#34A853"}),Object(Se.h)("path",{d:"M6.4739 13.9165C6.04657 12.6747 6.04657 11.3299 6.4739 10.088V7.51245H3.08521C1.63826 10.3379 1.63826 13.6667 3.08521 16.4921L6.4739 13.9165Z",fill:"#FBBC04"}),Object(Se.h)("path",{d:"M12.2013 5.95801C13.6558 5.93596 15.0615 6.47239 16.1148 7.45707L19.0274 4.60224C17.1832 2.90477 14.7353 1.97152 12.2013 2.00092C8.34406 2.00092 4.81667 4.13194 3.08484 7.51218L6.47353 10.0878C7.27947 7.71794 9.53985 5.95801 12.2013 5.95801Z",fill:"#EA4335"})));var Ui;var Hi;var Fi,Xi;const qi={[et.CREDIT_CARD]:Object(Se.h)((()=>{const{primaryColor:e}=xt();return Object(Se.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M21 4.74316H3C1.89543 4.74316 1 5.63859 1 6.74316V18.7432C1 19.8477 1.89543 20.7432 3 20.7432H21C22.1046 20.7432 23 19.8477 23 18.7432V6.74316C23 5.63859 22.1046 4.74316 21 4.74316Z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Se.h)("path",{d:"M1 10.7432H23",stroke:e,strokeWidth:"2",strokeLinecap:"round"}))}),null),[et.BANK]:Object(Se.h)((()=>{const{primaryColor:e}=xt();return Object(Se.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M4 8.74348V19.2435M7 19.2435V8.74348M16 8.74348V19.2435M19 19.2435V8.74348M3.5 22.7435H19.5C20.33 22.7435 21 22.7435 21 21.2435C21 19.7435 20.33 19.7435 19.5 19.7435H3.5C2.67 19.7435 2 19.7435 2 21.2435C2 22.7435 2.67 22.7435 3.5 22.7435ZM10.57 2.23348L2.67 6.39348C2.26 6.60348 2 7.03348 2 7.49348C2 8.18348 2.56 8.74348 3.25 8.74348H19.76C20.44 8.74348 21 8.18348 21 7.49348C21 7.03348 20.74 6.60348 20.33 6.39348L12.43 2.23348C11.85 1.92348 11.15 1.92348 10.57 2.23348Z",stroke:e,strokeWidth:"2"}))}),null),[et.PAYPAL]:Object(Se.h)((()=>Ui||(Ui=Object(Se.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M8.78495 22.0251L9.12912 19.7433L8.36247 19.7248H4.70166L7.24574 2.88757C7.25331 2.83613 7.27835 2.78924 7.31628 2.75545C7.3542 2.72166 7.4025 2.70322 7.45237 2.70349H13.625C15.6742 2.70349 17.0884 3.14858 17.8268 4.02709C18.1729 4.43921 18.3934 4.86988 18.5 5.34382C18.6118 5.84111 18.6138 6.43525 18.5046 7.1599L18.4967 7.21278V7.67711L18.8428 7.88179C19.1071 8.02153 19.3446 8.21056 19.5436 8.43953C19.8398 8.79189 20.0313 9.23973 20.1122 9.77068C20.1958 10.3167 20.1682 10.9665 20.0313 11.7022C19.8733 12.5484 19.618 13.2854 19.2732 13.8885C18.9689 14.4287 18.5599 14.8966 18.0722 15.2622C17.6142 15.6015 17.07 15.8591 16.4547 16.0239C15.8585 16.186 15.1787 16.2678 14.4331 16.2678H13.9527C13.6092 16.2678 13.2756 16.3969 13.0137 16.6284C12.7521 16.8623 12.5786 17.1856 12.5241 17.5405L12.4879 17.7459L11.8798 21.7675L11.8522 21.9152C11.845 21.9619 11.8324 21.9853 11.814 22.0011C11.7962 22.0163 11.7739 22.0248 11.7508 22.0251H8.78495Z",fill:"#253B80"}),Object(Se.h)("path",{d:"M19.1713 7.26611C19.1528 7.38906 19.1318 7.51476 19.1081 7.64389C18.2941 12.0062 15.5091 13.5132 11.9523 13.5132H10.1413C9.70633 13.5132 9.33979 13.8429 9.27201 14.2907L8.3448 20.4286L8.08223 22.1684C8.07177 22.2374 8.07576 22.308 8.09393 22.3752C8.1121 22.4425 8.14402 22.5048 8.18749 22.558C8.23096 22.6111 8.28494 22.6538 8.34572 22.683C8.4065 22.7123 8.47264 22.7275 8.53958 22.7275H11.7516C12.132 22.7275 12.4551 22.439 12.515 22.0475L12.5465 21.8772L13.1513 17.8714L13.1901 17.6516C13.2494 17.2587 13.5731 16.9702 13.9535 16.9702H14.4339C17.5459 16.9702 19.982 15.6514 20.694 11.8352C20.9915 10.2409 20.8375 8.90979 20.0504 7.97359C19.801 7.68398 19.5031 7.44424 19.1713 7.26611Z",fill:"#179BD7"}),Object(Se.h)("path",{d:"M18.3102 6.91227C18.0503 6.83379 17.7858 6.77254 17.5185 6.72888C16.9903 6.64415 16.4565 6.60349 15.9221 6.6073H11.084C10.8998 6.60715 10.7218 6.67576 10.5819 6.80073C10.442 6.9257 10.3496 7.09877 10.3213 7.28867L9.29206 14.0928L9.26245 14.2913C9.29451 14.0747 9.39979 13.8772 9.55924 13.7346C9.71869 13.592 9.92177 13.5136 10.1318 13.5138H11.9427C15.4996 13.5138 18.2845 12.0061 19.0985 7.64447C19.1229 7.51534 19.1433 7.38964 19.1617 7.26669C18.9469 7.14912 18.723 7.05055 18.4925 6.97203C18.432 6.95109 18.3712 6.93117 18.3102 6.91227Z",fill:"#222D65"}),Object(Se.h)("path",{d:"M10.3267 7.2882C10.3547 7.09825 10.4471 6.92509 10.5871 6.80018C10.727 6.67528 10.9053 6.60692 11.0894 6.60752H15.9275C16.5007 6.60752 17.0357 6.64667 17.5239 6.72909C17.8544 6.78329 18.1802 6.86436 18.4985 6.97156C18.7387 7.05467 18.9618 7.15289 19.1678 7.26622C19.41 5.65414 19.1658 4.55653 18.3307 3.56263C17.4101 2.46844 15.7485 2 13.6223 2H7.44964C7.01531 2 6.64482 2.3297 6.5777 2.77822L4.00664 19.7885C3.99467 19.8675 3.99922 19.9482 4.02 20.0252C4.04077 20.1022 4.07727 20.1735 4.12699 20.2344C4.1767 20.2952 4.23845 20.3441 4.30799 20.3776C4.37753 20.4112 4.4532 20.4286 4.5298 20.4287H8.34066L9.29748 14.0923L10.3267 7.2882Z",fill:"#253B80"})))),null),[et.VENMO]:Object(Se.h)((()=>Hi||(Hi=Object(Se.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M20.0439 2.17969C20.7029 3.32032 21 4.49518 21 5.97926C21 10.7127 17.1441 16.8618 14.0147 21.1797H6.86672L4 3.21606L10.2588 2.59335L11.7745 15.3756C13.1907 12.9578 14.9383 9.15825 14.9383 6.56776C14.9383 5.14981 14.7065 4.184 14.3443 3.38876L20.0439 2.17969Z",fill:"#3D95CE"})))),null),[et.CRYPTO]:Object(Se.h)((()=>{const{primaryColor:e}=xt();return Object(Se.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7.74316C4.23858 7.74316 2 9.98174 2 12.7432C2 15.5046 4.23858 17.7432 7 17.7432C9.76142 17.7432 12 15.5046 12 12.7432C12 9.98174 9.76142 7.74316 7 7.74316ZM0 12.7432C0 8.87717 3.13401 5.74316 7 5.74316C10.866 5.74316 14 8.87717 14 12.7432C14 16.6092 10.866 19.7432 7 19.7432C3.13401 19.7432 0 16.6092 0 12.7432Z",fill:e}),Object(Se.h)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1577 9.96518C11.5898 10.6788 11.9998 11.762 11.9998 12.7432C11.9998 13.7243 11.5898 14.8076 11.1577 15.5212C11.6896 14.7266 11.9998 13.7711 11.9998 12.7432C11.9998 11.7152 11.6896 10.7597 11.1577 9.96518ZM11.9999 7.84425C12.4759 8.32999 12.8816 8.88479 13.2007 9.49223C14.1189 8.42024 15.4804 7.74316 16.9998 7.74316C19.7613 7.74316 21.9998 9.98174 21.9998 12.7432C21.9998 15.5046 19.7613 17.7432 16.9998 17.7432C15.4804 17.7432 14.1189 17.0661 13.2007 15.9941C12.8816 16.6015 12.4759 17.1563 11.9999 17.6421C13.2696 18.9376 15.0405 19.7432 16.9998 19.7432C20.8658 19.7432 23.9998 16.6092 23.9998 12.7432C23.9998 8.87717 20.8658 5.74316 16.9998 5.74316C15.0405 5.74316 13.2696 6.5487 11.9999 7.84425Z",fill:e}))}),null),[et.STOCKS]:Object(Se.h)((()=>{const{primaryColor:e}=xt();return Object(Se.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",display:"ACCENT"},Object(Se.h)("path",{d:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Se.h)("path",{d:"M4.5 16.5L6 14l5 1 2.5-2h3l3-5.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}),null),[et.DAF]:Object(Se.h)((()=>Mi||(Mi=Object(Se.h)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("g",{clipPath:"url(#clip0_6252_22297)"},Object(Se.h)("path",{d:"M16.5765 4.96037C16.6594 5.00932 16.6809 5.11885 16.6232 5.19596L16.5759 5.2593L15.0086 7.35896L14.3138 8.29026C14.1242 8.54394 13.7833 8.62317 13.4831 8.52256C13.0331 8.37178 12.5519 8.29026 12.051 8.29026C11.5273 8.29026 11.025 8.37948 10.5576 8.54425C8.79202 9.1636 7.5255 10.8523 7.5255 12.8374C7.5255 13.6592 7.74264 14.4303 8.12246 15.0959C8.27802 15.3682 8.46016 15.6228 8.66692 15.8559C9.49528 16.7938 10.7048 17.3851 12.051 17.3851C12.3493 17.3851 12.4882 17.7411 12.2551 17.9272C12.1878 17.9808 12.1198 18.0335 12.051 18.0852C10.765 19.0543 9.21333 19.686 7.5255 19.8527C7.23059 19.882 6.93178 19.897 6.62909 19.897C6.44094 19.897 6.25947 19.8288 6.1178 19.705C6.05234 19.6478 5.98768 19.5895 5.92388 19.5304C5.25044 18.9084 4.67162 18.1855 4.21142 17.3845C3.55353 16.2421 3.13611 14.9422 3.02787 13.5557C3.00972 13.3186 3 13.0796 3 12.8374C3 11.1812 3.4414 9.62795 4.21142 8.29026C4.62236 7.57518 5.12793 6.92326 5.70999 6.34951C6.25315 5.81352 6.86243 5.34526 7.5255 4.96037C8.85684 4.18667 10.4021 3.74316 12.051 3.74316C12.1476 3.74316 12.2448 3.74447 12.3407 3.74837C13.8808 3.79657 15.3236 4.23226 16.5765 4.96037Z",fill:"#4DA3B3"}),Object(Se.h)("path",{d:"M19.8329 17.5145C19.8902 17.7092 19.7155 17.893 19.5181 17.8456C19.5181 17.8456 19.5181 17.8456 19.5181 17.8456C19.252 17.7817 19.1303 17.8928 18.9815 18.1224C18.6911 18.5706 18.0776 19.2612 18.0034 19.346C15.5724 22.1292 11.6274 22.1812 8.38852 21.0562C8.37562 21.0516 8.36273 21.0471 8.35048 21.0432C8.06547 20.9438 7.79658 20.8432 7.55155 20.747C7.356 20.6706 7.17601 20.5972 7.01593 20.5295C6.718 20.4036 6.76112 20.2967 7.08212 20.3365C7.24332 20.3567 7.40195 20.3697 7.55155 20.3781C7.84763 20.395 8.11027 20.3938 8.29155 20.3889C8.46291 20.3843 8.63426 20.3771 8.80536 20.3668C9.38849 20.3316 9.97709 20.2206 10.5583 20.0287C11.0948 19.8507 11.5952 19.613 12.0537 19.3246C12.338 19.1473 12.6063 18.9492 12.8578 18.7348C12.9919 18.6205 13.1202 18.5023 13.2446 18.3789C13.5748 18.0515 13.8708 17.6923 14.1268 17.3091C14.253 17.1207 14.3702 16.9266 14.4771 16.7271C14.4989 16.6863 14.4761 16.6361 14.4311 16.6252C14.0905 16.5435 13.965 16.1245 14.2047 15.8691L15.8892 14.0744C15.8895 14.0741 15.8895 14.0741 15.8898 14.0737C15.8988 14.0642 16.3261 13.6097 16.4665 13.4599C16.495 13.4295 16.5266 13.3957 16.5551 13.3652L17.1097 12.7742L17.35 12.5181C17.688 12.1579 18.2894 12.3006 18.4296 12.7742L19.0377 14.8286L19.5259 16.4789C19.5266 16.4813 19.5288 16.4829 19.5312 16.4834C19.5345 16.4841 19.5365 16.4877 19.5356 16.4909C19.5349 16.4935 19.5342 16.496 19.5336 16.4986C19.5332 16.5007 19.5332 16.5028 19.5338 16.5049L19.7715 17.3085L19.7992 17.4001L19.8329 17.5145Z",fill:"#91CCD7"}),Object(Se.h)("path",{d:"M5.42485 14.1279C4.19233 14.3874 2.95172 13.5889 3.00945 12.3307C3.06474 11.1259 3.36198 9.93661 3.89227 8.83616C4.75517 7.04549 6.1866 5.59086 7.96317 4.69928C9.73974 3.80771 11.7615 3.52936 13.7129 3.90767C14.9121 4.14016 16.0433 4.61261 17.0423 5.2883C18.0857 5.99397 17.9844 7.46586 17.0397 8.29894C16.095 9.13202 14.6462 8.96341 13.4564 8.55014C13.2576 8.4811 13.0533 8.42597 12.8448 8.38555C11.8824 8.19897 10.8853 8.33625 10.0091 8.77597C9.13287 9.21569 8.4269 9.9331 8.00132 10.8163C7.90912 11.0076 7.83121 11.2043 7.76777 11.405C7.38804 12.6059 6.65738 13.8683 5.42485 14.1279Z",fill:"#4DA3B3"})),Object(Se.h)("defs",null,Object(Se.h)("clipPath",{id:"clip0_6252_22297"},Object(Se.h)("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3.74316)"})))))),null),[et.GIFT_CARD]:Object(Se.h)(Pi,null)},Gi=({method:e})=>{const{paymentRequestAvailable:t}=En();return function(e,t){return e===et.PAYMENT_REQUEST?t.applePay?Fi||(Fi=Object(Se.h)(Li,null)):Xi||(Xi=Object(Se.h)(Bi,null)):qi[e]}(e,t)},$i={[et.CREDIT_CARD]:"Card",[et.BANK]:"Bank",[et.PAYPAL]:"PayPal",[et.VENMO]:"Venmo",[et.GIFT_CARD]:"Gift card",[et.CRYPTO]:"Crypto",[et.STOCKS]:"Stocks",[et.DAF]:"DAF"},zi=({method:e})=>{const{paymentRequestAvailable:t}=En(),n=function(e,t){return e===et.PAYMENT_REQUEST?t.applePay?"Apple Pay":"Google Pay":$i[e]}(e,t);return Object(Se.h)("span",{className:Te()(re({},Jt))},n)},Vi=Te()({padding:`${tn.XL} ${tn.XL} 0px`,[Wt.TabletLandscapeUp]:{padding:"0px"}}),Wi=Te()({border:"none",padding:0,margin:0,fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),Zi=Te()(ie({fontWeight:700},Jt,{marginBottom:tn.S})),Ki=Te()(ie({},an(tn.XL),{padding:"0px",[Wt.TabletLandscapeUp]:{gridColumn:"2/3",padding:tn.XXL}})),Yi=Te()({display:"grid",gridTemplateColumns:"1fr",[Wt.TabletLandscapeUp]:{gridAutoFlow:"column",gridTemplateColumns:"auto 1fr"}}),Qi=Te()({height:"100%",width:"100%",minWidth:"170px",flexGrow:1,backgroundColor:Zt.LightGray,display:"none",[Wt.TabletLandscapeUp]:ae({},an(0))}),Ji=kn([Wi,Te()({display:"block",[Wt.TabletLandscapeUp]:{display:"none"}})]),ea=Te()({display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:tn.S}),ta=ae({},cn(tn.XS),{alignItems:"center",justifyContent:"flex-start",width:"100%",background:"transparent"}),na=(e,t)=>Te()(ae({},ta,{border:`1px solid ${Zt.DarkGray}`,background:"transparent",textAlign:"start",padding:`${tn.XXS} ${tn.S}`,borderRadius:lo.Default,":hover":{cursor:"pointer",background:Zt.Gray},"& > svg":{width:"20px",height:"20px"}},e?{background:t,border:`1px solid ${t}`,fontWeight:700,color:"white","& > svg":{filter:"brightness(0) invert(1)",width:"20px",height:"20px"},":hover":{background:t}}:{}));var oa;const ra=()=>{const{methods:e,lockMonthlyFrequency:t}=xt(),{paymentRequestAvailable:n}=En();return h((()=>e.filter((e=>(!t||!tt.includes(e))&&(e!==et.PAYMENT_REQUEST||(n.applePay||n.googlePay))))),[e,t,n])},ia=()=>{const e=ra(),{selectedPaymentMethod:t,setSelectedPaymentMethod:n}=En();return 1===e.length?null:Object(Se.h)("ul",{className:Qi},e.map((e=>{return Object(Se.h)("li",{key:e},Object(Se.h)("button",{type:"button",className:(o=e===t,Te()(ae({},ta,{border:"none",padding:tn.M,":hover":{cursor:"pointer",background:Zt.Gray}},o?{background:"white",fontWeight:700,":hover":{background:"white"}}:{}))),onClick:()=>{n(e)}},Object(Se.h)(Gi,{method:e}),Object(Se.h)(zi,{method:e})));var o})))},aa=()=>{const e=ra(),{primaryColor:t}=xt(),{selectedPaymentMethod:n,setSelectedPaymentMethod:o}=En();return 1===e.length?null:Object(Se.h)("fieldset",{className:Ji},oa||(oa=Object(Se.h)("legend",{className:Zi},"Payment method")),Object(Se.h)("ul",{className:ea},e.map((e=>Object(Se.h)("li",{key:e},Object(Se.h)("button",{type:"button",className:na(e===n,t),onClick:()=>{o(e)}},Object(Se.h)(Gi,{method:e}),Object(Se.h)(zi,{method:e})))))))},ca=Te()({border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}),la=({checked:e,primaryColor:t})=>Te()(ce({cursor:"pointer",width:"24px",minWidth:"24px",height:"24px",display:"flex",borderRadius:"4px",justifyContent:"center",alignItems:"center",border:`1.5px solid ${e?t:Zt.DarkGray}`},e?{background:t}:{})),sa=Te()({width:"16px",height:"16px","& > path":{stroke:"white",strokeWidth:"2px"}}),ua=Te()({cursor:"pointer"}),da=Te()({display:"flex",alignItems:"center",gap:tn.XS});var pa;const fa=({className:e})=>Object(Se.h)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e},pa||(pa=Object(Se.h)("path",{d:"M20 6L9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})));var ha;const ba=["children","checked","className"],ma=e=>{let{children:t,checked:n}=e,o=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,ba);const{primaryColor:r}=xt();return Object(Se.h)("label",{className:da},Object(Se.h)("div",null,Object(Se.h)("input",le({className:ca,type:"checkbox",defaultChecked:n,role:"checkbox"},o)),Object(Se.h)("div",{className:la({checked:Boolean(n),primaryColor:r})},n&&(ha||(ha=Object(Se.h)(fa,{className:sa}))))),Object(Se.h)("span",{className:ua},t))};var ya;const va=()=>{var e;const t=Tn(),n=t.hasAdmin&&!(null!=(e=t.metadata)&&e.disablePrivateNotes),{privateNote:o,setPrivateNote:r}=En(),[i,a]=u(Boolean(o));return n?Object(Se.h)("div",{className:rn(tn.L)},Object(Se.h)(ma,{checked:i,onChange:()=>{a((e=>!e))}},"Add note for ",t.name),i&&Object(Se.h)("fieldset",{className:Te()(se({fieldSetCss:Wi},an(tn.XS)))},ya||(ya=Object(Se.h)("legend",{className:Zi},"Private note")),Object(Se.h)(Sr,{rows:3,label:"Note",id:"privateNote",value:o,inputClassName:Te()({resize:"none"}),onChange:({currentTarget:e})=>{r(e.value)}}))):null},ga=Te()({width:"100%",textAlign:"center"}),_a=Te()(ue({},{fontSize:"12px",lineHeight:"16px",letterSpacing:"0.01em"},{color:Zt.TextOpaque})),Oa=()=>{const{primaryColor:e}=xt();return Object(Se.h)("div",{className:ga},Object(Se.h)("span",{className:_a},"Every.org will accept your donation."," ",Object(Se.h)("a",{href:qe,target:"_blank",rel:"noreferrer",className:(t=e,Te()({color:t,textDecoration:"none",cursor:"pointer"}))},"Learn More")));var t},Ca=Te()(de({},Kt,{outline:"none",width:"100%",border:"none",fontFamily:"inherit",cursor:"pointer",borderRadius:lo.Big,height:"52px",fontWeight:700,padding:tn.XXS,transition:"opacity .3s"})),ja=Te()({color:Zt.White,backgroundColor:Zt.DarkGray,cursor:"default","& > span":{opacity:"0.6"}}),wa=({handleClick:e,disabled:t,children:n})=>{const{primaryColor:o}=xt();return Object(Se.h)("button",{type:"submit",className:kn([Ca,t?ja:(r=o,Te()({color:Zt.White,backgroundColor:r,":hover":{opacity:.9}}))]),disabled:t,onClick:e},Object(Se.h)("span",null,n));var r};var ka=e=>{const[t,n]=u(null),[o,r]=u(null),[i,a]=u(!1);return p((()=>{if(!e)return n(null),r(null),void a(!1);a(!0),async function(e){const t=`https://api.coingecko.com/api/v3/coins/${e}`;return(await fetch(t).then((async e=>e.json()))).market_data.current_price.usd}(e).then((e=>{n(e),r(null)})).catch((e=>{n(null),r(e.message)})).finally((()=>{a(!1)}))}),[e]),[t,i,o]};const xa="USD",Na="$",Sa=()=>{const e=xt(),{frequency:t,donationAmount:n,setSubmitError:l,selectedPaymentMethod:s,stockAmount:u,stockSymbol:d,cryptoAmount:p,cryptoCurrency:f,privateNote:h}=En(),{minDonationAmount:m}=xt();return b((b=>{b.preventDefault();const y=e.completeDonationInNewTab?"_blank":"_self",v={methods:[s],nonprofitSlug:e.nonprofitSlug,fundraiserSlug:e.fundraiserSlug,utmSource:e.utmSource,privateNote:h};switch(s){case et.CRYPTO:if(!p||!f){l("Please enter currency and amount");break}window.open(function(e){let{cryptoAmount:t,cryptoCurrency:n}=e,l=r(e,Ve);return`${a(l)}?${i(o({crypto_amount:t,crypto_currency:n},c(l)))}#/${Ze}`}(pe({cryptoAmount:p,cryptoCurrency:f},v)),y);break;case et.STOCKS:if(!d||!u){l("Please enter the symbol and amount");break}window.open(function(e){let{stockAmount:t,stockSymbol:n}=e,l=r(e,ze);return`${a(l)}?${i(o({stock_amount:t,stock_symbol:n},c(l)))}#/${Ze}`}(pe({stockSymbol:d,stockAmount:u},v)),y);break;case et.GIFT_CARD:window.open(function(e){const t=i({nonprofitSlug:e});return`${Ge}?${t}`}(e.nonprofitSlug),y);break;default:if(!n||n{var e;const t=Sa(),{cryptoAmount:n,cryptoCurrency:o}=En(),[r,i]=ka(o&&(null==(e=ui[o])?void 0:e.coingeckoId));return Object(Se.h)("form",{className:Yi,onSubmit:t},Aa||(Aa=Object(Se.h)(ia,null)),Object(Se.h)("div",{className:Ki},Ta||(Ta=Object(Se.h)(aa,null)),Object(Se.h)("fieldset",{className:Te()(he({fieldSetCss:Wi},an(tn.XXL)))},Ea||(Ea=Object(Se.h)("div",null,Object(Se.h)("legend",{className:Zi},"Crypto currency"),Object(Se.h)(ji,null))),o&&Object(Se.h)("div",null,Ia||(Ia=Object(Se.h)("legend",{className:Zi},"Amount")),Object(Se.h)(Ei,{cryptoTokenRate:r,cryptoTokenLoading:i}))),La||(La=Object(Se.h)(va,null)),Object(Se.h)(wa,{disabled:!n||!o},fe({method:et.CRYPTO,cryptoCurrency:o})),Ma||(Ma=Object(Se.h)(Oa,null)),o&&r&&r>0&&Object(Se.h)("p",{className:Te()(he({color:Zt.TextGray},en))},"*Estimated exchange rate of"," ",oe(r,"USD",{showCurrency:!0})," ","/ ",o," is provided by CoinGecko. Final rate will be determined by our brokerage at time of transaction conversion.")))},Pa=e=>Te()(be({outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",background:"none",fontWeight:500,transition:"opacity .3s",color:e,display:"flex",alignItems:"center",alignSelf:"flex-start"},Jt,{opacity:1,padding:0,gap:tn.XXS,marginBottom:tn.XXL,":hover":{opacity:.9},[Wt.TabletLandscapeUp]:{padding:tn.L,marginBottom:0}})),Da=()=>{const{primaryColor:e}=xt();return Object(Se.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{stroke:e,strokeWidth:"2",d:"M19 12H5M12 19l-7-7 7-7"}))};var Ba,Ua;const Ha=({handleClick:e})=>{const{primaryColor:t}=xt();return Object(Se.h)("button",{type:"button",className:Pa(t),onClick:e},Ba||(Ba=Object(Se.h)(Da,null)),Ua||(Ua=Object(Se.h)("span",null,"Back")))};let Fa=function(e){return e[e.START=0]="START",e[e.MANUAL=1]="MANUAL",e[e.AMOUNT=2]="AMOUNT",e}({});var Xa;const qa=e=>{"."===e.key&&e.preventDefault()},Ga=()=>{const e=f(null),{primaryColor:t,addAmounts:n}=xt(),{setDonationAmount:o,donationAmount:r,setSubmitError:i,submitError:a}=En();return p((()=>{Boolean("ontouchstart"in window||navigator.maxTouchPoints)||e.current&&e.current.focus()}),[]),Object(Se.h)("fieldset",{className:Te()(me({fieldSetCss:Wi},an(tn.S)))},Xa||(Xa=Object(Se.h)("legend",{className:Zi},"Donation amount")),Object(Se.h)(Tr,{ref:e,id:"donation-input",type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:r||void 0,prefix:Na,inputClassName:ar,prefixClassName:cr,sufix:xa,sufixClassName:lr(t),containerClassName:a?ir:void 0,onKeyDown:qa,onInput:e=>{o(Number(e.currentTarget.value)),i(null)}}),n&&n.length>0&&Object(Se.h)("div",{className:sr},n.map((e=>Object(Se.h)("button",{key:e,className:ur(t),type:"button",onClick:()=>{o((t=>"number"==typeof t?t+e:e))}},"+",((e,t)=>{if(e<1e3)return e.toString();let n="",o=1;return e>=1e3&&e<1e6?(o=1e3,n="k"):e>=1e6&&e<1e9?(o=1e6,n="m"):e>=1e9&&e<1e12?(o=1e9,n="b"):e>=1e12&&(o=1e12,n="t"),void 0===t?(e/o).toFixed(3).replace(/\.?0+$/,"")+n:(e/o).toFixed(t)+n})(e))))))},$a=e=>Te()({position:"relative",cursor:"pointer",display:"flex",width:"100%",height:"36px",alignItems:"center",justifyContent:"center",color:e,fontWeight:500,border:`2px solid ${e}`,borderRight:"none"}),za=e=>Te()({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 0px","& > input":{appearance:"none",height:0},"& > input:checked + label":{backgroundColor:e,color:"white"},"& > input:checked + label:hover":{backgroundColor:e,color:"white"}}),Va=e=>Te()({display:"flex",width:"100%","& > div:first-of-type > label":{borderRadius:"6px 0 0 6px","&::after":{borderRadius:"6px 0 0 6px"}},"& > div:last-of-type > label":{borderRadius:"0 6px 6px 0",borderRight:`2px solid ${e}`,"&::after":{borderRadius:"0 6px 6px 0"}}});var Wa,Za;const Ka="Monthly donation",Ya=()=>{const{primaryColor:e,lockMonthlyFrequency:t,monthlyTitle:n=Ka}=xt(),{frequency:o,selectedPaymentMethod:r,setFrequency:i}=En();return t?Object(Se.h)("h4",null,n):tt.includes(r)?Object(Se.h)("fieldset",{className:Wi},Wa||(Wa=Object(Se.h)("legend",{className:Zi},"Frequency")),Object(Se.h)("p",null,r===et.DAF?"Chariot":"Venmo"," ","only supports one-time donations")):Object(Se.h)("fieldset",{className:Wi},Za||(Za=Object(Se.h)("legend",{className:Zi},"Frequency")),Object(Se.h)("div",{className:Va(e)},Object(Se.h)("div",{className:za(e)},Object(Se.h)("input",{type:"radio",name:"frequency",id:"monthly",checked:o===Je.Monthly,value:Je.Monthly}),Object(Se.h)("label",{className:$a(e),id:"frequency-monthly",htmlFor:"monthly",onClick:()=>{i(Je.Monthly)}},"Give Monthly")),Object(Se.h)("div",{className:za(e)},Object(Se.h)("input",{type:"radio",name:"frequency",id:"once",checked:o===Je.OneTime,value:Je.OneTime}),Object(Se.h)("label",{id:"frequency-one-time",htmlFor:"one-time",className:$a(e),onClick:()=>{i(Je.OneTime)}},"Once"))))};var Qa,Ja,ec,tc,nc;const oc=({changeView:e})=>{const t=Sa(),{donationAmount:n}=En();return Object(Se.h)("form",{className:Yi,onSubmit:t},Object(Se.h)(Ha,{handleClick:()=>{e(Fa.START)}}),Object(Se.h)("div",{className:Ki},Qa||(Qa=Object(Se.h)("h3",null,"Connect your DAF with Chariot")),Ja||(Ja=Object(Se.h)(Ya,null)),ec||(ec=Object(Se.h)(Ga,null)),tc||(tc=Object(Se.h)(va,null)),Object(Se.h)(wa,{disabled:!n||Number.isNaN(n)},fe({method:et.DAF})),nc||(nc=Object(Se.h)(Oa,null))))};var rc,ic,ac,cc,lc,sc,uc,dc,pc,fc,hc;const bc=({changeView:e})=>{const{nonprofitSlug:t,primaryColor:n}=xt(),o=An(),r=o===It||o===Et?"the nonprofit":o.name;return Object(Se.h)("div",{className:Yi},Object(Se.h)(Ha,{handleClick:()=>{e(Fa.START)}}),Object(Se.h)("div",{className:Ki},rc||(rc=Object(Se.h)("h3",null,"Manual DAF donation")),ic||(ic=Object(Se.h)("p",null,"Please ask your provider to make a one-time or recurring grant to:")),Object(Se.h)("div",{className:rn(tn.S)},Object(Se.h)("p",{className:rn(0)},ac||(ac=Object(Se.h)("span",null,"Every.org (EIN: 61-1913297)")),cc||(cc=Object(Se.h)("span",null,"58 West Portal Ave #781 San Francisco, CA 94127")),Object(Se.h)("span",null,"Memo: every.org/",t),lc||(lc=Object(Se.h)("span",null,"Contact info: Mark Ulrich, CEO")),sc||(sc=Object(Se.h)("span",null,"Email: team@every.org")),uc||(uc=Object(Se.h)("span",null,"Phone number: +1 (415) 650-0503"))),Object(Se.h)("p",null,"You may also email us at"," ",Object(Se.h)("a",{className:Wn(n),href:I({address:De,subject:"Donation via DAF"})},De)," ","with the memo or to let us know if you wish to share your contact information with the nonprofit/campaign. By default, your name and email will be shared with ",r," if included in the grant letter from your DAF.")),Object(Se.h)("div",{className:Te()(ye({color:Zt.TextGray},an(0)))},Object(Se.h)("p",{className:Te()({paddingBottom:tn.S})},"We will attribute the donation accordingly:"),dc||(dc=Object(Se.h)("p",null,"If we receive BOTH your @username and a nonprofit/campaign: we will add a donation for that nonprofit/campaign to your account.")),pc||(pc=Object(Se.h)("p",null,"If we receive only your @username, we will credit your account's gift card balance in the amount received, which you can use to support as many nonprofits as you'd like.")),fc||(fc=Object(Se.h)("p",null,"If we receive only a nonprofit/campaign, we will send that amount to that nonprofit/campaign.")),hc||(hc=Object(Se.h)("p",null,"If we do not receive any information by the time the wire/ACH is received, we will apply it towards running Every.org.")))))},mc=Te()(ve({outline:"none",border:"none",fontFamily:"inherit",background:"#ADEFD1",color:"#00203F",alignSelf:"center",borderRadius:lo.Big,padding:`${tn.M} ${tn.XL}`,display:"flex",alignItems:"center",fontWeight:500},Jt,{gap:tn.XS,cursor:"pointer",":hover":{background:"#7ce6b6"}})),yc=e=>Te()(ve({outline:"none",border:"none",background:"none",fontFamily:"inherit",color:e,alignSelf:"center",display:"flex",alignItems:"center",fontWeight:500},Jt,{gap:tn.XS,cursor:"pointer",":hover":{opacity:.9}}));var vc,gc,_c,Oc,Cc,jc,wc,kc;const xc=()=>vc||(vc=Object(Se.h)("svg",{width:"101",height:"16",viewBox:"0 0 101 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Se.h)("path",{d:"M26.5651 0.257543H29.7622V15.2809H26.5651V0.257543ZM20.2894 15.2809H17.0923V0.257543H20.2894V15.2809ZM26.8019 9.12133H20.0525V6.18104H26.8019V9.12133Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M32.2018 15.2809L38.3591 0.257543H41.5168L47.6938 15.2809H44.3389L39.2867 2.01742H40.5497L35.4778 15.2809H32.2018ZM35.2805 12.0616L36.1291 9.4218H43.2337L44.1021 12.0616H35.2805Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M50.1138 15.2809V0.257543H56.0936C57.3303 0.257543 58.396 0.479317 59.2907 0.922864C60.1853 1.3521 60.876 1.9745 61.3628 2.79005C61.8496 3.60561 62.093 4.57855 62.093 5.70888C62.093 6.8249 61.8496 7.79069 61.3628 8.60625C60.876 9.40749 60.1853 10.0227 59.2907 10.452C58.396 10.8812 57.3303 11.0958 56.0936 11.0958H51.89L53.3109 9.57203V15.2809H50.1138ZM58.896 15.2809L55.4423 9.82958H58.8565L62.3496 15.2809H58.896ZM53.3109 9.95835L51.89 8.32724H55.916C56.9027 8.32724 57.6395 8.09831 58.1263 7.64046C58.6131 7.16829 58.8565 6.52444 58.8565 5.70888C58.8565 4.87902 58.6131 4.23516 58.1263 3.77731C57.6395 3.31945 56.9027 3.09052 55.916 3.09052H51.89L53.3109 1.43795V9.95835Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M65.6128 15.2809V0.257543H68.8099V15.2809H65.6128Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M79.7851 15.5385C78.6931 15.5385 77.68 15.3453 76.7459 14.959C75.8249 14.5727 75.0223 14.029 74.3382 13.3279C73.6672 12.6268 73.1409 11.8041 72.7594 10.8598C72.391 9.91543 72.2068 8.88525 72.2068 7.76923C72.2068 6.65321 72.391 5.62303 72.7594 4.67871C73.1409 3.73438 73.6738 2.91167 74.3579 2.21058C75.0421 1.50949 75.8446 0.965787 76.7656 0.579472C77.6866 0.193157 78.6865 0 79.7653 0C80.8573 0 81.8573 0.193157 82.7651 0.579472C83.686 0.965787 84.482 1.50949 85.153 2.21058C85.8372 2.91167 86.37 3.73438 86.7516 4.67871C87.1331 5.60873 87.3239 6.6389 87.3239 7.76923C87.3239 8.88525 87.1331 9.92258 86.7516 10.8812C86.37 11.8255 85.8372 12.6482 85.153 13.3493C84.482 14.0361 83.686 14.5727 82.7651 14.959C81.8573 15.3453 80.8639 15.5385 79.7851 15.5385ZM79.7653 12.5767C80.3837 12.5767 80.9494 12.4622 81.4626 12.2333C81.9888 12.0044 82.4493 11.6753 82.844 11.2461C83.2387 10.8168 83.5413 10.3089 83.7518 9.72227C83.9755 9.13564 84.0873 8.48463 84.0873 7.76923C84.0873 7.05383 83.9755 6.40282 83.7518 5.81619C83.5413 5.22956 83.2387 4.72163 82.844 4.29239C82.4625 3.86315 82.0086 3.53407 81.4823 3.30514C80.956 3.07621 80.3837 2.96175 79.7653 2.96175C79.147 2.96175 78.5747 3.07621 78.0484 3.30514C77.5353 3.53407 77.0814 3.86315 76.6867 4.29239C76.292 4.72163 75.9828 5.22956 75.7591 5.81619C75.5486 6.40282 75.4434 7.05383 75.4434 7.76923C75.4434 8.47032 75.5486 9.12133 75.7591 9.72227C75.9828 10.3089 76.2854 10.8168 76.6669 11.2461C77.0616 11.6753 77.5221 12.0044 78.0484 12.2333C78.5747 12.4622 79.147 12.5767 79.7653 12.5767Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M93.3822 15.2809V3.09052H88.9616V0.257543H101V3.09052H96.5793V15.2809H93.3822Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M11.272 1.05076C11.3408 1.09302 11.3586 1.18757 11.3108 1.25413L11.2714 1.30881L9.3933 3.92529C9.23593 4.14428 8.9529 4.21268 8.70361 4.12582C8.33005 3.99566 7.93049 3.92529 7.51464 3.92529C7.07982 3.92529 6.66276 4.00231 6.27476 4.14455C4.80885 4.6792 3.75732 6.13699 3.75732 7.85057C3.75732 8.56007 3.9376 9.22572 4.25295 9.80028C4.3821 10.0353 4.53332 10.2551 4.70499 10.4564C5.39274 11.2659 6.39692 11.7764 7.51464 11.7764C7.76228 11.7764 7.87763 12.0838 7.68405 12.2443C7.62823 12.2906 7.57176 12.3361 7.51464 12.3808C6.44696 13.2173 5.15865 13.7627 3.75732 13.9066C3.51247 13.9319 3.26438 13.9448 3.01307 13.9448C2.85686 13.9448 2.70619 13.886 2.58857 13.7791C2.53422 13.7297 2.48053 13.6794 2.42757 13.6283C1.86844 13.0914 1.38787 12.4674 1.00579 11.7759C0.459575 10.7898 0.11301 9.6676 0.0231398 8.47068C0.00807176 8.26604 0 8.05971 0 7.85057C0 6.4209 0.366476 5.08005 1.00579 3.92529C1.34697 3.308 1.76673 2.74523 2.24998 2.24993C2.70094 1.78724 3.2068 1.38302 3.75732 1.05076C4.86267 0.382868 6.1456 9.06616e-06 7.51464 9.06616e-06C7.59482 9.06616e-06 7.67555 0.00113271 7.75519 0.00450591C9.03382 0.0461087 10.2317 0.422222 11.272 1.05076Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M13.9754 11.8877C14.023 12.0558 13.8779 12.2145 13.7141 12.1736C13.4931 12.1184 13.3921 12.2143 13.2685 12.4126C13.0274 12.7994 12.5181 13.3956 12.4565 13.4688C10.4382 15.8714 7.16282 15.9162 4.47369 14.9451C4.46298 14.9412 4.45227 14.9373 4.4421 14.9339C4.20547 14.8481 3.98222 14.7612 3.77878 14.6782C3.61643 14.6123 3.46699 14.5489 3.33408 14.4905C3.08673 14.3817 3.12253 14.2895 3.38904 14.3239C3.52288 14.3412 3.65458 14.3525 3.77878 14.3597C4.15457 14.382 4.46549 14.3678 4.56937 14.3616C4.59412 14.3601 4.61885 14.3589 4.64363 14.3582C5.18515 14.3419 5.73401 14.2439 6.27519 14.0581C6.72061 13.9045 7.13605 13.6992 7.51669 13.4503C7.75279 13.2972 7.9755 13.1262 8.18429 12.9412C8.29565 12.8425 8.40219 12.7404 8.50551 12.6339C8.77962 12.3513 9.02535 12.0413 9.23789 11.7105C9.34271 11.5478 9.44004 11.3803 9.52876 11.208C9.5469 11.1728 9.52792 11.1295 9.49058 11.12C9.20779 11.0496 9.10362 10.6878 9.30264 10.4673L10.7012 8.91805L10.7017 8.91751C10.7086 8.90988 11.0638 8.51701 11.1804 8.38764C11.2042 8.36134 11.2303 8.33219 11.2541 8.3059L11.914 7.57461C12.1946 7.26369 12.6939 7.38682 12.8104 7.79567L13.7206 10.9938C13.7212 10.9958 13.7229 10.9972 13.7249 10.9977C13.7277 10.9983 13.7293 11.0014 13.7286 11.0042C13.728 11.0064 13.7275 11.0085 13.727 11.0108C13.7266 11.0126 13.7266 11.0144 13.7271 11.0162L13.9245 11.7099L13.9475 11.7889L13.9754 11.8877Z",fill:"#00203F"}),Object(Se.h)("path",{d:"M2.01325 8.96461C0.989941 9.18868 -0.0400886 8.49938 0.00784723 7.41322C0.0537471 6.37318 0.300533 5.3465 0.740811 4.39654C1.45724 2.85074 2.64569 1.59503 4.1207 0.825379C5.5957 0.0557292 7.27427 -0.184559 8.89443 0.142017C9.8901 0.342713 10.8293 0.750556 11.6587 1.33385C12.5249 1.94302 12.4409 3.21363 11.6566 3.93279C10.8722 4.65194 9.66932 4.50639 8.68146 4.14963C8.51643 4.09003 8.34679 4.04245 8.17368 4.00755C7.37463 3.84649 6.54677 3.965 5.81931 4.34458C5.09184 4.72417 4.50571 5.34348 4.15237 6.10585C4.07582 6.27101 4.01114 6.44087 3.95847 6.61407C3.64319 7.65079 3.03655 8.74054 2.01325 8.96461Z",fill:"#00203F"}))),Nc=({changeView:e})=>{const{primaryColor:t}=xt();return Object(Se.h)("div",{className:Yi},gc||(gc=Object(Se.h)(ia,null)),Object(Se.h)("div",{className:Ki},_c||(_c=Object(Se.h)(aa,null)),Oc||(Oc=Object(Se.h)("h4",null,"Instant DAF donation")),Cc||(Cc=Object(Se.h)("p",null,"We use Chariot to verify your account info and automatically initiate a grant from your DAF, or you can get instructions for making the donation manually.")),Object(Se.h)("button",{type:"button",className:mc,onClick:()=>{e(Fa.AMOUNT)}},jc||(jc=Object(Se.h)("span",null,"Donate with")),wc||(wc=Object(Se.h)(xc,null))),Object(Se.h)("button",{type:"button",className:yc(t),onClick:()=>{e(Fa.MANUAL)}},"Get instructions for a manual DAF donation"),kc||(kc=Object(Se.h)(Oa,null))))},Sc=()=>{const[e,t]=u(Fa.START);switch(e){case Fa.START:return Object(Se.h)(Nc,{changeView:t});case Fa.MANUAL:return Object(Se.h)(bc,{changeView:t});case Fa.AMOUNT:return Object(Se.h)(oc,{changeView:t})}};var Ac,Tc,Ec,Ic,Lc,Mc;const Rc=()=>{const{frequency:e,donationAmount:t,selectedPaymentMethod:n,paymentRequestAvailable:o}=En(),r=Sa();return Object(Se.h)("form",{className:Yi,onSubmit:r},Ac||(Ac=Object(Se.h)(ia,null)),Object(Se.h)("div",{className:Ki},Tc||(Tc=Object(Se.h)(aa,null)),Ec||(Ec=Object(Se.h)(Ya,null)),Ic||(Ic=Object(Se.h)(Ga,null)),Lc||(Lc=Object(Se.h)(va,null)),Object(Se.h)(wa,{disabled:e===Je.Unselected||!t||Number.isNaN(t)},fe({method:n,paymentRequestIsApplePay:o.applePay})),Mc||(Mc=Object(Se.h)(Oa,null))))},Pc=Te()({display:"block",width:"80px",height:"80px",alignSelf:"center","& > path":{strokeWidth:"1"}});var Dc,Bc,Uc,Hc,Fc;const Xc=()=>{const e=Sa();return Object(Se.h)("form",{className:Yi,onSubmit:e},Dc||(Dc=Object(Se.h)(ia,null)),Object(Se.h)("div",{className:Ki},Bc||(Bc=Object(Se.h)(aa,null)),Uc||(Uc=Object(Se.h)(Pi,{className:Pc})),Hc||(Hc=Object(Se.h)("p",null,"Redeem a gift card to add donation credits to your account.")),Object(Se.h)(wa,null,fe({method:et.GIFT_CARD})),Fc||(Fc=Object(Se.h)(Oa,null))))};var qc,Gc,$c,zc,Vc,Wc,Zc;const Kc=()=>{const e=Sa(),{stockAmount:t,stockSymbol:n,setStockAmount:o,setStockSymbol:r,submitError:i,setSubmitError:a}=(xt(),En());return Object(Se.h)("form",{className:Yi,onSubmit:e},qc||(qc=Object(Se.h)(ia,null)),Object(Se.h)("div",{className:Ki},Gc||(Gc=Object(Se.h)(aa,null)),Object(Se.h)("fieldset",{className:Te()(ge({fieldSetCss:Wi},an(tn.XXL)))},Object(Se.h)("div",null,$c||($c=Object(Se.h)("legend",{className:Zi},"What is the symbol of the shares?")),zc||(zc=Object(Se.h)("span",null,"Example: AAPL")),Object(Se.h)(Tr,{id:"stock-amount-input",inputClassName:ar,containerClassName:i?ir:void 0,type:"text",value:n,onInput:e=>{r(e.currentTarget.value),a(null)}})),Object(Se.h)("div",null,Vc||(Vc=Object(Se.h)("legend",{className:Zi},"How many shares are you donating?")),Object(Se.h)(Tr,{id:"donation-input",inputClassName:ar,containerClassName:i?ir:void 0,type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:t||void 0,onInput:e=>{o(Number(e.currentTarget.value)),a(null)}}))),Wc||(Wc=Object(Se.h)(va,null)),Object(Se.h)(wa,{disabled:!t||!n},fe({method:et.STOCKS})),Zc||(Zc=Object(Se.h)(Oa,null))))};var Yc,Qc,Jc,el,tl,nl;const ol=()=>{const{selectedPaymentMethod:e}=En();switch(e){case et.CRYPTO:return Yc||(Yc=Object(Se.h)(Ra,null));case et.STOCKS:return Qc||(Qc=Object(Se.h)(Kc,null));case et.DAF:return Jc||(Jc=Object(Se.h)(Sc,null));case et.GIFT_CARD:return el||(el=Object(Se.h)(Xc,null));default:return tl||(tl=Object(Se.h)(Rc,null))}},rl=()=>nl||(nl=Object(Se.h)(xn,{className:Vi},Object(Se.h)(ol,null))),il=e=>Te()({background:"white",width:"100%",height:"100%",borderRadius:"unset",position:"relative",overflow:"auto",padding:"0",paddingBottom:tn.XXL,[Wt.TabletLandscapeUp]:{height:e?`${e}px`:"unset",background:"#f3f6f6",minHeight:"378px",maxHeight:`calc(100vh - 2 * ${tn.XL})`,width:"1000px",overflow:"unset",overflowY:"scroll","-ms-overflow-style":"none",scrollbarWidth:"none","::-webkit-scrollbar":{display:"none"},borderRadius:lo.Medium,padding:tn.XL}}),al=X((({children:e,height:t},n)=>Object(Se.h)("div",{ref:n,className:il(t)},e))),cl=Te()(_e({},Jt,{position:"fixed",height:"auto",width:"100%",zIndex:999,top:0,bottom:0,left:0,right:0,display:"flex",background:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",color:Zt.Text,fontFamily:Ee.BasisGrotesque,padding:0,[Wt.TabletLandscapeUp]:{padding:tn.XL},boxSizing:"border-box","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","& *":{boxSizing:"inherit"},"& *:before":{boxSizing:"inherit"},"& *:after":{boxSizing:"inherit"}})),ll=({children:e,onClick:t})=>Object(Se.h)("div",{className:cl,onClick:t},e);var sl,ul,dl;var pl,fl=()=>{const{fundraiserSlug:e}=xt(),{hideWidget:t}=En(),n=Nn(),o=An(),r=e=>{e.target===e.currentTarget&&t()};return o===Et||e&&n===Nt?(t(),null):o===It||e&&n===St?Object(Se.h)(ll,{onClick:r},sl||(sl=Object(Se.h)(xi,{size:24}))):Object(Se.h)(ll,{onClick:r},ul||(ul=Object(Se.h)(ro,{className:to})),dl||(dl=Object(Se.h)(al,{height:null},Object(Se.h)(Qn,null,Object(Se.h)("div",{id:"every-header"},Object(Se.h)(co,null)),Object(Se.h)("div",{id:"every-nonprofitInfo"},Object(Se.h)(Ao,null)),Object(Se.h)("div",{id:"every-paymentProcess"},Object(Se.h)(rl,null)),Object(Se.h)("div",{id:"every-faq"},Object(Se.h)(Dn,null)),Object(Se.h)("div",{id:"every-fundraiserLink"},Object(Se.h)(Kn,null)),Object(Se.h)("div",{id:"every-footer"},Object(Se.h)(Vn,null))))))};let hl;const bl=()=>{const e=document.querySelector("body"),t=(()=>{const e=document.querySelector("body");return hl||(hl=null!=e&&e.style.overflow?e.style.overflow:"unset"),hl})();e&&(e.style.overflow=t)},ml=({options:e={},hide:t})=>(bl(),e.show?((()=>{const e=document.querySelector("body");e&&(e.style.overflow="hidden")})(),Object(Se.h)(Vt,{options:e,hide:t},pl||(pl=Object(Se.h)(fl,null)))):null);var yl="\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n\n h1, h2, h3, h4, h4, h6 {\n font-weight: 700\n }\n";const vl=["element"],gl={childList:!0,subtree:!0,attributeFilter:["href"]};let _l,Ol;const Cl=new Map;class jl{constructor(e,t){Ce(this,"options",void 0),Ce(this,"mountPoint",void 0),this.options=e,this.mountPoint=t}hide(){this.options.show=!1,this.render()}show(){this.options.show=!0,this.render()}setOptions(e){this.options=e,this.render()}render(){Object(Se.render)(Object(Se.h)(ml,{options:this.options,hide:()=>{this.hide()}}),this.mountPoint)}}const wl=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,kl=["element","selector"],xl=["element","selector"];(function(){var e;const t=null==(e=document.currentScript)||null==(e=e.getAttribute("src"))?void 0:e.split("?")[1],n=null==t?void 0:t.split("&").map((e=>{const[t,n]=e.split("=");return[t,n]})),o=n&&Object.fromEntries(n);return!o||"1"!==o.explicit})()?(at(),ke(),new wl(((e,t)=>{t.disconnect(),Boolean(e.some((e=>"A"===e.target.nodeName)))&&ke(),t.observe(document,gl)})).observe(document,gl)):function(){function e(...e){console.info("Every.org Donate Button:",...e)}function t(){Ne(a,{show:!0}),u()}function n(){Ne(a,{show:!1}),u()}function o(e){var n;const o=Ne({},e);return Ne(a,{openAt:null!=(n=o.openAt)?n:r}),e=>{e.preventDefault(),c=o,t()}}const r="donate",i={},a={show:!1,openAt:r};let c={};const l=(e,t)=>e?[e]:t&&document.querySelectorAll(t);let s;at();const u=()=>{var e,t,o,r,l;s||(()=>{const e=document.createElement("div");e.id="shadow-wrapper",e.style.position="absolute",e.style.zIndex="20000000",document.body.append(e),s=document.createElement("div"),e.attachShadow({mode:"open"}).append(s);const t=document.querySelector("#every-styles");if(t){var n,o;const e=Object.values(null!=(n=null==(o=t.sheet)?void 0:o.cssRules)?n:{}).map((e=>e.cssText)).join("\n"),r=document.createElement("style");r.id="every-shadow-styles",r.innerHTML=yl+e,s.append(r)}})(),(null==(e=window.location)?void 0:e.hash)===`#${null!=(t=null!=(o=null!=(r=null==(l=c)?void 0:l.openAt)?r:null==i?void 0:i.openAt)?o:null==a?void 0:a.openAt)?t:""}`&&Ne(a,{show:!0});const u=Ne({},a,i,c);Object(Se.render)(Object(Se.h)(ml,{options:u,hide:n}),s)};window.everyDotOrgDonateButton={createButton:t=>{let{element:n,selector:o}=t,r=xe(t,kl);n||o||r.nonprofitSlug||e("createButton():","must provide element or selector or nonprofitSlug");const i=l(n,o);if(i)for(const t of i){var a,s;const n=null!=(a=t.querySelector("a"))?a:void 0;if(!r.nonprofitSlug&&!n)return void e("no link in container",t);const o=null!=(s=null==n?void 0:n.getAttribute("href"))?s:void 0;if(!r.nonprofitSlug&&!o)return void e("link lacks href",n);const i=Ne({},c,r);Object(Se.render)(Object(Se.h)(Qe,i),t,n)}},showWidget:t,setOptions:function(e){Ne(i,e),u()},createWidget:t=>{let{element:n,selector:r}=t,a=xe(t,xl);n||r||e("createWidget():","must provide element or selector");const c=l(n,r);if(c)if(a.nonprofitSlug){for(const e of c)e.addEventListener("click",o(a));Ne(i,a),u()}else e("createWidget():","must provide nonprofitSlug")}}}()},"5zHJ":function(e){"use strict";var t={},n="x",o=[],r=function(e){return o.push(e)},i=function e(i){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments[2];return Object.keys(i).map((function(l){var s=i[l];if(null===s)return"";if("object"==typeof s){var u=/^@/.test(l)?l:null;return e(s,u?a:a+l,u||c)}var d=l+s+a+c;if(t[d])return t[d];var p=n+o.length.toString(36);return r(function(e,t){return t?t+"{"+e+"}":e}(function(e,t,n){return"."+e+"{"+t.replace(/[A-Z]|^ms/g,"-$&").toLowerCase()+":"+n+"}"}(p+a.replace(/&/g,""),l,s),c)),t[d]=p,p})).join(" ")};if(e.exports=function(){for(var e=arguments.length,t=Array(e),n=0;n2&&(c.children=arguments.length>3?L.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===c[i]&&(c[i]=e.defaultProps[i]);return a(e,c,o,r,null)}function a(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++R:r};return null==r&&null!=M.vnode&&M.vnode(i),i}function c(){return{current:null}}function l(e){return e.children}function s(e,t){this.props=e,this.context=t}function u(e,t){if(null==t)return e.__?u(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&D.sort(H));f.__r=0}function h(e,t,n,o,r,i,c,s,d,p,f){var h,m,g,_,O,C,w,k,S,A=0,T=o&&o.__k||q,E=T.length,I=E,L=t.length;for(n.__k=[],h=0;h0?a(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)?(_.__=n,_.__b=n.__b+1,-1===(k=v(_,T,w=h+A,I))?g=X:(g=T[k]||X,T[k]=void 0,I--),j(e,_,g,r,i,c,s,d,p,f),O=_.__e,(m=_.ref)&&g.ref!=m&&(g.ref&&x(g.ref,null,_),f.push(m,_.__c||O,_)),null!=O&&(null==C&&(C=O),(S=g===X||null===g.__v)?-1==k&&A--:k!==w&&(k===w+1?A++:k>w?I>L-w?A+=k-w:A--:A=k(null!=l?1:0))for(;a>=0||c=0){if((l=t[a])&&r==l.key&&i===l.type)return a;a--}if(c2&&(s.children=arguments.length>3?L.call(arguments,2):n),a(e.type,s,r||e.key,i||e.ref,null)}function I(e,t){var n={__c:t="__cC"+F++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,o;return this.getChildContext||(n=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,p(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.r(t),n.d(t,"Component",(function(){return s})),n.d(t,"Fragment",(function(){return l})),n.d(t,"cloneElement",(function(){return E})),n.d(t,"createContext",(function(){return I})),n.d(t,"createElement",(function(){return i})),n.d(t,"createRef",(function(){return c})),n.d(t,"h",(function(){return i})),n.d(t,"hydrate",(function(){return T})),n.d(t,"isValidElement",(function(){return P})),n.d(t,"options",(function(){return M})),n.d(t,"render",(function(){return A})),n.d(t,"toChildArray",(function(){return m}));var L,M,R,P,D,B,U,H,F,X={},q=[],G=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$=Array.isArray;L=q.slice,M={__e:function(e,t,n,o){for(var r,i,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),a=r.__d),a)return r.__E=r}catch(t){e=t}throw e}},R=0,P=function(e){return null!=e&&void 0===e.constructor},s.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=o({},this.state),"function"==typeof e&&(e=e(o({},n),this.props)),e&&o(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),p(this))},s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),p(this))},s.prototype.render=l,D=[],U="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,H=function(e,t){return e.__v.__b-t.__v.__b},f.__r=0,F=0},"Pq/i":function(e,t,n){"use strict";n.r(t);var o=n("NMMh");const{h:r,render:i,hydrate:a}=o,c=e=>e&&e.default?e.default:e;if("function"==typeof c(n("/hs+"))){let e=document.getElementById("preact_root")||document.body.firstElementChild,t=()=>{let t=c(n("/hs+")),o={};const a=document.querySelector('[type="__PREACT_CLI_DATA__"]');a&&(o=JSON.parse(decodeURI(a.innerHTML)).preRenderData||o);o.url&&(l=o.url);var l;i(r(t,{CLI_DATA:{preRenderData:o}}),document.body,e)};0,t()}},kPAj:function(e){var t;e.exports=t={},t.simpleFilter=function(e,n){return n.filter((function(n){return t.test(e,n)}))},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(e,t,n){var o,r=0,i=[],a=t.length,c=0,l=0,s=(n=n||{}).pre||"",u=n.post||"",d=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var p=0;p\n) {\n\treturn Object.entries(params)\n\t\t.filter(([, value]) => Boolean(value))\n\t\t.map((entry) => entry.map((part) => encodeURIComponent(part!)).join('='))\n\t\t.join('&');\n}\n\nfunction getBaseUrl({\n\tfundraiserSlug,\n\tnonprofitSlug\n}: Pick) {\n\tlet baseUrl = BASE_URL + nonprofitSlug;\n\n\tif (fundraiserSlug) {\n\t\tbaseUrl += '/f/' + fundraiserSlug;\n\t}\n\n\treturn baseUrl;\n}\n\nfunction getBaseParams({\n\tmethods,\n\tnonprofitSlug,\n\tnoExit,\n\tprivateNote,\n\tutmSource\n}: Pick<\n\tBaseUrlParams,\n\t'nonprofitSlug' | 'methods' | 'noExit' | 'privateNote' | 'utmSource'\n>) {\n\treturn {\n\t\tmethod: methods?.join(','),\n\t\tutm_campaign: 'donate-button',\n\t\tutm_source: utmSource ?? nonprofitSlug,\n\t\tutm_medium: UTM_MEDIUM,\n\t\tno_exit: noExit ?? 1,\n\t\tprivate_note: privateNote\n\t};\n}\n\nexport function constructBasicDonateUrl(\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\tprops: Omit\n) {\n\tconst baseUrl = getBaseUrl(props);\n\tconst params = getBaseParams(props);\n\n\tconst parameters = serializeParams(params);\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateUrl({\n\tfrequency,\n\tamount,\n\t...rest\n}: DonateUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tfrequency,\n\t\tamount,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateStocksUrl({\n\tstockAmount,\n\tstockSymbol,\n\t...rest\n}: DonateStocksUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tstock_amount: stockAmount,\n\t\tstock_symbol: stockSymbol,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateCryptoUrl({\n\tcryptoAmount,\n\tcryptoCurrency,\n\t...rest\n}: DonateCryptoUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tcrypto_amount: cryptoAmount,\n\t\tcrypto_currency: cryptoCurrency,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructGiftCardUrl(nonprofitSlug: string) {\n\tconst parameters = serializeParams({\n\t\tnonprofitSlug\n\t});\n\n\treturn `${GIFT_CARD_URL}?${parameters}`;\n}\n","import {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst MAX_AMOUNT_SUGGESTIONS = 5;\n\nenum DonateUrlParameters {\n\tMETHOD = 'method',\n\tFREQUENCY = 'frequency',\n\tMONTHLY_TITLE = 'monthlyTitle',\n\tSUGGESTED_AMOUNTS = 'suggestedAmounts',\n\tAMOUNT = 'amount',\n\tUTM_SOURCE = 'utm_source'\n}\n\nfunction methodsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn string\n\t\t.split(',')\n\t\t.filter((method): method is PaymentMethod =>\n\t\t\tAvailablePaymentMethods.includes(method as PaymentMethod)\n\t\t);\n}\n\nfunction frequencyFromString(string?: string | null) {\n\tif (!string) return;\n\treturn Object.values(DonationFrequency).find(\n\t\t(frequency) => frequency.toUpperCase() === string.toUpperCase()\n\t);\n}\n\nfunction addAmountsFromString(string?: string | null) {\n\tif (!string) return;\n\treturn (\n\t\tstring\n\t\t\t.split(',')\n\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t.map(Number.parseFloat)\n\t\t\t.filter(Boolean)\n\t\t\t.slice(0, MAX_AMOUNT_SUGGESTIONS)\n\t);\n}\n\nfunction intFromString(string?: string | null) {\n\tif (!string) return;\n\tconst number = Number.parseInt(string, 10);\n\treturn Number.isNaN(number) ? undefined : number;\n}\n\nexport function parseDonateUrl(\n\turlString: string\n): (Partial & {nonprofitSlug: string}) | undefined {\n\tconst url = new URL(urlString);\n\n\tconst fundraiserSlug = url.pathname.split('/f/')[1];\n\tconst nonprofitSlug = url.pathname.split('/')[1];\n\n\tconst searchParameters = new URLSearchParams(url.search);\n\tconst methods = methodsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.METHOD)\n\t);\n\tconst defaultFrequency = frequencyFromString(\n\t\tsearchParameters.get(DonateUrlParameters.FREQUENCY)\n\t);\n\tconst defaultDonationAmount = intFromString(\n\t\tsearchParameters.get(DonateUrlParameters.AMOUNT)\n\t);\n\tconst monthlyTitle =\n\t\tsearchParameters.get(DonateUrlParameters.MONTHLY_TITLE) ?? undefined;\n\n\tconst addAmounts = addAmountsFromString(\n\t\tsearchParameters.get(DonateUrlParameters.SUGGESTED_AMOUNTS)\n\t);\n\tconst utmSource =\n\t\tsearchParameters.get(DonateUrlParameters.UTM_SOURCE) ?? undefined;\n\tconst lockMonthlyFrequency = defaultFrequency === DonationFrequency.Monthly;\n\n\tif (!nonprofitSlug) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\tfundraiserSlug,\n\t\tnonprofitSlug,\n\t\tdefaultFrequency,\n\t\tmethods,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle,\n\t\taddAmounts,\n\t\tutmSource,\n\t\tdefaultDonationAmount\n\t};\n}\n","import { options } from 'preact';\n\n/** @type {number} */\nlet currentIndex;\n\n/** @type {import('./internal').Component} */\nlet currentComponent;\n\n/** @type {import('./internal').Component} */\nlet previousComponent;\n\n/** @type {number} */\nlet currentHook = 0;\n\n/** @type {Array} */\nlet afterPaintEffects = [];\n\nlet EMPTY = [];\n\nlet oldBeforeDiff = options._diff;\nlet oldBeforeRender = options._render;\nlet oldAfterDiff = options.diffed;\nlet oldCommit = options._commit;\nlet oldBeforeUnmount = options.unmount;\n\nconst RAF_TIMEOUT = 100;\nlet prevRaf;\n\noptions._diff = vnode => {\n\tcurrentComponent = null;\n\tif (oldBeforeDiff) oldBeforeDiff(vnode);\n};\n\noptions._render = vnode => {\n\tif (oldBeforeRender) oldBeforeRender(vnode);\n\n\tcurrentComponent = vnode._component;\n\tcurrentIndex = 0;\n\n\tconst hooks = currentComponent.__hooks;\n\tif (hooks) {\n\t\tif (previousComponent === currentComponent) {\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentComponent._renderCallbacks = [];\n\t\t\thooks._list.forEach(hookItem => {\n\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t}\n\t\t\t\thookItem._pendingValue = EMPTY;\n\t\t\t\thookItem._nextValue = hookItem._pendingArgs = undefined;\n\t\t\t});\n\t\t} else {\n\t\t\thooks._pendingEffects.forEach(invokeCleanup);\n\t\t\thooks._pendingEffects.forEach(invokeEffect);\n\t\t\thooks._pendingEffects = [];\n\t\t\tcurrentIndex = 0;\n\t\t}\n\t}\n\tpreviousComponent = currentComponent;\n};\n\noptions.diffed = vnode => {\n\tif (oldAfterDiff) oldAfterDiff(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tif (c.__hooks._pendingEffects.length) afterPaint(afterPaintEffects.push(c));\n\t\tc.__hooks._list.forEach(hookItem => {\n\t\t\tif (hookItem._pendingArgs) {\n\t\t\t\thookItem._args = hookItem._pendingArgs;\n\t\t\t}\n\t\t\tif (hookItem._pendingValue !== EMPTY) {\n\t\t\t\thookItem._value = hookItem._pendingValue;\n\t\t\t}\n\t\t\thookItem._pendingArgs = undefined;\n\t\t\thookItem._pendingValue = EMPTY;\n\t\t});\n\t}\n\tpreviousComponent = currentComponent = null;\n};\n\noptions._commit = (vnode, commitQueue) => {\n\tcommitQueue.some(component => {\n\t\ttry {\n\t\t\tcomponent._renderCallbacks.forEach(invokeCleanup);\n\t\t\tcomponent._renderCallbacks = component._renderCallbacks.filter(cb =>\n\t\t\t\tcb._value ? invokeEffect(cb) : true\n\t\t\t);\n\t\t} catch (e) {\n\t\t\tcommitQueue.some(c => {\n\t\t\t\tif (c._renderCallbacks) c._renderCallbacks = [];\n\t\t\t});\n\t\t\tcommitQueue = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t});\n\n\tif (oldCommit) oldCommit(vnode, commitQueue);\n};\n\noptions.unmount = vnode => {\n\tif (oldBeforeUnmount) oldBeforeUnmount(vnode);\n\n\tconst c = vnode._component;\n\tif (c && c.__hooks) {\n\t\tlet hasErrored;\n\t\tc.__hooks._list.forEach(s => {\n\t\t\ttry {\n\t\t\t\tinvokeCleanup(s);\n\t\t\t} catch (e) {\n\t\t\t\thasErrored = e;\n\t\t\t}\n\t\t});\n\t\tc.__hooks = undefined;\n\t\tif (hasErrored) options._catchError(hasErrored, c._vnode);\n\t}\n};\n\n/**\n * Get a hook's state from the currentComponent\n * @param {number} index The index of the hook to get\n * @param {number} type The index of the hook to get\n * @returns {any}\n */\nfunction getHookState(index, type) {\n\tif (options._hook) {\n\t\toptions._hook(currentComponent, index, currentHook || type);\n\t}\n\tcurrentHook = 0;\n\n\t// Largely inspired by:\n\t// * https://github.com/michael-klein/funcy.js/blob/f6be73468e6ec46b0ff5aa3cc4c9baf72a29025a/src/hooks/core_hooks.mjs\n\t// * https://github.com/michael-klein/funcy.js/blob/650beaa58c43c33a74820a3c98b3c7079cf2e333/src/renderer.mjs\n\t// Other implementations to look at:\n\t// * https://codesandbox.io/s/mnox05qp8\n\tconst hooks =\n\t\tcurrentComponent.__hooks ||\n\t\t(currentComponent.__hooks = {\n\t\t\t_list: [],\n\t\t\t_pendingEffects: []\n\t\t});\n\n\tif (index >= hooks._list.length) {\n\t\thooks._list.push({ _pendingValue: EMPTY });\n\t}\n\treturn hooks._list[index];\n}\n\n/**\n * @param {import('./index').StateUpdater} [initialState]\n */\nexport function useState(initialState) {\n\tcurrentHook = 1;\n\treturn useReducer(invokeOrReturn, initialState);\n}\n\n/**\n * @param {import('./index').Reducer} reducer\n * @param {import('./index').StateUpdater} initialState\n * @param {(initialState: any) => void} [init]\n * @returns {[ any, (state: any) => void ]}\n */\nexport function useReducer(reducer, initialState, init) {\n\t/** @type {import('./internal').ReducerHookState} */\n\tconst hookState = getHookState(currentIndex++, 2);\n\thookState._reducer = reducer;\n\tif (!hookState._component) {\n\t\thookState._value = [\n\t\t\t!init ? invokeOrReturn(undefined, initialState) : init(initialState),\n\n\t\t\taction => {\n\t\t\t\tconst currentValue = hookState._nextValue\n\t\t\t\t\t? hookState._nextValue[0]\n\t\t\t\t\t: hookState._value[0];\n\t\t\t\tconst nextValue = hookState._reducer(currentValue, action);\n\n\t\t\t\tif (currentValue !== nextValue) {\n\t\t\t\t\thookState._nextValue = [nextValue, hookState._value[1]];\n\t\t\t\t\thookState._component.setState({});\n\t\t\t\t}\n\t\t\t}\n\t\t];\n\n\t\thookState._component = currentComponent;\n\n\t\tif (!currentComponent._hasScuFromHooks) {\n\t\t\tcurrentComponent._hasScuFromHooks = true;\n\t\t\tlet prevScu = currentComponent.shouldComponentUpdate;\n\t\t\tconst prevCWU = currentComponent.componentWillUpdate;\n\n\t\t\t// If we're dealing with a forced update `shouldComponentUpdate` will\n\t\t\t// not be called. But we use that to update the hook values, so we\n\t\t\t// need to call it.\n\t\t\tcurrentComponent.componentWillUpdate = function (p, s, c) {\n\t\t\t\tif (this._force) {\n\t\t\t\t\tlet tmp = prevScu;\n\t\t\t\t\t// Clear to avoid other sCU hooks from being called\n\t\t\t\t\tprevScu = undefined;\n\t\t\t\t\tupdateHookState(p, s, c);\n\t\t\t\t\tprevScu = tmp;\n\t\t\t\t}\n\n\t\t\t\tif (prevCWU) prevCWU.call(this, p, s, c);\n\t\t\t};\n\n\t\t\t// This SCU has the purpose of bailing out after repeated updates\n\t\t\t// to stateful hooks.\n\t\t\t// we store the next value in _nextValue[0] and keep doing that for all\n\t\t\t// state setters, if we have next states and\n\t\t\t// all next states within a component end up being equal to their original state\n\t\t\t// we are safe to bail out for this specific component.\n\t\t\t/**\n\t\t\t *\n\t\t\t * @type {import('./internal').Component[\"shouldComponentUpdate\"]}\n\t\t\t */\n\t\t\t// @ts-ignore - We don't use TS to downtranspile\n\t\t\t// eslint-disable-next-line no-inner-declarations\n\t\t\tfunction updateHookState(p, s, c) {\n\t\t\t\tif (!hookState._component.__hooks) return true;\n\n\t\t\t\tconst stateHooks = hookState._component.__hooks._list.filter(\n\t\t\t\t\tx => x._component\n\t\t\t\t);\n\t\t\t\tconst allHooksEmpty = stateHooks.every(x => !x._nextValue);\n\t\t\t\t// When we have no updated hooks in the component we invoke the previous SCU or\n\t\t\t\t// traverse the VDOM tree further.\n\t\t\t\tif (allHooksEmpty) {\n\t\t\t\t\treturn prevScu ? prevScu.call(this, p, s, c) : true;\n\t\t\t\t}\n\n\t\t\t\t// We check whether we have components with a nextValue set that\n\t\t\t\t// have values that aren't equal to one another this pushes\n\t\t\t\t// us to update further down the tree\n\t\t\t\tlet shouldUpdate = false;\n\t\t\t\tstateHooks.forEach(hookItem => {\n\t\t\t\t\tif (hookItem._nextValue) {\n\t\t\t\t\t\tconst currentValue = hookItem._value[0];\n\t\t\t\t\t\thookItem._value = hookItem._nextValue;\n\t\t\t\t\t\thookItem._nextValue = undefined;\n\t\t\t\t\t\tif (currentValue !== hookItem._value[0]) shouldUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn shouldUpdate || hookState._component.props !== p\n\t\t\t\t\t? prevScu\n\t\t\t\t\t\t? prevScu.call(this, p, s, c)\n\t\t\t\t\t\t: true\n\t\t\t\t\t: false;\n\t\t\t}\n\n\t\t\tcurrentComponent.shouldComponentUpdate = updateHookState;\n\t\t}\n\t}\n\n\treturn hookState._nextValue || hookState._value;\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 3);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent.__hooks._pendingEffects.push(state);\n\t}\n}\n\n/**\n * @param {import('./internal').Effect} callback\n * @param {any[]} args\n */\nexport function useLayoutEffect(callback, args) {\n\t/** @type {import('./internal').EffectHookState} */\n\tconst state = getHookState(currentIndex++, 4);\n\tif (!options._skipEffects && argsChanged(state._args, args)) {\n\t\tstate._value = callback;\n\t\tstate._pendingArgs = args;\n\n\t\tcurrentComponent._renderCallbacks.push(state);\n\t}\n}\n\nexport function useRef(initialValue) {\n\tcurrentHook = 5;\n\treturn useMemo(() => ({ current: initialValue }), []);\n}\n\n/**\n * @param {object} ref\n * @param {() => object} createHandle\n * @param {any[]} args\n */\nexport function useImperativeHandle(ref, createHandle, args) {\n\tcurrentHook = 6;\n\tuseLayoutEffect(\n\t\t() => {\n\t\t\tif (typeof ref == 'function') {\n\t\t\t\tref(createHandle());\n\t\t\t\treturn () => ref(null);\n\t\t\t} else if (ref) {\n\t\t\t\tref.current = createHandle();\n\t\t\t\treturn () => (ref.current = null);\n\t\t\t}\n\t\t},\n\t\targs == null ? args : args.concat(ref)\n\t);\n}\n\n/**\n * @param {() => any} factory\n * @param {any[]} args\n */\nexport function useMemo(factory, args) {\n\t/** @type {import('./internal').MemoHookState} */\n\tconst state = getHookState(currentIndex++, 7);\n\tif (argsChanged(state._args, args)) {\n\t\tstate._pendingValue = factory();\n\t\tstate._pendingArgs = args;\n\t\tstate._factory = factory;\n\t\treturn state._pendingValue;\n\t}\n\n\treturn state._value;\n}\n\n/**\n * @param {() => void} callback\n * @param {any[]} args\n */\nexport function useCallback(callback, args) {\n\tcurrentHook = 8;\n\treturn useMemo(() => callback, args);\n}\n\n/**\n * @param {import('./internal').PreactContext} context\n */\nexport function useContext(context) {\n\tconst provider = currentComponent.context[context._id];\n\t// We could skip this call here, but than we'd not call\n\t// `options._hook`. We need to do that in order to make\n\t// the devtools aware of this hook.\n\t/** @type {import('./internal').ContextHookState} */\n\tconst state = getHookState(currentIndex++, 9);\n\t// The devtools needs access to the context object to\n\t// be able to pull of the default value when no provider\n\t// is present in the tree.\n\tstate._context = context;\n\tif (!provider) return context._defaultValue;\n\t// This is probably not safe to convert to \"!\"\n\tif (state._value == null) {\n\t\tstate._value = true;\n\t\tprovider.sub(currentComponent);\n\t}\n\treturn provider.props.value;\n}\n\n/**\n * Display a custom label for a custom hook for the devtools panel\n * @type {(value: T, cb?: (value: T) => string | number) => void}\n */\nexport function useDebugValue(value, formatter) {\n\tif (options.useDebugValue) {\n\t\toptions.useDebugValue(formatter ? formatter(value) : value);\n\t}\n}\n\n/**\n * @param {(error: any, errorInfo: import('preact').ErrorInfo) => void} cb\n */\nexport function useErrorBoundary(cb) {\n\t/** @type {import('./internal').ErrorBoundaryHookState} */\n\tconst state = getHookState(currentIndex++, 10);\n\tconst errState = useState();\n\tstate._value = cb;\n\tif (!currentComponent.componentDidCatch) {\n\t\tcurrentComponent.componentDidCatch = (err, errorInfo) => {\n\t\t\tif (state._value) state._value(err, errorInfo);\n\t\t\terrState[1](err);\n\t\t};\n\t}\n\treturn [\n\t\terrState[0],\n\t\t() => {\n\t\t\terrState[1](undefined);\n\t\t}\n\t];\n}\n\nexport function useId() {\n\tconst state = getHookState(currentIndex++, 11);\n\tif (!state._value) {\n\t\t// Grab either the root node or the nearest async boundary node.\n\t\t/** @type {import('./internal.d').VNode} */\n\t\tlet root = currentComponent._vnode;\n\t\twhile (root !== null && !root._mask && root._parent !== null) {\n\t\t\troot = root._parent;\n\t\t}\n\n\t\tlet mask = root._mask || (root._mask = [0, 0]);\n\t\tstate._value = 'P' + mask[0] + '-' + mask[1]++;\n\t}\n\n\treturn state._value;\n}\n/**\n * After paint effects consumer.\n */\nfunction flushAfterPaintEffects() {\n\tlet component;\n\twhile ((component = afterPaintEffects.shift())) {\n\t\tif (!component._parentDom || !component.__hooks) continue;\n\t\ttry {\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeCleanup);\n\t\t\tcomponent.__hooks._pendingEffects.forEach(invokeEffect);\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t} catch (e) {\n\t\t\tcomponent.__hooks._pendingEffects = [];\n\t\t\toptions._catchError(e, component._vnode);\n\t\t}\n\t}\n}\n\nlet HAS_RAF = typeof requestAnimationFrame == 'function';\n\n/**\n * Schedule a callback to be invoked after the browser has a chance to paint a new frame.\n * Do this by combining requestAnimationFrame (rAF) + setTimeout to invoke a callback after\n * the next browser frame.\n *\n * Also, schedule a timeout in parallel to the the rAF to ensure the callback is invoked\n * even if RAF doesn't fire (for example if the browser tab is not visible)\n *\n * @param {() => void} callback\n */\nfunction afterNextFrame(callback) {\n\tconst done = () => {\n\t\tclearTimeout(timeout);\n\t\tif (HAS_RAF) cancelAnimationFrame(raf);\n\t\tsetTimeout(callback);\n\t};\n\tconst timeout = setTimeout(done, RAF_TIMEOUT);\n\n\tlet raf;\n\tif (HAS_RAF) {\n\t\traf = requestAnimationFrame(done);\n\t}\n}\n\n// Note: if someone used options.debounceRendering = requestAnimationFrame,\n// then effects will ALWAYS run on the NEXT frame instead of the current one, incurring a ~16ms delay.\n// Perhaps this is not such a big deal.\n/**\n * Schedule afterPaintEffects flush after the browser paints\n * @param {number} newQueueLength\n */\nfunction afterPaint(newQueueLength) {\n\tif (newQueueLength === 1 || prevRaf !== options.requestAnimationFrame) {\n\t\tprevRaf = options.requestAnimationFrame;\n\t\t(prevRaf || afterNextFrame)(flushAfterPaintEffects);\n\t}\n}\n\n/**\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeCleanup(hook) {\n\t// A hook cleanup can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\tlet cleanup = hook._cleanup;\n\tif (typeof cleanup == 'function') {\n\t\thook._cleanup = undefined;\n\t\tcleanup();\n\t}\n\n\tcurrentComponent = comp;\n}\n\n/**\n * Invoke a Hook's effect\n * @param {import('./internal').EffectHookState} hook\n */\nfunction invokeEffect(hook) {\n\t// A hook call can introduce a call to render which creates a new root, this will call options.vnode\n\t// and move the currentComponent away.\n\tconst comp = currentComponent;\n\thook._cleanup = hook._value();\n\tcurrentComponent = comp;\n}\n\n/**\n * @param {any[]} oldArgs\n * @param {any[]} newArgs\n */\nfunction argsChanged(oldArgs, newArgs) {\n\treturn (\n\t\t!oldArgs ||\n\t\toldArgs.length !== newArgs.length ||\n\t\tnewArgs.some((arg, index) => arg !== oldArgs[index])\n\t);\n}\n\nfunction invokeOrReturn(arg, f) {\n\treturn typeof f == 'function' ? f(arg) : f;\n}\n","import {Stripe, loadStripe} from '@stripe/stripe-js';\nimport {useState, useCallback, useEffect} from 'preact/hooks';\nimport {PaymentRequestAvailable} from 'src/components/widget/types/PaymentMethod';\nimport {STRIPE_API_VERSION, STRIPE_PUBLIC_KEY} from 'src/constants/stripe';\n\ndeclare global {\n\tinterface Window {\n\t\tApplePaySession: any;\n\t}\n}\n\nfunction useStripe() {\n\tconst [stripePromise, setStripe] = useState(null);\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tconst stripe = await loadStripe(STRIPE_PUBLIC_KEY, {\n\t\t\t\t\tapiVersion: STRIPE_API_VERSION\n\t\t\t\t});\n\n\t\t\t\tsetStripe(stripe);\n\t\t\t} catch {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t})();\n\t}, []);\n\treturn stripePromise;\n}\n\nexport function useCheckPaymentRequest(): PaymentRequestAvailable {\n\tconst stripe = useStripe();\n\n\tconst [googlePay, setGooglePay] = useState(false);\n\tconst [applePay, setApplePay] = useState(false);\n\n\tconst initializePaymentRequest = useCallback(\n\t\tasync (stripe?: Stripe | null) => {\n\t\t\tconst applePay = Boolean(window.ApplePaySession);\n\t\t\tsetApplePay(applePay);\n\n\t\t\tif (!stripe) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst pr = stripe?.paymentRequest({\n\t\t\t\tcountry: 'US',\n\t\t\t\tcurrency: 'usd',\n\t\t\t\ttotal: {label: 'test', amount: 0},\n\t\t\t\trequestPayerName: false,\n\t\t\t\trequestPayerEmail: false\n\t\t\t});\n\t\t\tconst googlePay = Boolean(await pr?.canMakePayment());\n\n\t\t\tsetGooglePay(googlePay);\n\t\t},\n\t\t[]\n\t);\n\n\tuseEffect(() => {\n\t\tvoid initializePaymentRequest(stripe);\n\t}, [initializePaymentRequest, stripe]);\n\n\treturn {googlePay, applePay};\n}\n","import {Fragment} from 'preact/jsx-runtime';\nimport {faqLinkCss} from 'src/components/widget/components/Faq/styles';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getNonprofitName(nonprofit: Nonprofit) {\n\treturn nonprofit.metadata?.prefixWithThe\n\t\t? `the ${nonprofit.name}`\n\t\t: nonprofit.name;\n}\n\nexport function getDisbursementDescription(nonprofit: Nonprofit) {\n\tif (nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\tWe then grant directly to {nonprofit.name} on a weekly basis.\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\tWe then partner with Network for Good to grant to {nonprofit.name} on a{' '}\n\t\t\t\n\t\t\t\tmonthly basis\n\t\t\t\n\t\t\t.\n\t\t\n\t);\n}\n\nexport function getNfgDisclaimer(nonprofit: Nonprofit) {\n\tif (!nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\t

\n\t\t\t\t{nonprofit.name} has not added bank deposit info to Every.org yet, so we\n\t\t\t\tcurrently grant to them through Network for Good, who charges a 2.25%\n\t\t\t\tdisbursement fee.\n\t\t\t

\n\t\t);\n\t}\n\n\treturn null;\n}\n\nexport function getFeeDescriptionBody(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\tswitch (paymentMethod) {\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tPayPal charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVisa and Mastercard charge 2.2% + $0.30 for each transaction. Amex\n\t\t\t\t\t\tcharges a 3.5% flat fee. There’s an additional 1% fee for non-US\n\t\t\t\t\t\tcards.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn (\n\t\t\t\t

\n\t\t\t\t\tEvery.org currently covers all fees for donations made with a bank, so\n\t\t\t\t\t100% of your gift reaches {nonprofit.name}.\n\t\t\t\t

\n\t\t\t);\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVenmo charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tOur exchanges generally charge a 1% flat fee to automatically\n\t\t\t\t\t\tliquidate cryptocurrency. For large donations worth over $5k, you\n\t\t\t\t\t\thave the option to email crypto@every.org to request an address and\n\t\t\t\t\t\twe can do a manual conversion to get the best rates possible\n\t\t\t\t\t\t(usually 0.1%-0.4%). Or you are welcome to donate here with the 1%\n\t\t\t\t\t\tfee.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tEvery.org covers all brokerage fees for commonly traded stocks! For\n\t\t\t\t\t\tmutual funds, the First Republic brokerage fee is usually 0.1% of\n\t\t\t\t\t\tthe principle, with a $30 minimum and $150 maximum. Some slippage\n\t\t\t\t\t\tmay occur between when you donate and when we sell making the final\n\t\t\t\t\t\tamount different from what you donate.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

We do not charge any fees, but your DAF provider may have fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

However, there are third-party fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t}\n}\n\nexport function encourageBankDonation(nonprofit: Nonprofit) {\n\treturn (\n\t\t

\n\t\t\tDon’t like fees? Neither do we! Donate via bank and then 100% of your gift\n\t\t\twill reach {nonprofit.name}.\n\t\t

\n\t);\n}\n\nexport function getFeeDescription(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\treturn (\n\t\t\n\t\t\t

\n\t\t\t\tEvery.org is free for donors and nonprofits, with no platform fees -\n\t\t\t\tinstead we ask for a completely optional tip.\n\t\t\t

\n\t\t\t{getFeeDescriptionBody(paymentMethod, nonprofit)}\n\t\t
\n\t);\n}\n","export function isPresent(value: T): value is Exclude {\n\treturn !(value === null || value === undefined);\n}\n\nfunction addParameters(\n\tlink: string,\n\tparameters: Record\n) {\n\t// We don't use URLSearchParams here because it changes spaces to +s instead\n\t// of %20, and some mail clients like Apple don't handle that well.\n\tconst queryString = Object.entries(parameters)\n\t\t.map(([key, value]) => {\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t\treturn [key, value].map(encodeURIComponent).join('=');\n\t\t\t} catch {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t})\n\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t.filter(isPresent)\n\t\t.join('&');\n\treturn queryString ? [link, queryString].join('?') : link;\n}\n\nexport function mailToLink(parameters: {\n\taddress?: string;\n\tsubject?: string;\n\tbody?: string;\n}) {\n\treturn addParameters(`mailto:${parameters.address ?? ''}`, {\n\t\t...(parameters.subject ? {subject: parameters.subject} : {}),\n\t\t...(parameters.body ? {body: parameters.body} : {})\n\t});\n}\n","/*\r\n * big.js v6.2.1\r\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\r\n * Copyright (c) 2022 Michael Mclaughlin\r\n * https://github.com/MikeMcl/big.js/LICENCE.md\r\n */\r\n\r\n\r\n/************************************** EDITABLE DEFAULTS *****************************************/\r\n\r\n\r\n // The default values below must be integers within the stated ranges.\r\n\r\n /*\r\n * The maximum number of decimal places (DP) of the results of operations involving division:\r\n * div and sqrt, and pow with negative exponents.\r\n */\r\nvar DP = 20, // 0 to MAX_DP\r\n\r\n /*\r\n * The rounding mode (RM) used when rounding to the above decimal places.\r\n *\r\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\r\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\r\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\r\n * 3 Away from zero. (ROUND_UP)\r\n */\r\n RM = 1, // 0, 1, 2 or 3\r\n\r\n // The maximum value of DP and Big.DP.\r\n MAX_DP = 1E6, // 0 to 1000000\r\n\r\n // The maximum magnitude of the exponent argument to the pow method.\r\n MAX_POWER = 1E6, // 1 to 1000000\r\n\r\n /*\r\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\r\n * (JavaScript numbers: -7)\r\n * -1000000 is the minimum recommended exponent value of a Big.\r\n */\r\n NE = -7, // 0 to -1000000\r\n\r\n /*\r\n * The positive exponent (PE) at and above which toString returns exponential notation.\r\n * (JavaScript numbers: 21)\r\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\r\n */\r\n PE = 21, // 0 to 1000000\r\n\r\n /*\r\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\r\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\r\n * primitive number without a loss of precision.\r\n */\r\n STRICT = false, // true or false\r\n\r\n\r\n/**************************************************************************************************/\r\n\r\n\r\n // Error messages.\r\n NAME = '[big.js] ',\r\n INVALID = NAME + 'Invalid ',\r\n INVALID_DP = INVALID + 'decimal places',\r\n INVALID_RM = INVALID + 'rounding mode',\r\n DIV_BY_ZERO = NAME + 'Division by zero',\r\n\r\n // The shared prototype object.\r\n P = {},\r\n UNDEFINED = void 0,\r\n NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\r\n\r\n\r\n/*\r\n * Create and return a Big constructor.\r\n */\r\nfunction _Big_() {\r\n\r\n /*\r\n * The Big constructor and exported function.\r\n * Create and return a new instance of a Big number object.\r\n *\r\n * n {number|string|Big} A numeric value.\r\n */\r\n function Big(n) {\r\n var x = this;\r\n\r\n // Enable constructor usage without new.\r\n if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);\r\n\r\n // Duplicate.\r\n if (n instanceof Big) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = n.c.slice();\r\n } else {\r\n if (typeof n !== 'string') {\r\n if (Big.strict === true && typeof n !== 'bigint') {\r\n throw TypeError(INVALID + 'value');\r\n }\r\n\r\n // Minus zero?\r\n n = n === 0 && 1 / n < 0 ? '-0' : String(n);\r\n }\r\n\r\n parse(x, n);\r\n }\r\n\r\n // Retain a reference to this Big constructor.\r\n // Shadow Big.prototype.constructor which points to Object.\r\n x.constructor = Big;\r\n }\r\n\r\n Big.prototype = P;\r\n Big.DP = DP;\r\n Big.RM = RM;\r\n Big.NE = NE;\r\n Big.PE = PE;\r\n Big.strict = STRICT;\r\n Big.roundDown = 0;\r\n Big.roundHalfUp = 1;\r\n Big.roundHalfEven = 2;\r\n Big.roundUp = 3;\r\n\r\n return Big;\r\n}\r\n\r\n\r\n/*\r\n * Parse the number or string value passed to a Big constructor.\r\n *\r\n * x {Big} A Big number instance.\r\n * n {number|string} A numeric value.\r\n */\r\nfunction parse(x, n) {\r\n var e, i, nl;\r\n\r\n if (!NUMERIC.test(n)) {\r\n throw Error(INVALID + 'number');\r\n }\r\n\r\n // Determine sign.\r\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\r\n\r\n // Decimal point?\r\n if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = n.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +n.slice(i + 1);\r\n n = n.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = n.length;\r\n }\r\n\r\n nl = n.length;\r\n\r\n // Determine leading zeros.\r\n for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\r\n\r\n if (i == nl) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n\r\n // Determine trailing zeros.\r\n for (; nl > 0 && n.charAt(--nl) == '0';);\r\n x.e = e - i - 1;\r\n x.c = [];\r\n\r\n // Convert string to array of digits without leading/trailing zeros.\r\n for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\r\n *\r\n * x {Big} The Big to round.\r\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\r\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n * [more] {boolean} Whether the result of division was truncated.\r\n */\r\nfunction round(x, sd, rm, more) {\r\n var xc = x.c;\r\n\r\n if (rm === UNDEFINED) rm = x.constructor.RM;\r\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\r\n throw Error(INVALID_RM);\r\n }\r\n\r\n if (sd < 1) {\r\n more =\r\n rm === 3 && (more || !!xc[0]) || sd === 0 && (\r\n rm === 1 && xc[0] >= 5 ||\r\n rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED))\r\n );\r\n\r\n xc.length = 1;\r\n\r\n if (more) {\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n x.e = x.e - sd + 1;\r\n xc[0] = 1;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n } else if (sd < xc.length) {\r\n\r\n // xc[sd] is the digit after the digit that may be rounded up.\r\n more =\r\n rm === 1 && xc[sd] >= 5 ||\r\n rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\r\n (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\r\n rm === 3 && (more || !!xc[0]);\r\n\r\n // Remove any digits after the required precision.\r\n xc.length = sd;\r\n\r\n // Round up?\r\n if (more) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up.\r\n for (; ++xc[--sd] > 9;) {\r\n xc[sd] = 0;\r\n if (sd === 0) {\r\n ++x.e;\r\n xc.unshift(1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (sd = xc.length; !xc[--sd];) xc.pop();\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Return a string representing the value of Big x in normal or exponential notation.\r\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\r\n */\r\nfunction stringify(x, doExponential, isNonzero) {\r\n var e = x.e,\r\n s = x.c.join(''),\r\n n = s.length;\r\n\r\n // Exponential notation?\r\n if (doExponential) {\r\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\r\n\r\n // Normal notation.\r\n } else if (e < 0) {\r\n for (; ++e;) s = '0' + s;\r\n s = '0.' + s;\r\n } else if (e > 0) {\r\n if (++e > n) {\r\n for (e -= n; e--;) s += '0';\r\n } else if (e < n) {\r\n s = s.slice(0, e) + '.' + s.slice(e);\r\n }\r\n } else if (n > 1) {\r\n s = s.charAt(0) + '.' + s.slice(1);\r\n }\r\n\r\n return x.s < 0 && isNonzero ? '-' + s : s;\r\n}\r\n\r\n\r\n// Prototype/instance methods\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the absolute value of this Big.\r\n */\r\nP.abs = function () {\r\n var x = new this.constructor(this);\r\n x.s = 1;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return 1 if the value of this Big is greater than the value of Big y,\r\n * -1 if the value of this Big is less than the value of Big y, or\r\n * 0 if they have the same value.\r\n */\r\nP.cmp = function (y) {\r\n var isneg,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new x.constructor(y)).c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n isneg = i < 0;\r\n\r\n // Compare exponents.\r\n if (k != l) return k > l ^ isneg ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = -1; ++i < j;) {\r\n if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ isneg ? 1 : -1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\r\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.div = function (y) {\r\n var x = this,\r\n Big = x.constructor,\r\n a = x.c, // dividend\r\n b = (y = new Big(y)).c, // divisor\r\n k = x.s == y.s ? 1 : -1,\r\n dp = Big.DP;\r\n\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n\r\n // Divisor is zero?\r\n if (!b[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n // Dividend is 0? Return +-0.\r\n if (!a[0]) {\r\n y.s = k;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n var bl, bt, n, cmp, ri,\r\n bz = b.slice(),\r\n ai = bl = b.length,\r\n al = a.length,\r\n r = a.slice(0, bl), // remainder\r\n rl = r.length,\r\n q = y, // quotient\r\n qc = q.c = [],\r\n qi = 0,\r\n p = dp + (q.e = x.e - y.e) + 1; // precision of the result\r\n\r\n q.s = k;\r\n k = p < 0 ? 0 : p;\r\n\r\n // Create version of divisor with leading zero.\r\n bz.unshift(0);\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; rl++ < bl;) r.push(0);\r\n\r\n do {\r\n\r\n // n is how many times the divisor goes into current remainder.\r\n for (n = 0; n < 10; n++) {\r\n\r\n // Compare divisor and remainder.\r\n if (bl != (rl = r.length)) {\r\n cmp = bl > rl ? 1 : -1;\r\n } else {\r\n for (ri = -1, cmp = 0; ++ri < bl;) {\r\n if (b[ri] != r[ri]) {\r\n cmp = b[ri] > r[ri] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If divisor < remainder, subtract divisor from remainder.\r\n if (cmp < 0) {\r\n\r\n // Remainder can't be more than 1 digit longer than divisor.\r\n // Equalise lengths using divisor with extra leading zero?\r\n for (bt = rl == bl ? b : bz; rl;) {\r\n if (r[--rl] < bt[rl]) {\r\n ri = rl;\r\n for (; ri && !r[--ri];) r[ri] = 9;\r\n --r[ri];\r\n r[rl] += 10;\r\n }\r\n r[rl] -= bt[rl];\r\n }\r\n\r\n for (; !r[0];) r.shift();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n // Add the digit n to the result array.\r\n qc[qi++] = cmp ? n : ++n;\r\n\r\n // Update the remainder.\r\n if (r[0] && cmp) r[rl] = a[ai] || 0;\r\n else r = [a[ai]];\r\n\r\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\r\n\r\n // Leading zero? Do not remove if result is simply zero (qi == 1).\r\n if (!qc[0] && qi != 1) {\r\n\r\n // There can't be more than one zero.\r\n qc.shift();\r\n q.e--;\r\n p--;\r\n }\r\n\r\n // Round?\r\n if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);\r\n\r\n return q;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\r\n */\r\nP.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\r\n * false.\r\n */\r\nP.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.gte = function (y) {\r\n return this.cmp(y) > -1;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\r\n */\r\nP.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\r\n * return false.\r\n */\r\nP.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big minus the value of Big y.\r\n */\r\nP.minus = P.sub = function (y) {\r\n var i, j, t, xlty,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xc = x.c.slice(),\r\n xe = x.e,\r\n yc = y.c,\r\n ye = y.e;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (yc[0]) {\r\n y.s = -b;\r\n } else if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = 1;\r\n }\r\n return y;\r\n }\r\n\r\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\r\n if (a = xe - ye) {\r\n\r\n if (xlty = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n for (b = a; b--;) t.push(0);\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n if (xc[b] != yc[b]) {\r\n xlty = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xlty) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n /*\r\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\r\n * needs to start at yc.length.\r\n */\r\n if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;\r\n\r\n // Subtract yc from xc.\r\n for (b = i; j > a;) {\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i];) xc[i] = 9;\r\n --xc[i];\r\n xc[j] += 10;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--b] === 0;) xc.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] === 0;) {\r\n xc.shift();\r\n --ye;\r\n }\r\n\r\n if (!xc[0]) {\r\n\r\n // n - n = +0\r\n y.s = 1;\r\n\r\n // Result must be zero.\r\n xc = [ye = 0];\r\n }\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\r\n */\r\nP.mod = function (y) {\r\n var ygtx,\r\n x = this,\r\n Big = x.constructor,\r\n a = x.s,\r\n b = (y = new Big(y)).s;\r\n\r\n if (!y.c[0]) {\r\n throw Error(DIV_BY_ZERO);\r\n }\r\n\r\n x.s = y.s = 1;\r\n ygtx = y.cmp(x) == 1;\r\n x.s = a;\r\n y.s = b;\r\n\r\n if (ygtx) return new Big(x);\r\n\r\n a = Big.DP;\r\n b = Big.RM;\r\n Big.DP = Big.RM = 0;\r\n x = x.div(y);\r\n Big.DP = a;\r\n Big.RM = b;\r\n\r\n return this.minus(x.times(y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big negated.\r\n */\r\nP.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big plus the value of Big y.\r\n */\r\nP.plus = P.add = function (y) {\r\n var e, k, t,\r\n x = this,\r\n Big = x.constructor;\r\n\r\n y = new Big(y);\r\n\r\n // Signs differ?\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e,\r\n xc = x.c,\r\n ye = y.e,\r\n yc = y.c;\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n if (!yc[0]) {\r\n if (xc[0]) {\r\n y = new Big(x);\r\n } else {\r\n y.s = x.s;\r\n }\r\n }\r\n return y;\r\n }\r\n\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents.\r\n // Note: reverse faster than unshifts.\r\n if (e = xe - ye) {\r\n if (e > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n e = -e;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; e--;) t.push(0);\r\n t.reverse();\r\n }\r\n\r\n // Point xc to the longer array.\r\n if (xc.length - yc.length < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n }\r\n\r\n e = yc.length;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\r\n for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n\r\n if (k) {\r\n xc.unshift(k);\r\n ++ye;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (e = xc.length; xc[--e] === 0;) xc.pop();\r\n\r\n y.c = xc;\r\n y.e = ye;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a Big whose value is the value of this Big raised to the power n.\r\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\r\n * mode Big.RM.\r\n *\r\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\r\n */\r\nP.pow = function (n) {\r\n var x = this,\r\n one = new x.constructor('1'),\r\n y = one,\r\n isneg = n < 0;\r\n\r\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\r\n throw Error(INVALID + 'exponent');\r\n }\r\n\r\n if (isneg) n = -n;\r\n\r\n for (;;) {\r\n if (n & 1) y = y.times(x);\r\n n >>= 1;\r\n if (!n) break;\r\n x = x.times(x);\r\n }\r\n\r\n return isneg ? one.div(y) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\r\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.prec = function (sd, rm) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n return round(new this.constructor(this), sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\r\n * using rounding mode rm, or Big.RM if rm is not specified.\r\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\r\n * If dp is not specified, round to 0 decimal places.\r\n *\r\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.round = function (dp, rm) {\r\n if (dp === UNDEFINED) dp = 0;\r\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n return round(new this.constructor(this), dp + this.e + 1, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\r\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\r\n */\r\nP.sqrt = function () {\r\n var r, c, t,\r\n x = this,\r\n Big = x.constructor,\r\n s = x.s,\r\n e = x.e,\r\n half = new Big('0.5');\r\n\r\n // Zero?\r\n if (!x.c[0]) return new Big(x);\r\n\r\n // Negative?\r\n if (s < 0) {\r\n throw Error(NAME + 'No square root');\r\n }\r\n\r\n // Estimate.\r\n s = Math.sqrt(x + '');\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\r\n if (s === 0 || s === 1 / 0) {\r\n c = x.c.join('');\r\n if (!(c.length + e & 1)) c += '0';\r\n s = Math.sqrt(c);\r\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\r\n r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\r\n } else {\r\n r = new Big(s + '');\r\n }\r\n\r\n e = r.e + (Big.DP += 4);\r\n\r\n // Newton-Raphson iteration.\r\n do {\r\n t = r;\r\n r = half.times(t.plus(x.div(t)));\r\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\r\n\r\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Big whose value is the value of this Big times the value of Big y.\r\n */\r\nP.times = P.mul = function (y) {\r\n var c,\r\n x = this,\r\n Big = x.constructor,\r\n xc = x.c,\r\n yc = (y = new Big(y)).c,\r\n a = xc.length,\r\n b = yc.length,\r\n i = x.e,\r\n j = y.e;\r\n\r\n // Determine sign of result.\r\n y.s = x.s == y.s ? 1 : -1;\r\n\r\n // Return signed 0 if either 0.\r\n if (!xc[0] || !yc[0]) {\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // Initialise exponent of result as x.e + y.e.\r\n y.e = i + j;\r\n\r\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\r\n if (a < b) {\r\n c = xc;\r\n xc = yc;\r\n yc = c;\r\n j = a;\r\n a = b;\r\n b = j;\r\n }\r\n\r\n // Initialise coefficient array of result with zeros.\r\n for (c = new Array(j = a + b); j--;) c[j] = 0;\r\n\r\n // Multiply.\r\n\r\n // i is initially xc.length.\r\n for (i = b; i--;) {\r\n b = 0;\r\n\r\n // a is yc.length.\r\n for (j = a + i; j > i;) {\r\n\r\n // Current sum of products at this digit position, plus carry.\r\n b = c[j] + yc[i] * xc[j - i - 1] + b;\r\n c[j--] = b % 10;\r\n\r\n // carry\r\n b = b / 10 | 0;\r\n }\r\n\r\n c[j] = b;\r\n }\r\n\r\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\r\n if (b) ++y.e;\r\n else c.shift();\r\n\r\n // Remove trailing zeros.\r\n for (i = c.length; !c[--i];) c.pop();\r\n y.c = c;\r\n\r\n return y;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toExponential = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), ++dp, rm);\r\n for (; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, true, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\r\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\r\n *\r\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n */\r\nP.toFixed = function (dp, rm) {\r\n var x = this,\r\n n = x.c[0];\r\n\r\n if (dp !== UNDEFINED) {\r\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\r\n throw Error(INVALID_DP);\r\n }\r\n x = round(new x.constructor(x), dp + x.e + 1, rm);\r\n\r\n // x.e may have changed if the value is rounded up.\r\n for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, false, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Omit the sign for negative zero.\r\n */\r\nP[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\r\n};\r\n\r\n\r\n/*\r\n * Return the value of this Big as a primitve number.\r\n */\r\nP.toNumber = function () {\r\n var n = Number(stringify(this, true, true));\r\n if (this.constructor.strict === true && !this.eq(n.toString())) {\r\n throw Error(NAME + 'Imprecise conversion');\r\n }\r\n return n;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big rounded to sd significant digits using\r\n * rounding mode rm, or Big.RM if rm is not specified.\r\n * Use exponential notation if sd is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\r\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\r\n */\r\nP.toPrecision = function (sd, rm) {\r\n var x = this,\r\n Big = x.constructor,\r\n n = x.c[0];\r\n\r\n if (sd !== UNDEFINED) {\r\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\r\n throw Error(INVALID + 'precision');\r\n }\r\n x = round(new Big(x), sd, rm);\r\n for (; x.c.length < sd;) x.c.push(0);\r\n }\r\n\r\n return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Big.\r\n * Return exponential notation if this Big has a positive exponent equal to or greater than\r\n * Big.PE, or a negative exponent equal to or less than Big.NE.\r\n * Include the sign for negative zero.\r\n */\r\nP.valueOf = function () {\r\n var x = this,\r\n Big = x.constructor;\r\n if (Big.strict === true) {\r\n throw Error(NAME + 'valueOf disallowed');\r\n }\r\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\r\n};\r\n\r\n\r\n// Export\r\n\r\n\r\nexport var Big = _Big_();\r\n\r\n/// \r\nexport default Big;\r\n","/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Check if two objects have a different shape\n * @param {object} a\n * @param {object} b\n * @returns {boolean}\n */\nexport function shallowDiffers(a, b) {\n\tfor (let i in a) if (i !== '__source' && !(i in b)) return true;\n\tfor (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;\n\treturn false;\n}\n\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/**\n * Check if two values are the same value\n * @param {*} x\n * @param {*} y\n * @returns {boolean}\n */\nexport function is(x, y) {\n\treturn (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function (props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function (error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function (vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._hydrating === true) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function (promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tconst wasHydrating = suspendingVNode._hydrating === true;\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function () {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function (props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._hydrating = null;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\t/** @type {import('./internal').Component} */\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function (child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function (props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate =\n\tSuspenseList.prototype.componentDidMount = function () {\n\t\t// Iterate through all children after mounting for two reasons:\n\t\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t\t// The nodes can now be completely consumed from the linked list.\n\t\t// 2. Handle nodes that might have gotten resolved between render and\n\t\t// componentDidMount.\n\t\tthis._map.forEach((node, child) => {\n\t\t\tresolve(this, child, node);\n\t\t});\n\t};\n","import {\n\trender as preactRender,\n\thydrate as preactHydrate,\n\toptions,\n\ttoChildArray,\n\tComponent\n} from 'preact';\n\nexport const REACT_ELEMENT_TYPE =\n\t(typeof Symbol != 'undefined' && Symbol.for && Symbol.for('react.element')) ||\n\t0xeac7;\n\nconst CAMEL_PROPS =\n\t/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;\nconst ON_ANI = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;\nconst CAMEL_REPLACE = /[A-Z0-9]/g;\n\nconst IS_DOM = typeof document !== 'undefined';\n\n// Input types for which onchange should not be converted to oninput.\n// type=\"file|checkbox|radio\", plus \"range\" in IE11.\n// (IE11 doesn't support Symbol, which we use here to turn `rad` into `ra` which matches \"range\")\nconst onChangeInputType = type =>\n\t(typeof Symbol != 'undefined' && typeof Symbol() == 'symbol'\n\t\t? /fil|che|rad/\n\t\t: /fil|che|ra/\n\t).test(type);\n\n// Some libraries like `react-virtualized` explicitly check for this.\nComponent.prototype.isReactComponent = {};\n\n// `UNSAFE_*` lifecycle hooks\n// Preact only ever invokes the unprefixed methods.\n// Here we provide a base \"fallback\" implementation that calls any defined UNSAFE_ prefixed method.\n// - If a component defines its own `componentDidMount()` (including via defineProperty), use that.\n// - If a component defines `UNSAFE_componentDidMount()`, `componentDidMount` is the alias getter/setter.\n// - If anything assigns to an `UNSAFE_*` property, the assignment is forwarded to the unprefixed property.\n// See https://github.com/preactjs/preact/issues/1941\n[\n\t'componentWillMount',\n\t'componentWillReceiveProps',\n\t'componentWillUpdate'\n].forEach(key => {\n\tObject.defineProperty(Component.prototype, key, {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn this['UNSAFE_' + key];\n\t\t},\n\t\tset(v) {\n\t\t\tObject.defineProperty(this, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t\tvalue: v\n\t\t\t});\n\t\t}\n\t});\n});\n\n/**\n * Proxy render() since React returns a Component reference.\n * @param {import('./internal').VNode} vnode VNode tree to render\n * @param {import('./internal').PreactElement} parent DOM node to render vnode tree into\n * @param {() => void} [callback] Optional callback that will be called after rendering\n * @returns {import('./internal').Component | null} The root component reference or null\n */\nexport function render(vnode, parent, callback) {\n\t// React destroys any existing DOM nodes, see #1727\n\t// ...but only on the first render, see #1828\n\tif (parent._children == null) {\n\t\tparent.textContent = '';\n\t}\n\n\tpreactRender(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nexport function hydrate(vnode, parent, callback) {\n\tpreactHydrate(vnode, parent);\n\tif (typeof callback == 'function') callback();\n\n\treturn vnode ? vnode._component : null;\n}\n\nlet oldEventHook = options.event;\noptions.event = e => {\n\tif (oldEventHook) e = oldEventHook(e);\n\n\te.persist = empty;\n\te.isPropagationStopped = isPropagationStopped;\n\te.isDefaultPrevented = isDefaultPrevented;\n\treturn (e.nativeEvent = e);\n};\n\nfunction empty() {}\n\nfunction isPropagationStopped() {\n\treturn this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n\treturn this.defaultPrevented;\n}\n\nconst classNameDescriptorNonEnumberable = {\n\tenumerable: false,\n\tconfigurable: true,\n\tget() {\n\t\treturn this.class;\n\t}\n};\n\nfunction handleDomVNode(vnode) {\n\tlet props = vnode.props,\n\t\ttype = vnode.type,\n\t\tnormalizedProps = {};\n\n\tfor (let i in props) {\n\t\tlet value = props[i];\n\n\t\tif (\n\t\t\t(i === 'value' && 'defaultValue' in props && value == null) ||\n\t\t\t// Emulate React's behavior of not rendering the contents of noscript tags on the client.\n\t\t\t(IS_DOM && i === 'children' && type === 'noscript') ||\n\t\t\ti === 'class' ||\n\t\t\ti === 'className'\n\t\t) {\n\t\t\t// Skip applying value if it is null/undefined and we already set\n\t\t\t// a default value\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet lowerCased = i.toLowerCase();\n\t\tif (i === 'defaultValue' && 'value' in props && props.value == null) {\n\t\t\t// `defaultValue` is treated as a fallback `value` when a value prop is present but null/undefined.\n\t\t\t// `defaultValue` for Elements with no value prop is the same as the DOM defaultValue property.\n\t\t\ti = 'value';\n\t\t} else if (i === 'download' && value === true) {\n\t\t\t// Calling `setAttribute` with a truthy value will lead to it being\n\t\t\t// passed as a stringified value, e.g. `download=\"true\"`. React\n\t\t\t// converts it to an empty string instead, otherwise the attribute\n\t\t\t// value will be used as the file name and the file will be called\n\t\t\t// \"true\" upon downloading it.\n\t\t\tvalue = '';\n\t\t} else if (lowerCased === 'ondoubleclick') {\n\t\t\ti = 'ondblclick';\n\t\t} else if (\n\t\t\tlowerCased === 'onchange' &&\n\t\t\t(type === 'input' || type === 'textarea') &&\n\t\t\t!onChangeInputType(props.type)\n\t\t) {\n\t\t\tlowerCased = i = 'oninput';\n\t\t} else if (lowerCased === 'onfocus') {\n\t\t\ti = 'onfocusin';\n\t\t} else if (lowerCased === 'onblur') {\n\t\t\ti = 'onfocusout';\n\t\t} else if (ON_ANI.test(i)) {\n\t\t\ti = lowerCased;\n\t\t} else if (type.indexOf('-') === -1 && CAMEL_PROPS.test(i)) {\n\t\t\ti = i.replace(CAMEL_REPLACE, '-$&').toLowerCase();\n\t\t} else if (value === null) {\n\t\t\tvalue = undefined;\n\t\t}\n\n\t\t// Add support for onInput and onChange, see #3561\n\t\t// if we have an oninput prop already change it to oninputCapture\n\t\tif (lowerCased === 'oninput') {\n\t\t\ti = lowerCased;\n\t\t\tif (normalizedProps[i]) {\n\t\t\t\ti = 'oninputCapture';\n\t\t\t}\n\t\t}\n\n\t\tnormalizedProps[i] = value;\n\t}\n\n\t// Add support for array select values: value not being updated.\n\t\t\t\t\t// To avoid a stale select value we need to set the option.value\n\t\t\t\t\t// again, which triggers IE11 to re-evaluate the select value\n\t\t\t\t\t(nodeType === 'option' && i !== oldProps.value))\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'value', i, oldProps.value, false);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t'checked' in newProps &&\n\t\t\t\t(i = newProps.checked) !== undefined &&\n\t\t\t\ti !== dom.checked\n\t\t\t) {\n\t\t\t\tsetProperty(dom, 'checked', i, oldProps.checked, false);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/**\n * Invoke or update a ref, depending on whether it is a function or object ref.\n * @param {object|function} ref\n * @param {any} value\n * @param {import('../internal').VNode} vnode\n */\nexport function applyRef(ref, value, vnode) {\n\ttry {\n\t\tif (typeof ref == 'function') ref(value);\n\t\telse ref.current = value;\n\t} catch (e) {\n\t\toptions._catchError(e, vnode);\n\t}\n}\n\n/**\n * Unmount a virtual node from the tree and apply DOM changes\n * @param {import('../internal').VNode} vnode The virtual node to unmount\n * @param {import('../internal').VNode} parentVNode The parent of the VNode that\n * initiated the unmount\n * @param {boolean} [skipRemove] Flag that indicates that a parent node of the\n * current element is already detached from the DOM.\n */\nexport function unmount(vnode, parentVNode, skipRemove) {\n\tlet r;\n\tif (options.unmount) options.unmount(vnode);\n\n\tif ((r = vnode.ref)) {\n\t\tif (!r.current || r.current === vnode._dom) {\n\t\t\tapplyRef(r, null, parentVNode);\n\t\t}\n\t}\n\n\tif ((r = vnode._component) != null) {\n\t\tif (r.componentWillUnmount) {\n\t\t\ttry {\n\t\t\t\tr.componentWillUnmount();\n\t\t\t} catch (e) {\n\t\t\t\toptions._catchError(e, parentVNode);\n\t\t\t}\n\t\t}\n\n\t\tr.base = r._parentDom = null;\n\t\tvnode._component = undefined;\n\t}\n\n\tif ((r = vnode._children)) {\n\t\tfor (let i = 0; i < r.length; i++) {\n\t\t\tif (r[i]) {\n\t\t\t\tunmount(\n\t\t\t\t\tr[i],\n\t\t\t\t\tparentVNode,\n\t\t\t\t\tskipRemove || typeof vnode.type !== 'function'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!skipRemove && vnode._dom != null) {\n\t\tremoveNode(vnode._dom);\n\t}\n\n\t// Must be set to `undefined` to properly clean up `_nextDom`\n\t// for which `null` is a valid value. See comment in `create-element.js`\n\tvnode._parent = vnode._dom = vnode._nextDom = undefined;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n","import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = ((!isHydrating && replaceNode) || parentDom)._children =\n\t\tcreateElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [],\n\t\trefQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating,\n\t\trefQueue\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode, refQueue);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","import { assign, slice } from './util';\nimport { createVNode } from './create-element';\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {import('./internal').VNode} vnode The virtual DOM element to clone\n * @param {object} props Attributes/props to add when cloning\n * @param {Array} rest Any additional arguments will be used as replacement children.\n * @returns {import('./internal').VNode}\n */\nexport function cloneElement(vnode, props, children) {\n\tlet normalizedProps = assign({}, vnode.props),\n\t\tkey,\n\t\tref,\n\t\ti;\n\n\tlet defaultProps;\n\n\tif (vnode.type && vnode.type.defaultProps) {\n\t\tdefaultProps = vnode.type.defaultProps;\n\t}\n\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse if (props[i] === undefined && defaultProps !== undefined) {\n\t\t\tnormalizedProps[i] = defaultProps[i];\n\t\t} else {\n\t\t\tnormalizedProps[i] = props[i];\n\t\t}\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\treturn createVNode(\n\t\tvnode.type,\n\t\tnormalizedProps,\n\t\tkey || vnode.key,\n\t\tref || vnode.ref,\n\t\tnull\n\t);\n}\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType =\n\t\tcontext);\n}\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw\n * the error that was caught (except for unmounting when this parameter\n * is the highest parent that was being unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component, ctor, handled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != null) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != null) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","/* global __webpack_public_path__ */\n\nimport * as Preact from 'preact';\nconst { h, render, hydrate } = Preact;\n\nconst interopDefault = m => (m && m.default ? m.default : m);\n\nconst normalizeURL = url => (url[url.length - 1] === '/' ? url : url + '/');\n\nif (process.env.NODE_ENV === 'development') {\n\t// enable preact devtools\n\trequire('preact/debug');\n\n\t// only add a debug sw if webpack service worker is not requested.\n\tif (process.env.ADD_SW === undefined && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) + 'sw-debug.js'\n\t\t);\n\t} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\t\tnavigator.serviceWorker.register(\n\t\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t\t);\n\t}\n} else if (process.env.ADD_SW && 'serviceWorker' in navigator) {\n\tnavigator.serviceWorker.register(\n\t\tnormalizeURL(__webpack_public_path__) +\n\t\t\t(process.env.ES_BUILD ? 'sw-esm.js' : 'sw.js')\n\t);\n}\n\nlet app = interopDefault(require('preact-cli-entrypoint'));\n\nif (typeof app === 'function') {\n\tlet root =\n\t\tdocument.getElementById('preact_root') || document.body.firstElementChild;\n\n\tlet init = () => {\n\t\tlet app = interopDefault(require('preact-cli-entrypoint'));\n\t\tlet preRenderData = {};\n\t\tconst inlineDataElement = document.querySelector(\n\t\t\t'[type=\"__PREACT_CLI_DATA__\"]'\n\t\t);\n\t\tif (inlineDataElement) {\n\t\t\tpreRenderData =\n\t\t\t\tJSON.parse(decodeURI(inlineDataElement.innerHTML)).preRenderData ||\n\t\t\t\tpreRenderData;\n\t\t}\n\t\t/* An object named CLI_DATA is passed as a prop,\n\t\t * this keeps us future proof if in case we decide,\n\t\t * to send other data like at some point in time.\n\t\t */\n\t\tconst CLI_DATA = { preRenderData };\n\t\tconst currentURL = preRenderData.url ? normalizeURL(preRenderData.url) : '';\n\t\tconst canHydrate =\n\t\t\tprocess.env.PRERENDER &&\n\t\t\tprocess.env.NODE_ENV === 'production' &&\n\t\t\thydrate &&\n\t\t\tcurrentURL === normalizeURL(location.pathname);\n\t\tconst doRender = canHydrate ? hydrate : render;\n\t\tdoRender(h(app, { CLI_DATA }), document.body, root);\n\t};\n\n\tif (module.hot) module.hot.accept('preact-cli-entrypoint', init);\n\n\tinit();\n}\n","/*\n * Fuzzy\n * https://github.com/myork/fuzzy\n *\n * Copyright (c) 2012 Matt York\n * Licensed under the MIT license.\n */\n\n(function() {\n\nvar root = this;\n\nvar fuzzy = {};\n\n// Use in node or in browser\nif (typeof exports !== 'undefined') {\n module.exports = fuzzy;\n} else {\n root.fuzzy = fuzzy;\n}\n\n// Return all elements of `array` that have a fuzzy\n// match against `pattern`.\nfuzzy.simpleFilter = function(pattern, array) {\n return array.filter(function(str) {\n return fuzzy.test(pattern, str);\n });\n};\n\n// Does `pattern` fuzzy match `str`?\nfuzzy.test = function(pattern, str) {\n return fuzzy.match(pattern, str) !== null;\n};\n\n// If `pattern` matches `str`, wrap each matching character\n// in `opts.pre` and `opts.post`. If no match, return null\nfuzzy.match = function(pattern, str, opts) {\n opts = opts || {};\n var patternIdx = 0\n , result = []\n , len = str.length\n , totalScore = 0\n , currScore = 0\n // prefix\n , pre = opts.pre || ''\n // suffix\n , post = opts.post || ''\n // String to compare against. This might be a lowercase version of the\n // raw string\n , compareString = opts.caseSensitive && str || str.toLowerCase()\n , ch;\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n // For each character in the string, either add it to the result\n // or wrap in template if it's the next string in the pattern\n for(var idx = 0; idx < len; idx++) {\n ch = str[idx];\n if(compareString[idx] === pattern[patternIdx]) {\n ch = pre + ch + post;\n patternIdx += 1;\n\n // consecutive characters should increase the score more than linearly\n currScore += 1 + currScore;\n } else {\n currScore = 0;\n }\n totalScore += currScore;\n result[result.length] = ch;\n }\n\n // return rendered string if we have a match for every char\n if(patternIdx === pattern.length) {\n // if the string is an exact match with pattern, totalScore should be maxed\n totalScore = (compareString === pattern) ? Infinity : totalScore;\n return {rendered: result.join(''), score: totalScore};\n }\n\n return null;\n};\n\n// The normal entry point. Filters `arr` for matches against `pattern`.\n// It returns an array with matching values of the type:\n//\n// [{\n// string: 'lah' // The rendered string\n// , index: 2 // The index of the element in `arr`\n// , original: 'blah' // The original element in `arr`\n// }]\n//\n// `opts` is an optional argument bag. Details:\n//\n// opts = {\n// // string to put before a matching character\n// pre: ''\n//\n// // string to put after matching character\n// , post: ''\n//\n// // Optional function. Input is an entry in the given arr`,\n// // output should be the string to test `pattern` against.\n// // In this example, if `arr = [{crying: 'koala'}]` we would return\n// // 'koala'.\n// , extract: function(arg) { return arg.crying; }\n// }\nfuzzy.filter = function(pattern, arr, opts) {\n if(!arr || arr.length === 0) {\n return [];\n }\n if (typeof pattern !== 'string') {\n return arr;\n }\n opts = opts || {};\n return arr\n .reduce(function(prev, element, idx, arr) {\n var str = element;\n if(opts.extract) {\n str = opts.extract(element);\n }\n var rendered = fuzzy.match(pattern, str, opts);\n if(rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered\n , score: rendered.score\n , index: idx\n , original: element\n };\n }\n return prev;\n }, [])\n\n // Sort by score. Browsers are inconsistent wrt stable/unstable\n // sorting, so force stable by using the index in the case of tie.\n // See http://ofb.net/~sethml/is-sort-stable.html\n .sort(function(a,b) {\n var compare = b.score - a.score;\n if(compare) return compare;\n return a.index - b.index;\n });\n};\n\n\n}());\n\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/ddb1f3b63e33585263e5905706d6ff6d.svg b/docs/dist/donate-button/0.4/ddb1f3b63e33585263e5905706d6ff6d.svg new file mode 100644 index 00000000..e196b51c --- /dev/null +++ b/docs/dist/donate-button/0.4/ddb1f3b63e33585263e5905706d6ff6d.svg @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/docs/dist/donate-button/0.4/index.html b/docs/dist/donate-button/0.4/index.html index 75e2bf52..7a62f015 100644 --- a/docs/dist/donate-button/0.4/index.html +++ b/docs/dist/donate-button/0.4/index.html @@ -7,8 +7,20 @@ -
- Donate +
+ Donate +
+ + + + diff --git a/docs/dist/donate-button/0.4/index.js b/docs/dist/donate-button/0.4/index.js index b1b3b802..39d54afc 100644 --- a/docs/dist/donate-button/0.4/index.js +++ b/docs/dist/donate-button/0.4/index.js @@ -1,2 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="https://assets.every.org/dist/donate-button/0.4/",t(t.s="riXW")}({"/hs+":function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function i(e){return Object.entries(e).filter((function(e){return Boolean(e[1])})).map((function(e){return e.map((function(e){return encodeURIComponent(e)})).join("=")})).join("&")}function a(e){var t=e.fundraiserSlug,n=Fe+e.nonprofitSlug;return t&&(n+="/f/"+t),n}function l(e){var t=e.methods,n=e.nonprofitSlug,r=e.noExit;return{method:null==t?void 0:t.join(","),utm_campaign:"donate-button",utm_source:n,utm_medium:"donate-button-0.4",no_exit:null!=r?r:1}}function c(e,t){Pe.i.__h&&Pe.i.__h(Ke,e,ct||t),ct=0;var n=Ke.__H||(Ke.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function u(e){return ct=1,s(_,e)}function s(e,t,n){var r=c($e++,2);return r.t=e,r.__c||(r.__=[n?n(t):_(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=Ke),r.__}function f(e,t){var n=c($e++,3);!Pe.i.__s&&v(n.__H,t)&&(n.__=e,n.__H=t,Ke.__H.__h.push(n))}function p(e){return ct=5,d((function(){return{current:e}}),[])}function d(e,t){var n=c($e++,7);return v(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function g(e,t){return ct=8,d((function(){return e}),t)}function h(e){var t=Ke.context[e.__c],n=c($e++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Ke)),t.props.value):e.__}function b(){for(var e;e=ut.shift();)if(e.__P)try{e.__H.__h.forEach(m),e.__H.__h.forEach(y),e.__H.__h=[]}catch(t){e.__H.__h=[],Pe.i.__e(t,e.__v)}}function m(e){var t=Ke,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ke=t}function y(e){var t=Ke;e.__c=e.__(),Ke=t}function v(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function _(e,t){return"function"==typeof t?t(e):t}function O(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){O(l,r,o,i,a,"next",e)}function a(e){O(l,r,o,i,a,"throw",e)}var l=e.apply(t,n);i(void 0)}))}}function j(){return(j=C((function*(e){return(yield fetch(Xe+"/"+e).then(function(){var e=C((function*(e){return e.json()}));return function(t){return e.apply(this,arguments)}}())).data.nonprofit}))).apply(this,arguments)}function w(){return(w=C((function*(e,t){var n=Xe+"/"+e+"/fundraiser/"+t;return(yield fetch(n).then(function(){var e=C((function*(e){return e.json()}));return function(t){return e.apply(this,arguments)}}())).data.fundraiser}))).apply(this,arguments)}function x(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function k(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){x(l,r,o,i,a,"next",e)}function a(e){x(l,r,o,i,a,"throw",e)}var l=e.apply(t,n);i(void 0)}))}}function S(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){S(l,r,o,i,a,"next",e)}function a(e){S(l,r,o,i,a,"throw",e)}var l=e.apply(t,n);i(void 0)}))}}function T(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){T(l,r,o,i,a,"next",e)}function a(e){T(l,r,o,i,a,"throw",e)}var l=e.apply(t,n);i(void 0)}))}}function N(){return P.apply(this,arguments)}function P(){return(P=L((function*(e){return new PaymentRequest([{supportedMethods:e}],St).canMakePayment()}))).apply(this,arguments)}function M(){return(M=L((function*(){try{var e=yield Promise.all([N("https://google.com/pay"),N("https://apple.com/apple-pay")]);return{googlePay:e[0],applePay:e[1]}}catch(e){return{googlePay:!1,applePay:!1}}}))).apply(this,arguments)}function E(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function D(){return(D=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,gl);if(t.parentNode){var r=t.parentNode;Object(Pe.j)(Object(Pe.g)(Ye,n),r,t)}}function ke(){document.querySelectorAll("*[href^='https://www.every.org/']").forEach((function(e){var t=e.getAttribute("href");if(null!=t&&t.includes("#/donate")){var n=function(e){var t,n=new URL(e),r=n.pathname.split("/f/")[1],o=n.pathname.split("/")[1],i=new URLSearchParams(n.search),a=function(e){if(e)return e.split(",").filter((function(e){return et.includes(e)}))}(i.get("method")),l=function(e){if(e)return Object.values(He).find((function(t){return t.toUpperCase()===e.toUpperCase()}))}(i.get("frequency")),c=null!=(t=i.get("monthlyTitle"))?t:void 0,u=l===He.Monthly;if(!o)return;return{fundraiserSlug:r,nonprofitSlug:o,defaultFrequency:l,methods:a,lockMonthlyFrequency:u,monthlyTitle:c}}(t);if(!n)return;var r=function(e){$a||we();var t=document.createElement("div");return $a.append(t),new bl(e,t)}(n);null===e.getAttribute("data-every-style")?e.addEventListener("click",(function(e){e.preventDefault(),r.show()})):xe(Ce({element:e,onClick:function(){r.show()}},n,{url:t}))}}))}function Se(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ae(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}function Le(){return(Le=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,ze),j=O||a(t=C)+"?"+i(l(t))+"#/"+Ze;return Object(Pe.g)("a",{href:j,style:{background:s,color:c,borderRadius:p,fontSize:g,padding:b},className:[Ie,m].filter(Boolean).join(" "),target:_,onClick:y?function(e){e.preventDefault(),y()}:void 0},r&&Object(Pe.g)("svg",{className:Ue,style:{color:c,height:g,width:g},width:"64",height:"56",viewBox:"0 0 64 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},De||(De=Object(Pe.g)("path",{d:"M48.3746 20.9558C48.3746 9.03877 38.4374 0 25.6754 0C11.4001 0 0 12.0685 0 27.0153C0 43.1235 12.8125 56 30.0639 56C47.3153 56 62.7508 42.3156 63.9614 24.3895H56.0924C54.6295 37.8215 43.2799 48.1226 30.0639 48.1226C17.3523 48.1226 7.91952 38.7809 7.91952 27.0153C7.91952 16.4112 15.7886 7.87737 25.6754 7.87737C33.948 7.87737 40.4551 13.5329 40.4551 20.9558C40.4551 27.1163 36.0161 32.2669 30.1143 32.2669V40.1443C40.556 40.1443 48.3746 31.4085 48.3746 20.9558Z"}))),Re||(Re=Object(Pe.g)("span",{className:qe},"Donate")))};!function(e){e.Monthly="monthly",e.OneTime="once",e.Unselected=""}(He||(He={})),function(e){e.CREDIT_CARD="card",e.BANK="bank",e.PAYPAL="paypal",e.VENMO="venmo",e.PAYMENT_REQUEST="pay",e.CRYPTO="crypto",e.STOCKS="stocks",e.DAF="daf"}(Be||(Be={}));var $e,Ke,Qe,Je=[Be.VENMO,Be.DAF,Be.CRYPTO,Be.STOCKS],et=Object.values(Be),tt=function(){var e=document.createElement("style");e.innerHTML='\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format("woff2");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n ',document.head.append(e)},nt=n("nr9d"),rt=n.n(nt),ot={methods:Object.values(et),show:!1,addAmounts:[10,50,100],defaultFrequency:He.OneTime,minDonationAmount:5,primaryColor:"#018669"},it={arrayMerge:function(e,t){return t}},at=Object(Pe.d)({}),lt=function(e){var t=e.children,n=function(e){var t,n=null==(t=e.methods)?void 0:t.filter((function(e){return et.includes(e)}));return rt.a.all([ot,e,{methods:n&&n.length>0?n:et}],it)}(e.options);return Object(Pe.g)(at.Provider,{value:n},t)},ct=0,ut=[],st=Pe.i.__b,ft=Pe.i.__r,pt=Pe.i.diffed,dt=Pe.i.__c,gt=Pe.i.unmount;Pe.i.__b=function(e){Ke=null,st&&st(e)},Pe.i.__r=function(e){ft&&ft(e),$e=0;var t=(Ke=e.__c).__H;t&&(t.__h.forEach(m),t.__h.forEach(y),t.__h=[])},Pe.i.diffed=function(e){pt&&pt(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==ut.push(t)&&Qe===Pe.i.requestAnimationFrame||((Qe=Pe.i.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),mt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);mt&&(t=requestAnimationFrame(n))})(b)),Ke=null},Pe.i.__c=function(e,t){t.some((function(e){try{e.__h.forEach(m),e.__h=e.__h.filter((function(e){return!e.__||y(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Pe.i.__e(n,e.__v)}})),dt&&dt(e,t)},Pe.i.unmount=function(e){gt&>(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{m(e)}catch(e){t=e}})),t&&Pe.i.__e(t,n.__v))};var ht,bt,mt="function"==typeof requestAnimationFrame,yt=function(){return h(at)},vt=Symbol("FundraiserFetchError"),_t=Symbol("FundraiserFetching"),Ot=Object(Pe.d)({fundraiser:_t}),Ct=function(e){var t=e.children,n=yt(),r=n.fundraiserSlug,o=n.nonprofitSlug,i=u(_t),a=i[0],l=i[1],c=g(k((function*(){if(r)try{var e=yield function(e,t){return w.apply(this,arguments)}(o,r);l(e)}catch(e){l(vt)}else l(void 0)})),[o,r]);return f((function(){c()}),[c]),Object(Pe.g)(Ot.Provider,{value:{fundraiser:a}},t)},jt=Symbol("NonprofitFetchError"),wt=Symbol("NonprofitFetching"),xt=Object(Pe.d)({nonprofit:wt}),kt=function(e){var t=e.children,n=yt().nonprofitSlug,r=u(wt),o=r[0],i=r[1],a=g(A((function*(){try{var e=yield function(e){return j.apply(this,arguments)}(n);i(e)}catch(e){i(jt)}})),[n]);return f((function(){a()}),[a]),Object(Pe.g)(xt.Provider,{value:{nonprofit:o}},t)},St={total:{label:"Test Purchase",amount:{currency:"USD",value:"1.00"}}},At=Object(Pe.d)({}),Tt=function(e){var t=e.children,n=e.hide,r=yt(),o=u(r.defaultFrequency),i=o[0],a=o[1],l=u(r.defaultDonationAmount),c=l[0],s=l[1],p=u(null),d=p[0],g=p[1],h=u(r.methods[0]),b=h[0],m=h[1],y=u(),v=y[0],_=y[1],O=u(),C=O[0],j=O[1],w=u(),x=w[0],k=w[1],S=u(),A=S[0],T=S[1],L=u({googlePay:!1,applePay:!1}),N=L[0],P=L[1];return f((function(){(function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){E(l,r,o,i,a,"next",e)}function a(e){E(l,r,o,i,a,"throw",e)}var l=e.apply(t,n);i(void 0)}))}}((function*(){var e=yield function(){return M.apply(this,arguments)}();P(e)}));return function(){return e.apply(this,arguments)}})()()}),[]),Object(Pe.g)(At.Provider,{value:{frequency:i,setFrequency:a,donationAmount:c,setDonationAmount:s,hideWidget:n,submitError:d,setSubmitError:g,selectedPaymentMethod:b,setSelectedPaymentMethod:m,stockAmount:v,setStockAmount:_,stockSymbol:C,setStockSymbol:j,cryptoAmount:x,setCryptoAmount:k,cryptoCurrency:A,setCryptoCurrency:T,paymentRequestAvailable:N}},t)},Lt=function(e){var t=e.options,n=e.hide,r=e.children;return Object(Pe.g)(lt,{options:t},Object(Pe.g)(Tt,{hide:n},Object(Pe.g)(kt,null,Object(Pe.g)(Ct,null,r))))};!function(e){e.PhoneOnly="@media only screen and (max-width: 37.44em)",e.TabletUp="@media only screen and (min-width: 37.5em)",e.TabletLandscapeUp="@media only screen and (min-width: 56.25em)",e.DesktopUp="@media only screen and (min-width: 75em)",e.BigDesktopUp="@media only screen and (min-width: 112.5em)"}(ht||(ht={})),function(e){e.LightGray="#EAEDED",e.Gray="#f3f6f6",e.DarkGray="#868A8A",e.Black="#272727",e.Text="#2E3434",e.TextGray="#868383",e.TextOpaque="rgba(46, 52, 52, 0.6)",e.Error="#D95C35",e.ErrorShadow="rgba(217, 92, 53, 0.2)",e.Transparent="transparent",e.White="#fff"}(bt||(bt={}));var Nt,Pt={fontSize:"32px",lineHeight:"36px"},Mt={fontSize:"24px",lineHeight:"32px"},Et={fontSize:"20px",lineHeight:"24px"},Dt={fontSize:"16px",lineHeight:"24px"},Rt={fontSize:"14px",lineHeight:"20px"};!function(e){e.Empty="0",e.XXS="4px",e.XS="8px",e.S="12px",e.M="16px",e.L="20px",e.XL="24px",e.XXL="32px",e.Stack_XXS="0 0 4px 0",e.Stack_XS="0 0 8px 0",e.Stack_S="0 0 12px 0",e.Stack_M="0 0 16px 0",e.Stack_L="0 0 20px 0",e.Stack_XL="0 0 24px 0",e.Stack_XXL="0 0 32px 0",e.Inset_XXS="4px 4px 4px 4px",e.Inset_XS="8px 8px 8px 8px",e.Inset_S="12px 12px 12px 12px",e.Inset_M="16px 16px 16px 16px",e.Inset_L="20px 20px 20px 20px",e.Inset_XL="24px 24px 24px 24px",e.Inset_XXL="32px 32px 32px 32px",e.InsetSquish_XS="8px 16px",e.InsetSquish_S="12px 24px",e.InsetSquish_M="16px 32px",e.InsetSquish_L="20px 40px",e.InsetSquish_XL="24px 48px",e.Inline_XS="0 8px 0 0",e.Inline_S="0 12px 0 0",e.Inline_M="0 16px 0 0",e.Inline_L="0 20px 0 0",e.Inline_XL="0 24px 0 0",e.Inline_XXL="0 24px 0 0"}(Nt||(Nt={}));var Ht,Bt,It,Ut,qt,Ft,Xt,Wt,Gt,Vt,Zt,zt,Yt,$t,Kt,Qt,Jt,en,tn,nn,rn,on,an,ln,cn,un,sn,fn,pn,dn,gn=function(e){return{display:"flex",flexDirection:"column","> *:not(:last-child)":{marginBottom:"number"==typeof e?e+"px":e}}},hn=function(e){return{display:"flex",flexDirection:"row","> *:not(:last-child)":{marginRight:"number"==typeof e?e+"px":e}}},bn=function(e){return Ee()(gn(e))},mn=function(e){return gn(e)},yn=function(e){return hn(e)},vn=Ee()({display:"flex",flexDirection:"column",gap:Nt.M}),_n={position:"relative",top:"-1px",transform:"rotate(180deg)"},On={"> p":{marginBottom:Nt.XS}},Cn=Ee()(D({},On,{maxHeight:"1000px",transition:"all 1s",opacity:"1"})),jn=Ee()(D({},On,{opacity:"0",overflow:"hidden",maxHeight:"0",transition:"all 0.5s"})),wn=function(e){var t;return Ee()(D({},Rt,e?((t={})[ht.TabletLandscapeUp]={padding:"none"},t):{}))},xn=function(e){return Ee()(D({},yn(Nt.S),Rt,{alignItems:"center",justifyContent:"space-between",width:"100%",border:"none",background:"transparent",textAlign:"start",padding:0,":hover":{cursor:"pointer"},"> svg":D({width:"16px",height:"16px"},e?_n:{})},e?{fontWeight:700}:{fontWeight:500,color:bt.TextGray}))},kn=Ee()({color:bt.Text,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),Sn=function(e,t){var n="100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to "+e.name+" on your behalf. \n As a legal matter, Every.org must provide any donations to "+e.name+" on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.",r=t&&!function(e){return e.nonprofitId===e.creatorNonprofitId}(t),o="";return e.hasAdmin&&r?o="Please note "+e.name+" has not reviewed or approved the content of this peer-to-peer fundraiser.":e.hasAdmin||r?!e.hasAdmin&&r&&(o="Please note "+e.name+" has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser."):o="Please note "+e.name+" has not provided permission for this solicitation.",Object(Pe.g)("span",null,n," ",o)},An=Ee()(((Vt={backgroundColor:"white",padding:Nt.XL+" "+Nt.XL+" 0px",borderRadius:"unset",overflow:"hidden"})[ht.TabletLandscapeUp]={borderRadius:"16px",padding:Nt.M},Vt)),Tn=function(e){return e.filter((function(e){return Boolean(e)})).join(" ")},Ln=function(e){var t=e.children,n=e.className;return Object(Pe.g)("div",{className:Tn([An,n])},t)},Nn=function(){return h(Ot).fundraiser},Pn=function(){var e=Nn();if(e!==vt&&e!==_t)return e},Mn=function(){return h(xt).nonprofit},En=function(){var e=Mn();if(e===jt||e===wt)throw new Error("Nonprofit error");return e},Dn=function(){return h(At)},Rn=function(){return Zt||(Zt=Object(Pe.g)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Object(Pe.g)("path",{d:"M6 9l6 6 6-6"})))},Hn=function(e){var t=e.faqData,n=u(!1),r=n[0],o=n[1];return Object(Pe.g)("div",{className:wn(t.mobileOnly)},Object(Pe.g)("button",{type:"button",className:xn(r),onClick:function(){o(!r)}},Object(Pe.g)("span",null,t.title),zt||(zt=Object(Pe.g)(Rn,null))),Object(Pe.g)("div",{className:r?Cn:jn},t.description))},Bn=function(){var e=En(),t=Pn(),n=Dn().selectedPaymentMethod,r=[{id:"intro",title:"How does Every.org accept my donation?",description:Object(Pe.g)(Pe.b,null,Object(Pe.g)("p",null,"Your donation first goes to Every.org, a US 501(c)(3) public charity, and we immediately issue a receipt for your charitable contribution. ",R(e)),Yt||(Yt=Object(Pe.g)("p",null,"This process ensures your eligibility for a tax-deduction, consolidates records of your giving, and reduces the administrative burden on the nonprofits.")))},{id:"fees",title:"Are there any fees?",description:I(n,e)},{id:"tax",title:"Is this donation tax-deductible?",description:Object(Pe.g)("p",null,"Yes, ",Sn(e,t))},{id:"receipt",title:"Will I receive a receipt for my donation?",description:$t||($t=Object(Pe.g)(Pe.b,null,Object(Pe.g)("p",null,"Yes, after your donation payment is confirmed, you will immediately get a receipt emailed to you."),Object(Pe.g)("p",null,"Additionally, if you have an Every.org account, you can always get a single itemized receipt that shows all your donations in a given year.")))},{id:"p2p",mobileOnly:!0,title:"How else can I support "+e.name,description:Object(Pe.g)("p",null,"You can also rally your friends, family, and social networks to support this nonprofit by starting your own fundraiser for them."," ",Object(Pe.g)("a",{className:kn,href:Fe+e.primarySlug+"/fundraiser"},"Start a fundraiser for ",e.name))}];return Object(Pe.g)(Ln,null,Object(Pe.g)("div",{className:vn},r.map((function(e){return Object(Pe.g)(Hn,{key:e.id,faqData:e})}))))},In=Ee()(U({padding:Nt.XL+" "+Nt.XL+" 0px",backgroundColor:"unset",display:"flex",flexDirection:"column"},Rt,((Kt={color:bt.TextGray})[ht.TabletLandscapeUp]={padding:"0px "+Nt.L},Kt["> p"]={margin:0},Kt["> p:not(:last-child)"]={marginBottom:Nt.XS},Kt))),Un=Ee()({color:bt.TextGray,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),qn=["children"],Fn=X({address:"support@every.org"}),Xn=function(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,qn);return Object(Pe.g)("a",W({className:Un},n),t)},Wn=function(){var e=En(),t=Pn();return Object(Pe.g)(Ln,{className:In},Object(Pe.g)("p",null,Sn(e,t)," ",Qt||(Qt=Object(Pe.g)(Xn,{href:"https://www.every.org/terms"},"See Terms"))),Jt||(Jt=Object(Pe.g)("p",null,"Need help? See FAQs or contact us at our"," ",Object(Pe.g)(Xn,{href:"https://www.every.org/support"},"Help Center"),".")),en||(en=Object(Pe.g)("p",null,"Have ideas for how we can build a better donation experience?"," ",Object(Pe.g)(Xn,{href:Fn},"Send us feedback"),".")),tn||(tn=Object(Pe.g)("p",null,"We respect your privacy. To learn more, check out our"," ",Object(Pe.g)(Xn,{href:"https://www.every.org/privacy"},"Privacy Policy"),".")))},Gn=function(e){return Ee()({color:e,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}})},Vn=Ee()(((nn={display:"none"})[ht.TabletLandscapeUp]={display:"block"},nn)),Zn=function(){var e=yt(),t=e.primaryColor,n=Fe+e.nonprofitSlug+"/fundraiser";return Object(Pe.g)(Ln,{className:Vn},Object(Pe.g)("p",null,Object(Pe.g)("a",{className:Gn(t),href:n},"Start a fundraiser")," ","to rally your friends and family"))},zn=Ee()(((on={display:"grid",gridGap:0,gridTemplateColumns:"1fr",gridTemplateAreas:'"header"\n "promoBanners"\n "nonprofitInfo"\n "paymentProcess"\n "fundraiserLink"\n "faq"\n "footer"'})[ht.TabletLandscapeUp]={gridColumnGap:Nt.XL,gridTemplateColumns:"1fr 2fr",gridTemplateRows:"auto auto auto auto auto 1fr",gridTemplateAreas:'"header header"\n "promoBanners promoBanners"\n "nonprofitInfo paymentProcess"\n "fundraiserLink paymentProcess"\n "faq paymentProcess"\n "faq footer"',"& > div:not(:last-child):not(:empty)":{marginBottom:Nt.XL}},on["& > #every-header"]=((rn={gridArea:"header",display:"block"})[ht.TabletLandscapeUp]={display:"none"},rn),on["& > #every-promoBanners"]={gridArea:"promoBanners"},on["& > #every-nonprofitInfo"]={gridArea:"nonprofitInfo"},on["& > #every-paymentProcess"]={gridArea:"paymentProcess"},on["& > #every-faq"]={gridArea:"faq"},on["& > #every-fundraiserLink"]={gridArea:"fundraiserLink"},on["& > #every-footer"]={gridArea:"footer"},on)),Yn=function(e){var t=e.children;return Object(Pe.g)("div",{className:zn},t)},$n=Ee()({cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",fontFamily:Ne.BasisGrotesque}),Kn=Ee()(((an={display:"block"})[ht.TabletLandscapeUp]={display:"none"},an)),Qn=Ee()(((ln={position:"absolute",right:Nt.XL,top:Nt.XL,padding:Nt.XXS,background:"white",borderRadius:"8px",display:"none"})[ht.TabletLandscapeUp]={display:"block"},ln)),Jn=function(){var e=yt().primaryColor;return Object(Pe.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M18 6L6 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(Pe.g)("path",{d:"M6 6L18 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},er=function(e){var t=e.className,n=Dn().hideWidget;return Object(Pe.g)("button",{type:"button",className:Tn([$n,t]),onClick:n},cn||(cn=Object(Pe.g)(Jn,null)))},tr=Ee()(((un={display:"flex",justifyContent:"flex-end",alignItems:"center",padding:Nt.M+" "+Nt.XL})[ht.TabletLandscapeUp]={padding:0},un)),nr=function(){return sn||(sn=Object(Pe.g)("div",{className:tr},Object(Pe.g)(er,{className:Kn})))};!function(e){e.Small="4px",e.Default="8px",e.Medium="24px",e.Big="100px",e.Circle="100%"}(fn||(fn={}));var rr,or,ir,ar=Ee()({lineHeight:"20px","> span":{fontWeight:700}}),lr=function(e){var t;return Ee()(((t={borderRadius:fn.Circle,overflow:"hidden",display:"block",backgroundImage:"url("+e+")",backgroundSize:"contain",width:"40px",height:"40px",flexShrink:0})[ht.TabletLandscapeUp]={width:"64px",height:"64px"},t))},cr=Ee()(((pn={padding:""+Nt.XL})[ht.TabletLandscapeUp]=G({},mn(Nt.S),{padding:""+Nt.L}),pn)),ur=Ee()(G({},yn(Nt.S),{alignItems:"center"})),sr=Ee()(G({},Rt,((dn={color:"rgba(0, 0, 0, 0.7)",display:"none"})[ht.TabletLandscapeUp]={display:"block"},dn))),fr=function(){var e=En(),t=e.name,n=e.logoCloudinaryId,r=e.hasAdmin,o="https://res.cloudinary.com/everydotorg/image/upload/"+(null!=n?n:"NonprofitAvatarPlaceholder");return Object(Pe.g)(Ln,{className:cr},Object(Pe.g)("div",{className:ur},Object(Pe.g)("div",{alt:"nonprofit logo",className:lr(o)}),Object(Pe.g)("h1",{className:ar},r?Object(Pe.g)(Pe.b,null,Object(Pe.g)("span",null,t)," is using Every.org to accept this donation"):Object(Pe.g)(Pe.b,null,"Every.org created this page for ",Object(Pe.g)("span",null,t)))),rr||(rr=Object(Pe.g)("p",{className:sr},"Every.org is a 501(c)(3) nonprofit building free, accessible giving tools for every person and every organization.")))},pr=function(){return or||(or=Object(Pe.g)(fr,null))};!function(e){e.Normal="1px solid",e.Big="4px solid"}(ir||(ir={}));var dr,gr,hr,br=function(e,t){return e+" "+t},mr=Ee()({position:"relative","& input":{fontSize:Dt.fontSize,lineHeight:Dt.fontSize,fontWeight:400}}),yr=Ee()({position:"absolute",top:"100%",left:"0",right:"0",overflow:"hidden",zIndex:2,background:bt.White,borderRadius:"0 0 "+fn.Default+" "+fn.Default,border:br(ir.Normal,bt.LightGray),borderTop:"none"}),vr=Ee()({display:"flex",alignItems:"center",gap:Nt.XXS}),_r=Ee()({overflowY:"scroll",height:"100%",maxHeight:"200px"}),Or=Ee()({borderBottom:br(ir.Normal,bt.LightGray)}),Cr=Ee()(V({border:"none",background:"none",padding:Nt.S+" "+Nt.M},Dt,{width:"100%",display:"flex",alignItems:"center",gap:Nt.XS,":hover":{cursor:"pointer"},"> span:last-of-type":V({marginLeft:"auto"},Rt,{color:bt.TextGray})})),jr=function(e,t){return Ee()(V({marginLeft:"auto"},Rt,{color:bt.TextGray,display:"flex",gap:Nt.XS,alignItems:"center","> svg":V({color:e},t?_n:{})}))},wr=Ee()({borderRadius:fn.Default+" "+fn.Default+" 0 0 "}),xr=Ee()({gap:Nt.XS,"> input":{textAlign:"right"}}),kr=(Ee()({}),Ee()({border:br(ir.Normal,bt.Error)})),Sr=function(e){return Ee()({position:"relative",padding:Nt.M,display:"flex",flexDirection:"row",alignItems:"center",borderRadius:fn.Default,color:bt.Text,backgroundColor:bt.Gray,border:br(ir.Normal,bt.LightGray),cursor:"text",":focus-within":{backgroundColor:"white",borderColor:e}})},Ar=Ee()({fontSize:Mt.fontSize,lineHeight:Mt.fontSize,fontFamily:"inherit",fontWeight:700,flex:1,border:"none",outline:"none",background:"transparent",width:"100%",minWidth:"unset",padding:0,margin:0,"::placeholder":{fontWeight:400},"::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield"}),Tr=Ee()(Z({},Mt,{fontWeight:700,display:"inline-flex",marginRight:Nt.XXS})),Lr=function(e){return Ee()(Z({},Et,{fontWeight:700,color:e,display:"inline-flex",marginLeft:Nt.XXS}))},Nr=Ee()(Z({},yn(Nt.M),{justifyContent:"center"})),Pr=function(e){var t;return Ee()(Z({},Dt,((t={color:e,borderRadius:fn.Big,fontWeight:500,border:"none",padding:0,fontFamily:"inherit",cursor:"pointer",background:"unset"})[ht.TabletLandscapeUp]={border:"1px solid "+bt.DarkGray,padding:Nt.XS+" "+Nt.L},t)))};!function(e){e.ALGO="ALGO",e.APE="APE",e.AVAX="AVAX",e.BAT="BAT",e.BTC="BTC",e.DAI="DAI",e.DOGE="DOGE",e.DOT="DOT",e.ETH="ETH",e.FIL="FIL",e.GRT="GRT",e.LINK="LINK",e.LTC="LTC",e.MATIC="MATIC",e.MOB="MOB",e.RAY="RAY",e.SAMO="SAMO",e.SBR="SBR",e.SHIB="SHIB",e.SOL="SOL",e.UNI="UNI",e.USDC="USDC",e.USDT="USDT",e.XTZ="XTZ",e.ZEC="ZEC"}(gr||(gr={})),function(e){e.ERC20="ERC-20",e.SPL="SPL"}(hr||(hr={}));var Mr,Er,Dr,Rr,Hr,Br,Ir,Ur,qr,Fr,Xr,Wr,Gr,Vr,Zr,zr,Yr,$r,Kr,Qr,Jr,eo,to,no,ro,oo,io,ao,lo=[gr.ALGO,gr.MOB],co=((dr={})[gr.ALGO]={displayName:"Algorand",abbreviation:"ALGO",decimalOffset:6},dr[gr.APE]={displayName:"Apecoin",abbreviation:"APE",decimalOffset:18,contractType:hr.ERC20},dr[gr.AVAX]={displayName:"Avalanche",abbreviation:"AVAX",decimalOffset:9},dr[gr.BAT]={displayName:"Basic Attention Token",abbreviation:"BAT",decimalOffset:18,contractType:hr.ERC20},dr[gr.BTC]={displayName:"Bitcoin",abbreviation:"BTC",decimalOffset:8},dr[gr.DOGE]={displayName:"DogeCoin",abbreviation:"DOGE",decimalOffset:8},dr[gr.DAI]={displayName:"Dai",abbreviation:"DAI",decimalOffset:18,contractType:hr.ERC20},dr[gr.DOT]={displayName:"Polkadot",abbreviation:"DOT",decimalOffset:10},dr[gr.ETH]={displayName:"Ethereum",abbreviation:"ETH",decimalOffset:18},dr[gr.FIL]={displayName:"Filecoin",abbreviation:"FIL",decimalOffset:18},dr[gr.GRT]={displayName:"The Graph",abbreviation:"GRT",decimalOffset:18,contractType:hr.ERC20},dr[gr.LINK]={displayName:"Chainlink",abbreviation:"LINK",decimalOffset:18,contractType:hr.ERC20},dr[gr.LTC]={displayName:"Litecoin",abbreviation:"LTC",decimalOffset:8},dr[gr.MATIC]={displayName:"Polygon",abbreviation:"MATIC",decimalOffset:18,contractType:hr.ERC20},dr[gr.MOB]={displayName:"MobileCoin",abbreviation:"MOB",decimalOffset:12},dr[gr.RAY]={displayName:"Raydium",abbreviation:"RAY",decimalOffset:6,contractType:hr.SPL},dr[gr.SAMO]={displayName:"Samoyed",abbreviation:"SAMO",decimalOffset:9,contractType:hr.SPL},dr[gr.SBR]={displayName:"Saber",abbreviation:"SBR",decimalOffset:6,contractType:hr.SPL},dr[gr.SHIB]={displayName:"Shiba Inu",abbreviation:"SHIB",decimalOffset:18,contractType:hr.ERC20},dr[gr.SOL]={displayName:"Solana",abbreviation:"SOL",decimalOffset:9},dr[gr.UNI]={displayName:"Uniswap",abbreviation:"UNI",decimalOffset:18,contractType:hr.ERC20},dr[gr.USDC]={displayName:"USD Coin",abbreviation:"USDC",decimalOffset:6,contractType:hr.ERC20},dr[gr.USDT]={displayName:"Tether",abbreviation:"USDT",decimalOffset:6},dr[gr.XTZ]={displayName:"Tezos",abbreviation:"XTZ",decimalOffset:6},dr[gr.ZEC]={displayName:"ZCash",abbreviation:"ZEC",decimalOffset:8},dr),uo=function(){var e=yt().primaryColor,t=Dn(),n=t.cryptoAmount,r=t.setCryptoAmount,o=t.cryptoCurrency,i=t.submitError,a=t.setSubmitError,l=Tn([Sr(e),xr].concat(i?[kr]:[]));return Object(Pe.g)("div",{className:l},Object(Pe.g)("input",{id:"donation-input",className:Ar,type:"number",inputMode:"decimal",pattern:"[+-]?(\\d*\\.)?\\d+",step:z(o),value:n,onInput:function(e){var t=e.currentTarget.value;""===t&&(e.currentTarget.value=t,r(void 0));var n=Number.parseFloat(t);!Number.isNaN(n)&&/[+-]?(\d*\.)?\d+/g.test(t)&&(r(n),a(null))}}),Object(Pe.g)("span",null,o))},so=n("kPAj"),fo=n.p+"5982461fe2304c26f3a3cf4c50806dad.svg",po=n.p+"b31a89ce5555412a0c8a4c6463286584.svg",go=n.p+"26c9b1d3d7943e6e67cf13e039ba5ac8.svg",ho=n.p+"9052c75387065f76bb3436b7e4ce12cd.svg",bo=n.p+"3a5177b76709819ba4663556e60222f8.svg",mo=n.p+"f8f4253f02d1fbc4bf04d0959a6e614c.svg",yo=n.p+"4d81ee51fa2520df58ae092aeb3d0bd4.svg",vo=n.p+"8098252f28e93069c75d6010d3ac6bc1.svg",_o=n.p+"03c114f6e014588a4bde815d9bc85821.svg",Oo=n.p+"5450d3cada4fd0370ab8d885765f5cc3.svg",Co=n.p+"cc9ce389e9a4e0f518e3caeb7b60912d.svg",jo=n.p+"8f22b294629293d29895fddef0a8baea.svg",wo=n.p+"f588feb3cbbcc0fb259a3630ec7e34ba.svg",xo=n.p+"3e1eb932bdbaa2318584813bf468be53.svg",ko=n.p+"badb98080214485db486794fb59a95cc.svg",So=n.p+"fc9295a4651c56d5b4e8c3aa13a93208.svg",Ao=n.p+"e4bfa8eb04696d4fd5ea04ca4c35469b.svg",To=n.p+"743324f8e09d34a894c21e91c396f289.svg",Lo=n.p+"b9021bb757262a32de6d8931015051d9.svg",No=n.p+"7ab9396038b4befda4354b2a476d9064.svg",Po=n.p+"bc2c9e9d67b73656a6da5dd177aa10a2.svg",Mo=n.p+"6214ae0b42d798a0c9a51503a27a66bf.svg",Eo=n.p+"45bcde5a98dbbdf2a4e0769eca2154f1.svg",Do=n.p+"88611c6e2f9450f29ece8d2b36641670.svg",Ro=((Mr={})[gr.ALGO]=n.p+"58f20393bf2b41f944c6229c2af785b9.svg",Mr[gr.APE]=fo,Mr[gr.AVAX]=po,Mr[gr.BAT]=go,Mr[gr.BTC]=ho,Mr[gr.DOGE]=yo,Mr[gr.DAI]=mo,Mr[gr.DOT]=wo,Mr[gr.ETH]=vo,Mr[gr.FIL]=_o,Mr[gr.GRT]=Oo,Mr[gr.LINK]=bo,Mr[gr.LTC]=Co,Mr[gr.MATIC]=xo,Mr[gr.MOB]=jo,Mr[gr.RAY]=ko,Mr[gr.SAMO]=Ao,Mr[gr.SBR]=So,Mr[gr.SHIB]=To,Mr[gr.SOL]=Lo,Mr[gr.UNI]=Eo,Mr[gr.USDC]=Po,Mr[gr.USDT]=No,Mr[gr.XTZ]=Mo,Mr[gr.ZEC]=Do,Mr),Ho=function(e){var t=e.currency;return Object(Pe.g)("img",{src:Ro[t],alt:t+"_icon",width:24,height:24})},Bo=function(){return Er||(Er=Object(Pe.g)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-search"},Object(Pe.g)("circle",{cx:"11",cy:"11",r:"8"}),Object(Pe.g)("path",{d:"M21 21l-4.35-4.35"})))},Io=[gr.BTC,gr.ETH,gr.USDC],Uo=Io.map((function(e){return K(e)})),qo=Object.values(gr).filter((function(e){return!Io.includes(e)})).filter((function(e){return!lo.includes(e)})).map((function(e){return K(e)})),Fo=Object.values(gr).map((function(e){return K(e)})),Xo=function(e){var t=e.onClick,n=e.option;return Object(Pe.g)("li",{key:n.value,role:"option"},Object(Pe.g)("button",{type:"button",className:Cr,onClick:function(){t(n)}},Object(Pe.g)(Ho,{currency:n.value}),Object(Pe.g)("span",null,n.label),Object(Pe.g)("span",null,n.contractType)))},Wo=function(){var e=En(),t=yt().primaryColor,n="Contents: I would like to make a crypto donation to support https://www.every.org/"+e.primarySlug+".\n\nMy name:\nToken name:\nToken symbol:\nToken quantity:\n\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.";return Object(Pe.g)("a",{className:Gn(t),href:X({address:"crypto@every.org",subject:"Crypto donation for "+e.name,body:n})},"crypto@every.org")},Go=function(){var e=Dn(),t=e.submitError,n=e.cryptoCurrency,r=e.setCryptoCurrency,o=yt().primaryColor,i=p(null),a=u(Fo.find((function(e){return e.value===n}))),l=a[0],c=a[1],s=u(null==l?void 0:l.label),f=s[0],d=s[1],g=u(!l),h=g[0],b=g[1],m=function(e){c(e),r(e.value),d(e.label),b(!1)},y=function(){c(void 0),r(void 0),b(!0),d("")},v=Tn([Sr(o),vr].concat(t?[kr]:[],h?[wr]:[])),_=function(e){return Object(Pe.g)(Xo,{option:e,onClick:m})},O=f?Object(so.filter)(f,Fo,{extract:function(e){var t=co[e.value];return[t.displayName,t.abbreviation].join(" ")}}).map((function(e){return e.original})):void 0;return Object(Pe.g)("div",{className:mr},Object(Pe.g)("div",{className:v,onClick:function(){var e;null==(e=i.current)||e.focus(),y()}},l?Object(Pe.g)(Ho,{currency:l.value}):Dr||(Dr=Object(Pe.g)(Bo,null)),Object(Pe.g)("input",{ref:i,className:Ar,value:f,onInput:function(e){d(e.currentTarget.value),c(void 0),r(void 0),b(!0)},onFocus:y}),Object(Pe.g)("span",{className:jr(o,h)},Object(Pe.g)("span",null,null==l?void 0:l.contractType)," ",Rr||(Rr=Object(Pe.g)(Rn,null)))),h&&Object(Pe.g)("div",{className:yr},Object(Pe.g)("div",{className:_r},O?0===O.length?Object(Pe.g)("div",{className:Ee()({padding:"20px"})},"We don't currently support this coin on our site, but for donations worth over $5,000 USD we can do it manually. Please email ",Hr||(Hr=Object(Pe.g)(Wo,null))," to arrange."):Object(Pe.g)("ul",null,O.map((function(e){return _(e)}))):Object(Pe.g)(Pe.b,null,Object(Pe.g)("ul",{className:Or},Uo.map((function(e){return _(e)}))),Object(Pe.g)("ul",null,qo.map((function(e){return _(e)})))))))},Vo=function(){return Br||(Br=Object(Pe.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M14.9384 5.2052C15.6282 4.34238 16.0964 3.18386 15.9729 2C14.9631 2.05021 13.7308 2.6662 13.0174 3.5297C12.3768 4.26915 11.8098 5.47617 11.9576 6.61041C13.0912 6.70874 14.2237 6.04381 14.9384 5.2052Z",fill:"#2E3434"}),Object(Pe.g)("path",{d:"M15.9595 6.83176C14.3133 6.73371 12.9136 7.76606 12.1275 7.76606C11.3409 7.76606 10.1371 6.88118 8.83501 6.90503C7.14031 6.92992 5.56781 7.88812 4.70782 9.41211C2.93897 12.4608 4.24102 16.9832 5.96114 19.4662C6.79647 20.6946 7.80318 22.0472 9.12968 21.9986C10.383 21.9494 10.8743 21.1871 12.3977 21.1871C13.9201 21.1871 14.3626 21.9986 15.6893 21.974C17.0651 21.9494 17.9253 20.745 18.7606 19.5154C19.7189 18.115 20.1111 16.7629 20.1358 16.6887C20.1111 16.6641 17.4828 15.6558 17.4584 12.6324C17.4336 10.1009 19.522 8.89672 19.6203 8.82205C18.441 7.07785 16.5983 6.88118 15.9595 6.83176Z",fill:"#2E3434"})))},Zo=function(){return Ur||(Ur=Object(Pe.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M22 12.2296C22 11.5499 21.9438 10.8665 21.8238 10.1978H12.2013V14.0483H17.7117C17.483 15.2902 16.7483 16.3887 15.6725 17.0868V19.5853H18.9599C20.8904 17.8437 22 15.2718 22 12.2296Z",fill:"#4285F4"}),Object(Pe.g)("path",{d:"M12.2013 21.9998C14.9528 21.9998 17.2731 21.1143 18.9637 19.5859L15.6762 17.0874C14.7616 17.6974 13.5808 18.0427 12.2051 18.0427C9.5436 18.0427 7.28697 16.2828 6.47728 13.9166H3.08484V16.4922C4.81667 19.8688 8.34406 21.9998 12.2013 21.9998Z",fill:"#34A853"}),Object(Pe.g)("path",{d:"M6.4739 13.9165C6.04657 12.6747 6.04657 11.3299 6.4739 10.088V7.51245H3.08521C1.63826 10.3379 1.63826 13.6667 3.08521 16.4921L6.4739 13.9165Z",fill:"#FBBC04"}),Object(Pe.g)("path",{d:"M12.2013 5.95801C13.6558 5.93596 15.0615 6.47239 16.1148 7.45707L19.0274 4.60224C17.1832 2.90477 14.7353 1.97152 12.2013 2.00092C8.34406 2.00092 4.81667 4.13194 3.08484 7.51218L6.47353 10.0878C7.27947 7.71794 9.53985 5.95801 12.2013 5.95801Z",fill:"#EA4335"})))},zo=((Xr={})[Be.CREDIT_CARD]=Object(Pe.g)((function(){var e=yt().primaryColor;return Object(Pe.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M21 4.74316H3C1.89543 4.74316 1 5.63859 1 6.74316V18.7432C1 19.8477 1.89543 20.7432 3 20.7432H21C22.1046 20.7432 23 19.8477 23 18.7432V6.74316C23 5.63859 22.1046 4.74316 21 4.74316Z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Pe.g)("path",{d:"M1 10.7432H23",stroke:e,strokeWidth:"2",strokeLinecap:"round"}))}),null),Xr[Be.BANK]=Object(Pe.g)((function(){var e=yt().primaryColor;return Object(Pe.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M4 8.74348V19.2435M7 19.2435V8.74348M16 8.74348V19.2435M19 19.2435V8.74348M3.5 22.7435H19.5C20.33 22.7435 21 22.7435 21 21.2435C21 19.7435 20.33 19.7435 19.5 19.7435H3.5C2.67 19.7435 2 19.7435 2 21.2435C2 22.7435 2.67 22.7435 3.5 22.7435ZM10.57 2.23348L2.67 6.39348C2.26 6.60348 2 7.03348 2 7.49348C2 8.18348 2.56 8.74348 3.25 8.74348H19.76C20.44 8.74348 21 8.18348 21 7.49348C21 7.03348 20.74 6.60348 20.33 6.39348L12.43 2.23348C11.85 1.92348 11.15 1.92348 10.57 2.23348Z",stroke:e,strokeWidth:"2"}))}),null),Xr[Be.PAYPAL]=Object(Pe.g)((function(){return qr||(qr=Object(Pe.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M8.78495 22.0251L9.12912 19.7433L8.36247 19.7248H4.70166L7.24574 2.88757C7.25331 2.83613 7.27835 2.78924 7.31628 2.75545C7.3542 2.72166 7.4025 2.70322 7.45237 2.70349H13.625C15.6742 2.70349 17.0884 3.14858 17.8268 4.02709C18.1729 4.43921 18.3934 4.86988 18.5 5.34382C18.6118 5.84111 18.6138 6.43525 18.5046 7.1599L18.4967 7.21278V7.67711L18.8428 7.88179C19.1071 8.02153 19.3446 8.21056 19.5436 8.43953C19.8398 8.79189 20.0313 9.23973 20.1122 9.77068C20.1958 10.3167 20.1682 10.9665 20.0313 11.7022C19.8733 12.5484 19.618 13.2854 19.2732 13.8885C18.9689 14.4287 18.5599 14.8966 18.0722 15.2622C17.6142 15.6015 17.07 15.8591 16.4547 16.0239C15.8585 16.186 15.1787 16.2678 14.4331 16.2678H13.9527C13.6092 16.2678 13.2756 16.3969 13.0137 16.6284C12.7521 16.8623 12.5786 17.1856 12.5241 17.5405L12.4879 17.7459L11.8798 21.7675L11.8522 21.9152C11.845 21.9619 11.8324 21.9853 11.814 22.0011C11.7962 22.0163 11.7739 22.0248 11.7508 22.0251H8.78495Z",fill:"#253B80"}),Object(Pe.g)("path",{d:"M19.1713 7.26611C19.1528 7.38906 19.1318 7.51476 19.1081 7.64389C18.2941 12.0062 15.5091 13.5132 11.9523 13.5132H10.1413C9.70633 13.5132 9.33979 13.8429 9.27201 14.2907L8.3448 20.4286L8.08223 22.1684C8.07177 22.2374 8.07576 22.308 8.09393 22.3752C8.1121 22.4425 8.14402 22.5048 8.18749 22.558C8.23096 22.6111 8.28494 22.6538 8.34572 22.683C8.4065 22.7123 8.47264 22.7275 8.53958 22.7275H11.7516C12.132 22.7275 12.4551 22.439 12.515 22.0475L12.5465 21.8772L13.1513 17.8714L13.1901 17.6516C13.2494 17.2587 13.5731 16.9702 13.9535 16.9702H14.4339C17.5459 16.9702 19.982 15.6514 20.694 11.8352C20.9915 10.2409 20.8375 8.90979 20.0504 7.97359C19.801 7.68398 19.5031 7.44424 19.1713 7.26611Z",fill:"#179BD7"}),Object(Pe.g)("path",{d:"M18.3102 6.91227C18.0503 6.83379 17.7858 6.77254 17.5185 6.72888C16.9903 6.64415 16.4565 6.60349 15.9221 6.6073H11.084C10.8998 6.60715 10.7218 6.67576 10.5819 6.80073C10.442 6.9257 10.3496 7.09877 10.3213 7.28867L9.29206 14.0928L9.26245 14.2913C9.29451 14.0747 9.39979 13.8772 9.55924 13.7346C9.71869 13.592 9.92177 13.5136 10.1318 13.5138H11.9427C15.4996 13.5138 18.2845 12.0061 19.0985 7.64447C19.1229 7.51534 19.1433 7.38964 19.1617 7.26669C18.9469 7.14912 18.723 7.05055 18.4925 6.97203C18.432 6.95109 18.3712 6.93117 18.3102 6.91227Z",fill:"#222D65"}),Object(Pe.g)("path",{d:"M10.3267 7.2882C10.3547 7.09825 10.4471 6.92509 10.5871 6.80018C10.727 6.67528 10.9053 6.60692 11.0894 6.60752H15.9275C16.5007 6.60752 17.0357 6.64667 17.5239 6.72909C17.8544 6.78329 18.1802 6.86436 18.4985 6.97156C18.7387 7.05467 18.9618 7.15289 19.1678 7.26622C19.41 5.65414 19.1658 4.55653 18.3307 3.56263C17.4101 2.46844 15.7485 2 13.6223 2H7.44964C7.01531 2 6.64482 2.3297 6.5777 2.77822L4.00664 19.7885C3.99467 19.8675 3.99922 19.9482 4.02 20.0252C4.04077 20.1022 4.07727 20.1735 4.12699 20.2344C4.1767 20.2952 4.23845 20.3441 4.30799 20.3776C4.37753 20.4112 4.4532 20.4286 4.5298 20.4287H8.34066L9.29748 14.0923L10.3267 7.2882Z",fill:"#253B80"})))}),null),Xr[Be.VENMO]=Object(Pe.g)((function(){return Fr||(Fr=Object(Pe.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M20.0439 2.17969C20.7029 3.32032 21 4.49518 21 5.97926C21 10.7127 17.1441 16.8618 14.0147 21.1797H6.86672L4 3.21606L10.2588 2.59335L11.7745 15.3756C13.1907 12.9578 14.9383 9.15825 14.9383 6.56776C14.9383 5.14981 14.7065 4.184 14.3443 3.38876L20.0439 2.17969Z",fill:"#3D95CE"})))}),null),Xr[Be.CRYPTO]=Object(Pe.g)((function(){var e=yt().primaryColor;return Object(Pe.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7.74316C4.23858 7.74316 2 9.98174 2 12.7432C2 15.5046 4.23858 17.7432 7 17.7432C9.76142 17.7432 12 15.5046 12 12.7432C12 9.98174 9.76142 7.74316 7 7.74316ZM0 12.7432C0 8.87717 3.13401 5.74316 7 5.74316C10.866 5.74316 14 8.87717 14 12.7432C14 16.6092 10.866 19.7432 7 19.7432C3.13401 19.7432 0 16.6092 0 12.7432Z",fill:e}),Object(Pe.g)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1577 9.96518C11.5898 10.6788 11.9998 11.762 11.9998 12.7432C11.9998 13.7243 11.5898 14.8076 11.1577 15.5212C11.6896 14.7266 11.9998 13.7711 11.9998 12.7432C11.9998 11.7152 11.6896 10.7597 11.1577 9.96518ZM11.9999 7.84425C12.4759 8.32999 12.8816 8.88479 13.2007 9.49223C14.1189 8.42024 15.4804 7.74316 16.9998 7.74316C19.7613 7.74316 21.9998 9.98174 21.9998 12.7432C21.9998 15.5046 19.7613 17.7432 16.9998 17.7432C15.4804 17.7432 14.1189 17.0661 13.2007 15.9941C12.8816 16.6015 12.4759 17.1563 11.9999 17.6421C13.2696 18.9376 15.0405 19.7432 16.9998 19.7432C20.8658 19.7432 23.9998 16.6092 23.9998 12.7432C23.9998 8.87717 20.8658 5.74316 16.9998 5.74316C15.0405 5.74316 13.2696 6.5487 11.9999 7.84425Z",fill:e}))}),null),Xr[Be.STOCKS]=Object(Pe.g)((function(){var e=yt().primaryColor;return Object(Pe.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",display:"ACCENT"},Object(Pe.g)("path",{d:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Pe.g)("path",{d:"M4.5 16.5L6 14l5 1 2.5-2h3l3-5.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}),null),Xr[Be.DAF]=Object(Pe.g)((function(){return Ir||(Ir=Object(Pe.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("g",{clipPath:"url(#clip0_6252_22297)"},Object(Pe.g)("path",{d:"M16.5765 4.96037C16.6594 5.00932 16.6809 5.11885 16.6232 5.19596L16.5759 5.2593L15.0086 7.35896L14.3138 8.29026C14.1242 8.54394 13.7833 8.62317 13.4831 8.52256C13.0331 8.37178 12.5519 8.29026 12.051 8.29026C11.5273 8.29026 11.025 8.37948 10.5576 8.54425C8.79202 9.1636 7.5255 10.8523 7.5255 12.8374C7.5255 13.6592 7.74264 14.4303 8.12246 15.0959C8.27802 15.3682 8.46016 15.6228 8.66692 15.8559C9.49528 16.7938 10.7048 17.3851 12.051 17.3851C12.3493 17.3851 12.4882 17.7411 12.2551 17.9272C12.1878 17.9808 12.1198 18.0335 12.051 18.0852C10.765 19.0543 9.21333 19.686 7.5255 19.8527C7.23059 19.882 6.93178 19.897 6.62909 19.897C6.44094 19.897 6.25947 19.8288 6.1178 19.705C6.05234 19.6478 5.98768 19.5895 5.92388 19.5304C5.25044 18.9084 4.67162 18.1855 4.21142 17.3845C3.55353 16.2421 3.13611 14.9422 3.02787 13.5557C3.00972 13.3186 3 13.0796 3 12.8374C3 11.1812 3.4414 9.62795 4.21142 8.29026C4.62236 7.57518 5.12793 6.92326 5.70999 6.34951C6.25315 5.81352 6.86243 5.34526 7.5255 4.96037C8.85684 4.18667 10.4021 3.74316 12.051 3.74316C12.1476 3.74316 12.2448 3.74447 12.3407 3.74837C13.8808 3.79657 15.3236 4.23226 16.5765 4.96037Z",fill:"#4DA3B3"}),Object(Pe.g)("path",{d:"M19.8329 17.5145C19.8902 17.7092 19.7155 17.893 19.5181 17.8456C19.5181 17.8456 19.5181 17.8456 19.5181 17.8456C19.252 17.7817 19.1303 17.8928 18.9815 18.1224C18.6911 18.5706 18.0776 19.2612 18.0034 19.346C15.5724 22.1292 11.6274 22.1812 8.38852 21.0562C8.37562 21.0516 8.36273 21.0471 8.35048 21.0432C8.06547 20.9438 7.79658 20.8432 7.55155 20.747C7.356 20.6706 7.17601 20.5972 7.01593 20.5295C6.718 20.4036 6.76112 20.2967 7.08212 20.3365C7.24332 20.3567 7.40195 20.3697 7.55155 20.3781C7.84763 20.395 8.11027 20.3938 8.29155 20.3889C8.46291 20.3843 8.63426 20.3771 8.80536 20.3668C9.38849 20.3316 9.97709 20.2206 10.5583 20.0287C11.0948 19.8507 11.5952 19.613 12.0537 19.3246C12.338 19.1473 12.6063 18.9492 12.8578 18.7348C12.9919 18.6205 13.1202 18.5023 13.2446 18.3789C13.5748 18.0515 13.8708 17.6923 14.1268 17.3091C14.253 17.1207 14.3702 16.9266 14.4771 16.7271C14.4989 16.6863 14.4761 16.6361 14.4311 16.6252C14.0905 16.5435 13.965 16.1245 14.2047 15.8691L15.8892 14.0744C15.8895 14.0741 15.8895 14.0741 15.8898 14.0737C15.8988 14.0642 16.3261 13.6097 16.4665 13.4599C16.495 13.4295 16.5266 13.3957 16.5551 13.3652L17.1097 12.7742L17.35 12.5181C17.688 12.1579 18.2894 12.3006 18.4296 12.7742L19.0377 14.8286L19.5259 16.4789C19.5266 16.4813 19.5288 16.4829 19.5312 16.4834C19.5345 16.4841 19.5365 16.4877 19.5356 16.4909C19.5349 16.4935 19.5342 16.496 19.5336 16.4986C19.5332 16.5007 19.5332 16.5028 19.5338 16.5049L19.7715 17.3085L19.7992 17.4001L19.8329 17.5145Z",fill:"#91CCD7"}),Object(Pe.g)("path",{d:"M5.42485 14.1279C4.19233 14.3874 2.95172 13.5889 3.00945 12.3307C3.06474 11.1259 3.36198 9.93661 3.89227 8.83616C4.75517 7.04549 6.1866 5.59086 7.96317 4.69928C9.73974 3.80771 11.7615 3.52936 13.7129 3.90767C14.9121 4.14016 16.0433 4.61261 17.0423 5.2883C18.0857 5.99397 17.9844 7.46586 17.0397 8.29894C16.095 9.13202 14.6462 8.96341 13.4564 8.55014C13.2576 8.4811 13.0533 8.42597 12.8448 8.38555C11.8824 8.19897 10.8853 8.33625 10.0091 8.77597C9.13287 9.21569 8.4269 9.9331 8.00132 10.8163C7.90912 11.0076 7.83121 11.2043 7.76777 11.405C7.38804 12.6059 6.65738 13.8683 5.42485 14.1279Z",fill:"#4DA3B3"})),Object(Pe.g)("defs",null,Object(Pe.g)("clipPath",{id:"clip0_6252_22297"},Object(Pe.g)("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3.74316)"})))))}),null),Xr),Yo=function(e){return function(e,t){return e===Be.PAYMENT_REQUEST?t.applePay?Wr||(Wr=Object(Pe.g)(Vo,null)):Gr||(Gr=Object(Pe.g)(Zo,null)):zo[e]}(e.method,Dn().paymentRequestAvailable)},$o=((Vr={})[Be.CREDIT_CARD]="Card",Vr[Be.BANK]="Bank",Vr[Be.PAYPAL]="PayPal",Vr[Be.VENMO]="Venmo",Vr[Be.CRYPTO]="Crypto",Vr[Be.STOCKS]="Stocks",Vr[Be.DAF]="DAF",Vr),Ko=function(e){var t=function(e,t){return e===Be.PAYMENT_REQUEST?t.applePay?"Apple Pay":"Google Pay":$o[e]}(e.method,Dn().paymentRequestAvailable);return Object(Pe.g)("span",{className:Ee()(Q({},Dt))},t)},Qo=Ee()(((Zr={padding:Nt.XL+" "+Nt.XL+" 0px"})[ht.TabletLandscapeUp]={padding:"0px"},Zr)),Jo=Ee()({border:"none",padding:0,margin:0,fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),ei=Ee()(J({fontWeight:700},Dt,{marginBottom:Nt.S})),ti=Ee()(J({},mn(Nt.XL),((zr={padding:"0px"})[ht.TabletLandscapeUp]={padding:Nt.XXL},zr))),ni=Ee()(((Yr={display:"grid",gridTemplateColumns:"1fr"})[ht.TabletLandscapeUp]={gridAutoFlow:"column",gridTemplateColumns:"auto 1fr"},Yr)),ri=Ee()((($r={height:"100%",width:"100%",minWidth:"170px",flexGrow:1,backgroundColor:bt.LightGray,display:"none"})[ht.TabletLandscapeUp]=ee({},mn(0)),$r)),oi=Tn([Jo,Ee()((Kr={display:"block"},Kr[ht.TabletLandscapeUp]={display:"none"},Kr))]),ii=Ee()({display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:Nt.S}),ai=ee({},yn(Nt.XS),{alignItems:"center",justifyContent:"flex-start",width:"100%",background:"transparent"}),li=function(e,t){return Ee()(ee({},ai,{border:"1px solid "+bt.DarkGray,background:"transparent",textAlign:"start",padding:Nt.XXS+" "+Nt.S,borderRadius:fn.Default,":hover":{cursor:"pointer",background:bt.Gray},"& > svg":{width:"20px",height:"20px"}},e?{background:t,border:"1px solid "+t,fontWeight:700,color:"white","& > svg":{filter:"brightness(0) invert(1)",width:"20px",height:"20px"},":hover":{background:t}}:{}))},ci=function(){var e=yt(),t=e.methods,n=e.lockMonthlyFrequency,r=Dn().paymentRequestAvailable;return d((function(){return t.filter((function(e){return(!n||!Je.includes(e))&&(e!==Be.PAYMENT_REQUEST||(r.applePay||r.googlePay))}))}),[t,n,r])},ui=function(){var e=ci(),t=Dn(),n=t.selectedPaymentMethod,r=t.setSelectedPaymentMethod;return Object(Pe.g)("ul",{className:ri},e.map((function(e){return Object(Pe.g)("li",{key:e},Object(Pe.g)("button",{type:"button",className:(t=e===n,Ee()(ee({},ai,{border:"none",padding:Nt.M,":hover":{cursor:"pointer",background:bt.Gray}},t?{background:"white",fontWeight:700,":hover":{background:"white"}}:{}))),onClick:function(){r(e)}},Object(Pe.g)(Yo,{method:e}),Object(Pe.g)(Ko,{method:e})));var t})))},si=function(){var e=ci(),t=yt().primaryColor,n=Dn(),r=n.selectedPaymentMethod,o=n.setSelectedPaymentMethod;return Object(Pe.g)("fieldset",{className:oi},Qr||(Qr=Object(Pe.g)("legend",{className:ei},"Payment method")),Object(Pe.g)("ul",{className:ii},e.map((function(e){return Object(Pe.g)("li",{key:e},Object(Pe.g)("button",{type:"button",className:li(e===r,t),onClick:function(){o(e)}},Object(Pe.g)(Yo,{method:e}),Object(Pe.g)(Ko,{method:e})))}))))},fi=Ee()({width:"100%",textAlign:"center"}),pi=Ee()(te({},{fontSize:"12px",lineHeight:"16px",letterSpacing:"0.01em"},{color:bt.TextOpaque})),di=function(){var e,t=yt().primaryColor;return Object(Pe.g)("div",{className:fi},Object(Pe.g)("span",{className:pi},"Every.org will process your donation."," ",Object(Pe.g)("a",{href:"https://www.every.org/about-us",target:"_blank",rel:"noreferrer",className:(e=t,Ee()({color:e,textDecoration:"none",cursor:"pointer"}))},"Learn More")))},gi=Ee()(ne({},{fontSize:"16px",lineHeight:"24px",letterSpacing:"-0.01em"},{outline:"none",width:"100%",border:"none",fontFamily:"inherit",cursor:"pointer",borderRadius:fn.Big,height:"52px",fontWeight:700,padding:Nt.XXS,transition:"opacity .3s"})),hi=Ee()({color:bt.White,backgroundColor:bt.DarkGray,cursor:"default","& > span":{opacity:"0.6"}}),bi=function(e){var t,n=e.handleClick,r=e.disabled,o=e.children,i=yt().primaryColor;return Object(Pe.g)("button",{type:"submit",className:Tn([gi,r?hi:(t=i,Ee()({color:bt.White,backgroundColor:t,":hover":{opacity:.9}}))]),disabled:r,onClick:n},Object(Pe.g)("span",null,o))},mi="USD",yi="$",vi=function(){var e=yt(),t=Dn(),n=t.frequency,c=t.donationAmount,u=t.setSubmitError,s=t.selectedPaymentMethod,f=t.stockAmount,p=t.stockSymbol,d=t.cryptoAmount,h=t.cryptoCurrency,b=yt().minDonationAmount;return g((function(t){t.preventDefault();var g=e.completeDonationInNewTab?"_blank":"_self",m={methods:[s],nonprofitSlug:e.nonprofitSlug,fundraiserSlug:e.fundraiserSlug};switch(s){case Be.CRYPTO:if(!d||!h){u("Please enter currency and amount");break}window.open(function(e){var t=e.cryptoAmount,n=e.cryptoCurrency,c=o(e,Ve);return a(c)+"?"+i(r({crypto_amount:t,crypto_currency:n},l(c)))+"#/"+Ze}(re({cryptoAmount:d,cryptoCurrency:h},m)),g);break;case Be.STOCKS:if(!p||!f){u("Please enter the symbol and amount");break}window.open(function(e){var t=e.stockAmount,n=e.stockSymbol,c=o(e,Ge);return a(c)+"?"+i(r({stock_amount:t,stock_symbol:n},l(c)))+"#/"+Ze}(re({stockSymbol:p,stockAmount:f},m)),g);break;default:if(!c||c0&&Object(Pe.g)("div",{className:Nr},r.map((function(e){return Object(Pe.g)("button",{key:e,className:Pr(n),type:"button",onClick:function(){i((function(t){return"number"==typeof t?t+e:e}))}},"+",e)}))))},ha=function(e){return Ee()({position:"relative",cursor:"pointer",display:"flex",width:"100%",height:"36px",alignItems:"center",justifyContent:"center",color:e,fontWeight:500,border:"2px solid "+e,borderRight:""})},ba=function(e){return Ee()({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 0px","& > input":{appearance:"none",height:0},"& > input:checked + label":{backgroundColor:e,color:"white"},"& > input:checked + label:hover":{backgroundColor:e,color:"white"}})},ma=function(e){return Ee()({display:"flex",width:"100%","& > div:first-of-type > label":{borderRadius:"6px 0 0 6px","&::after":{borderRadius:"6px 0 0 6px"}},"& > div:last-of-type > label":{borderRadius:"0 6px 6px 0",borderRight:"2px solid "+e,"&::after":{borderRadius:"0 6px 6px 0"}}})},ya=function(){var e=yt(),t=e.primaryColor,n=e.lockMonthlyFrequency,r=e.monthlyTitle,o=void 0===r?"Monthly donation":r,i=Dn(),a=i.frequency,l=i.selectedPaymentMethod,c=i.setFrequency;return n?Object(Pe.g)("h4",null,o):Je.includes(l)?Object(Pe.g)("fieldset",{className:Jo},xi||(xi=Object(Pe.g)("legend",{className:ei},"Frequency")),Object(Pe.g)("p",null,l===Be.DAF?"Chariot":"Venmo"," ","only supports one-time donations")):Object(Pe.g)("fieldset",{className:Jo},ki||(ki=Object(Pe.g)("legend",{className:ei},"Frequency")),Object(Pe.g)("div",{className:ma(t)},Object(Pe.g)("div",{className:ba(t)},Object(Pe.g)("input",{type:"radio",name:"frequency",id:"monthly",checked:a===He.Monthly,value:He.Monthly}),Object(Pe.g)("label",{className:ha(t),id:"frequency-monthly",htmlFor:"monthly",onClick:function(){c(He.Monthly)}},"Give Monthly")),Object(Pe.g)("div",{className:ba(t)},Object(Pe.g)("input",{type:"radio",name:"frequency",id:"once",checked:a===He.OneTime,value:He.OneTime}),Object(Pe.g)("label",{id:"frequency-one-time",htmlFor:"one-time",className:ha(t),onClick:function(){c(He.OneTime)}},"Once"))))},va=function(e){var t=e.changeView,n=vi(),r=Dn(),o=r.donationAmount;return Object(Pe.g)("form",{className:ni,onSubmit:n},Object(Pe.g)(ji,{handleClick:function(){t(ao.START)}}),Object(Pe.g)("div",{className:ti},Si||(Si=Object(Pe.g)("h3",null,"Connect your DAF with Chariot")),Ai||(Ai=Object(Pe.g)(ya,null)),Ti||(Ti=Object(Pe.g)(ga,null)),Object(Pe.g)(bi,{disabled:!o||Number.isNaN(o)},oe({method:Be.DAF})),Li||(Li=Object(Pe.g)(di,null))))},_a=function(e){var t=e.changeView,n=yt().primaryColor;return Object(Pe.g)("div",{className:ni},Object(Pe.g)(ji,{handleClick:function(){t(ao.START)}}),Object(Pe.g)("div",{className:ti},Ni||(Ni=Object(Pe.g)("h3",null,"Manual DAF donation")),Pi||(Pi=Object(Pe.g)("p",null,"Please ask your provider to make a one-time or recurring grant to:")),Object(Pe.g)("div",{className:bn(Nt.S)},Object(Pe.g)("p",{className:bn(0)},Mi||(Mi=Object(Pe.g)("span",null,"Every.org (EIN: 61-1913297)")),Ei||(Ei=Object(Pe.g)("span",null,"58 West Portal Ave #781 San Francisco, CA 94127")),Di||(Di=Object(Pe.g)("span",null,"Memo: For every.org/themarshallproject from @darth.vader506")),Ri||(Ri=Object(Pe.g)("span",null,"Contact info: Mark Ulrich, CEO")),Hi||(Hi=Object(Pe.g)("span",null,"Email: team@every.org")),Bi||(Bi=Object(Pe.g)("span",null,"Phone number: +1 (415) 650-0503"))),Object(Pe.g)("p",null,"You may also email us at"," ",Object(Pe.g)("a",{className:Gn(n),href:X({address:"team@every.org",subject:"Donation via DAF"})},"team@every.org")," ","with the memo or to let us know if you wish to share your contact information with the nonprofit/campaign. By default, we do not share your contact information")),Object(Pe.g)("div",{className:Ee()(ce({color:bt.TextGray},mn(0)))},Object(Pe.g)("p",{className:Ee()({paddingBottom:Nt.S})},"We will attribute the donation accordingly:"),Ii||(Ii=Object(Pe.g)("p",null,"If we receive BOTH your @username and a nonprofit/campaign: we will add a donation for that nonprofit/campaign to your account.")),Ui||(Ui=Object(Pe.g)("p",null,"If we receive only your @username, we will credit your account's gift card balance in the amount received, which you can use to support as many nonprofits as you'd like.")),qi||(qi=Object(Pe.g)("p",null,"If we receive only a nonprofit/campaign, we will send that amount to that nonprofit/campaign as an anonymous donation.")),Fi||(Fi=Object(Pe.g)("p",null,"If we do not receive any information by the time the wire/ACH is received, we will apply it towards running Every.org.")))))},Oa=Ee()(ue({outline:"none",border:"none",fontFamily:"inherit",background:"#ADEFD1",color:"#00203F",alignSelf:"center",borderRadius:fn.Big,padding:Nt.M+" "+Nt.XL,display:"flex",alignItems:"center",fontWeight:500},Dt,{gap:Nt.XS,cursor:"pointer",":hover":{background:"#7ce6b6"}})),Ca=function(e){return Ee()(ue({outline:"none",border:"none",background:"none",fontFamily:"inherit",color:e,alignSelf:"center",display:"flex",alignItems:"center",fontWeight:500},Dt,{gap:Nt.XS,cursor:"pointer",":hover":{opacity:.9}}))},ja=function(){return Xi||(Xi=Object(Pe.g)("svg",{width:"101",height:"16",viewBox:"0 0 101 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Pe.g)("path",{d:"M26.5651 0.257543H29.7622V15.2809H26.5651V0.257543ZM20.2894 15.2809H17.0923V0.257543H20.2894V15.2809ZM26.8019 9.12133H20.0525V6.18104H26.8019V9.12133Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M32.2018 15.2809L38.3591 0.257543H41.5168L47.6938 15.2809H44.3389L39.2867 2.01742H40.5497L35.4778 15.2809H32.2018ZM35.2805 12.0616L36.1291 9.4218H43.2337L44.1021 12.0616H35.2805Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M50.1138 15.2809V0.257543H56.0936C57.3303 0.257543 58.396 0.479317 59.2907 0.922864C60.1853 1.3521 60.876 1.9745 61.3628 2.79005C61.8496 3.60561 62.093 4.57855 62.093 5.70888C62.093 6.8249 61.8496 7.79069 61.3628 8.60625C60.876 9.40749 60.1853 10.0227 59.2907 10.452C58.396 10.8812 57.3303 11.0958 56.0936 11.0958H51.89L53.3109 9.57203V15.2809H50.1138ZM58.896 15.2809L55.4423 9.82958H58.8565L62.3496 15.2809H58.896ZM53.3109 9.95835L51.89 8.32724H55.916C56.9027 8.32724 57.6395 8.09831 58.1263 7.64046C58.6131 7.16829 58.8565 6.52444 58.8565 5.70888C58.8565 4.87902 58.6131 4.23516 58.1263 3.77731C57.6395 3.31945 56.9027 3.09052 55.916 3.09052H51.89L53.3109 1.43795V9.95835Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M65.6128 15.2809V0.257543H68.8099V15.2809H65.6128Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M79.7851 15.5385C78.6931 15.5385 77.68 15.3453 76.7459 14.959C75.8249 14.5727 75.0223 14.029 74.3382 13.3279C73.6672 12.6268 73.1409 11.8041 72.7594 10.8598C72.391 9.91543 72.2068 8.88525 72.2068 7.76923C72.2068 6.65321 72.391 5.62303 72.7594 4.67871C73.1409 3.73438 73.6738 2.91167 74.3579 2.21058C75.0421 1.50949 75.8446 0.965787 76.7656 0.579472C77.6866 0.193157 78.6865 0 79.7653 0C80.8573 0 81.8573 0.193157 82.7651 0.579472C83.686 0.965787 84.482 1.50949 85.153 2.21058C85.8372 2.91167 86.37 3.73438 86.7516 4.67871C87.1331 5.60873 87.3239 6.6389 87.3239 7.76923C87.3239 8.88525 87.1331 9.92258 86.7516 10.8812C86.37 11.8255 85.8372 12.6482 85.153 13.3493C84.482 14.0361 83.686 14.5727 82.7651 14.959C81.8573 15.3453 80.8639 15.5385 79.7851 15.5385ZM79.7653 12.5767C80.3837 12.5767 80.9494 12.4622 81.4626 12.2333C81.9888 12.0044 82.4493 11.6753 82.844 11.2461C83.2387 10.8168 83.5413 10.3089 83.7518 9.72227C83.9755 9.13564 84.0873 8.48463 84.0873 7.76923C84.0873 7.05383 83.9755 6.40282 83.7518 5.81619C83.5413 5.22956 83.2387 4.72163 82.844 4.29239C82.4625 3.86315 82.0086 3.53407 81.4823 3.30514C80.956 3.07621 80.3837 2.96175 79.7653 2.96175C79.147 2.96175 78.5747 3.07621 78.0484 3.30514C77.5353 3.53407 77.0814 3.86315 76.6867 4.29239C76.292 4.72163 75.9828 5.22956 75.7591 5.81619C75.5486 6.40282 75.4434 7.05383 75.4434 7.76923C75.4434 8.47032 75.5486 9.12133 75.7591 9.72227C75.9828 10.3089 76.2854 10.8168 76.6669 11.2461C77.0616 11.6753 77.5221 12.0044 78.0484 12.2333C78.5747 12.4622 79.147 12.5767 79.7653 12.5767Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M93.3822 15.2809V3.09052H88.9616V0.257543H101V3.09052H96.5793V15.2809H93.3822Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M11.272 1.05076C11.3408 1.09302 11.3586 1.18757 11.3108 1.25413L11.2714 1.30881L9.3933 3.92529C9.23593 4.14428 8.9529 4.21268 8.70361 4.12582C8.33005 3.99566 7.93049 3.92529 7.51464 3.92529C7.07982 3.92529 6.66276 4.00231 6.27476 4.14455C4.80885 4.6792 3.75732 6.13699 3.75732 7.85057C3.75732 8.56007 3.9376 9.22572 4.25295 9.80028C4.3821 10.0353 4.53332 10.2551 4.70499 10.4564C5.39274 11.2659 6.39692 11.7764 7.51464 11.7764C7.76228 11.7764 7.87763 12.0838 7.68405 12.2443C7.62823 12.2906 7.57176 12.3361 7.51464 12.3808C6.44696 13.2173 5.15865 13.7627 3.75732 13.9066C3.51247 13.9319 3.26438 13.9448 3.01307 13.9448C2.85686 13.9448 2.70619 13.886 2.58857 13.7791C2.53422 13.7297 2.48053 13.6794 2.42757 13.6283C1.86844 13.0914 1.38787 12.4674 1.00579 11.7759C0.459575 10.7898 0.11301 9.6676 0.0231398 8.47068C0.00807176 8.26604 0 8.05971 0 7.85057C0 6.4209 0.366476 5.08005 1.00579 3.92529C1.34697 3.308 1.76673 2.74523 2.24998 2.24993C2.70094 1.78724 3.2068 1.38302 3.75732 1.05076C4.86267 0.382868 6.1456 9.06616e-06 7.51464 9.06616e-06C7.59482 9.06616e-06 7.67555 0.00113271 7.75519 0.00450591C9.03382 0.0461087 10.2317 0.422222 11.272 1.05076Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M13.9754 11.8877C14.023 12.0558 13.8779 12.2145 13.7141 12.1736C13.4931 12.1184 13.3921 12.2143 13.2685 12.4126C13.0274 12.7994 12.5181 13.3956 12.4565 13.4688C10.4382 15.8714 7.16282 15.9162 4.47369 14.9451C4.46298 14.9412 4.45227 14.9373 4.4421 14.9339C4.20547 14.8481 3.98222 14.7612 3.77878 14.6782C3.61643 14.6123 3.46699 14.5489 3.33408 14.4905C3.08673 14.3817 3.12253 14.2895 3.38904 14.3239C3.52288 14.3412 3.65458 14.3525 3.77878 14.3597C4.15457 14.382 4.46549 14.3678 4.56937 14.3616C4.59412 14.3601 4.61885 14.3589 4.64363 14.3582C5.18515 14.3419 5.73401 14.2439 6.27519 14.0581C6.72061 13.9045 7.13605 13.6992 7.51669 13.4503C7.75279 13.2972 7.9755 13.1262 8.18429 12.9412C8.29565 12.8425 8.40219 12.7404 8.50551 12.6339C8.77962 12.3513 9.02535 12.0413 9.23789 11.7105C9.34271 11.5478 9.44004 11.3803 9.52876 11.208C9.5469 11.1728 9.52792 11.1295 9.49058 11.12C9.20779 11.0496 9.10362 10.6878 9.30264 10.4673L10.7012 8.91805L10.7017 8.91751C10.7086 8.90988 11.0638 8.51701 11.1804 8.38764C11.2042 8.36134 11.2303 8.33219 11.2541 8.3059L11.914 7.57461C12.1946 7.26369 12.6939 7.38682 12.8104 7.79567L13.7206 10.9938C13.7212 10.9958 13.7229 10.9972 13.7249 10.9977C13.7277 10.9983 13.7293 11.0014 13.7286 11.0042C13.728 11.0064 13.7275 11.0085 13.727 11.0108C13.7266 11.0126 13.7266 11.0144 13.7271 11.0162L13.9245 11.7099L13.9475 11.7889L13.9754 11.8877Z",fill:"#00203F"}),Object(Pe.g)("path",{d:"M2.01325 8.96461C0.989941 9.18868 -0.0400886 8.49938 0.00784723 7.41322C0.0537471 6.37318 0.300533 5.3465 0.740811 4.39654C1.45724 2.85074 2.64569 1.59503 4.1207 0.825379C5.5957 0.0557292 7.27427 -0.184559 8.89443 0.142017C9.8901 0.342713 10.8293 0.750556 11.6587 1.33385C12.5249 1.94302 12.4409 3.21363 11.6566 3.93279C10.8722 4.65194 9.66932 4.50639 8.68146 4.14963C8.51643 4.09003 8.34679 4.04245 8.17368 4.00755C7.37463 3.84649 6.54677 3.965 5.81931 4.34458C5.09184 4.72417 4.50571 5.34348 4.15237 6.10585C4.07582 6.27101 4.01114 6.44087 3.95847 6.61407C3.64319 7.65079 3.03655 8.74054 2.01325 8.96461Z",fill:"#00203F"})))},wa=function(e){var t=e.changeView,n=yt().primaryColor;return Object(Pe.g)("div",{className:ni},Wi||(Wi=Object(Pe.g)(ui,null)),Object(Pe.g)("div",{className:ti},Gi||(Gi=Object(Pe.g)(si,null)),Vi||(Vi=Object(Pe.g)("h4",null,"Instant DAF donation")),Zi||(Zi=Object(Pe.g)("p",null,"We use Chariot to verify your account info and automatically initiate a grant from your DAF, or you can get instructions for making the donation manually.")),Object(Pe.g)("button",{type:"button",className:Oa,onClick:function(){t(ao.AMOUNT)}},zi||(zi=Object(Pe.g)("span",null,"Donate with")),Yi||(Yi=Object(Pe.g)(ja,null))),Object(Pe.g)("button",{type:"button",className:Ca(n),onClick:function(){t(ao.MANUAL)}},"Get instructions for a manual DAF donation"),$i||($i=Object(Pe.g)(di,null))))},xa=function(){var e=u(ao.START),t=e[1];switch(e[0]){case ao.START:return Object(Pe.g)(wa,{changeView:t});case ao.MANUAL:return Object(Pe.g)(_a,{changeView:t});case ao.AMOUNT:return Object(Pe.g)(va,{changeView:t})}},ka=function(){var e=Dn(),t=e.frequency,n=e.donationAmount,r=e.selectedPaymentMethod,o=e.paymentRequestAvailable,i=vi();return Object(Pe.g)("form",{className:ni,onSubmit:i},Ki||(Ki=Object(Pe.g)(ui,null)),Object(Pe.g)("div",{className:ti},Qi||(Qi=Object(Pe.g)(si,null)),Ji||(Ji=Object(Pe.g)(ya,null)),ea||(ea=Object(Pe.g)(ga,null)),Object(Pe.g)(bi,{disabled:t===He.Unselected||!n||Number.isNaN(n)},oe({method:r,paymentRequestIsApplePay:o.applePay})),ta||(ta=Object(Pe.g)(di,null))))},Sa=function(){var e=vi(),t=yt().primaryColor,n=Dn(),r=n.stockAmount,o=n.stockSymbol,i=n.setStockAmount,a=n.setStockSymbol,l=n.submitError,c=n.setSubmitError,u=[Sr(t)].concat(l?[kr]:[]).join(" ");return Object(Pe.g)("form",{className:ni,onSubmit:e},na||(na=Object(Pe.g)(ui,null)),Object(Pe.g)("div",{className:ti},ra||(ra=Object(Pe.g)(si,null)),Object(Pe.g)("fieldset",{className:Ee()(se({fieldSetCss:Jo},mn(Nt.XXL)))},Object(Pe.g)("div",null,oa||(oa=Object(Pe.g)("legend",{className:ei},"What is the symbol of the shares?")),ia||(ia=Object(Pe.g)("span",null,"Example: GOOG")),Object(Pe.g)("div",{className:u},Object(Pe.g)("input",{id:"stock-amount-input",className:Ar,type:"text",value:o,onInput:function(e){a(e.currentTarget.value),c(null)}}))),Object(Pe.g)("div",null,aa||(aa=Object(Pe.g)("legend",{className:ei},"How many shares are you donating?")),Object(Pe.g)("div",{className:u},Object(Pe.g)("input",{id:"donation-input",className:Ar,type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:r||void 0,onInput:function(e){i(Number(e.currentTarget.value)),c(null)}})))),Object(Pe.g)(bi,{disabled:!r||!o},oe({method:Be.STOCKS})),la||(la=Object(Pe.g)(di,null))))},Aa=function(){switch(Dn().selectedPaymentMethod){case Be.CRYPTO:return ca||(ca=Object(Pe.g)(_i,null));case Be.STOCKS:return ua||(ua=Object(Pe.g)(Sa,null));case Be.DAF:return sa||(sa=Object(Pe.g)(xa,null));default:return fa||(fa=Object(Pe.g)(ka,null))}},Ta=function(){return pa||(pa=Object(Pe.g)(Ln,{className:Qo},Object(Pe.g)(Aa,null)))};(de.prototype=new Pe.a).isPureReactComponent=!0,de.prototype.shouldComponentUpdate=function(e,t){return pe(this.props,e)||pe(this.state,t)};var La=Pe.i.__b;Pe.i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),La&&La(e)};var Na="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Pa=Pe.i.__e;Pe.i.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Pa(e,t,n,r)};var Ma=Pe.i.unmount;Pe.i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Ma&&Ma(e)},(he.prototype=new Pe.a).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=be(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=a;var l=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(a,a)},he.prototype.componentWillUnmount=function(){this.t=[]},he.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=fe({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__e&&Object(Pe.e)(Pe.b,null,e.fallback);return o&&(o.__h=null),[Object(Pe.e)(Pe.b,null,t.__e?null:e.children),o]};var Ea=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]1&&void 0!==arguments[1]?arguments[1]:"",s=arguments[2];return Object.keys(c).map((function(f){var p=c[f];if(null===p)return"";if("object"==typeof p){var d=/^@/.test(f)?f:null;return e(p,d?u:u+f,d||s)}var g=f+p+u+s;if(t[g])return t[g];var h=n+r.length.toString(36);return o(i(a(h+l(u),f,p),s)),t[g]=h,h})).join(" ")};if(e.exports=function(){for(var e=arguments.length,t=Array(e),n=0;n2&&(l.children=arguments.length>3?P.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return a(e,l,r,o,null)}function a(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++E:o};return null==o&&null!=M.vnode&&M.vnode(i),i}function l(){return{current:null}}function c(e){return e.children}function u(e,t){this.props=e,this.context=t}function s(e,t){if(null==t)return e.__?s(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?a(y.type,y.props,y.key,null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(b=j[d])||b&&y.key==b.key&&y.type===b.type)j[d]=void 0;else for(g=0;g2&&(c.children=arguments.length>3?P.call(arguments,2):n),a(e.type,c,o||e.key,i||e.ref,null)}function N(e,t){var n={__c:t="__cC"+B++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(p)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.d(t,"j",(function(){return A})),n.d(t,"h",(function(){return T})),n.d(t,"e",(function(){return i})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return L})),n.d(t,"d",(function(){return N})),n.d(t,"k",(function(){return b})),n.d(t,"i",(function(){return M}));var P,M,E,D,R,H,B,I={},U=[],q=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;P=U.slice,M={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},E=0,u.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof e&&(e=e(r({},n),this.props)),e&&r(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),p(this))},u.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),p(this))},u.prototype.render=c,D=[],R="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d.__r=0,B=0},kPAj:function(e){var t;e.exports=t={},t.simpleFilter=function(e,n){return n.filter((function(n){return t.test(e,n)}))},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(e,t,n){var r,o=0,i=[],a=t.length,l=0,c=0,u=(n=n||{}).pre||"",s=n.post||"",f=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var p=0;p=0||(o[n]=e[n]);return o}function i(e){return Object.entries(e).filter((function(e){return Boolean(e[1])})).map((function(e){return e.map((function(e){return encodeURIComponent(e)})).join("=")})).join("&")}function a(e){var t=e.fundraiserSlug,n=Ye+e.nonprofitSlug;return t&&(n+="/f/"+t),n}function c(e){var t=e.methods,n=e.nonprofitSlug,r=e.noExit,o=e.privateNote,i=e.utmSource;return{method:null==t?void 0:t.join(","),utm_campaign:"donate-button",utm_source:null!=i?i:n,utm_medium:ut,no_exit:null!=r?r:1,private_note:o}}function l(e){var t,n,r=new URL(e),o=r.pathname.split("/f/")[1],i=r.pathname.split("/")[1],a=new URLSearchParams(r.search),c=function(e){if(e)return e.split(",").filter((function(e){return ht.includes(e)}))}(a.get(vt.METHOD)),l=function(e){if(e)return Object.values(pt).find((function(t){return t.toUpperCase()===e.toUpperCase()}))}(a.get(vt.FREQUENCY)),u=function(e){if(e){var t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t}}(a.get(vt.AMOUNT)),s=null!=(t=a.get(vt.MONTHLY_TITLE))?t:void 0,d=function(e){if(e)return e.split(",").map(Number.parseFloat).filter(Boolean).slice(0,yt)}(a.get(vt.SUGGESTED_AMOUNTS)),f=null!=(n=a.get(vt.UTM_SOURCE))?n:void 0;if(i)return{fundraiserSlug:o,nonprofitSlug:i,defaultFrequency:l,methods:c,lockMonthlyFrequency:l===pt.Monthly,monthlyTitle:s,addAmounts:d,utmSource:f,defaultDonationAmount:u}}function u(e,t){Be.i.__h&&Be.i.__h(Ge,e,Nt||t),Nt=0;var n=Ge.__H||(Ge.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:At}),n.__[e]}function s(e){return Nt=1,d(C,e)}function d(e,t,n){var r=u(qe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):C(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ge,!Ge.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};Ge.u=!0;var i=Ge.shouldComponentUpdate,a=Ge.componentWillUpdate;Ge.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},Ge.shouldComponentUpdate=o}return r.__N||r.__}function f(e,t){var n=u(qe++,3);!Be.i.__s&&O(n.__H,t)&&(n.__=e,n.i=t,Ge.__H.__h.push(n))}function p(e){return Nt=5,g((function(){return{current:e}}),[])}function g(e,t){var n=u(qe++,7);return O(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function b(e,t){return Nt=8,g((function(){return e}),t)}function h(e){var t=Ge.context[e.__c],n=u(qe++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Ge)),t.props.value):e.__}function m(){for(var e;e=St.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(v),e.__H.__h.forEach(_),e.__H.__h=[]}catch(t){e.__H.__h=[],Be.i.__e(t,e.__v)}}function y(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Bt&&(t=requestAnimationFrame(n))}function v(e){var t=Ge,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Ge=t}function _(e){var t=Ge;e.__c=e.__(),Ge=t}function O(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function C(e,t){return"function"==typeof t?t(e):t}function j(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){j(c,r,o,i,a,"next",e)}function a(e){j(c,r,o,i,a,"throw",e)}var c=e.apply(t,n);i(void 0)}))}}function k(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){k(c,r,o,i,a,"next",e)}function a(e){k(c,r,o,i,a,"throw",e)}var c=e.apply(t,n);i(void 0)}))}}function N(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){N(c,r,o,i,a,"next",e)}function a(e){N(c,r,o,i,a,"throw",e)}var c=e.apply(t,n);i(void 0)}))}}function A(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function T(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){A(c,r,o,i,a,"next",e)}function a(e){A(c,r,o,i,a,"throw",e)}var c=e.apply(t,n);i(void 0)}))}}function I(){var e,t,n,r,o=(t=s(null),n=t[0],r=t[1],f((function(){T((function*(){try{var e=yield Pn(Rn,{apiVersion:Dn});r(e)}catch(e){}}))()}),[]),n),i=s(!1),a=i[0],c=i[1],l=s(!1),u=l[0],d=l[1],p=b((function(t){return(e=e||T((function*(e){var t=Boolean(window.ApplePaySession);if(d(t),e){var n=null==e?void 0:e.paymentRequest({country:"US",currency:"usd",total:{label:"test",amount:0},requestPayerName:!1,requestPayerEmail:!1}),r=Boolean(yield null==n?void 0:n.canMakePayment());c(r)}}))).apply(this,arguments)}),[]);return f((function(){p(o)}),[p,o]),{googlePay:a,applePay:u}}function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t=5||2===n&&(o[0]>5||5===o[0]&&(r||o[1]!==so))),o.length=1,r?(e.e=e.e-t+1,o[0]=1):o[0]=e.e=0;else if(t=5||2===n&&(o[t]>5||5===o[t]&&(r||o[t+1]!==so||1&o[t-1]))||3===n&&(r||!!o[0]),o.length=t,r)for(;++o[--t]>9;)if(o[t]=0,0===t){++e.e,o.unshift(1);break}for(t=o.length;!o[--t];)o.pop()}return e}function G(e,t,n){var r=e.e,o=e.c.join(""),i=o.length;if(t)o=o.charAt(0)+(i>1?"."+o.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)o="0"+o;o="0."+o}else if(r>0)if(++r>i)for(r-=i;r--;)o+="0";else r1&&(o=o.charAt(0)+"."+o.slice(1));return e.s<0&&n?"-"+o:o}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,cu);if(t.parentNode){var r=t.parentNode;Object(Be.j)(Object(Be.g)(ft,n),r,t)}}function Ee(){document.querySelectorAll("*[href^='https://www.every.org/']").forEach((function(e){var t=e.getAttribute("href");if(null!=t&&t.includes("#/donate")){var n,r=l(t);if(!r)return;var o=null!=(n=uu.get(t))?n:function(e,t){Tc||Ie();var n=document.createElement("div");Tc.append(n);var r=new su(e,n);return uu.set(t,r),r}(r,t);null===e.getAttribute("data-every-style")?e.addEventListener("click",(function(e){e.preventDefault(),o.show()})):Le(Ae({element:e,onClick:function(){o.show()}},r,{url:t}))}}))}function Me(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,dt),k=O||a(t=w)+"?"+i(c(t))+"#/"+st;return Object(Be.g)("a",{href:k,style:{background:s,color:l,borderRadius:f,fontSize:g,padding:h},className:[We,m].filter(Boolean).join(" "),target:_,onClick:y?function(e){e.preventDefault(),y()}:void 0},r&&Object(Be.g)("svg",{className:Ze,style:{color:l,height:g,width:g},width:"64",height:"56",viewBox:"0 0 64 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Fe||(Fe=Object(Be.g)("path",{d:"M48.3746 20.9558C48.3746 9.03877 38.4374 0 25.6754 0C11.4001 0 0 12.0685 0 27.0153C0 43.1235 12.8125 56 30.0639 56C47.3153 56 62.7508 42.3156 63.9614 24.3895H56.0924C54.6295 37.8215 43.2799 48.1226 30.0639 48.1226C17.3523 48.1226 7.91952 38.7809 7.91952 27.0153C7.91952 16.4112 15.7886 7.87737 25.6754 7.87737C33.948 7.87737 40.4551 13.5329 40.4551 20.9558C40.4551 27.1163 36.0161 32.2669 30.1143 32.2669V40.1443C40.556 40.1443 48.3746 31.4085 48.3746 20.9558Z"}))),Object(Be.g)("span",{className:Ke},j))},pt=function(e){return e.Monthly="monthly",e.OneTime="once",e.Unselected="",e}({}),gt=function(e){return e.CREDIT_CARD="card",e.BANK="bank",e.PAYPAL="paypal",e.VENMO="venmo",e.PAYMENT_REQUEST="pay",e.CRYPTO="crypto",e.STOCKS="stocks",e.DAF="daf",e.GIFT_CARD="gift",e}({}),bt=[gt.VENMO,gt.DAF,gt.CRYPTO,gt.STOCKS],ht=Object.values(gt),mt=ht.filter((function(e){return e!==gt.GIFT_CARD})),yt=5,vt=function(e){return e.METHOD="method",e.FREQUENCY="frequency",e.MONTHLY_TITLE="monthlyTitle",e.SUGGESTED_AMOUNTS="suggestedAmounts",e.AMOUNT="amount",e.UTM_SOURCE="utm_source",e}(vt||{}),_t=function(){var e=document.createElement("style");e.innerHTML='\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format("woff2");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format("woff2");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: "Basis Grotesque Pro";\n src: local("Basis Grotesque Pro"), local("Basis Grotesque Pro"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format("woff2");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n ',document.head.append(e)},Ot=n("nr9d"),Ct=n.n(Ot),jt={methods:Object.values(mt),show:!1,addAmounts:[10,50,100],defaultFrequency:pt.OneTime,minDonationAmount:5,primaryColor:"#018669",showGiftCardOption:!1},wt={arrayMerge:function(e,t){return t}},kt=Object(Be.d)({}),xt=function(e){var t=e.children,n=function(e){var t,n=null==(t=e.methods)?void 0:t.filter((function(e){return ht.includes(e)})),r=(n&&n.length>0?n:mt).concat(e.showGiftCardOption?[gt.GIFT_CARD]:[]);return Ct.a.all([jt,e,{methods:r}],wt)}(e.options);return Object(Be.g)(kt.Provider,{value:n},t)},Nt=0,St=[],At=[],Tt=Be.i.__b,It=Be.i.__r,Lt=Be.i.diffed,Et=Be.i.__c,Mt=Be.i.unmount;Be.i.__b=function(e){Ge=null,Tt&&Tt(e)},Be.i.__r=function(e){It&&It(e),qe=0;var t=(Ge=e.__c).__H;t&&(ze===Ge?(t.__h=[],Ge.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=At,e.__N=e.i=void 0}))):(t.__h.forEach(v),t.__h.forEach(_),t.__h=[],qe=0)),ze=Ge},Be.i.diffed=function(e){Lt&&Lt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==St.push(t)&&Ve===Be.i.requestAnimationFrame||((Ve=Be.i.requestAnimationFrame)||y)(m)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==At&&(e.__=e.__V),e.i=void 0,e.__V=At}))),ze=Ge=null},Be.i.__c=function(e,t){t.some((function(e){try{e.__h.forEach(v),e.__h=e.__h.filter((function(e){return!e.__||_(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Be.i.__e(n,e.__v)}})),Et&&Et(e,t)},Be.i.unmount=function(e){Mt&&Mt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{v(e)}catch(e){t=e}})),n.__H=void 0,t&&Be.i.__e(t,n.__v))};var Pt,Rt,Dt,Bt="function"==typeof requestAnimationFrame,Ut=function(){return h(kt)},Ht=Symbol("FundraiserFetchError"),Xt=Symbol("FundraiserFetching"),Ft=Object(Be.d)({fundraiser:Xt}),qt=function(e){var t=e.children,n=Ut(),r=n.fundraiserSlug,o=n.nonprofitSlug,i=s(Xt),a=i[0],c=i[1],l=b(x((function*(){if(r)try{var e=yield function(e,t){return(Rt=Rt||w((function*(e,t){var n,r=$e+"/"+e+"/fundraiser/"+t,o=yield fetch(r).then((function(e){return(n=n||w((function*(e){return e.json()}))).apply(this,arguments)}));return o.data.fundraiser}))).apply(this,arguments)}(o,r);c(e)}catch(e){c(Ht)}else c(void 0)})),[o,r]);return f((function(){l()}),[l]),Object(Be.g)(Ft.Provider,{value:{fundraiser:a}},t)},Gt=Symbol("NonprofitFetchError"),zt=Symbol("NonprofitFetching"),Vt=Object(Be.d)({nonprofit:zt}),Wt=function(e){var t=e.children,n=Ut().nonprofitSlug,r=s(zt),o=r[0],i=r[1],a=b(S((function*(){try{var e=yield function(e){return(Pt=Pt||w((function*(e){var t,n=yield fetch($e+"/"+e).then((function(e){return(t=t||w((function*(e){return e.json()}))).apply(this,arguments)}));return n.data.nonprofit}))).apply(this,arguments)}(n);i(e)}catch(e){i(Gt)}})),[n]);return f((function(){a()}),[a]),Object(Be.g)(Vt.Provider,{value:{nonprofit:o}},t)},Zt="https://js.stripe.com/v3",Kt=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Yt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",$t=null,Qt=function(e){return null!==$t||($t=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(Yt),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Zt,'"]')),t=0;t element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))),$t},Jt=Promise.resolve().then((function(){return Qt(null)})),en=!1;Jt.catch((function(e){en||console.warn(e)}));var tn,nn,rn,on,an,cn,ln,un,sn,dn,fn,pn,gn,bn,hn,mn,yn,vn,_n,On,Cn,jn,wn,kn,xn,Nn,Sn,An,Tn,In,Ln,En,Mn,Pn=function(){for(var e=arguments.length,t=new Array(e),n=0;n *:not(:last-child)":{marginBottom:"number"==typeof e?e+"px":e}}},Yn=function(e){return{display:"flex",flexDirection:"row","> *:not(:last-child)":{marginRight:"number"==typeof e?e+"px":e}}},$n=function(e){return He()(Kn(e))},Qn=function(e){return Kn(e)},Jn=function(e){return Yn(e)},er=He()({display:"flex",flexDirection:"column",gap:Zn.M}),tr={position:"relative",top:"-1px",transform:"rotate(180deg)"},nr={"> p":{marginBottom:Zn.XS}},rr=He()(L({},nr,{maxHeight:"1000px",transition:"all 1s",opacity:"1"})),or=He()(L({},nr,{opacity:"0",overflow:"hidden",maxHeight:"0",transition:"all 0.5s"})),ir=function(e){var t;return He()(L({},Wn,e?((t={})[Xn.TabletLandscapeUp]={padding:"none"},t):{}))},ar=function(e){return He()(L({},Jn(Zn.S),Wn,{alignItems:"center",justifyContent:"space-between",width:"100%",border:"none",background:"transparent",textAlign:"start",padding:0,":hover":{cursor:"pointer"},"> svg":L({width:"16px",height:"16px"},e?tr:{})},e?{fontWeight:700}:{fontWeight:500,color:Fn.TextGray}))},cr=He()({color:Fn.Text,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),lr=function(e,t){var n="100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to "+E(e)+" on your behalf. \n As a legal matter, Every.org must provide any donations to "+E(e)+" on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.",r=t&&!function(e){return e.nonprofitId===e.creatorNonprofitId}(t),o="";return e.hasAdmin&&r?o="Please note "+e.name+" has not reviewed or approved the content of this peer-to-peer fundraiser.":e.hasAdmin||r?!e.hasAdmin&&r&&(o="Please note "+e.name+" has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser."):o="Please note "+e.name+" has not provided permission for this solicitation.",Object(Be.g)("span",null,n," ",o)},ur=He()(((sn={backgroundColor:"white",padding:Zn.XL+" "+Zn.XL+" 0px",borderRadius:"unset",overflow:"hidden"})[Xn.TabletLandscapeUp]={borderRadius:"16px",padding:Zn.M},sn)),sr=function(e){return e.filter((function(e){return Boolean(e)})).join(" ")},dr=function(e){var t=e.children,n=e.className;return Object(Be.g)("div",{className:sr([ur,n])},t)},fr=function(){return h(Ft).fundraiser},pr=function(){var e=fr();if(e!==Ht&&e!==Xt)return e},gr=function(){return h(Vt).nonprofit},br=function(){var e=gr();if(e===Gt||e===zt)throw new Error("Nonprofit error");return e},hr=function(){return h(Bn)},mr=function(){return dn||(dn=Object(Be.g)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Object(Be.g)("path",{d:"M6 9l6 6 6-6"})))},yr=function(e){var t,n=e.faqData,r=s(!1),o=r[0],i=r[1],a=Ut();return null!=(t=n.hideSlugList)&&t.includes(a.nonprofitSlug)?null:Object(Be.g)("div",{className:ir(n.mobileOnly)},Object(Be.g)("button",{type:"button",className:ar(o),onClick:function(){i(!o)}},Object(Be.g)("span",null,n.title),fn||(fn=Object(Be.g)(mr,null))),Object(Be.g)("div",{className:o?rr:or},n.description))},vr=function(){var e=br(),t=pr(),n=hr().selectedPaymentMethod,r=[{id:"intro",title:"How does Every.org accept my donation?",description:Object(Be.g)(Be.b,null,Object(Be.g)("p",null,"Your donation is made to Every.org, a US 501(c)(3) public charity. Every.org will immediately send you a receipt by email. On a weekly basis, Every.org sends funds to ",E(e),"."),Object(Be.g)("p",null,"This process ensures your eligibility for a tax deduction, enables you to consolidate your gift records, and reduces the burden on"," ",E(e),"."))},{id:"fees",title:"Are there any fees?",description:R(n,e)},{id:"tax",title:"Is this donation tax-deductible?",description:Object(Be.g)("p",null,"Yes, ",lr(e,t))},{id:"receipt",title:"Will I receive a receipt for my donation?",description:pn||(pn=Object(Be.g)(Be.b,null,Object(Be.g)("p",null,"Yes, after your donation payment is confirmed, you will immediately get a receipt emailed to you."),Object(Be.g)("p",null,"Additionally, if you have an Every.org account, you can always get a single itemized receipt that shows all your donations in a given year.")))},{id:"p2p",mobileOnly:!0,hideSlugList:["irc"],title:"How else can I support "+e.name+"?",description:Object(Be.g)("p",null,"You can also rally your friends, family, and social networks to support this nonprofit by starting your own fundraiser for them."," ",Object(Be.g)("a",{className:cr,href:Ye+e.primarySlug+"/"+et},"Start a fundraiser for ",e.name))}];return Object(Be.g)(dr,null,Object(Be.g)("div",{className:er},r.map((function(e){return Object(Be.g)(yr,{key:e.id,faqData:e})}))))},_r=He()(D({padding:Zn.XL+" "+Zn.XL+" 0px",backgroundColor:"unset",display:"flex",flexDirection:"column"},Wn,((gn={color:Fn.TextGray})[Xn.TabletLandscapeUp]={padding:"0px "+Zn.L},gn["> p"]={margin:0},gn["> p:not(:last-child)"]={marginBottom:Zn.XS},gn))),Or=He()({color:Fn.TextGray,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}}),Cr=["children"],jr=H({address:"support@every.org"}),wr=function(e){var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,Cr);return Object(Be.g)("a",X({className:Or},n),t)},kr=function(){var e=br(),t=pr();return Object(Be.g)(dr,{className:_r},Object(Be.g)("p",null,lr(e,t)," ",bn||(bn=Object(Be.g)(wr,{href:tt},"See Terms"))),hn||(hn=Object(Be.g)("p",null,"Need help? See FAQs or contact us at our"," ",Object(Be.g)(wr,{href:nt},"Help Center"),".")),mn||(mn=Object(Be.g)("p",null,"Have ideas for how we can build a better donation experience?"," ",Object(Be.g)(wr,{href:jr},"Send us feedback"),".")),yn||(yn=Object(Be.g)("p",null,"We respect your privacy. To learn more, check out our"," ",Object(Be.g)(wr,{href:rt},"Privacy Policy"),".")))},xr=function(e){return He()({color:e,fontWeight:500,textDecoration:"none",":hover":{textDecoration:"underline"}})},Nr=He()(((vn={display:"none"})[Xn.TabletLandscapeUp]={display:"block"},vn)),Sr=function(){var e,t=Ut(),n=t.primaryColor,r=t.nonprofitSlug;if(null!=(e=br().metadata)&&e.hideFundraiseButton)return null;var o=Ye+r+"/"+et;return Object(Be.g)(dr,{className:Nr},Object(Be.g)("p",null,Object(Be.g)("a",{className:xr(n),href:o},"Start a fundraiser")," ","to rally your friends and family"))},Ar=He()(((On={display:"grid",gridGap:0,gridTemplateColumns:"1fr",gridTemplateAreas:'"header"\n "promoBanners"\n "nonprofitInfo"\n "paymentProcess"\n "fundraiserLink"\n "faq"\n "footer"'})[Xn.TabletLandscapeUp]={gridColumnGap:Zn.XL,gridTemplateColumns:"1fr 2fr",gridTemplateRows:"auto auto auto auto auto 1fr",gridTemplateAreas:'"header header"\n "promoBanners promoBanners"\n "nonprofitInfo paymentProcess"\n "fundraiserLink paymentProcess"\n "faq paymentProcess"\n "faq footer"',"& > div:not(:last-child):not(:empty)":{marginBottom:Zn.XL}},On["& > #every-header"]=((_n={gridArea:"header",display:"block"})[Xn.TabletLandscapeUp]={display:"none"},_n),On["& > #every-promoBanners"]={gridArea:"promoBanners"},On["& > #every-nonprofitInfo"]={gridArea:"nonprofitInfo"},On["& > #every-paymentProcess"]={gridArea:"paymentProcess"},On["& > #every-faq"]={gridArea:"faq"},On["& > #every-fundraiserLink"]={gridArea:"fundraiserLink"},On["& > #every-footer"]={gridArea:"footer"},On)),Tr=function(e){var t=e.children;return Object(Be.g)("div",{className:Ar},t)},Ir=He()({cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",fontFamily:Xe.BasisGrotesque}),Lr=He()(((Cn={display:"block"})[Xn.TabletLandscapeUp]={display:"none"},Cn)),Er=He()(((jn={position:"absolute",right:Zn.XL,top:Zn.XL,padding:Zn.XXS,background:"white",borderRadius:"8px",display:"none"})[Xn.TabletLandscapeUp]={display:"block"},jn)),Mr=function(){var e=Ut().primaryColor;return Object(Be.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M18 6L6 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(Be.g)("path",{d:"M6 6L18 18",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},Pr=function(e){var t=e.className,n=hr().hideWidget;return Object(Be.g)("button",{type:"button",className:sr([Ir,t]),onClick:n},wn||(wn=Object(Be.g)(Mr,null)))},Rr=He()(((kn={display:"flex",justifyContent:"flex-end",alignItems:"center",padding:Zn.M+" "+Zn.XL})[Xn.TabletLandscapeUp]={padding:0},kn)),Dr=function(){return xn||(xn=Object(Be.g)("div",{className:Rr},Object(Be.g)(Pr,{className:Lr})))},Br=function(e){return e.Small="4px",e.Default="8px",e.Medium="24px",e.Big="100px",e.Circle="100%",e}({}),Ur=He()({lineHeight:"20px",fontWeight:"unset","> span":{fontWeight:700}}),Hr=(He()({lineHeight:"20px",fontWeight:"unset","> span":{fontWeight:700}}),function(e){var t;return He()(((t={borderRadius:Br.Circle,overflow:"hidden",display:"block",backgroundImage:"url("+e+")",backgroundSize:"contain",width:"40px",height:"40px",flexShrink:0})[Xn.TabletLandscapeUp]={width:"64px",height:"64px"},t))}),Xr=function(e){var t;return sr([Hr(e),He()((t={width:"32px",height:"32px",flexShrink:0},t[Xn.TabletLandscapeUp]={width:"40px",height:"40px"},t))])},Fr=He()(((Nn={padding:""+Zn.XL})[Xn.TabletLandscapeUp]=F({},Qn(Zn.S),{padding:""+Zn.L}),Nn)),qr=He()(((Sn={display:"none",overflow:"hidden"})[Xn.TabletLandscapeUp]={display:"flex",gap:""+Zn.S,flexDirection:"column",padding:""+Zn.L},Sn)),Gr=He()(((An={display:"flex",gap:""+Zn.S,padding:""+Zn.XL,overflow:"hidden"})[Xn.TabletLandscapeUp]={display:"none",flexDirection:"column",padding:""+Zn.L},An)),zr=He()(F({},Jn(Zn.S),{alignItems:"center"})),Vr=He()({display:"flex",gap:""+Zn.S,alignItems:"center","& > .every-embedded-fundraiser-card__nonprofit-name":(Tn={display:"none"},Tn[Xn.TabletLandscapeUp]={display:"block"},Tn)}),Wr=He()(F({},Wn,((In={color:"rgba(0, 0, 0, 0.7)",display:"none"})[Xn.TabletLandscapeUp]={display:"block"},In))),Zr=function(e){return He()({overflow:"hidden",overflowWrap:"anywhere",wordBreak:"break-word",textOverflow:"ellipsis",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":e,alignItems:"start"})},Kr="NonprofitAvatarPlaceholder",Yr=function(e,t){return"https://res.cloudinary.com/everydotorg/image/upload/f_auto,q_auto"+(t?","+function(e){var t;if(0===e.width||0===e.height)throw new Error("dimensions cannot be 0");return["c_"+(null!=(t=e.fillMode)?t:"lfill"),e.width?"w_"+Math.floor(e.width):void 0,e.height?"h_"+Math.floor(e.height):void 0].filter((function(e){return void 0!==e})).join(",")}(t):"")+"/"+e},$r=function(e){var t=e.fundraiser;return Object(Be.g)(Be.b,null,Object(Be.g)(Qr,{fundraiser:t}),Object(Be.g)(Jr,{fundraiser:t}))},Qr=function(e){var t,n=e.fundraiser,r=br(),o=r.name,i=r.logoCloudinaryId,a=r.coverImageCloudinaryId,c=Yr(null!=i?i:Kr),l=a&&Yr(a,{width:320});return Object(Be.g)(dr,{className:qr},Object(Be.g)("div",{className:Vr},Object(Be.g)("div",{alt:"nonprofit logo",className:Xr(c)}),Object(Be.g)("div",{className:"every-embedded-fundraiser-card__nonprofit-name"},Object(Be.g)("h2",{className:Zr(1)},o),n.creatorNonprofitId===n.nonprofitId&&(Ln||(Ln=Object(Be.g)("p",{className:Wr},"Official fundraiser"))))),l&&Object(Be.g)("div",{className:(t=l,He()({backgroundImage:"url("+t+")",backgroundSize:"cover",width:"calc(100% + 25px + 25px)",height:"160px",position:"relative",left:"-25px"}))}),Object(Be.g)("h1",{className:Ur},Object(Be.g)("span",null,n.title)),n.description&&Object(Be.g)("p",{className:sr([Wr,Zr(3)])},n.description))},Jr=function(e){var t=e.fundraiser,n=br(),r=n.logoCloudinaryId,o=n.coverImageCloudinaryId,i=Yr(null!=r?r:Kr);o&&Yr(o);return Object(Be.g)(dr,{className:Gr},Object(Be.g)("div",{className:Vr},Object(Be.g)("div",{alt:"nonprofit logo",className:Xr(i)}),Object(Be.g)("h1",{className:Ur},Object(Be.g)("span",null,t.title))))},eo=function(){var e=br(),t=e.name,n=e.logoCloudinaryId,r=e.hasAdmin,o=Yr(null!=n?n:Kr);return Object(Be.g)(dr,{className:Fr},Object(Be.g)("div",{className:zr},Object(Be.g)("div",{alt:"nonprofit logo",className:Hr(o)}),Object(Be.g)("h1",{className:Ur},r?Object(Be.g)(Be.b,null,Object(Be.g)("span",null,t)," is using Every.org to accept this donation"):Object(Be.g)(Be.b,null,"Every.org created this page for ",Object(Be.g)("span",null,t)))),En||(En=Object(Be.g)("p",{className:Wr},"Every.org is a 501(c)(3) nonprofit inspiring generosity and philanthropy for everyone.")))},to=function(){var e=pr();return e?Object(Be.g)($r,{fundraiser:e}):Mn||(Mn=Object(Be.g)(eo,null))},no=1e6,ro=1e6,oo="[big.js] ",io=oo+"Invalid ",ao=io+"decimal places",co=io+"rounding mode",lo=oo+"Division by zero",uo={},so=void 0,fo=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;uo.abs=function(){var e=new this.constructor(this);return e.s=1,e},uo.cmp=function(e){var t,n=this,r=n.c,o=(e=new n.constructor(e)).c,i=n.s,a=e.s,c=n.e,l=e.e;if(!r[0]||!o[0])return r[0]?i:o[0]?-a:0;if(i!=a)return i;if(t=i<0,c!=l)return c>l^t?1:-1;for(a=(c=r.length)<(l=o.length)?c:l,i=-1;++io[i]^t?1:-1;return c==l?0:c>l^t?1:-1},uo.div=function(e){var t=this,n=t.constructor,r=t.c,o=(e=new n(e)).c,i=t.s==e.s?1:-1,a=n.DP;if(a!==~~a||a<0||a>no)throw Error(ao);if(!o[0])throw Error(lo);if(!r[0])return e.s=i,e.c=[e.e=0],e;var c,l,u,s,d,f=o.slice(),p=c=o.length,g=r.length,b=r.slice(0,c),h=b.length,m=e,y=m.c=[],v=0,_=a+(m.e=t.e-e.e)+1;for(m.s=i,i=_<0?0:_,f.unshift(0);h++h?1:-1;else for(d=-1,s=0;++db[d]?1:-1;break}if(!(s<0))break;for(l=h==c?o:f;h;){if(b[--h]_&&q(m,_,n.RM,b[0]!==so),m},uo.eq=function(e){return 0===this.cmp(e)},uo.gt=function(e){return this.cmp(e)>0},uo.gte=function(e){return this.cmp(e)>-1},uo.lt=function(e){return this.cmp(e)<0},uo.lte=function(e){return this.cmp(e)<1},uo.minus=uo.sub=function(e){var t,n,r,o,i=this,a=i.constructor,c=i.s,l=(e=new a(e)).s;if(c!=l)return e.s=-l,i.plus(e);var u=i.c.slice(),s=i.e,d=e.c,f=e.e;if(!u[0]||!d[0])return d[0]?e.s=-l:u[0]?e=new a(i):e.s=1,e;if(c=s-f){for((o=c<0)?(c=-c,r=u):(f=s,r=d),r.reverse(),l=c;l--;)r.push(0);r.reverse()}else for(n=((o=u.length0)for(;l--;)u[t++]=0;for(l=t;n>c;){if(u[--n]0?(l=a,r=u):(t=-t,r=c),r.reverse();t--;)r.push(0);r.reverse()}for(c.length-u.length<0&&(r=u,u=c,c=r),t=u.length,n=0;t;c[t]%=10)n=(c[--t]=c[t]+u[t]+n)/10|0;for(n&&(c.unshift(n),++l),t=c.length;0===c[--t];)c.pop();return e.c=c,e.e=l,e},uo.pow=function(e){var t=this,n=new t.constructor("1"),r=n,o=e<0;if(e!==~~e||e<-1e6||e>ro)throw Error(io+"exponent");for(o&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return o?n.div(r):r},uo.prec=function(e,t){if(e!==~~e||e<1||e>no)throw Error(io+"precision");return q(new this.constructor(this),e,t)},uo.round=function(e,t){if(e===so)e=0;else if(e!==~~e||e<-no||e>no)throw Error(ao);return q(new this.constructor(this),e+this.e+1,t)},uo.sqrt=function(){var e,t,n,r=this,o=r.constructor,i=r.s,a=r.e,c=new o("0.5");if(!r.c[0])return new o(r);if(i<0)throw Error(oo+"No square root");0===(i=Math.sqrt(r+""))||i===1/0?((t=r.c.join("")).length+a&1||(t+="0"),a=((a+1)/2|0)-(a<0||1&a),e=new o(((i=Math.sqrt(t))==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+a)):e=new o(i+""),a=e.e+(o.DP+=4);do{e=c.times((n=e).plus(r.div(n)))}while(n.c.slice(0,a).join("")!==e.c.slice(0,a).join(""));return q(e,(o.DP-=4)+e.e+1,o.RM)},uo.times=uo.mul=function(e){var t,n=this,r=n.c,o=(e=new(0,n.constructor)(e)).c,i=r.length,a=o.length,c=n.e,l=e.e;if(e.s=n.s==e.s?1:-1,!r[0]||!o[0])return e.c=[e.e=0],e;for(e.e=c+l,ic;)a=t[l]+o[c]*r[l-c-1]+a,t[l--]=a%10,a=a/10|0;t[l]=a}for(a?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},uo.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==so){if(e!==~~e||e<0||e>no)throw Error(ao);for(n=q(new n.constructor(n),++e,t);n.c.lengthno)throw Error(ao);for(e=e+(n=q(new n.constructor(n),e+n.e+1,t)).e+1;n.c.length=t.PE,!!e.c[0])},uo.toNumber=function(){var e=Number(G(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(oo+"Imprecise conversion");return e},uo.toPrecision=function(e,t){var n=this,r=n.constructor,o=n.c[0];if(e!==so){if(e!==~~e||e<1||e>no)throw Error(io+"precision");for(n=q(new r(n),e,t);n.c.length=r.PE,!!o)},uo.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(oo+"valueOf disallowed");return G(e,e.e<=t.NE||e.e>=t.PE,!0)};var po=function e(){function t(n){var r=this;if(!(r instanceof t))return n===so?e():new t(n);if(n instanceof t)r.s=n.s,r.e=n.e,r.c=n.c.slice();else{if("string"!=typeof n){if(!0===t.strict&&"bigint"!=typeof n)throw TypeError(io+"value");n=0===n&&1/n<0?"-0":String(n)}!function(e,t){var n,r,o;if(!fo.test(t))throw Error(io+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length);for(o=t.length,r=0;r0&&"0"==t.charAt(--o););for(e.e=n-r-1,e.c=[],n=0;r<=o;)e.c[n++]=+t.charAt(r++)}}(r,n)}r.constructor=t}return t.prototype=uo,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=false,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}(),go=n("kPAj"),bo=function(e){return e.Normal="1px solid",e.Big="4px solid",e}({}),ho=function(e,t){return e+" "+t},mo=(He()({border:ho(bo.Normal,Fn.Error)}),function(e){return He()({position:"relative",padding:Zn.M,display:"flex",flexDirection:"row",alignItems:"center",borderRadius:Br.Default,color:Fn.Text,backgroundColor:Fn.Gray,border:ho(bo.Normal,Fn.LightGray),cursor:"text",":focus-within":{backgroundColor:"white",borderColor:e}})}),yo=He()({fontSize:Vn.fontSize,lineHeight:Vn.fontSize,fontFamily:"inherit",flex:1,border:"none",outline:"none",background:"transparent",width:"100%",minWidth:"unset",padding:0,margin:0,"::placeholder":{fontWeight:400},"::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:0},"::-webkit-inner-spin-button":{"-webkit-appearance":"none",margin:0},"-moz-appearance":"textfield"}),vo=He()({maxHeight:"250px","& input":{fontSize:Vn.fontSize,lineHeight:Vn.fontSize,fontWeight:400}}),_o=He()({background:Fn.White,borderRadius:"0 0 "+Br.Default+" "+Br.Default,border:ho(bo.Normal,Fn.LightGray),borderTop:"none"}),Oo=He()({display:"flex",alignItems:"center",gap:Zn.XXS}),Co=He()({overflowY:"scroll",height:"100%",maxHeight:"200px"}),jo=He()({borderBottom:ho(bo.Normal,Fn.LightGray)}),wo=He()(z({border:"none",background:"none",padding:Zn.S+" "+Zn.M},Vn,{width:"100%",display:"flex",alignItems:"center",gap:Zn.XS,":hover":{cursor:"pointer"},"> span:last-of-type":z({marginLeft:"auto"},Wn,{color:Fn.TextGray})})),ko=function(e,t){return He()(z({marginLeft:"auto"},Wn,{color:Fn.TextGray,display:"flex",gap:Zn.XS,alignItems:"center","> svg":z({color:e},t?tr:{})}))},xo=He()({borderRadius:Br.Default+" "+Br.Default+" 0 0 "}),No=function(e){return sr([mo(e)])},So=He()({display:"flex",width:"100%",gap:Zn.S,alignItems:"flex-end",fontWeight:500}),Ao=He()({display:"flex",flexDirection:"column",width:"100%",gap:Zn.XXS,"> input":z({width:"100%",textAlign:"right",fontWeight:700},Gn),textAlign:"right"}),To=He()({gap:Zn.XXS,display:"flex",flexDirection:"column"}),Io=He()(z({},qn,{outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",padding:Zn.XXS,transform:"rotate(90deg)",color:Fn.TextGray,"> svg":{strokeWidth:"2px"}})),Lo=He()({border:ho(bo.Normal,Fn.Error)}),Eo=He()({fontSize:Gn.fontSize,lineHeight:Gn.fontSize,fontWeight:700}),Mo=He()(V({},Gn,{fontWeight:700,display:"inline-flex",marginRight:Zn.XXS})),Po=function(e){return He()(V({},zn,{fontWeight:700,color:e,display:"inline-flex",marginLeft:Zn.XXS}))},Ro=He()(V({},Jn(Zn.M),{justifyContent:"center"})),Do=function(e){var t;return He()(V({},Vn,((t={color:e,borderRadius:Br.Big,fontWeight:500,border:"none",padding:0,fontFamily:"inherit",cursor:"pointer",background:"unset"})[Xn.TabletLandscapeUp]={border:"1px solid "+Fn.DarkGray,padding:Zn.XS+" "+Zn.L},t)))};(K.prototype=new Be.a).isPureReactComponent=!0,K.prototype.shouldComponentUpdate=function(e,t){return Z(this.props,e)||Z(this.state,t)};var Bo=Be.i.__b;Be.i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Bo&&Bo(e)};var Uo="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Ho=Be.i.__e;Be.i.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Ho(e,t,n,r)};var Xo=Be.i.unmount;Be.i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Xo&&Xo(e)},(J.prototype=new Be.a).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=ee(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(c):c())};n.__R=a;var c=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Q(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},J.prototype.componentWillUnmount=function(){this.t=[]},J.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=$(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&Object(Be.e)(Be.b,null,e.fallback);return o&&(o.__h=null),[Object(Be.e)(Be.b,null,t.__a?null:e.children),o]};var Fo=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]=0||(o[n]=e[n]);return o}(e,ai);return Object(Be.g)("div",{className:sr([mo(r),o]),onClick:function(){var e;null==(e=n.current)||e.focus()}},Object(Be.g)("textarea",ie({ref:function(e){e&&(n.current=e,t&&(t.current=e))},className:sr([yo,i])},a)))})),li=["sufix","sufixClassName","prefix","prefixClassName","containerClassName","inputClassName","containerOnClick"],ui=Y((function(e,t){var n=e.sufix,r=e.sufixClassName,o=e.prefix,i=e.prefixClassName,a=e.containerClassName,c=e.inputClassName,l=e.containerOnClick,u=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,li),s=p(),d=Ut().primaryColor;return Object(Be.g)("div",{className:sr([mo(d),a]),onClick:function(){var e;l?l():null==(e=s.current)||e.focus()}},o&&Object(Be.g)("div",{className:i},o),Object(Be.g)("input",ae({ref:function(e){e&&(s.current=e,t&&(t.current=e))},className:sr([yo,c])},u)),n&&Object(Be.g)("div",{className:r},n))})),si=n.p+"58f20393bf2b41f944c6229c2af785b9.svg",di=n.p+"5982461fe2304c26f3a3cf4c50806dad.svg",fi=n.p+"b31a89ce5555412a0c8a4c6463286584.svg",pi=n.p+"26c9b1d3d7943e6e67cf13e039ba5ac8.svg",gi=n.p+"ddb1f3b63e33585263e5905706d6ff6d.svg",bi=n.p+"ad80427b5a2980f1d19884ede42b29de.svg",hi=n.p+"9052c75387065f76bb3436b7e4ce12cd.svg",mi=n.p+"3a5177b76709819ba4663556e60222f8.svg",yi=n.p+"f8f4253f02d1fbc4bf04d0959a6e614c.svg",vi=n.p+"4d81ee51fa2520df58ae092aeb3d0bd4.svg",_i=n.p+"8098252f28e93069c75d6010d3ac6bc1.svg",Oi=n.p+"03c114f6e014588a4bde815d9bc85821.svg",Ci=n.p+"5450d3cada4fd0370ab8d885765f5cc3.svg",ji=n.p+"cc9ce389e9a4e0f518e3caeb7b60912d.svg",wi=n.p+"8f22b294629293d29895fddef0a8baea.svg",ki=n.p+"f588feb3cbbcc0fb259a3630ec7e34ba.svg",xi=n.p+"3e1eb932bdbaa2318584813bf468be53.svg",Ni=n.p+"badb98080214485db486794fb59a95cc.svg",Si=n.p+"fc9295a4651c56d5b4e8c3aa13a93208.svg",Ai=n.p+"e4bfa8eb04696d4fd5ea04ca4c35469b.svg",Ti=n.p+"743324f8e09d34a894c21e91c396f289.svg",Ii=n.p+"b9021bb757262a32de6d8931015051d9.svg",Li=n.p+"7ab9396038b4befda4354b2a476d9064.svg",Ei=n.p+"bc2c9e9d67b73656a6da5dd177aa10a2.svg",Mi=n.p+"6214ae0b42d798a0c9a51503a27a66bf.svg",Pi=n.p+"45bcde5a98dbbdf2a4e0769eca2154f1.svg",Ri=n.p+"8798fcc6fd2d5d3aeccea6ee3fcfec89.svg",Di=n.p+"88611c6e2f9450f29ece8d2b36641670.svg",Bi=function(e){return e.AAVE="AAVE",e.ALCX="ALCX",e.ALGO="ALGO",e.AMP="AMP",e.ANKR="ANKR",e.APE="APE",e.API3="API3",e.AUDIO="AUDIO",e.AVAX="AVAX",e.AXS="AXS",e.BAT="BAT",e.BCH="BCH",e.BNB="BNB",e.BNT="BNT",e.BOND="BOND",e.BTC="BTC",e.CHZ="CHZ",e.COMP="COMP",e.CRV="CRV",e.CUBE="CUBE",e.CVC="CVC",e.DAI="DAI",e.DOGE="DOGE",e.DOT="DOT",e.ELON="ELON",e.ENS="ENS",e.ETH="ETH",e.FET="FET",e.FIL="FIL",e.FTM="FTM",e.GAL="GAL",e.GALA="GALA",e.GMT="GMT",e.GRT="GRT",e.GUSD="GUSD",e.INJ="INJ",e.JAM="JAM",e.KNC="KNC",e.KP3R="KP3R",e.LDO="LDO",e.LINK="LINK",e.LPT="LPT",e.LRC="LRC",e.LTC="LTC",e.MANA="MANA",e.MASK="MASK",e.MATIC="MATIC",e.MCO2="MCO2",e.MKR="MKR",e.MOB="MOB",e.NMR="NMR",e.OXT="OXT",e.PAXG="PAXG",e.QNT="QNT",e.QRDO="QRDO",e.RAY="RAY",e.REN="REN",e.RNDR="RNDR",e.SAMO="SAMO",e.SAND="SAND",e.SBR="SBR",e.SHIB="SHIB",e.SKL="SKL",e.SLP="SLP",e.SNX="SNX",e.SOL="SOL",e.STORJ="STORJ",e.SUSHI="SUSHI",e.UMA="UMA",e.UNI="UNI",e.USDC="USDC",e.USDT="USDT",e.XLM="XLM",e.XRP="XRP",e.XTZ="XTZ",e.YFI="YFI",e.ZBC="ZBC",e.ZEC="ZEC",e.ZRX="ZRX",e}({}),Ui=function(e){return e.ERC20="ERC-20",e.SPL="SPL",e}({}),Hi=[Bi.ALGO,Bi.MOB,Bi.XLM,Bi.BNB],Xi=((ei={})[Bi.AAVE]={displayName:"Aave",abbreviation:"AAVE",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"aave"},ei[Bi.ALCX]={displayName:"Alchemix",abbreviation:"ALCX",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"alchemix"},ei[Bi.ALGO]={displayName:"Algorand",abbreviation:"ALGO",decimalOffset:6,coingeckoId:"algorand"},ei[Bi.AMP]={displayName:"Amp",abbreviation:"AMP",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"amp-token"},ei[Bi.ANKR]={displayName:"Ankr",abbreviation:"ANKR",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"ankr"},ei[Bi.APE]={displayName:"Apecoin",abbreviation:"APE",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"apecoin"},ei[Bi.API3]={displayName:"API3",abbreviation:"API3",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"api3"},ei[Bi.AUDIO]={displayName:"Audius",abbreviation:"AUDIO",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"audius"},ei[Bi.AVAX]={displayName:"Avalanche",abbreviation:"AVAX",decimalOffset:9,coingeckoId:"avalanche-2"},ei[Bi.AXS]={displayName:"Axie Infinity",abbreviation:"AXS",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"axs"},ei[Bi.BAT]={displayName:"Basic Attention Token",abbreviation:"BAT",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"basic-attention-token"},ei[Bi.BCH]={displayName:"Bitcoin Cash",abbreviation:"BCH",decimalOffset:8,coingeckoId:"bitcoin-cash"},ei[Bi.BNB]={displayName:"Binance Coin",abbreviation:"BNB",decimalOffset:8,coingeckoId:"binancecoin"},ei[Bi.BNT]={displayName:"Bancor",abbreviation:"BNT",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"bancor"},ei[Bi.BOND]={displayName:"BarnBridge",abbreviation:"BOND",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"barnbridge"},ei[Bi.BTC]={displayName:"Bitcoin",abbreviation:"BTC",decimalOffset:8,coingeckoId:"bitcoin"},ei[Bi.CHZ]={displayName:"Chiliz",abbreviation:"CHZ",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"chiliz"},ei[Bi.COMP]={displayName:"Compound",abbreviation:"COMP",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"compound-governance-token"},ei[Bi.CRV]={displayName:"Curve DAO Token",abbreviation:"CRV",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"curve-dao-token"},ei[Bi.CUBE]={displayName:"Cube",abbreviation:"CUBE",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"somnium-space-cubes"},ei[Bi.CVC]={displayName:"Civic",abbreviation:"CVC",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"civic"},ei[Bi.DAI]={displayName:"Dai",abbreviation:"DAI",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"dai"},ei[Bi.DOGE]={displayName:"DogeCoin",abbreviation:"DOGE",decimalOffset:8,coingeckoId:"dogecoin"},ei[Bi.DOT]={displayName:"Polkadot",abbreviation:"DOT",decimalOffset:10,coingeckoId:"polkadot"},ei[Bi.ELON]={displayName:"Dogelon Mars",abbreviation:"ELON",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"dogelon-mars"},ei[Bi.ENS]={displayName:"Ethereum Name Service",abbreviation:"ENS",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"ethereum-name-service"},ei[Bi.ETH]={displayName:"Ethereum",abbreviation:"ETH",decimalOffset:18,coingeckoId:"ethereum"},ei[Bi.FET]={displayName:"Fetch.ai",abbreviation:"FET",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"fetch-ai"},ei[Bi.FIL]={displayName:"Filecoin",abbreviation:"FIL",decimalOffset:18,coingeckoId:"filecoin"},ei[Bi.FTM]={displayName:"Fantom",abbreviation:"FTM",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"fantom"},ei[Bi.GAL]={displayName:"Galaxe",abbreviation:"GAL",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"project-galaxy"},ei[Bi.GALA]={displayName:"Gala",abbreviation:"GALA",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"gala"},ei[Bi.GMT]={displayName:"STEPN",abbreviation:"GMT",contractType:Ui.SPL,decimalOffset:9,coingeckoId:"stepn"},ei[Bi.GRT]={displayName:"The Graph",abbreviation:"GRT",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"the-graph"},ei[Bi.GUSD]={displayName:"Gemini Dollar",abbreviation:"GUSD",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"gemini-dollar"},ei[Bi.INJ]={displayName:"Injective Protocol",abbreviation:"INJ",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"injective-protocol"},ei[Bi.JAM]={displayName:"Geojam",abbreviation:"JAM",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"geojam"},ei[Bi.KNC]={displayName:"Kyber types.Network",abbreviation:"KNC",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"kyber-network-crystal"},ei[Bi.KP3R]={displayName:"Keep3rV1",abbreviation:"KP3R",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"keep3rv1"},ei[Bi.LDO]={displayName:"Lido DAO",abbreviation:"LDO",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"lido-dao"},ei[Bi.LINK]={displayName:"Chainlink",abbreviation:"LINK",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"chainlink"},ei[Bi.LPT]={displayName:"Livepeer",abbreviation:"LPT",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"livepeer"},ei[Bi.LRC]={displayName:"Loopring",abbreviation:"LRC",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"loopring"},ei[Bi.LTC]={displayName:"Litecoin",abbreviation:"LTC",decimalOffset:8,coingeckoId:"litecoin"},ei[Bi.MANA]={displayName:"Mana",abbreviation:"MANA",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"decentraland"},ei[Bi.MASK]={displayName:"Mask Network",abbreviation:"MASK",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"mask-network"},ei[Bi.MATIC]={displayName:"Polygon",abbreviation:"MATIC",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"matic-network"},ei[Bi.MCO2]={displayName:"Moss Carbon Credit",abbreviation:"MCO2",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"moss-carbon-credit"},ei[Bi.MKR]={displayName:"Maker",abbreviation:"MKR",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"maker"},ei[Bi.MOB]={displayName:"MobileCoin",abbreviation:"MOB",decimalOffset:12,coingeckoId:"mobilecoin"},ei[Bi.NMR]={displayName:"Numeraire",abbreviation:"NMR",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"numeraire"},ei[Bi.OXT]={displayName:"Orchid",abbreviation:"OXT",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"orchid-protocol"},ei[Bi.PAXG]={displayName:"PAX Gold",abbreviation:"PAXG",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"pax-gold"},ei[Bi.QNT]={displayName:"Quant",abbreviation:"QNT",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"quant-network"},ei[Bi.QRDO]={displayName:"Qredo",abbreviation:"QRDO",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"qredo"},ei[Bi.RAY]={displayName:"Raydium",abbreviation:"RAY",decimalOffset:6,contractType:Ui.SPL,coingeckoId:"raydium"},ei[Bi.REN]={displayName:"Ren",abbreviation:"REN",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"republic-protocol"},ei[Bi.RNDR]={displayName:"Render Token",abbreviation:"RNDR",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"render-token"},ei[Bi.SAMO]={displayName:"Samoyed",abbreviation:"SAMO",decimalOffset:9,contractType:Ui.SPL,coingeckoId:"samoyedcoin"},ei[Bi.SAND]={displayName:"Sandbox",abbreviation:"SAND",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"the-sandbox"},ei[Bi.SBR]={displayName:"Saber",abbreviation:"SBR",decimalOffset:6,contractType:Ui.SPL,coingeckoId:"saber"},ei[Bi.SHIB]={displayName:"Shiba Inu",abbreviation:"SHIB",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"shiba-inu"},ei[Bi.SKL]={displayName:"Skale",abbreviation:"SKL",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"skale"},ei[Bi.SLP]={displayName:"Smooth Love Potion",abbreviation:"SLP",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"smooth-love-potion"},ei[Bi.SNX]={displayName:"Synthetix",abbreviation:"SNX",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"havven"},ei[Bi.SOL]={displayName:"Solana",abbreviation:"SOL",decimalOffset:9,coingeckoId:"solana"},ei[Bi.STORJ]={displayName:"Storj",abbreviation:"STORJ",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"storj"},ei[Bi.SUSHI]={displayName:"SushiSwap",abbreviation:"SUSHI",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"sushi"},ei[Bi.UMA]={displayName:"UMA",abbreviation:"UMA",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"uma"},ei[Bi.UNI]={displayName:"Uniswap",abbreviation:"UNI",decimalOffset:18,contractType:Ui.ERC20,coingeckoId:"uniswap"},ei[Bi.USDC]={displayName:"USD Coin",abbreviation:"USDC",decimalOffset:6,contractType:Ui.ERC20,coingeckoId:"usd-coin"},ei[Bi.USDT]={displayName:"Tether",abbreviation:"USDT",decimalOffset:6,coingeckoId:"tether"},ei[Bi.XLM]={displayName:"Stellar",abbreviation:"XLM",decimalOffset:7,coingeckoId:"stellar"},ei[Bi.XRP]={displayName:"XRP",abbreviation:"XRP",decimalOffset:6,coingeckoId:"ripple"},ei[Bi.XTZ]={displayName:"Tezos",abbreviation:"XTZ",decimalOffset:6,coingeckoId:"tezos"},ei[Bi.YFI]={displayName:"Yearn Finance",abbreviation:"YFI",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"yearn-finance"},ei[Bi.ZBC]={displayName:"Zebec Protocol",abbreviation:"ZBC",contractType:Ui.SPL,decimalOffset:9,coingeckoId:"zebec-protocol"},ei[Bi.ZEC]={displayName:"ZCash",abbreviation:"ZEC",decimalOffset:8,coingeckoId:"zcash"},ei[Bi.ZRX]={displayName:"0x",abbreviation:"ZRX",contractType:Ui.ERC20,decimalOffset:18,coingeckoId:"0x"},ei),Fi=((ti={})[Bi.AAVE]={iconCloudinaryId:"crypto/aave_oszkzj"},ti[Bi.ALCX]={iconCloudinaryId:"crypto/alcx_agfvh3"},ti[Bi.AMP]={iconCloudinaryId:"crypto/amp_zrgutx"},ti[Bi.ANKR]={iconCloudinaryId:"crypto/ankr_vipelu"},ti[Bi.ALGO]={icon:si},ti[Bi.APE]={icon:di},ti[Bi.AVAX]={icon:fi},ti[Bi.AXS]={iconCloudinaryId:"crypto/axs_vdwbc0"},ti[Bi.BAT]={icon:pi},ti[Bi.BCH]={icon:bi},ti[Bi.BNB]={icon:gi},ti[Bi.BTC]={icon:hi},ti[Bi.CHZ]={iconCloudinaryId:"crypto/chiliz_j11blm"},ti[Bi.DAI]={icon:yi},ti[Bi.DOGE]={icon:vi},ti[Bi.DOT]={icon:ki},ti[Bi.ETH]={icon:_i},ti[Bi.FIL]={icon:Oi},ti[Bi.GRT]={icon:Ci},ti[Bi.LINK]={icon:mi},ti[Bi.LTC]={icon:ji},ti[Bi.MATIC]={icon:xi},ti[Bi.MOB]={icon:wi},ti[Bi.RAY]={icon:Ni},ti[Bi.SAMO]={icon:Ai},ti[Bi.SBR]={icon:Si},ti[Bi.SHIB]={icon:Ti},ti[Bi.SLP]={iconCloudinaryId:"crypto/slp_clp71c"},ti[Bi.SOL]={icon:Ii},ti[Bi.UNI]={icon:Pi},ti[Bi.USDC]={icon:Ri},ti[Bi.USDT]={icon:Ei},ti[Bi.XLM]={icon:Li},ti[Bi.XRP]={iconCloudinaryId:"crypto/xrp_uwcehg"},ti[Bi.XTZ]={icon:Mi},ti[Bi.ZEC]={icon:Di},ti[Bi.API3]={iconCloudinaryId:"crypto/xb8xoz6kxev0uytaejlo"},ti[Bi.AUDIO]={iconCloudinaryId:"crypto/ucctvvgwedku9hexplp7"},ti[Bi.BNT]={iconCloudinaryId:"crypto/jgb6ub5gckohghdrt1ig"},ti[Bi.BOND]={iconCloudinaryId:"crypto/cidlkxmdqdoi2ezygfjj"},ti[Bi.COMP]={iconCloudinaryId:"crypto/ayjushqknohuz9x3hcx5"},ti[Bi.CRV]={iconCloudinaryId:"crypto/txyb4aa9a0skuhoyjcti"},ti[Bi.CUBE]={iconCloudinaryId:"crypto/n8su92fe1atqx79hrhqf"},ti[Bi.CVC]={iconCloudinaryId:"crypto/cw8ahifxtnfw8pbgh5o9"},ti[Bi.ELON]={iconCloudinaryId:"crypto/fvsarijyyz1v9j5w1sh2"},ti[Bi.ENS]={iconCloudinaryId:"crypto/naiw9tgamtvxcxctwxog"},ti[Bi.FET]={iconCloudinaryId:"crypto/mwfznnuw28qqeia4uwov"},ti[Bi.FTM]={iconCloudinaryId:"crypto/laq3m7el5wdfmlhwwtk0"},ti[Bi.GAL]={iconCloudinaryId:"crypto/a5km5rat7dpiz6ckkvfi"},ti[Bi.GALA]={iconCloudinaryId:"crypto/rifljrw1ry9wu1i7mxji"},ti[Bi.GMT]={iconCloudinaryId:"crypto/uyyddnskoabbpei7olin"},ti[Bi.GUSD]={iconCloudinaryId:"crypto/w8zltgl5ngsz1lqch17g"},ti[Bi.INJ]={iconCloudinaryId:"crypto/gi0voz42gn33azwaa11a"},ti[Bi.JAM]={iconCloudinaryId:"crypto/xmn1xxzccz84xiej1esw"},ti[Bi.KNC]={iconCloudinaryId:"crypto/mqdyhpc07mle6dkfomye"},ti[Bi.KP3R]={iconCloudinaryId:"crypto/eoabgtxyhpqqfhv1bxud"},ti[Bi.LDO]={iconCloudinaryId:"crypto/thmvnuxks9z3gthhypwb"},ti[Bi.LPT]={iconCloudinaryId:"crypto/setl154mkwd9kpfly7om"},ti[Bi.LRC]={iconCloudinaryId:"crypto/sazpx9zyfsgbmprmfag9"},ti[Bi.MANA]={iconCloudinaryId:"crypto/ekefdi1p3jgoeb08oszc"},ti[Bi.MASK]={iconCloudinaryId:"crypto/ykwym7djaofb2q6lcn5n"},ti[Bi.MCO2]={iconCloudinaryId:"crypto/ysuyysfrukryu1jw2wrh"},ti[Bi.MKR]={iconCloudinaryId:"crypto/tpdipvaap6m150j2hdec"},ti[Bi.NMR]={iconCloudinaryId:"crypto/bqecgq3rawel0k99tohj"},ti[Bi.OXT]={iconCloudinaryId:"crypto/ietkmjcp0yj71vlg0zjy"},ti[Bi.PAXG]={iconCloudinaryId:"crypto/yb5x1aizhhdn8mprrn2m"},ti[Bi.QNT]={iconCloudinaryId:"crypto/dwdx02ifn9fsvbw1pgfz"},ti[Bi.QRDO]={iconCloudinaryId:"crypto/jzbmlpvwoogroaaazkxz"},ti[Bi.REN]={iconCloudinaryId:"crypto/ili8nkjwnifmbfra20ly"},ti[Bi.RNDR]={iconCloudinaryId:"crypto/tm0klwno0hqjbcxsuvrp"},ti[Bi.SAND]={iconCloudinaryId:"crypto/w6g6ep4ghqpsz54vqzmy"},ti[Bi.SKL]={iconCloudinaryId:"crypto/zccvwa5yin8r32s4sfqy"},ti[Bi.SNX]={iconCloudinaryId:"crypto/sxvudvsjujuhdupwssvz"},ti[Bi.STORJ]={iconCloudinaryId:"crypto/le1ikh3apsrxyttjxg64"},ti[Bi.SUSHI]={iconCloudinaryId:"crypto/iivxx5mfdz1bckmhom1f"},ti[Bi.UMA]={iconCloudinaryId:"crypto/imxydvsf4mydmyjukbel"},ti[Bi.YFI]={iconCloudinaryId:"crypto/mal5muwn4fcsbuuyhohz"},ti[Bi.ZBC]={iconCloudinaryId:"crypto/hhiopvuac8qbpcnupgle"},ti[Bi.ZRX]={iconCloudinaryId:"crypto/ge5jqonw89ffg200z0in"},ti),qi=Object.fromEntries(Object.values(Bi).map((function(e){return[e,ce({},Xi[e],Fi[e])]}))),Gi=function(e){var t=e.currency;return Object(Be.g)("img",{src:le(t),alt:t+"_icon",width:24,height:24})},zi=function(){return ni||(ni=Object(Be.g)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-search"},Object(Be.g)("circle",{cx:"11",cy:"11",r:"8"}),Object(Be.g)("path",{d:"M21 21l-4.35-4.35"})))},Vi=new Set([Bi.BTC,Bi.ETH,Bi.USDC]),Wi=[],Zi=[],Ki=[];Object.values(Bi).forEach((function(e){var t,n={value:t=e,label:ue(t),contractType:se(t)};Hi.includes(e)||(Wi.push(n),Vi.has(e)?Zi.push(n):Ki.push(n))}));var Yi,$i,Qi,Ji,ea,ta,na,ra,oa,ia,aa,ca,la,ua,sa,da,fa,pa,ga,ba,ha,ma,ya,va,_a,Oa,Ca,ja,wa,ka,xa,Na,Sa,Aa,Ta,Ia,La,Ea,Ma,Pa,Ra,Da,Ba,Ua,Ha,Xa,Fa,qa,Ga,za,Va,Wa,Za,Ka,Ya,$a,Qa,Ja,ec,tc,nc,rc,oc,ic,ac,cc,lc,uc,sc,dc,fc,pc,gc,bc,hc,mc,yc,vc,_c,Oc,Cc,jc,wc,kc,xc,Nc,Sc,Ac,Tc,Ic,Lc,Ec,Mc,Pc=function(e){var t=e.onClick,n=e.option;return Object(Be.g)("li",{key:n.value,role:"option"},Object(Be.g)("button",{type:"button",className:wo,onClick:function(){t(n)}},Object(Be.g)(Gi,{currency:n.value}),Object(Be.g)("span",null,n.label),Object(Be.g)("span",null,n.contractType)))},Rc=function(){var e=br(),t=Ut().primaryColor,n="Contents: I would like to make a crypto donation to support https://www.every.org/"+e.primarySlug+".\n\nMy name:\nToken name:\nToken symbol:\nToken quantity:\n\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.";return Object(Be.g)("a",{className:xr(t),href:H({address:Je,subject:"Crypto donation for "+e.name,body:n})},Je)},Dc=function(){var e=hr(),t=e.submitError,n=e.cryptoCurrency,r=e.setCryptoCurrency,o=Ut().primaryColor,i=p(null),a=s(Wi.find((function(e){return e.value===n}))),c=a[0],l=a[1],u=s(null==c?void 0:c.label),d=u[0],f=u[1],g=s(!c),b=g[0],h=g[1],m=function(e){l(e),r(e.value),f(e.label),h(!1)},y=function(){l(void 0),r(void 0),h(!0),f("")},v=sr([Oo].concat(t?[Lo]:[],b?[xo]:[])),_=function(e){return Object(Be.g)(Pc,{option:e,onClick:m})},O=d?Object(go.filter)(d,Wi,{extract:function(e){var t=Xi[e.value];return[t.displayName,t.abbreviation].join(" ")}}).map((function(e){return e.original})):void 0;return Object(Be.g)("div",{className:vo},Object(Be.g)(ui,{ref:i,inputClassName:Eo,containerOnClick:function(){var e;null==(e=i.current)||e.focus(),y()},value:d,prefix:c?Object(Be.g)(Gi,{currency:c.value}):ri||(ri=Object(Be.g)(zi,null)),prefixClassName:He()({display:"inline-flex"}),sufixClassName:ko(o,b),containerClassName:v,sufix:Object(Be.g)(Be.b,null,Object(Be.g)("span",null,null==c?void 0:c.contractType)," ",oi||(oi=Object(Be.g)(mr,null))),onInput:function(e){f(e.currentTarget.value),l(void 0),r(void 0),h(!0)},onFocus:y}),b&&Object(Be.g)("div",{className:_o},Object(Be.g)("div",{className:Co},O?0===O.length?Object(Be.g)("div",{className:He()({padding:"20px"})},"We don't currently support this coin on our site, but for donations worth over $5,000 USD we can do it manually. Please email ",ii||(ii=Object(Be.g)(Rc,null))," to arrange."):Object(Be.g)("ul",null,O.map((function(e){return _(e)}))):Object(Be.g)(Be.b,null,Object(Be.g)("ul",{className:jo},Zi.map((function(e){return _(e)}))),Object(Be.g)("ul",null,Ki.map((function(e){return _(e)})))))))},Bc="data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A",Uc=He()({display:"inline-block",verticalAlign:"middle",maskImage:'url("'+Bc+'")',"-webkit-mask-image":'url("'+Bc+'")',"-webkit-mask-size":"cover",maskSize:"cover"}),Hc=function(e){return He()({fill:e})},Xc=function(e){var t=e.size,n=void 0===t?72:t,r=e.color,o=void 0===r?Fn.LightGray:r;return Object(Be.g)("svg",{width:n,height:n,viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:Uc},Object(Be.g)("path",{className:Hc(o),d:"M51.147 28.97C51.147 17.614 41.667 9 29.493 9C15.875 9 5 20.5 5 34.744C5 50.094 17.223 62.365 33.68 62.365C50.137 62.365 64.862 49.325 66.017 32.242H58.51C57.114 45.042 46.287 54.859 33.68 54.859C21.553 54.859 12.555 45.956 12.555 34.744C12.555 24.639 20.062 16.507 29.493 16.507C37.385 16.507 43.593 21.897 43.593 28.97C43.593 34.84 39.358 39.749 33.728 39.749V47.256C43.688 47.256 51.148 38.931 51.148 28.97"}))},Fc=function(){return Yi||(Yi=Object(Be.g)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-repeat"},Object(Be.g)("path",{d:"M17 1l4 4-4 4"}),Object(Be.g)("path",{d:"M3 11V9a4 4 0 014-4h14M7 23l-4-4 4-4"}),Object(Be.g)("path",{d:"M21 13v2a4 4 0 01-4 4H3"})))},qc=function(e){var t=e.cryptoTokenLoading,n=e.cryptoTokenRate,r=s(""),o=r[0],i=r[1],a=hr(),c=a.cryptoAmount,l=a.setCryptoAmount,u=a.cryptoCurrency,d=a.submitError,g=Ut(),h=sr([No(g.primaryColor)].concat(d?[Lo]:[])),m=s(void 0),y=m[0],v=m[1],_=s(!0),O=_[0],C=_[1],j=p(null);f((function(){u&&j&&j.current&&j.current.focus()}),[u]);var w=b((function(e){var t=e&&""!==e?new po(e):void 0;if(O){var r,o;i(null!=(r=null==t?void 0:t.toString())?r:""),l(null!=(o=null==t?void 0:t.toNumber())?o:0)}else{var a=t&&n?t.div(n).round(7):new po(0);i(a.toString()),l(a.toNumber())}}),[l,O,n]),k=n&&c&&new po(c).times(n).round(2).toString();f((function(){if(y){var e=setTimeout((function(){v(void 0)}),1e3);return function(){clearTimeout(e)}}}),[y]);var x=b((function(e){if(v(void 0),""===e)return w(""),!1;v(void 0);try{var t=new po(e);if(t.lt(0))return!1;if(t.gt(Number.MAX_SAFE_INTEGER))return v("Amount is too large"),!1}catch(e){return!1}return w(e),!0}),[w]),N=0===n;return Object(Be.g)("div",{className:h},Object(Be.g)("div",{className:So},Object(Be.g)("div",{className:Ao},Object(Be.g)("input",{ref:j,className:yo,value:O?o:null!=k?k:"",type:"text",pattern:"[+-]?(\\d*\\.)?\\d+",name:"donateAmountInput",id:"donateAmountInput",inputMode:"decimal",onChange:function(e){return x(e.currentTarget.value)}}),!N&&Object(Be.g)("div",{className:He()({color:Fn.TextGray})},null===n&&t?$i||($i=Object(Be.g)(Xc,{size:16})):O?de(null!=k?k:0,"USD",{showCurrency:!1}):null!=c?c:0)),Object(Be.g)("div",{className:To},Object(Be.g)("div",null,O?u:"USD"),!N&&Object(Be.g)("div",{className:He()({color:Fn.TextGray})},O?"USD":u,"*"))),!N&&Object(Be.g)("button",{className:Io,type:"button",disabled:void 0===n,onClick:function(){C(!O)}},Qi||(Qi=Object(Be.g)(Fc,null))))},Gc=function(){return Ji||(Ji=Object(Be.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M14.9384 5.2052C15.6282 4.34238 16.0964 3.18386 15.9729 2C14.9631 2.05021 13.7308 2.6662 13.0174 3.5297C12.3768 4.26915 11.8098 5.47617 11.9576 6.61041C13.0912 6.70874 14.2237 6.04381 14.9384 5.2052Z",fill:"#2E3434"}),Object(Be.g)("path",{d:"M15.9595 6.83176C14.3133 6.73371 12.9136 7.76606 12.1275 7.76606C11.3409 7.76606 10.1371 6.88118 8.83501 6.90503C7.14031 6.92992 5.56781 7.88812 4.70782 9.41211C2.93897 12.4608 4.24102 16.9832 5.96114 19.4662C6.79647 20.6946 7.80318 22.0472 9.12968 21.9986C10.383 21.9494 10.8743 21.1871 12.3977 21.1871C13.9201 21.1871 14.3626 21.9986 15.6893 21.974C17.0651 21.9494 17.9253 20.745 18.7606 19.5154C19.7189 18.115 20.1111 16.7629 20.1358 16.6887C20.1111 16.6641 17.4828 15.6558 17.4584 12.6324C17.4336 10.1009 19.522 8.89672 19.6203 8.82205C18.441 7.07785 16.5983 6.88118 15.9595 6.83176Z",fill:"#2E3434"})))},zc=function(e){var t=e.className;return Object(Be.g)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ta||(ta=Object(Be.g)("path",{d:"M20 12v10H4V12M22 7H2v5h20V7zM12 22V7M12 7H7.5a2.5 2.5 0 110-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",stroke:"#00A37F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},Vc=function(){return na||(na=Object(Be.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M22 12.2296C22 11.5499 21.9438 10.8665 21.8238 10.1978H12.2013V14.0483H17.7117C17.483 15.2902 16.7483 16.3887 15.6725 17.0868V19.5853H18.9599C20.8904 17.8437 22 15.2718 22 12.2296Z",fill:"#4285F4"}),Object(Be.g)("path",{d:"M12.2013 21.9998C14.9528 21.9998 17.2731 21.1143 18.9637 19.5859L15.6762 17.0874C14.7616 17.6974 13.5808 18.0427 12.2051 18.0427C9.5436 18.0427 7.28697 16.2828 6.47728 13.9166H3.08484V16.4922C4.81667 19.8688 8.34406 21.9998 12.2013 21.9998Z",fill:"#34A853"}),Object(Be.g)("path",{d:"M6.4739 13.9165C6.04657 12.6747 6.04657 11.3299 6.4739 10.088V7.51245H3.08521C1.63826 10.3379 1.63826 13.6667 3.08521 16.4921L6.4739 13.9165Z",fill:"#FBBC04"}),Object(Be.g)("path",{d:"M12.2013 5.95801C13.6558 5.93596 15.0615 6.47239 16.1148 7.45707L19.0274 4.60224C17.1832 2.90477 14.7353 1.97152 12.2013 2.00092C8.34406 2.00092 4.81667 4.13194 3.08484 7.51218L6.47353 10.0878C7.27947 7.71794 9.53985 5.95801 12.2013 5.95801Z",fill:"#EA4335"})))},Wc=((ia={})[gt.CREDIT_CARD]=Object(Be.g)((function(){var e=Ut().primaryColor;return Object(Be.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M21 4.74316H3C1.89543 4.74316 1 5.63859 1 6.74316V18.7432C1 19.8477 1.89543 20.7432 3 20.7432H21C22.1046 20.7432 23 19.8477 23 18.7432V6.74316C23 5.63859 22.1046 4.74316 21 4.74316Z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Be.g)("path",{d:"M1 10.7432H23",stroke:e,strokeWidth:"2",strokeLinecap:"round"}))}),null),ia[gt.BANK]=Object(Be.g)((function(){var e=Ut().primaryColor;return Object(Be.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M4 8.74348V19.2435M7 19.2435V8.74348M16 8.74348V19.2435M19 19.2435V8.74348M3.5 22.7435H19.5C20.33 22.7435 21 22.7435 21 21.2435C21 19.7435 20.33 19.7435 19.5 19.7435H3.5C2.67 19.7435 2 19.7435 2 21.2435C2 22.7435 2.67 22.7435 3.5 22.7435ZM10.57 2.23348L2.67 6.39348C2.26 6.60348 2 7.03348 2 7.49348C2 8.18348 2.56 8.74348 3.25 8.74348H19.76C20.44 8.74348 21 8.18348 21 7.49348C21 7.03348 20.74 6.60348 20.33 6.39348L12.43 2.23348C11.85 1.92348 11.15 1.92348 10.57 2.23348Z",stroke:e,strokeWidth:"2"}))}),null),ia[gt.PAYPAL]=Object(Be.g)((function(){return ra||(ra=Object(Be.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M8.78495 22.0251L9.12912 19.7433L8.36247 19.7248H4.70166L7.24574 2.88757C7.25331 2.83613 7.27835 2.78924 7.31628 2.75545C7.3542 2.72166 7.4025 2.70322 7.45237 2.70349H13.625C15.6742 2.70349 17.0884 3.14858 17.8268 4.02709C18.1729 4.43921 18.3934 4.86988 18.5 5.34382C18.6118 5.84111 18.6138 6.43525 18.5046 7.1599L18.4967 7.21278V7.67711L18.8428 7.88179C19.1071 8.02153 19.3446 8.21056 19.5436 8.43953C19.8398 8.79189 20.0313 9.23973 20.1122 9.77068C20.1958 10.3167 20.1682 10.9665 20.0313 11.7022C19.8733 12.5484 19.618 13.2854 19.2732 13.8885C18.9689 14.4287 18.5599 14.8966 18.0722 15.2622C17.6142 15.6015 17.07 15.8591 16.4547 16.0239C15.8585 16.186 15.1787 16.2678 14.4331 16.2678H13.9527C13.6092 16.2678 13.2756 16.3969 13.0137 16.6284C12.7521 16.8623 12.5786 17.1856 12.5241 17.5405L12.4879 17.7459L11.8798 21.7675L11.8522 21.9152C11.845 21.9619 11.8324 21.9853 11.814 22.0011C11.7962 22.0163 11.7739 22.0248 11.7508 22.0251H8.78495Z",fill:"#253B80"}),Object(Be.g)("path",{d:"M19.1713 7.26611C19.1528 7.38906 19.1318 7.51476 19.1081 7.64389C18.2941 12.0062 15.5091 13.5132 11.9523 13.5132H10.1413C9.70633 13.5132 9.33979 13.8429 9.27201 14.2907L8.3448 20.4286L8.08223 22.1684C8.07177 22.2374 8.07576 22.308 8.09393 22.3752C8.1121 22.4425 8.14402 22.5048 8.18749 22.558C8.23096 22.6111 8.28494 22.6538 8.34572 22.683C8.4065 22.7123 8.47264 22.7275 8.53958 22.7275H11.7516C12.132 22.7275 12.4551 22.439 12.515 22.0475L12.5465 21.8772L13.1513 17.8714L13.1901 17.6516C13.2494 17.2587 13.5731 16.9702 13.9535 16.9702H14.4339C17.5459 16.9702 19.982 15.6514 20.694 11.8352C20.9915 10.2409 20.8375 8.90979 20.0504 7.97359C19.801 7.68398 19.5031 7.44424 19.1713 7.26611Z",fill:"#179BD7"}),Object(Be.g)("path",{d:"M18.3102 6.91227C18.0503 6.83379 17.7858 6.77254 17.5185 6.72888C16.9903 6.64415 16.4565 6.60349 15.9221 6.6073H11.084C10.8998 6.60715 10.7218 6.67576 10.5819 6.80073C10.442 6.9257 10.3496 7.09877 10.3213 7.28867L9.29206 14.0928L9.26245 14.2913C9.29451 14.0747 9.39979 13.8772 9.55924 13.7346C9.71869 13.592 9.92177 13.5136 10.1318 13.5138H11.9427C15.4996 13.5138 18.2845 12.0061 19.0985 7.64447C19.1229 7.51534 19.1433 7.38964 19.1617 7.26669C18.9469 7.14912 18.723 7.05055 18.4925 6.97203C18.432 6.95109 18.3712 6.93117 18.3102 6.91227Z",fill:"#222D65"}),Object(Be.g)("path",{d:"M10.3267 7.2882C10.3547 7.09825 10.4471 6.92509 10.5871 6.80018C10.727 6.67528 10.9053 6.60692 11.0894 6.60752H15.9275C16.5007 6.60752 17.0357 6.64667 17.5239 6.72909C17.8544 6.78329 18.1802 6.86436 18.4985 6.97156C18.7387 7.05467 18.9618 7.15289 19.1678 7.26622C19.41 5.65414 19.1658 4.55653 18.3307 3.56263C17.4101 2.46844 15.7485 2 13.6223 2H7.44964C7.01531 2 6.64482 2.3297 6.5777 2.77822L4.00664 19.7885C3.99467 19.8675 3.99922 19.9482 4.02 20.0252C4.04077 20.1022 4.07727 20.1735 4.12699 20.2344C4.1767 20.2952 4.23845 20.3441 4.30799 20.3776C4.37753 20.4112 4.4532 20.4286 4.5298 20.4287H8.34066L9.29748 14.0923L10.3267 7.2882Z",fill:"#253B80"})))}),null),ia[gt.VENMO]=Object(Be.g)((function(){return oa||(oa=Object(Be.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M20.0439 2.17969C20.7029 3.32032 21 4.49518 21 5.97926C21 10.7127 17.1441 16.8618 14.0147 21.1797H6.86672L4 3.21606L10.2588 2.59335L11.7745 15.3756C13.1907 12.9578 14.9383 9.15825 14.9383 6.56776C14.9383 5.14981 14.7065 4.184 14.3443 3.38876L20.0439 2.17969Z",fill:"#3D95CE"})))}),null),ia[gt.CRYPTO]=Object(Be.g)((function(){var e=Ut().primaryColor;return Object(Be.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 7.74316C4.23858 7.74316 2 9.98174 2 12.7432C2 15.5046 4.23858 17.7432 7 17.7432C9.76142 17.7432 12 15.5046 12 12.7432C12 9.98174 9.76142 7.74316 7 7.74316ZM0 12.7432C0 8.87717 3.13401 5.74316 7 5.74316C10.866 5.74316 14 8.87717 14 12.7432C14 16.6092 10.866 19.7432 7 19.7432C3.13401 19.7432 0 16.6092 0 12.7432Z",fill:e}),Object(Be.g)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1577 9.96518C11.5898 10.6788 11.9998 11.762 11.9998 12.7432C11.9998 13.7243 11.5898 14.8076 11.1577 15.5212C11.6896 14.7266 11.9998 13.7711 11.9998 12.7432C11.9998 11.7152 11.6896 10.7597 11.1577 9.96518ZM11.9999 7.84425C12.4759 8.32999 12.8816 8.88479 13.2007 9.49223C14.1189 8.42024 15.4804 7.74316 16.9998 7.74316C19.7613 7.74316 21.9998 9.98174 21.9998 12.7432C21.9998 15.5046 19.7613 17.7432 16.9998 17.7432C15.4804 17.7432 14.1189 17.0661 13.2007 15.9941C12.8816 16.6015 12.4759 17.1563 11.9999 17.6421C13.2696 18.9376 15.0405 19.7432 16.9998 19.7432C20.8658 19.7432 23.9998 16.6092 23.9998 12.7432C23.9998 8.87717 20.8658 5.74316 16.9998 5.74316C15.0405 5.74316 13.2696 6.5487 11.9999 7.84425Z",fill:e}))}),null),ia[gt.STOCKS]=Object(Be.g)((function(){var e=Ut().primaryColor;return Object(Be.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",display:"ACCENT"},Object(Be.g)("path",{d:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:e,strokeWidth:"2",strokeLinecap:"round"}),Object(Be.g)("path",{d:"M4.5 16.5L6 14l5 1 2.5-2h3l3-5.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}),null),ia[gt.DAF]=Object(Be.g)((function(){return ea||(ea=Object(Be.g)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("g",{clipPath:"url(#clip0_6252_22297)"},Object(Be.g)("path",{d:"M16.5765 4.96037C16.6594 5.00932 16.6809 5.11885 16.6232 5.19596L16.5759 5.2593L15.0086 7.35896L14.3138 8.29026C14.1242 8.54394 13.7833 8.62317 13.4831 8.52256C13.0331 8.37178 12.5519 8.29026 12.051 8.29026C11.5273 8.29026 11.025 8.37948 10.5576 8.54425C8.79202 9.1636 7.5255 10.8523 7.5255 12.8374C7.5255 13.6592 7.74264 14.4303 8.12246 15.0959C8.27802 15.3682 8.46016 15.6228 8.66692 15.8559C9.49528 16.7938 10.7048 17.3851 12.051 17.3851C12.3493 17.3851 12.4882 17.7411 12.2551 17.9272C12.1878 17.9808 12.1198 18.0335 12.051 18.0852C10.765 19.0543 9.21333 19.686 7.5255 19.8527C7.23059 19.882 6.93178 19.897 6.62909 19.897C6.44094 19.897 6.25947 19.8288 6.1178 19.705C6.05234 19.6478 5.98768 19.5895 5.92388 19.5304C5.25044 18.9084 4.67162 18.1855 4.21142 17.3845C3.55353 16.2421 3.13611 14.9422 3.02787 13.5557C3.00972 13.3186 3 13.0796 3 12.8374C3 11.1812 3.4414 9.62795 4.21142 8.29026C4.62236 7.57518 5.12793 6.92326 5.70999 6.34951C6.25315 5.81352 6.86243 5.34526 7.5255 4.96037C8.85684 4.18667 10.4021 3.74316 12.051 3.74316C12.1476 3.74316 12.2448 3.74447 12.3407 3.74837C13.8808 3.79657 15.3236 4.23226 16.5765 4.96037Z",fill:"#4DA3B3"}),Object(Be.g)("path",{d:"M19.8329 17.5145C19.8902 17.7092 19.7155 17.893 19.5181 17.8456C19.5181 17.8456 19.5181 17.8456 19.5181 17.8456C19.252 17.7817 19.1303 17.8928 18.9815 18.1224C18.6911 18.5706 18.0776 19.2612 18.0034 19.346C15.5724 22.1292 11.6274 22.1812 8.38852 21.0562C8.37562 21.0516 8.36273 21.0471 8.35048 21.0432C8.06547 20.9438 7.79658 20.8432 7.55155 20.747C7.356 20.6706 7.17601 20.5972 7.01593 20.5295C6.718 20.4036 6.76112 20.2967 7.08212 20.3365C7.24332 20.3567 7.40195 20.3697 7.55155 20.3781C7.84763 20.395 8.11027 20.3938 8.29155 20.3889C8.46291 20.3843 8.63426 20.3771 8.80536 20.3668C9.38849 20.3316 9.97709 20.2206 10.5583 20.0287C11.0948 19.8507 11.5952 19.613 12.0537 19.3246C12.338 19.1473 12.6063 18.9492 12.8578 18.7348C12.9919 18.6205 13.1202 18.5023 13.2446 18.3789C13.5748 18.0515 13.8708 17.6923 14.1268 17.3091C14.253 17.1207 14.3702 16.9266 14.4771 16.7271C14.4989 16.6863 14.4761 16.6361 14.4311 16.6252C14.0905 16.5435 13.965 16.1245 14.2047 15.8691L15.8892 14.0744C15.8895 14.0741 15.8895 14.0741 15.8898 14.0737C15.8988 14.0642 16.3261 13.6097 16.4665 13.4599C16.495 13.4295 16.5266 13.3957 16.5551 13.3652L17.1097 12.7742L17.35 12.5181C17.688 12.1579 18.2894 12.3006 18.4296 12.7742L19.0377 14.8286L19.5259 16.4789C19.5266 16.4813 19.5288 16.4829 19.5312 16.4834C19.5345 16.4841 19.5365 16.4877 19.5356 16.4909C19.5349 16.4935 19.5342 16.496 19.5336 16.4986C19.5332 16.5007 19.5332 16.5028 19.5338 16.5049L19.7715 17.3085L19.7992 17.4001L19.8329 17.5145Z",fill:"#91CCD7"}),Object(Be.g)("path",{d:"M5.42485 14.1279C4.19233 14.3874 2.95172 13.5889 3.00945 12.3307C3.06474 11.1259 3.36198 9.93661 3.89227 8.83616C4.75517 7.04549 6.1866 5.59086 7.96317 4.69928C9.73974 3.80771 11.7615 3.52936 13.7129 3.90767C14.9121 4.14016 16.0433 4.61261 17.0423 5.2883C18.0857 5.99397 17.9844 7.46586 17.0397 8.29894C16.095 9.13202 14.6462 8.96341 13.4564 8.55014C13.2576 8.4811 13.0533 8.42597 12.8448 8.38555C11.8824 8.19897 10.8853 8.33625 10.0091 8.77597C9.13287 9.21569 8.4269 9.9331 8.00132 10.8163C7.90912 11.0076 7.83121 11.2043 7.76777 11.405C7.38804 12.6059 6.65738 13.8683 5.42485 14.1279Z",fill:"#4DA3B3"})),Object(Be.g)("defs",null,Object(Be.g)("clipPath",{id:"clip0_6252_22297"},Object(Be.g)("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3.74316)"})))))}),null),ia[gt.GIFT_CARD]=Object(Be.g)(zc,null),ia),Zc=function(e){return function(e,t){return e===gt.PAYMENT_REQUEST?t.applePay?aa||(aa=Object(Be.g)(Gc,null)):ca||(ca=Object(Be.g)(Vc,null)):Wc[e]}(e.method,hr().paymentRequestAvailable)},Kc=((la={})[gt.CREDIT_CARD]="Card",la[gt.BANK]="Bank",la[gt.PAYPAL]="PayPal",la[gt.VENMO]="Venmo",la[gt.GIFT_CARD]="Gift card",la[gt.CRYPTO]="Crypto",la[gt.STOCKS]="Stocks",la[gt.DAF]="DAF",la),Yc=function(e){var t=function(e,t){return e===gt.PAYMENT_REQUEST?t.applePay?"Apple Pay":"Google Pay":Kc[e]}(e.method,hr().paymentRequestAvailable);return Object(Be.g)("span",{className:He()(fe({},Vn))},t)},$c=He()(((ua={padding:Zn.XL+" "+Zn.XL+" 0px"})[Xn.TabletLandscapeUp]={padding:"0px"},ua)),Qc=He()({border:"none",padding:0,margin:0,fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),Jc=He()(pe({fontWeight:700},Vn,{marginBottom:Zn.S})),el=He()(pe({},Qn(Zn.XL),((sa={padding:"0px"})[Xn.TabletLandscapeUp]={gridColumn:"2/3",padding:Zn.XXL},sa))),tl=He()(((da={display:"grid",gridTemplateColumns:"1fr"})[Xn.TabletLandscapeUp]={gridAutoFlow:"column",gridTemplateColumns:"auto 1fr"},da)),nl=He()(((fa={height:"100%",width:"100%",minWidth:"170px",flexGrow:1,backgroundColor:Fn.LightGray,display:"none"})[Xn.TabletLandscapeUp]=ge({},Qn(0)),fa)),rl=sr([Qc,He()((pa={display:"block"},pa[Xn.TabletLandscapeUp]={display:"none"},pa))]),ol=He()({display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:Zn.S}),il=ge({},Jn(Zn.XS),{alignItems:"center",justifyContent:"flex-start",width:"100%",background:"transparent"}),al=function(e,t){return He()(ge({},il,{border:"1px solid "+Fn.DarkGray,background:"transparent",textAlign:"start",padding:Zn.XXS+" "+Zn.S,borderRadius:Br.Default,":hover":{cursor:"pointer",background:Fn.Gray},"& > svg":{width:"20px",height:"20px"}},e?{background:t,border:"1px solid "+t,fontWeight:700,color:"white","& > svg":{filter:"brightness(0) invert(1)",width:"20px",height:"20px"},":hover":{background:t}}:{}))},cl=function(){var e=Ut(),t=e.methods,n=e.lockMonthlyFrequency,r=hr().paymentRequestAvailable;return g((function(){return t.filter((function(e){return(!n||!bt.includes(e))&&(e!==gt.PAYMENT_REQUEST||(r.applePay||r.googlePay))}))}),[t,n,r])},ll=function(){var e=cl(),t=hr(),n=t.selectedPaymentMethod,r=t.setSelectedPaymentMethod;return 1===e.length?null:Object(Be.g)("ul",{className:nl},e.map((function(e){return Object(Be.g)("li",{key:e},Object(Be.g)("button",{type:"button",className:(t=e===n,He()(ge({},il,{border:"none",padding:Zn.M,":hover":{cursor:"pointer",background:Fn.Gray}},t?{background:"white",fontWeight:700,":hover":{background:"white"}}:{}))),onClick:function(){r(e)}},Object(Be.g)(Zc,{method:e}),Object(Be.g)(Yc,{method:e})));var t})))},ul=function(){var e=cl(),t=Ut().primaryColor,n=hr(),r=n.selectedPaymentMethod,o=n.setSelectedPaymentMethod;return 1===e.length?null:Object(Be.g)("fieldset",{className:rl},ga||(ga=Object(Be.g)("legend",{className:Jc},"Payment method")),Object(Be.g)("ul",{className:ol},e.map((function(e){return Object(Be.g)("li",{key:e},Object(Be.g)("button",{type:"button",className:al(e===r,t),onClick:function(){o(e)}},Object(Be.g)(Zc,{method:e}),Object(Be.g)(Yc,{method:e})))}))))},sl=He()({border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}),dl=function(e){var t=e.checked,n=e.primaryColor;return He()(be({cursor:"pointer",width:"24px",minWidth:"24px",height:"24px",display:"flex",borderRadius:"4px",justifyContent:"center",alignItems:"center",border:"1.5px solid "+(t?n:Fn.DarkGray)},t?{background:n}:{}))},fl=He()({width:"16px",height:"16px","& > path":{stroke:"white",strokeWidth:"2px"}}),pl=He()({cursor:"pointer"}),gl=He()({display:"flex",alignItems:"center",gap:Zn.XS}),bl=function(e){var t=e.className;return Object(Be.g)("svg",{fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:t},ba||(ba=Object(Be.g)("path",{d:"M20 6L9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})))},hl=["children","checked","className"],ml=function(e){var t=e.children,n=e.checked,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,hl),o=Ut().primaryColor;return Object(Be.g)("label",{className:gl},Object(Be.g)("div",null,Object(Be.g)("input",he({className:sl,type:"checkbox",defaultChecked:n,role:"checkbox"},r)),Object(Be.g)("div",{className:dl({checked:Boolean(n),primaryColor:o})},n&&(ha||(ha=Object(Be.g)(bl,{className:fl}))))),Object(Be.g)("span",{className:pl},t))},yl=function(){var e,t=br(),n=t.hasAdmin&&!(null!=(e=t.metadata)&&e.disablePrivateNotes),r=hr(),o=r.privateNote,i=r.setPrivateNote,a=s(Boolean(o)),c=a[0],l=a[1];return n?Object(Be.g)("div",{className:$n(Zn.L)},Object(Be.g)(ml,{checked:c,onChange:function(){l((function(e){return!e}))}},"Add note for ",t.name),c&&Object(Be.g)("fieldset",{className:He()(me({fieldSetCss:Qc},Qn(Zn.XS)))},ma||(ma=Object(Be.g)("legend",{className:Jc},"Private note")),Object(Be.g)(ci,{rows:3,label:"Note",id:"privateNote",value:o,inputClassName:He()({resize:"none"}),onChange:function(e){i(e.currentTarget.value)}}))):null},vl=He()({width:"100%",textAlign:"center"}),_l=He()(ye({},{fontSize:"12px",lineHeight:"16px",letterSpacing:"0.01em"},{color:Fn.TextOpaque})),Ol=function(){var e,t=Ut().primaryColor;return Object(Be.g)("div",{className:vl},Object(Be.g)("span",{className:_l},"Every.org will accept your donation."," ",Object(Be.g)("a",{href:ot,target:"_blank",rel:"noreferrer",className:(e=t,He()({color:e,textDecoration:"none",cursor:"pointer"}))},"Learn More")))},Cl=He()(ve({},qn,{outline:"none",width:"100%",border:"none",fontFamily:"inherit",cursor:"pointer",borderRadius:Br.Big,height:"52px",fontWeight:700,padding:Zn.XXS,transition:"opacity .3s"})),jl=He()({color:Fn.White,backgroundColor:Fn.DarkGray,cursor:"default","& > span":{opacity:"0.6"}}),wl=function(e){var t,n=e.handleClick,r=e.disabled,o=e.children,i=Ut().primaryColor;return Object(Be.g)("button",{type:"submit",className:sr([Cl,r?jl:(t=i,He()({color:Fn.White,backgroundColor:t,":hover":{opacity:.9}}))]),disabled:r,onClick:n},Object(Be.g)("span",null,o))},kl=function(e){var t=s(null),n=t[0],r=t[1],o=s(null),i=o[0],a=o[1],c=s(!1),l=c[0],u=c[1];return f((function(){if(!e)return r(null),a(null),void u(!1);u(!0),function(e){return(Dt=Dt||w((function*(e){var t,n="https://api.coingecko.com/api/v3/coins/"+e,r=yield fetch(n).then((function(e){return(t=t||w((function*(e){return e.json()}))).apply(this,arguments)}));return r.market_data.current_price.usd}))).apply(this,arguments)}(e).then((function(e){r(e),a(null)})).catch((function(e){r(null),a(e.message)})).finally((function(){u(!1)}))}),[e]),[n,l,i]},xl="USD",Nl="$",Sl=function(){var e=Ut(),t=hr(),n=t.frequency,l=t.donationAmount,u=t.setSubmitError,s=t.selectedPaymentMethod,d=t.stockAmount,f=t.stockSymbol,p=t.cryptoAmount,g=t.cryptoCurrency,h=t.privateNote,m=Ut().minDonationAmount;return b((function(t){t.preventDefault();var b,y=e.completeDonationInNewTab?"_blank":"_self",v={methods:[s],nonprofitSlug:e.nonprofitSlug,fundraiserSlug:e.fundraiserSlug,utmSource:e.utmSource,privateNote:h};switch(s){case gt.CRYPTO:if(!p||!g){u("Please enter currency and amount");break}window.open(function(e){var t=e.cryptoAmount,n=e.cryptoCurrency,l=o(e,lt);return a(l)+"?"+i(r({crypto_amount:t,crypto_currency:n},c(l)))+"#/"+st}(_e({cryptoAmount:p,cryptoCurrency:g},v)),y);break;case gt.STOCKS:if(!f||!d){u("Please enter the symbol and amount");break}window.open(function(e){var t=e.stockAmount,n=e.stockSymbol,l=o(e,ct);return a(l)+"?"+i(r({stock_amount:t,stock_symbol:n},c(l)))+"#/"+st}(_e({stockSymbol:f,stockAmount:d},v)),y);break;case gt.GIFT_CARD:window.open((b=i({nonprofitSlug:e.nonprofitSlug}),it+"?"+b),y);break;default:if(!l||l0&&Object(Be.g)("p",{className:He()(Ce({color:Fn.TextGray},Wn))},"*Estimated exchange rate of"," ",de(a,"USD",{showCurrency:!0})," ","/ ",o," is provided by CoinGecko. Final rate will be determined by our brokerage at time of transaction conversion.")))},Tl=function(e){var t;return He()(je({outline:"none",border:"none",fontFamily:"inherit",cursor:"pointer",background:"none",fontWeight:500,transition:"opacity .3s",color:e,display:"flex",alignItems:"center",alignSelf:"flex-start"},Vn,((t={opacity:1,padding:0,gap:Zn.XXS,marginBottom:Zn.XXL,":hover":{opacity:.9}})[Xn.TabletLandscapeUp]={padding:Zn.L,marginBottom:0},t)))},Il=function(){var e=Ut().primaryColor;return Object(Be.g)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{stroke:e,strokeWidth:"2",d:"M19 12H5M12 19l-7-7 7-7"}))},Ll=function(e){var t=e.handleClick,n=Ut().primaryColor;return Object(Be.g)("button",{type:"button",className:Tl(n),onClick:t},wa||(wa=Object(Be.g)(Il,null)),ka||(ka=Object(Be.g)("span",null,"Back")))},El=function(e){return e[e.START=0]="START",e[e.MANUAL=1]="MANUAL",e[e.AMOUNT=2]="AMOUNT",e}({}),Ml=function(e){"."===e.key&&e.preventDefault()},Pl=function(){var e=p(null),t=Ut(),n=t.primaryColor,r=t.addAmounts,o=hr(),i=o.setDonationAmount,a=o.donationAmount,c=o.setSubmitError,l=o.submitError;return f((function(){Boolean("ontouchstart"in window||navigator.maxTouchPoints)||e.current&&e.current.focus()}),[]),Object(Be.g)("fieldset",{className:He()(we({fieldSetCss:Qc},Qn(Zn.S)))},xa||(xa=Object(Be.g)("legend",{className:Jc},"Donation amount")),Object(Be.g)(ui,{ref:e,id:"donation-input",type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:a||void 0,prefix:Nl,inputClassName:Eo,prefixClassName:Mo,sufix:xl,sufixClassName:Po(n),containerClassName:l?Lo:void 0,onKeyDown:Ml,onInput:function(e){i(Number(e.currentTarget.value)),c(null)}}),r&&r.length>0&&Object(Be.g)("div",{className:Ro},r.map((function(e){return Object(Be.g)("button",{key:e,className:Do(n),type:"button",onClick:function(){i((function(t){return"number"==typeof t?t+e:e}))}},"+",function(e,t){if(e<1e3)return e.toString();var n="",r=1;return e>=1e3&&e<1e6?(r=1e3,n="k"):e>=1e6&&e<1e9?(r=1e6,n="m"):e>=1e9&&e<1e12?(r=1e9,n="b"):e>=1e12&&(r=1e12,n="t"),void 0===t?(e/r).toFixed(3).replace(/\.?0+$/,"")+n:(e/r).toFixed(t)+n}(e))}))))},Rl=function(e){return He()({position:"relative",cursor:"pointer",display:"flex",width:"100%",height:"36px",alignItems:"center",justifyContent:"center",color:e,fontWeight:500,border:"2px solid "+e,borderRight:"none"})},Dl=function(e){return He()({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 0px","& > input":{appearance:"none",height:0},"& > input:checked + label":{backgroundColor:e,color:"white"},"& > input:checked + label:hover":{backgroundColor:e,color:"white"}})},Bl=function(e){return He()({display:"flex",width:"100%","& > div:first-of-type > label":{borderRadius:"6px 0 0 6px","&::after":{borderRadius:"6px 0 0 6px"}},"& > div:last-of-type > label":{borderRadius:"0 6px 6px 0",borderRight:"2px solid "+e,"&::after":{borderRadius:"0 6px 6px 0"}}})},Ul=function(){var e=Ut(),t=e.primaryColor,n=e.lockMonthlyFrequency,r=e.monthlyTitle,o=void 0===r?"Monthly donation":r,i=hr(),a=i.frequency,c=i.selectedPaymentMethod,l=i.setFrequency;return n?Object(Be.g)("h4",null,o):bt.includes(c)?Object(Be.g)("fieldset",{className:Qc},Na||(Na=Object(Be.g)("legend",{className:Jc},"Frequency")),Object(Be.g)("p",null,c===gt.DAF?"Chariot":"Venmo"," ","only supports one-time donations")):Object(Be.g)("fieldset",{className:Qc},Sa||(Sa=Object(Be.g)("legend",{className:Jc},"Frequency")),Object(Be.g)("div",{className:Bl(t)},Object(Be.g)("div",{className:Dl(t)},Object(Be.g)("input",{type:"radio",name:"frequency",id:"monthly",checked:a===pt.Monthly,value:pt.Monthly}),Object(Be.g)("label",{className:Rl(t),id:"frequency-monthly",htmlFor:"monthly",onClick:function(){l(pt.Monthly)}},"Give Monthly")),Object(Be.g)("div",{className:Dl(t)},Object(Be.g)("input",{type:"radio",name:"frequency",id:"once",checked:a===pt.OneTime,value:pt.OneTime}),Object(Be.g)("label",{id:"frequency-one-time",htmlFor:"one-time",className:Rl(t),onClick:function(){l(pt.OneTime)}},"Once"))))},Hl=function(e){var t=e.changeView,n=Sl(),r=hr(),o=r.donationAmount;return Object(Be.g)("form",{className:tl,onSubmit:n},Object(Be.g)(Ll,{handleClick:function(){t(El.START)}}),Object(Be.g)("div",{className:el},Aa||(Aa=Object(Be.g)("h3",null,"Connect your DAF with Chariot")),Ta||(Ta=Object(Be.g)(Ul,null)),Ia||(Ia=Object(Be.g)(Pl,null)),La||(La=Object(Be.g)(yl,null)),Object(Be.g)(wl,{disabled:!o||Number.isNaN(o)},Oe({method:gt.DAF})),Ea||(Ea=Object(Be.g)(Ol,null))))},Xl=function(e){var t=e.changeView,n=Ut(),r=n.nonprofitSlug,o=n.primaryColor,i=gr(),a=i===zt||i===Gt?"the nonprofit":i.name;return Object(Be.g)("div",{className:tl},Object(Be.g)(Ll,{handleClick:function(){t(El.START)}}),Object(Be.g)("div",{className:el},Ma||(Ma=Object(Be.g)("h3",null,"Manual DAF donation")),Pa||(Pa=Object(Be.g)("p",null,"Please ask your provider to make a one-time or recurring grant to:")),Object(Be.g)("div",{className:$n(Zn.S)},Object(Be.g)("p",{className:$n(0)},Ra||(Ra=Object(Be.g)("span",null,"Every.org (EIN: 61-1913297)")),Da||(Da=Object(Be.g)("span",null,"58 West Portal Ave #781 San Francisco, CA 94127")),Object(Be.g)("span",null,"Memo: every.org/",r),Ba||(Ba=Object(Be.g)("span",null,"Contact info: Mark Ulrich, CEO")),Ua||(Ua=Object(Be.g)("span",null,"Email: team@every.org")),Ha||(Ha=Object(Be.g)("span",null,"Phone number: +1 (415) 650-0503"))),Object(Be.g)("p",null,"You may also email us at"," ",Object(Be.g)("a",{className:xr(o),href:H({address:Qe,subject:"Donation via DAF"})},Qe)," ","with the memo or to let us know if you wish to share your contact information with the nonprofit/campaign. By default, your name and email will be shared with ",a," if included in the grant letter from your DAF.")),Object(Be.g)("div",{className:He()(ke({color:Fn.TextGray},Qn(0)))},Object(Be.g)("p",{className:He()({paddingBottom:Zn.S})},"We will attribute the donation accordingly:"),Xa||(Xa=Object(Be.g)("p",null,"If we receive BOTH your @username and a nonprofit/campaign: we will add a donation for that nonprofit/campaign to your account.")),Fa||(Fa=Object(Be.g)("p",null,"If we receive only your @username, we will credit your account's gift card balance in the amount received, which you can use to support as many nonprofits as you'd like.")),qa||(qa=Object(Be.g)("p",null,"If we receive only a nonprofit/campaign, we will send that amount to that nonprofit/campaign.")),Ga||(Ga=Object(Be.g)("p",null,"If we do not receive any information by the time the wire/ACH is received, we will apply it towards running Every.org.")))))},Fl=He()(xe({outline:"none",border:"none",fontFamily:"inherit",background:"#ADEFD1",color:"#00203F",alignSelf:"center",borderRadius:Br.Big,padding:Zn.M+" "+Zn.XL,display:"flex",alignItems:"center",fontWeight:500},Vn,{gap:Zn.XS,cursor:"pointer",":hover":{background:"#7ce6b6"}})),ql=function(e){return He()(xe({outline:"none",border:"none",background:"none",fontFamily:"inherit",color:e,alignSelf:"center",display:"flex",alignItems:"center",fontWeight:500},Vn,{gap:Zn.XS,cursor:"pointer",":hover":{opacity:.9}}))},Gl=function(){return za||(za=Object(Be.g)("svg",{width:"101",height:"16",viewBox:"0 0 101 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(Be.g)("path",{d:"M26.5651 0.257543H29.7622V15.2809H26.5651V0.257543ZM20.2894 15.2809H17.0923V0.257543H20.2894V15.2809ZM26.8019 9.12133H20.0525V6.18104H26.8019V9.12133Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M32.2018 15.2809L38.3591 0.257543H41.5168L47.6938 15.2809H44.3389L39.2867 2.01742H40.5497L35.4778 15.2809H32.2018ZM35.2805 12.0616L36.1291 9.4218H43.2337L44.1021 12.0616H35.2805Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M50.1138 15.2809V0.257543H56.0936C57.3303 0.257543 58.396 0.479317 59.2907 0.922864C60.1853 1.3521 60.876 1.9745 61.3628 2.79005C61.8496 3.60561 62.093 4.57855 62.093 5.70888C62.093 6.8249 61.8496 7.79069 61.3628 8.60625C60.876 9.40749 60.1853 10.0227 59.2907 10.452C58.396 10.8812 57.3303 11.0958 56.0936 11.0958H51.89L53.3109 9.57203V15.2809H50.1138ZM58.896 15.2809L55.4423 9.82958H58.8565L62.3496 15.2809H58.896ZM53.3109 9.95835L51.89 8.32724H55.916C56.9027 8.32724 57.6395 8.09831 58.1263 7.64046C58.6131 7.16829 58.8565 6.52444 58.8565 5.70888C58.8565 4.87902 58.6131 4.23516 58.1263 3.77731C57.6395 3.31945 56.9027 3.09052 55.916 3.09052H51.89L53.3109 1.43795V9.95835Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M65.6128 15.2809V0.257543H68.8099V15.2809H65.6128Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M79.7851 15.5385C78.6931 15.5385 77.68 15.3453 76.7459 14.959C75.8249 14.5727 75.0223 14.029 74.3382 13.3279C73.6672 12.6268 73.1409 11.8041 72.7594 10.8598C72.391 9.91543 72.2068 8.88525 72.2068 7.76923C72.2068 6.65321 72.391 5.62303 72.7594 4.67871C73.1409 3.73438 73.6738 2.91167 74.3579 2.21058C75.0421 1.50949 75.8446 0.965787 76.7656 0.579472C77.6866 0.193157 78.6865 0 79.7653 0C80.8573 0 81.8573 0.193157 82.7651 0.579472C83.686 0.965787 84.482 1.50949 85.153 2.21058C85.8372 2.91167 86.37 3.73438 86.7516 4.67871C87.1331 5.60873 87.3239 6.6389 87.3239 7.76923C87.3239 8.88525 87.1331 9.92258 86.7516 10.8812C86.37 11.8255 85.8372 12.6482 85.153 13.3493C84.482 14.0361 83.686 14.5727 82.7651 14.959C81.8573 15.3453 80.8639 15.5385 79.7851 15.5385ZM79.7653 12.5767C80.3837 12.5767 80.9494 12.4622 81.4626 12.2333C81.9888 12.0044 82.4493 11.6753 82.844 11.2461C83.2387 10.8168 83.5413 10.3089 83.7518 9.72227C83.9755 9.13564 84.0873 8.48463 84.0873 7.76923C84.0873 7.05383 83.9755 6.40282 83.7518 5.81619C83.5413 5.22956 83.2387 4.72163 82.844 4.29239C82.4625 3.86315 82.0086 3.53407 81.4823 3.30514C80.956 3.07621 80.3837 2.96175 79.7653 2.96175C79.147 2.96175 78.5747 3.07621 78.0484 3.30514C77.5353 3.53407 77.0814 3.86315 76.6867 4.29239C76.292 4.72163 75.9828 5.22956 75.7591 5.81619C75.5486 6.40282 75.4434 7.05383 75.4434 7.76923C75.4434 8.47032 75.5486 9.12133 75.7591 9.72227C75.9828 10.3089 76.2854 10.8168 76.6669 11.2461C77.0616 11.6753 77.5221 12.0044 78.0484 12.2333C78.5747 12.4622 79.147 12.5767 79.7653 12.5767Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M93.3822 15.2809V3.09052H88.9616V0.257543H101V3.09052H96.5793V15.2809H93.3822Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M11.272 1.05076C11.3408 1.09302 11.3586 1.18757 11.3108 1.25413L11.2714 1.30881L9.3933 3.92529C9.23593 4.14428 8.9529 4.21268 8.70361 4.12582C8.33005 3.99566 7.93049 3.92529 7.51464 3.92529C7.07982 3.92529 6.66276 4.00231 6.27476 4.14455C4.80885 4.6792 3.75732 6.13699 3.75732 7.85057C3.75732 8.56007 3.9376 9.22572 4.25295 9.80028C4.3821 10.0353 4.53332 10.2551 4.70499 10.4564C5.39274 11.2659 6.39692 11.7764 7.51464 11.7764C7.76228 11.7764 7.87763 12.0838 7.68405 12.2443C7.62823 12.2906 7.57176 12.3361 7.51464 12.3808C6.44696 13.2173 5.15865 13.7627 3.75732 13.9066C3.51247 13.9319 3.26438 13.9448 3.01307 13.9448C2.85686 13.9448 2.70619 13.886 2.58857 13.7791C2.53422 13.7297 2.48053 13.6794 2.42757 13.6283C1.86844 13.0914 1.38787 12.4674 1.00579 11.7759C0.459575 10.7898 0.11301 9.6676 0.0231398 8.47068C0.00807176 8.26604 0 8.05971 0 7.85057C0 6.4209 0.366476 5.08005 1.00579 3.92529C1.34697 3.308 1.76673 2.74523 2.24998 2.24993C2.70094 1.78724 3.2068 1.38302 3.75732 1.05076C4.86267 0.382868 6.1456 9.06616e-06 7.51464 9.06616e-06C7.59482 9.06616e-06 7.67555 0.00113271 7.75519 0.00450591C9.03382 0.0461087 10.2317 0.422222 11.272 1.05076Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M13.9754 11.8877C14.023 12.0558 13.8779 12.2145 13.7141 12.1736C13.4931 12.1184 13.3921 12.2143 13.2685 12.4126C13.0274 12.7994 12.5181 13.3956 12.4565 13.4688C10.4382 15.8714 7.16282 15.9162 4.47369 14.9451C4.46298 14.9412 4.45227 14.9373 4.4421 14.9339C4.20547 14.8481 3.98222 14.7612 3.77878 14.6782C3.61643 14.6123 3.46699 14.5489 3.33408 14.4905C3.08673 14.3817 3.12253 14.2895 3.38904 14.3239C3.52288 14.3412 3.65458 14.3525 3.77878 14.3597C4.15457 14.382 4.46549 14.3678 4.56937 14.3616C4.59412 14.3601 4.61885 14.3589 4.64363 14.3582C5.18515 14.3419 5.73401 14.2439 6.27519 14.0581C6.72061 13.9045 7.13605 13.6992 7.51669 13.4503C7.75279 13.2972 7.9755 13.1262 8.18429 12.9412C8.29565 12.8425 8.40219 12.7404 8.50551 12.6339C8.77962 12.3513 9.02535 12.0413 9.23789 11.7105C9.34271 11.5478 9.44004 11.3803 9.52876 11.208C9.5469 11.1728 9.52792 11.1295 9.49058 11.12C9.20779 11.0496 9.10362 10.6878 9.30264 10.4673L10.7012 8.91805L10.7017 8.91751C10.7086 8.90988 11.0638 8.51701 11.1804 8.38764C11.2042 8.36134 11.2303 8.33219 11.2541 8.3059L11.914 7.57461C12.1946 7.26369 12.6939 7.38682 12.8104 7.79567L13.7206 10.9938C13.7212 10.9958 13.7229 10.9972 13.7249 10.9977C13.7277 10.9983 13.7293 11.0014 13.7286 11.0042C13.728 11.0064 13.7275 11.0085 13.727 11.0108C13.7266 11.0126 13.7266 11.0144 13.7271 11.0162L13.9245 11.7099L13.9475 11.7889L13.9754 11.8877Z",fill:"#00203F"}),Object(Be.g)("path",{d:"M2.01325 8.96461C0.989941 9.18868 -0.0400886 8.49938 0.00784723 7.41322C0.0537471 6.37318 0.300533 5.3465 0.740811 4.39654C1.45724 2.85074 2.64569 1.59503 4.1207 0.825379C5.5957 0.0557292 7.27427 -0.184559 8.89443 0.142017C9.8901 0.342713 10.8293 0.750556 11.6587 1.33385C12.5249 1.94302 12.4409 3.21363 11.6566 3.93279C10.8722 4.65194 9.66932 4.50639 8.68146 4.14963C8.51643 4.09003 8.34679 4.04245 8.17368 4.00755C7.37463 3.84649 6.54677 3.965 5.81931 4.34458C5.09184 4.72417 4.50571 5.34348 4.15237 6.10585C4.07582 6.27101 4.01114 6.44087 3.95847 6.61407C3.64319 7.65079 3.03655 8.74054 2.01325 8.96461Z",fill:"#00203F"})))},zl=function(e){var t=e.changeView,n=Ut().primaryColor;return Object(Be.g)("div",{className:tl},Va||(Va=Object(Be.g)(ll,null)),Object(Be.g)("div",{className:el},Wa||(Wa=Object(Be.g)(ul,null)),Za||(Za=Object(Be.g)("h4",null,"Instant DAF donation")),Ka||(Ka=Object(Be.g)("p",null,"We use Chariot to verify your account info and automatically initiate a grant from your DAF, or you can get instructions for making the donation manually.")),Object(Be.g)("button",{type:"button",className:Fl,onClick:function(){t(El.AMOUNT)}},Ya||(Ya=Object(Be.g)("span",null,"Donate with")),$a||($a=Object(Be.g)(Gl,null))),Object(Be.g)("button",{type:"button",className:ql(n),onClick:function(){t(El.MANUAL)}},"Get instructions for a manual DAF donation"),Qa||(Qa=Object(Be.g)(Ol,null))))},Vl=function(){var e=s(El.START),t=e[1];switch(e[0]){case El.START:return Object(Be.g)(zl,{changeView:t});case El.MANUAL:return Object(Be.g)(Xl,{changeView:t});case El.AMOUNT:return Object(Be.g)(Hl,{changeView:t})}},Wl=function(){var e=hr(),t=e.frequency,n=e.donationAmount,r=e.selectedPaymentMethod,o=e.paymentRequestAvailable,i=Sl();return Object(Be.g)("form",{className:tl,onSubmit:i},Ja||(Ja=Object(Be.g)(ll,null)),Object(Be.g)("div",{className:el},ec||(ec=Object(Be.g)(ul,null)),tc||(tc=Object(Be.g)(Ul,null)),nc||(nc=Object(Be.g)(Pl,null)),rc||(rc=Object(Be.g)(yl,null)),Object(Be.g)(wl,{disabled:t===pt.Unselected||!n||Number.isNaN(n)},Oe({method:r,paymentRequestIsApplePay:o.applePay})),oc||(oc=Object(Be.g)(Ol,null))))},Zl=He()({display:"block",width:"80px",height:"80px",alignSelf:"center","& > path":{strokeWidth:"1"}}),Kl=function(){var e=Sl();return Object(Be.g)("form",{className:tl,onSubmit:e},ic||(ic=Object(Be.g)(ll,null)),Object(Be.g)("div",{className:el},ac||(ac=Object(Be.g)(ul,null)),cc||(cc=Object(Be.g)(zc,{className:Zl})),lc||(lc=Object(Be.g)("p",null,"Redeem a gift card to add donation credits to your account.")),Object(Be.g)(wl,null,Oe({method:gt.GIFT_CARD})),uc||(uc=Object(Be.g)(Ol,null))))},Yl=function(){var e=Sl(),t=(Ut(),hr()),n=t.stockAmount,r=t.stockSymbol,o=t.setStockAmount,i=t.setStockSymbol,a=t.submitError,c=t.setSubmitError;return Object(Be.g)("form",{className:tl,onSubmit:e},sc||(sc=Object(Be.g)(ll,null)),Object(Be.g)("div",{className:el},dc||(dc=Object(Be.g)(ul,null)),Object(Be.g)("fieldset",{className:He()(Ne({fieldSetCss:Qc},Qn(Zn.XXL)))},Object(Be.g)("div",null,fc||(fc=Object(Be.g)("legend",{className:Jc},"What is the symbol of the shares?")),pc||(pc=Object(Be.g)("span",null,"Example: AAPL")),Object(Be.g)(ui,{id:"stock-amount-input",inputClassName:Eo,containerClassName:a?Lo:void 0,type:"text",value:r,onInput:function(e){i(e.currentTarget.value),c(null)}})),Object(Be.g)("div",null,gc||(gc=Object(Be.g)("legend",{className:Jc},"How many shares are you donating?")),Object(Be.g)(ui,{id:"donation-input",inputClassName:Eo,containerClassName:a?Lo:void 0,type:"number",pattern:"[0-9]*",inputMode:"numeric",min:0,step:1,value:n||void 0,onInput:function(e){o(Number(e.currentTarget.value)),c(null)}}))),bc||(bc=Object(Be.g)(yl,null)),Object(Be.g)(wl,{disabled:!n||!r},Oe({method:gt.STOCKS})),hc||(hc=Object(Be.g)(Ol,null))))},$l=function(){switch(hr().selectedPaymentMethod){case gt.CRYPTO:return mc||(mc=Object(Be.g)(Al,null));case gt.STOCKS:return yc||(yc=Object(Be.g)(Yl,null));case gt.DAF:return vc||(vc=Object(Be.g)(Vl,null));case gt.GIFT_CARD:return _c||(_c=Object(Be.g)(Kl,null));default:return Oc||(Oc=Object(Be.g)(Wl,null))}},Ql=function(){return Cc||(Cc=Object(Be.g)(dr,{className:$c},Object(Be.g)($l,null)))},Jl=function(e){var t;return He()(((t={background:"white",width:"100%",height:"100%",borderRadius:"unset",position:"relative",overflow:"auto",padding:"0",paddingBottom:Zn.XXL})[Xn.TabletLandscapeUp]={height:e?e+"px":"unset",background:"#f3f6f6",minHeight:"378px",maxHeight:"calc(100vh - 2 * "+Zn.XL+")",width:"1000px",overflow:"unset",overflowY:"scroll","-ms-overflow-style":"none",scrollbarWidth:"none","::-webkit-scrollbar":{display:"none"},borderRadius:Br.Medium,padding:Zn.XL},t))},eu=Y((function(e,t){var n=e.children,r=e.height;return Object(Be.g)("div",{ref:t,className:Jl(r)},n)})),tu=He()(Se({},Vn,((jc={position:"fixed",height:"auto",width:"100%",zIndex:999,top:0,bottom:0,left:0,right:0,display:"flex",background:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",color:Fn.Text,fontFamily:Xe.BasisGrotesque,padding:0})[Xn.TabletLandscapeUp]={padding:Zn.XL},jc.boxSizing="border-box",jc["-webkit-font-smoothing"]="antialiased",jc["-moz-osx-font-smoothing"]="grayscale",jc["& *"]={boxSizing:"inherit"},jc["& *:before"]={boxSizing:"inherit"},jc["& *:after"]={boxSizing:"inherit"},jc))),nu=function(e){var t=e.children,n=e.onClick;return Object(Be.g)("div",{className:tu,onClick:n},t)},ru=function(){var e=Ut().fundraiserSlug,t=hr().hideWidget,n=fr(),r=gr(),o=function(e){e.target===e.currentTarget&&t()};return r===Gt||e&&n===Ht?(t(),null):r===zt||e&&n===Xt?Object(Be.g)(nu,{onClick:o},wc||(wc=Object(Be.g)(Xc,{size:24}))):Object(Be.g)(nu,{onClick:o},kc||(kc=Object(Be.g)(Pr,{className:Er})),xc||(xc=Object(Be.g)(eu,{height:null},Object(Be.g)(Tr,null,Object(Be.g)("div",{id:"every-header"},Object(Be.g)(Dr,null)),Object(Be.g)("div",{id:"every-nonprofitInfo"},Object(Be.g)(to,null)),Object(Be.g)("div",{id:"every-paymentProcess"},Object(Be.g)(Ql,null)),Object(Be.g)("div",{id:"every-faq"},Object(Be.g)(vr,null)),Object(Be.g)("div",{id:"every-fundraiserLink"},Object(Be.g)(Sr,null)),Object(Be.g)("div",{id:"every-footer"},Object(Be.g)(kr,null))))))},ou=function(){var e=document.querySelector("body"),t=function(){var e=document.querySelector("body");return Sc||(Sc=null!=e&&e.style.overflow?e.style.overflow:"unset"),Sc}();e&&(e.style.overflow=t)},iu=function(e){var t,n=e.options,r=void 0===n?{}:n,o=e.hide;return ou(),r.show?((t=document.querySelector("body"))&&(t.style.overflow="hidden"),Object(Be.g)(Hn,{options:r,hide:o},Nc||(Nc=Object(Be.g)(ru,null)))):null},au="\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n\n h1, h2, h3, h4, h4, h6 {\n font-weight: 700\n }\n",cu=["element"],lu={childList:!0,subtree:!0,attributeFilter:["href"]},uu=new Map,su=function(){function e(e,t){Te(this,"options",void 0),Te(this,"mountPoint",void 0),this.options=e,this.mountPoint=t}var t=e.prototype;return t.hide=function(){this.options.show=!1,this.render()},t.show=function(){this.options.show=!0,this.render()},t.setOptions=function(e){this.options=e,this.render()},t.render=function(){var e=this;Object(Be.j)(Object(Be.g)(iu,{options:this.options,hide:function(){e.hide()}}),this.mountPoint)},e}(),du=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,fu=["element","selector"],pu=["element","selector"];(Lc=null==(Ic=document.currentScript)||null==(Ic=Ic.getAttribute("src"))?void 0:Ic.split("?")[1],Ec=null==Lc?void 0:Lc.split("&").map((function(e){var t=e.split("=");return[t[0],t[1]]})),!(Mc=Ec&&Object.fromEntries(Ec))||"1"!==Mc.explicit)?(_t(),Ee(),new du((function(e,t){t.disconnect(),Boolean(e.some((function(e){return"A"===e.target.nodeName})))&&Ee(),t.observe(document,lu)})).observe(document,lu)):function(){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:"",c=arguments[2];return Object.keys(i).map((function(l){var u=i[l];if(null===u)return"";if("object"==typeof u){var s=/^@/.test(l)?l:null;return e(u,s?a:a+l,s||c)}var d=l+u+a+c;if(t[d])return t[d];var f=n+r.length.toString(36);return o(function(e,t){return t?t+"{"+e+"}":e}(function(e,t,n){return"."+e+"{"+t.replace(/[A-Z]|^ms/g,"-$&").toLowerCase()+":"+n+"}"}(f+a.replace(/&/g,""),l,u),c)),t[d]=f,f})).join(" ")};if(e.exports=function(){for(var e=arguments.length,t=Array(e),n=0;n2&&(c.children=arguments.length>3?E.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===c[i]&&(c[i]=e.defaultProps[i]);return a(e,c,r,o,null)}function a(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++P:o};return null==o&&null!=M.vnode&&M.vnode(i),i}function c(){return{current:null}}function l(e){return e.children}function u(e,t){this.props=e,this.context=t}function s(e,t){if(null==t)return e.__?s(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&R.sort(U));p.__r=0}function g(e,t,n,r,o,i,c,u,d,f,p){var g,h,v,_,O,C,w,k,S,A=0,T=r&&r.__k||F,I=T.length,L=I,E=t.length;for(n.__k=[],g=0;g0?a(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_)?(_.__=n,_.__b=n.__b+1,-1===(k=y(_,T,w=g+A,L))?v=X:(v=T[k]||X,T[k]=void 0,L--),j(e,_,v,o,i,c,u,d,f,p),O=_.__e,(h=_.ref)&&v.ref!=h&&(v.ref&&x(v.ref,null,_),p.push(h,_.__c||O,_)),null!=O&&(null==C&&(C=O),(S=v===X||null===v.__v)?-1==k&&A--:k!==w&&(k===w+1?A++:k>w?L>E-w?A+=k-w:A--:A=k(null!=l?1:0))for(;a>=0||c=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(c2&&(u.children=arguments.length>3?E.call(arguments,2):n),a(e.type,u,o||e.key,i||e.ref,null)}function L(e,t){var n={__c:t="__cC"+H++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,f(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return I})),n.d(t,"d",(function(){return L})),n.d(t,"e",(function(){return i})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return i})),n.d(t,"h",(function(){return T})),n.d(t,"i",(function(){return M})),n.d(t,"j",(function(){return A})),n.d(t,"k",(function(){return h}));var E,M,P,R,D,B,U,H,X={},F=[],q=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,G=Array.isArray;E=F.slice,M={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},P=0,u.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=r({},this.state),"function"==typeof e&&(e=e(r({},n),this.props)),e&&r(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),f(this))},u.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),f(this))},u.prototype.render=l,R=[],B="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,U=function(e,t){return e.__v.__b-t.__v.__b},p.__r=0,H=0},"Pq/i":function(e,t,n){"use strict";n.r(t);var r=n("NMMh"),o=r.g,i=r.j,a=function(e){return e&&e.default?e.default:e};if("function"==typeof a(n("/hs+"))){var c=document.getElementById("preact_root")||document.body.firstElementChild;0,function(){var e=a(n("/hs+")),t={},r=document.querySelector('[type="__PREACT_CLI_DATA__"]');r&&(t=JSON.parse(decodeURI(r.innerHTML)).preRenderData||t);var l;t.url&&(l=t.url);i(o(e,{CLI_DATA:{preRenderData:t}}),document.body,c)}()}},kPAj:function(e){var t;e.exports=t={},t.simpleFilter=function(e,n){return n.filter((function(n){return t.test(e,n)}))},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(e,t,n){var r,o=0,i=[],a=t.length,c=0,l=0,u=(n=n||{}).pre||"",s=n.post||"",d=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var f=0;f\n) {\n\treturn Object.entries(params)\n\t\t.filter(([, value]) => Boolean(value))\n\t\t.map((entry) => entry.map((part) => encodeURIComponent(part!)).join('='))\n\t\t.join('&');\n}\n\nfunction getBaseUrl({\n\tfundraiserSlug,\n\tnonprofitSlug\n}: Pick) {\n\tlet baseUrl = BASE_URL + nonprofitSlug;\n\n\tif (fundraiserSlug) {\n\t\tbaseUrl += '/f/' + fundraiserSlug;\n\t}\n\n\treturn baseUrl;\n}\n\nfunction getBaseParams({\n\tmethods,\n\tnonprofitSlug,\n\tnoExit\n}: Pick) {\n\treturn {\n\t\tmethod: methods?.join(','),\n\t\tutm_campaign: 'donate-button',\n\t\tutm_source: nonprofitSlug,\n\t\tutm_medium: UTM_MEDIUM,\n\t\tno_exit: noExit ?? 1\n\t};\n}\n\nexport function constructBasicDonateUrl(\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\tprops: Omit\n) {\n\tconst baseUrl = getBaseUrl(props);\n\tconst params = getBaseParams(props);\n\n\tconst parameters = serializeParams(params);\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateUrl({\n\tfrequency,\n\tamount,\n\t...rest\n}: DonateUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tfrequency,\n\t\tamount,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateStocksUrl({\n\tstockAmount,\n\tstockSymbol,\n\t...rest\n}: DonateStocksUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tstock_amount: stockAmount,\n\t\tstock_symbol: stockSymbol,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n\nexport function constructDonateCryptoUrl({\n\tcryptoAmount,\n\tcryptoCurrency,\n\t...rest\n}: DonateCryptoUrlParams) {\n\tconst baseUrl = getBaseUrl(rest);\n\tconst params = getBaseParams(rest);\n\n\tconst parameters = serializeParams({\n\t\tcrypto_amount: cryptoAmount,\n\t\tcrypto_currency: cryptoCurrency,\n\t\t...params\n\t});\n\n\treturn `${baseUrl}?${parameters}#/${HASH}`;\n}\n","import {\n\tcreateElement,\n\trender as preactRender,\n\tcloneElement as preactCloneElement,\n\tcreateRef,\n\tComponent,\n\tcreateContext,\n\tFragment\n} from 'preact';\nimport {\n\tuseState,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue\n} from 'preact/hooks';\nimport { PureComponent } from './PureComponent';\nimport { memo } from './memo';\nimport { forwardRef } from './forwardRef';\nimport { Children } from './Children';\nimport { Suspense, lazy } from './suspense';\nimport { SuspenseList } from './suspense-list';\nimport { createPortal } from './portals';\nimport {\n\thydrate,\n\trender,\n\tREACT_ELEMENT_TYPE,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n} from './render';\n\nconst version = '17.0.2'; // trick libraries to think we are react\n\n/**\n * Legacy version of createElement.\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component constructor\n */\nfunction createFactory(type) {\n\treturn createElement.bind(null, type);\n}\n\n/**\n * Check if the passed element is a valid (p)react node.\n * @param {*} element The element to check\n * @returns {boolean}\n */\nfunction isValidElement(element) {\n\treturn !!element && element.$$typeof === REACT_ELEMENT_TYPE;\n}\n\n/**\n * Wrap `cloneElement` to abort if the passed element is not a valid element and apply\n * all vnode normalizations.\n * @param {import('./internal').VNode} element The vnode to clone\n * @param {object} props Props to add when cloning\n * @param {Array} rest Optional component children\n */\nfunction cloneElement(element) {\n\tif (!isValidElement(element)) return element;\n\treturn preactCloneElement.apply(null, arguments);\n}\n\n/**\n * Remove a component tree from the DOM, including state and event handlers.\n * @param {import('./internal').PreactElement} container\n * @returns {boolean}\n */\nfunction unmountComponentAtNode(container) {\n\tif (container._children) {\n\t\tpreactRender(null, container);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Get the matching DOM node for a component\n * @param {import('./internal').Component} component\n * @returns {import('./internal').PreactElement | null}\n */\nfunction findDOMNode(component) {\n\treturn (\n\t\t(component &&\n\t\t\t(component.base || (component.nodeType === 1 && component))) ||\n\t\tnull\n\t);\n}\n\n/**\n * Deprecated way to control batched rendering inside the reconciler, but we\n * already schedule in batches inside our rendering code\n * @template Arg\n * @param {(arg: Arg) => void} callback function that triggers the updated\n * @param {Arg} [arg] Optional argument that can be passed to the callback\n */\n// eslint-disable-next-line camelcase\nconst unstable_batchedUpdates = (callback, arg) => callback(arg);\n\n/**\n * In React, `flushSync` flushes the entire tree and forces a rerender. It's\n * implmented here as a no-op.\n * @template Arg\n * @template Result\n * @param {(arg: Arg) => Result} callback function that runs before the flush\n * @param {Arg} [arg] Optional arugment that can be passed to the callback\n * @returns\n */\nconst flushSync = (callback, arg) => callback(arg);\n\n/**\n * Strict Mode is not implemented in Preact, so we provide a stand-in for it\n * that just renders its children without imposing any restrictions.\n */\nconst StrictMode = Fragment;\n\nexport * from 'preact/hooks';\nexport {\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\t// eslint-disable-next-line camelcase\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n\n// React copies the named exports to the default one.\nexport default {\n\tuseState,\n\tuseReducer,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tversion,\n\tChildren,\n\trender,\n\thydrate,\n\tunmountComponentAtNode,\n\tcreatePortal,\n\tcreateElement,\n\tcreateContext,\n\tcreateFactory,\n\tcloneElement,\n\tcreateRef,\n\tFragment,\n\tisValidElement,\n\tfindDOMNode,\n\tComponent,\n\tPureComponent,\n\tmemo,\n\tforwardRef,\n\tflushSync,\n\tunstable_batchedUpdates,\n\tStrictMode,\n\tSuspense,\n\tSuspenseList,\n\tlazy,\n\t__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n};\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {BASE_API_URL} from 'src/constants/url';\n\ntype NonprofitResponse = {\n\tmessage: string;\n\tdata: {\n\t\tnonprofit: Nonprofit;\n\t};\n};\n\ntype FundraiserResponse = {\n\tdata: {\n\t\tfundraiser: Fundraiser;\n\t\tnonprofits: Nonprofit[];\n\t};\n};\n\nexport async function getNonprofit(nonprofitSlug: string) {\n\tconst data: NonprofitResponse = await fetch(\n\t\t`${BASE_API_URL}/${nonprofitSlug}`\n\t).then(async (response) => response.json());\n\n\treturn data.data.nonprofit;\n}\n\nexport async function getFundraiser(\n\tnonprofitSlug: string,\n\tfundraiserSlug: string\n) {\n\tconst url = `${BASE_API_URL}/${nonprofitSlug}/fundraiser/${fundraiserSlug}`;\n\tconst data: FundraiserResponse = await fetch(url).then(async (response) =>\n\t\tresponse.json()\n\t);\n\n\treturn data.data.fundraiser;\n}\n","export interface PaymentRequestAvailable {\n\tgooglePay: boolean;\n\tapplePay: boolean;\n}\n\nconst testRequestDetails = {\n\ttotal: {label: 'Test Purchase', amount: {currency: 'USD', value: '1.00'}}\n};\n\nasync function makeRequest(supportedMethods: string): Promise {\n\tconst request = new PaymentRequest([{supportedMethods}], testRequestDetails);\n\treturn request.canMakePayment();\n}\n\nexport async function checkPaymentRequest(): Promise {\n\ttry {\n\t\tconst [googlePay, applePay] = await Promise.all([\n\t\t\tmakeRequest('https://google.com/pay'),\n\t\t\tmakeRequest('https://apple.com/apple-pay')\n\t\t]);\n\n\t\treturn {googlePay, applePay};\n\t} catch {\n\t\treturn {googlePay: false, applePay: false};\n\t}\n}\n","import {Fragment} from 'preact/jsx-runtime';\nimport {faqLinkCss} from 'src/components/widget/components/Faq/styles';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getDisbursementDescription(nonprofit: Nonprofit) {\n\tif (nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\tWe then grant directly to {nonprofit.name} on a weekly basis.\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\tWe then partner with Network for Good to grant to {nonprofit.name} on a{' '}\n\t\t\t\n\t\t\t\tmonthly basis\n\t\t\t\n\t\t\t.\n\t\t\n\t);\n}\n\nexport function getNfgDisclaimer(nonprofit: Nonprofit) {\n\tif (!nonprofit.directDisbursement) {\n\t\treturn (\n\t\t\t

\n\t\t\t\t{nonprofit.name} has not added bank deposit info to Every.org yet, so we\n\t\t\t\tcurrently grant to them through Network for Good, who charges a 2.25%\n\t\t\t\tdisbursement fee.\n\t\t\t

\n\t\t);\n\t}\n\n\treturn null;\n}\n\nexport function getFeeDescriptionBody(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\tswitch (paymentMethod) {\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tPayPal charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVisa and Mastercard charge 2.2% + $0.30 for each transaction. Amex\n\t\t\t\t\t\tcharges a 3.5% flat fee. There’s an additional 1% fee for non-US\n\t\t\t\t\t\tcards.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn (\n\t\t\t\t

\n\t\t\t\t\tEvery.org currently covers all fees for donations made with a bank, so\n\t\t\t\t\t100% of your gift reaches {nonprofit.name}.\n\t\t\t\t

\n\t\t\t);\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tVenmo charges 1.99% + $0.49 for each transaction. There’s an\n\t\t\t\t\t\tadditional 1.5% fee for non-US donors.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tOur exchanges generally charge a 1% flat fee to automatically\n\t\t\t\t\t\tliquidate cryptocurrency. For large donations worth over $5k, you\n\t\t\t\t\t\thave the option to email crypto@every.org to request an address and\n\t\t\t\t\t\twe can do a manual conversion to get the best rates possible\n\t\t\t\t\t\t(usually 0.1%-0.4%). Or you are welcome to donate here with the 1%\n\t\t\t\t\t\tfee.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

\n\t\t\t\t\t\tEvery.org covers all brokerage fees for commonly traded stocks! For\n\t\t\t\t\t\tmutual funds, the First Republic brokerage fee is usually 0.1% of\n\t\t\t\t\t\tthe principle, with a $30 minimum and $150 maximum. Some slippage\n\t\t\t\t\t\tmay occur between when you donate and when we sell making the final\n\t\t\t\t\t\tamount different from what you donate.\n\t\t\t\t\t

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

We do not charge any fees, but your DAF provider may have fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t

However, there are third-party fees.

\n\t\t\t\t\t{getNfgDisclaimer(nonprofit)}\n\t\t\t\t\t{encourageBankDonation(nonprofit)}\n\t\t\t\t
\n\t\t\t);\n\t}\n}\n\nexport function encourageBankDonation(nonprofit: Nonprofit) {\n\treturn (\n\t\t

\n\t\t\tDon’t like fees? Neither do we! Donate via bank and then 100% of your gift\n\t\t\twill reach {nonprofit.name}.\n\t\t

\n\t);\n}\n\nexport function getFeeDescription(\n\tpaymentMethod: PaymentMethod,\n\tnonprofit: Nonprofit\n) {\n\treturn (\n\t\t\n\t\t\t

\n\t\t\t\tEvery.org is free for donors and nonprofits, with no platform fees -\n\t\t\t\tinstead we ask for a completely optional tip.\n\t\t\t

\n\t\t\t{getFeeDescriptionBody(paymentMethod, nonprofit)}\n\t\t
\n\t);\n}\n","export function isPresent(value: T): value is Exclude {\n\treturn !(value === null || value === undefined);\n}\n\nfunction addParameters(\n\tlink: string,\n\tparameters: Record\n) {\n\t// We don't use URLSearchParams here because it changes spaces to +s instead\n\t// of %20, and some mail clients like Apple don't handle that well.\n\tconst queryString = Object.entries(parameters)\n\t\t.map(([key, value]) => {\n\t\t\ttry {\n\t\t\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t\t\treturn [key, value].map(encodeURIComponent).join('=');\n\t\t\t} catch {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t})\n\t\t// eslint-disable-next-line unicorn/no-array-callback-reference\n\t\t.filter(isPresent)\n\t\t.join('&');\n\treturn queryString ? [link, queryString].join('?') : link;\n}\n\nexport function mailToLink(parameters: {\n\taddress?: string;\n\tsubject?: string;\n\tbody?: string;\n}) {\n\treturn addParameters(`mailto:${parameters.address ?? ''}`, {\n\t\t...(parameters.subject ? {subject: parameters.subject} : {}),\n\t\t...(parameters.body ? {body: parameters.body} : {})\n\t});\n}\n","import {\n\tCryptoCurrency,\n\tSharedCryptoCurrencyConfig\n} from 'src/components/widget/types/Crypto';\n\nexport function getStepForCurrencyAmountInput(currency?: CryptoCurrency) {\n\tif (!currency) return;\n\n\tconst {decimalOffset} = SharedCryptoCurrencyConfig[currency];\n\tconst zeros = '0'.repeat(decimalOffset - 1);\n\n\treturn `0.${zeros}1`;\n}\n","import cxs from 'cxs';\nimport {filter as fuzzyFilter} from 'fuzzy';\nimport {useRef, useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {\n\tcryptoSelectorDropDownItemCss,\n\tcryptoSelectorInputContainerCss,\n\tinputContainerWithDropDownCss,\n\tcryptoSelectorContainerCss,\n\tcryptoSelectorInputSufixCss,\n\tcryptoSelectorDropDownContainerCss,\n\tcryptoSelectorDropDownContentCss,\n\tquickSelectOptionsListCss\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {\n\tinputContainerCss,\n\tinputContainerErrorCss,\n\tinputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tuseNonprofit,\n\tuseNonprofitOrError\n} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {CryptoCurrencyIcon} from 'src/components/widget/icons/CryptoCurrencyIcon';\nimport {SearchIcon} from 'src/components/widget/icons/SearchIcon';\nimport {\n\tCryptoCurrency,\n\tSharedCryptoCurrencyConfig,\n\tCryptoCurrencyOption,\n\tDISABLED_TOKENS\n} from 'src/components/widget/types/Crypto';\nimport {CRYPTO_EMAIL} from 'src/constants/url';\nimport joinClassNames from 'src/helpers/joinClassNames';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport function displayLabelForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.displayName} (${config.abbreviation})`;\n}\n\nexport function displayContractTypeForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.contractType ? `${config.contractType}` : ''}`;\n}\n\nfunction cryptoCurrencyToOption(cc: CryptoCurrency): CryptoCurrencyOption {\n\treturn {\n\t\tvalue: cc,\n\t\tlabel: displayLabelForCryptoCurrency(cc),\n\t\tcontractType: displayContractTypeForCryptoCurrency(cc)\n\t};\n}\n\nconst quickSelectTokens = [\n\tCryptoCurrency.BTC,\n\tCryptoCurrency.ETH,\n\tCryptoCurrency.USDC\n];\n\nconst quickSelectOptions = quickSelectTokens.map((value) =>\n\tcryptoCurrencyToOption(value)\n);\n\nconst otherOptions = Object.values(CryptoCurrency)\n\t.filter((cc) => !quickSelectTokens.includes(cc))\n\t.filter((cc) => !DISABLED_TOKENS.includes(cc))\n\t.map((value) => cryptoCurrencyToOption(value));\n\nconst cryptoCurrencyOptions = Object.values(CryptoCurrency).map((value) =>\n\tcryptoCurrencyToOption(value)\n);\n\nexport const MAX_CRYPTO_DECIMALS_FOR_DISPLAY = 7;\n\nconst CryptoSelectorDropDownItem = ({\n\tonClick,\n\toption\n}: {\n\tonClick: (option: CryptoCurrencyOption) => void;\n\toption: CryptoCurrencyOption;\n}) => (\n\t
  • \n\t\t {\n\t\t\t\tonClick(option);\n\t\t\t}}\n\t\t>\n\t\t\t\n\t\t\t{option.label}\n\t\t\t{option.contractType}\n\t\t\n\t
  • \n);\n\nconst CryptoSupprotLink = () => {\n\tconst nonprofit = useNonprofitOrError();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst cryptoSupportBody = `Contents: I would like to make a crypto donation to support https://www.every.org/${nonprofit.primarySlug}.\\n\\nMy name:\\nToken name:\\nToken symbol:\\nToken quantity:\\n\\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;\n\n\treturn (\n\t\t\n\t\t\t{CRYPTO_EMAIL}\n\t\t\n\t);\n};\n\nexport const CryptoSelector = () => {\n\tconst {submitError, cryptoCurrency, setCryptoCurrency} = useWidgetContext();\n\tconst {primaryColor} = useConfigContext();\n\n\tconst inputRef = useRef(null);\n\tconst [selectedOption, setSelectedOption] = useState<\n\t\tCryptoCurrencyOption | undefined\n\t>(cryptoCurrencyOptions.find((option) => option.value === cryptoCurrency));\n\n\tconst [inputValue, setInputValue] = useState(selectedOption?.label);\n\n\tconst [showDropDown, setShowDrowDown] = useState(!selectedOption);\n\n\tconst handleItemClick = (option: CryptoCurrencyOption) => {\n\t\tsetSelectedOption(option);\n\t\tsetCryptoCurrency(option.value);\n\t\tsetInputValue(option.label);\n\t\tsetShowDrowDown(false);\n\t};\n\n\tconst handleInputFocus = () => {\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t\tsetInputValue('');\n\t};\n\n\tconst handleInput = (value: string) => {\n\t\tsetInputValue(value);\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t};\n\n\tconst handleContainerClick = () => {\n\t\tinputRef.current?.focus();\n\t\thandleInputFocus();\n\t};\n\n\tconst inputContainerClasses = joinClassNames([\n\t\tinputContainerCss(primaryColor),\n\t\tcryptoSelectorInputContainerCss,\n\t\t...(submitError ? [inputContainerErrorCss] : []),\n\t\t...(showDropDown ? [inputContainerWithDropDownCss] : [])\n\t]);\n\n\tconst optionToListItem = (option: CryptoCurrencyOption) => (\n\t\t\n\t);\n\n\tconst filteredOptions = inputValue\n\t\t? fuzzyFilter(inputValue, cryptoCurrencyOptions, {\n\t\t\t\textract: (option) => {\n\t\t\t\t\tconst config = SharedCryptoCurrencyConfig[option.value];\n\t\t\t\t\treturn [config.displayName, config.abbreviation].join(' ');\n\t\t\t\t}\n\t\t }).map((element) => element.original)\n\t\t: undefined;\n\n\treturn (\n\t\t
    \n\t\t\t
    \n\t\t\t\t{selectedOption ? (\n\t\t\t\t\t\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t {\n\t\t\t\t\t\thandleInput(event.currentTarget.value);\n\t\t\t\t\t}}\n\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\t{selectedOption?.contractType} \n\t\t\t\t\n\t\t\t
    \n\t\t\t{showDropDown && (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{filteredOptions ? (\n\t\t\t\t\t\t\tfilteredOptions.length === 0 ? (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\tWe don't currently support this coin on our site, but for\n\t\t\t\t\t\t\t\t\tdonations worth over $5,000 USD we can do it manually. Please\n\t\t\t\t\t\t\t\t\temail to arrange.\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{filteredOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{quickSelectOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{otherOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t)}\n\t\t
    \n\t);\n};\n","import {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getSubmitButtonText({\n\tmethod,\n\tpaymentRequestIsApplePay,\n\tcryptoCurrency\n}: {\n\tmethod: PaymentMethod;\n\tpaymentRequestIsApplePay?: boolean;\n\tcryptoCurrency?: CryptoCurrency;\n}) {\n\tconst base = 'Continue with ';\n\tswitch (method) {\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\t\treturn base + 'credit or debit';\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn base + 'bank';\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn base + 'PayPal';\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn base + 'Venmo';\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn base + (paymentRequestIsApplePay ? 'Apple Pay' : 'Google Pay');\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn base + 'Chariot';\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn base + (cryptoCurrency ?? 'crypto');\n\t\tdefault:\n\t\t\treturn 'Continue';\n\t}\n}\n","import { EMPTY_ARR } from \"./constants\";\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { Component } from 'preact';\nimport { shallowDiffers } from './util';\n\n/**\n * Component class with a predefined `shouldComponentUpdate` implementation\n */\nexport function PureComponent(p) {\n\tthis.props = p;\n}\nPureComponent.prototype = new Component();\n// Some third-party libraries check if this property is present\nPureComponent.prototype.isPureReactComponent = true;\nPureComponent.prototype.shouldComponentUpdate = function(props, state) {\n\treturn shallowDiffers(this.props, props) || shallowDiffers(this.state, state);\n};\n","import { options } from 'preact';\nimport { assign } from './util';\n\nlet oldDiffHook = options._diff;\noptions._diff = vnode => {\n\tif (vnode.type && vnode.type._forwarded && vnode.ref) {\n\t\tvnode.props.ref = vnode.ref;\n\t\tvnode.ref = null;\n\t}\n\tif (oldDiffHook) oldDiffHook(vnode);\n};\n\nexport const REACT_FORWARD_SYMBOL =\n\t(typeof Symbol != 'undefined' &&\n\t\tSymbol.for &&\n\t\tSymbol.for('react.forward_ref')) ||\n\t0xf47;\n\n/**\n * Pass ref down to a child. This is mainly used in libraries with HOCs that\n * wrap components. Using `forwardRef` there is an easy way to get a reference\n * of the wrapped component instead of one of the wrapper itself.\n * @param {import('./index').ForwardFn} fn\n * @returns {import('./internal').FunctionComponent}\n */\nexport function forwardRef(fn) {\n\tfunction Forwarded(props) {\n\t\tlet clone = assign({}, props);\n\t\tdelete clone.ref;\n\t\treturn fn(clone, props.ref || null);\n\t}\n\n\t// mobx-react checks for this being present\n\tForwarded.$$typeof = REACT_FORWARD_SYMBOL;\n\t// mobx-react heavily relies on implementation details.\n\t// It expects an object here with a `render` property,\n\t// and prototype.render will fail. Without this\n\t// mobx-react throws.\n\tForwarded.render = Forwarded;\n\n\tForwarded.prototype.isReactComponent = Forwarded._forwarded = true;\n\tForwarded.displayName = 'ForwardRef(' + (fn.displayName || fn.name) + ')';\n\treturn Forwarded;\n}\n","import { Component, createElement, options, Fragment } from 'preact';\nimport { assign } from './util';\n\nconst oldCatchError = options._catchError;\noptions._catchError = function(error, newVNode, oldVNode, errorInfo) {\n\tif (error.then) {\n\t\t/** @type {import('./internal').Component} */\n\t\tlet component;\n\t\tlet vnode = newVNode;\n\n\t\tfor (; (vnode = vnode._parent); ) {\n\t\t\tif ((component = vnode._component) && component._childDidSuspend) {\n\t\t\t\tif (newVNode._dom == null) {\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t}\n\t\t\t\t// Don't call oldCatchError if we found a Suspense\n\t\t\t\treturn component._childDidSuspend(error, newVNode);\n\t\t\t}\n\t\t}\n\t}\n\toldCatchError(error, newVNode, oldVNode, errorInfo);\n};\n\nconst oldUnmount = options.unmount;\noptions.unmount = function(vnode) {\n\t/** @type {import('./internal').Component} */\n\tconst component = vnode._component;\n\tif (component && component._onResolve) {\n\t\tcomponent._onResolve();\n\t}\n\n\t// if the component is still hydrating\n\t// most likely it is because the component is suspended\n\t// we set the vnode.type as `null` so that it is not a typeof function\n\t// so the unmount will remove the vnode._dom\n\tif (component && vnode._hydrating === true) {\n\t\tvnode.type = null;\n\t}\n\n\tif (oldUnmount) oldUnmount(vnode);\n};\n\nfunction detachedClone(vnode, detachedParent, parentDom) {\n\tif (vnode) {\n\t\tif (vnode._component && vnode._component.__hooks) {\n\t\t\tvnode._component.__hooks._list.forEach(effect => {\n\t\t\t\tif (typeof effect._cleanup == 'function') effect._cleanup();\n\t\t\t});\n\n\t\t\tvnode._component.__hooks = null;\n\t\t}\n\n\t\tvnode = assign({}, vnode);\n\t\tif (vnode._component != null) {\n\t\t\tif (vnode._component._parentDom === parentDom) {\n\t\t\t\tvnode._component._parentDom = detachedParent;\n\t\t\t}\n\t\t\tvnode._component = null;\n\t\t}\n\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tdetachedClone(child, detachedParent, parentDom)\n\t\t\t);\n\t}\n\n\treturn vnode;\n}\n\nfunction removeOriginal(vnode, detachedParent, originalParent) {\n\tif (vnode) {\n\t\tvnode._original = null;\n\t\tvnode._children =\n\t\t\tvnode._children &&\n\t\t\tvnode._children.map(child =>\n\t\t\t\tremoveOriginal(child, detachedParent, originalParent)\n\t\t\t);\n\n\t\tif (vnode._component) {\n\t\t\tif (vnode._component._parentDom === detachedParent) {\n\t\t\t\tif (vnode._dom) {\n\t\t\t\t\toriginalParent.insertBefore(vnode._dom, vnode._nextDom);\n\t\t\t\t}\n\t\t\t\tvnode._component._force = true;\n\t\t\t\tvnode._component._parentDom = originalParent;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn vnode;\n}\n\n// having custom inheritance instead of a class here saves a lot of bytes\nexport function Suspense() {\n\t// we do not call super here to golf some bytes...\n\tthis._pendingSuspensionCount = 0;\n\tthis._suspenders = null;\n\tthis._detachOnNextRender = null;\n}\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspense.prototype = new Component();\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {Promise} promise The thrown promise\n * @param {import('./internal').VNode} suspendingVNode The suspending component\n */\nSuspense.prototype._childDidSuspend = function(promise, suspendingVNode) {\n\tconst suspendingComponent = suspendingVNode._component;\n\n\t/** @type {import('./internal').SuspenseComponent} */\n\tconst c = this;\n\n\tif (c._suspenders == null) {\n\t\tc._suspenders = [];\n\t}\n\tc._suspenders.push(suspendingComponent);\n\n\tconst resolve = suspended(c._vnode);\n\n\tlet resolved = false;\n\tconst onResolved = () => {\n\t\tif (resolved) return;\n\n\t\tresolved = true;\n\t\tsuspendingComponent._onResolve = null;\n\n\t\tif (resolve) {\n\t\t\tresolve(onSuspensionComplete);\n\t\t} else {\n\t\t\tonSuspensionComplete();\n\t\t}\n\t};\n\n\tsuspendingComponent._onResolve = onResolved;\n\n\tconst onSuspensionComplete = () => {\n\t\tif (!--c._pendingSuspensionCount) {\n\t\t\t// If the suspension was during hydration we don't need to restore the\n\t\t\t// suspended children into the _children array\n\t\t\tif (c.state._suspended) {\n\t\t\t\tconst suspendedVNode = c.state._suspended;\n\t\t\t\tc._vnode._children[0] = removeOriginal(\n\t\t\t\t\tsuspendedVNode,\n\t\t\t\t\tsuspendedVNode._component._parentDom,\n\t\t\t\t\tsuspendedVNode._component._originalParentDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tc.setState({ _suspended: (c._detachOnNextRender = null) });\n\n\t\t\tlet suspended;\n\t\t\twhile ((suspended = c._suspenders.pop())) {\n\t\t\t\tsuspended.forceUpdate();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * We do not set `suspended: true` during hydration because we want the actual markup\n\t * to remain on screen and hydrate it when the suspense actually gets resolved.\n\t * While in non-hydration cases the usual fallback -> component flow would occour.\n\t */\n\tconst wasHydrating = suspendingVNode._hydrating === true;\n\tif (!c._pendingSuspensionCount++ && !wasHydrating) {\n\t\tc.setState({ _suspended: (c._detachOnNextRender = c._vnode._children[0]) });\n\t}\n\tpromise.then(onResolved, onResolved);\n};\n\nSuspense.prototype.componentWillUnmount = function() {\n\tthis._suspenders = [];\n};\n\n/**\n * @this {import('./internal').SuspenseComponent}\n * @param {import('./internal').SuspenseComponent[\"props\"]} props\n * @param {import('./internal').SuspenseState} state\n */\nSuspense.prototype.render = function(props, state) {\n\tif (this._detachOnNextRender) {\n\t\t// When the Suspense's _vnode was created by a call to createVNode\n\t\t// (i.e. due to a setState further up in the tree)\n\t\t// it's _children prop is null, in this case we \"forget\" about the parked vnodes to detach\n\t\tif (this._vnode._children) {\n\t\t\tconst detachedParent = document.createElement('div');\n\t\t\tconst detachedComponent = this._vnode._children[0]._component;\n\t\t\tthis._vnode._children[0] = detachedClone(\n\t\t\t\tthis._detachOnNextRender,\n\t\t\t\tdetachedParent,\n\t\t\t\t(detachedComponent._originalParentDom = detachedComponent._parentDom)\n\t\t\t);\n\t\t}\n\n\t\tthis._detachOnNextRender = null;\n\t}\n\n\t// Wrap fallback tree in a VNode that prevents itself from being marked as aborting mid-hydration:\n\t/** @type {import('./internal').VNode} */\n\tconst fallback =\n\t\tstate._suspended && createElement(Fragment, null, props.fallback);\n\tif (fallback) fallback._hydrating = null;\n\n\treturn [\n\t\tcreateElement(Fragment, null, state._suspended ? null : props.children),\n\t\tfallback\n\t];\n};\n\n/**\n * Checks and calls the parent component's _suspended method, passing in the\n * suspended vnode. This is a way for a parent (e.g. SuspenseList) to get notified\n * that one of its children/descendants suspended.\n *\n * The parent MAY return a callback. The callback will get called when the\n * suspension resolves, notifying the parent of the fact.\n * Moreover, the callback gets function `unsuspend` as a parameter. The resolved\n * child descendant will not actually get unsuspended until `unsuspend` gets called.\n * This is a way for the parent to delay unsuspending.\n *\n * If the parent does not return a callback then the resolved vnode\n * gets unsuspended immediately when it resolves.\n *\n * @param {import('./internal').VNode} vnode\n * @returns {((unsuspend: () => void) => void)?}\n */\nexport function suspended(vnode) {\n\t/** @type {import('./internal').Component} */\n\tlet component = vnode._parent._component;\n\treturn component && component._suspended && component._suspended(vnode);\n}\n\nexport function lazy(loader) {\n\tlet prom;\n\tlet component;\n\tlet error;\n\n\tfunction Lazy(props) {\n\t\tif (!prom) {\n\t\t\tprom = loader();\n\t\t\tprom.then(\n\t\t\t\texports => {\n\t\t\t\t\tcomponent = exports.default || exports;\n\t\t\t\t},\n\t\t\t\te => {\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!component) {\n\t\t\tthrow prom;\n\t\t}\n\n\t\treturn createElement(component, props);\n\t}\n\n\tLazy.displayName = 'Lazy';\n\tLazy._forwarded = true;\n\treturn Lazy;\n}\n","import { Component, toChildArray } from 'preact';\nimport { suspended } from './suspense.js';\n\n// Indexes to linked list nodes (nodes are stored as arrays to save bytes).\nconst SUSPENDED_COUNT = 0;\nconst RESOLVED_COUNT = 1;\nconst NEXT_NODE = 2;\n\n// Having custom inheritance instead of a class here saves a lot of bytes.\nexport function SuspenseList() {\n\tthis._next = null;\n\tthis._map = null;\n}\n\n// Mark one of child's earlier suspensions as resolved.\n// Some pending callbacks may become callable due to this\n// (e.g. the last suspended descendant gets resolved when\n// revealOrder === 'together'). Process those callbacks as well.\nconst resolve = (list, child, node) => {\n\tif (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {\n\t\t// The number a child (or any of its descendants) has been suspended\n\t\t// matches the number of times it's been resolved. Therefore we\n\t\t// mark the child as completely resolved by deleting it from ._map.\n\t\t// This is used to figure out when *all* children have been completely\n\t\t// resolved when revealOrder is 'together'.\n\t\tlist._map.delete(child);\n\t}\n\n\t// If revealOrder is falsy then we can do an early exit, as the\n\t// callbacks won't get queued in the node anyway.\n\t// If revealOrder is 'together' then also do an early exit\n\t// if all suspended descendants have not yet been resolved.\n\tif (\n\t\t!list.props.revealOrder ||\n\t\t(list.props.revealOrder[0] === 't' && list._map.size)\n\t) {\n\t\treturn;\n\t}\n\n\t// Walk the currently suspended children in order, calling their\n\t// stored callbacks on the way. Stop if we encounter a child that\n\t// has not been completely resolved yet.\n\tnode = list._next;\n\twhile (node) {\n\t\twhile (node.length > 3) {\n\t\t\tnode.pop()();\n\t\t}\n\t\tif (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {\n\t\t\tbreak;\n\t\t}\n\t\tlist._next = node = node[NEXT_NODE];\n\t}\n};\n\n// Things we do here to save some bytes but are not proper JS inheritance:\n// - call `new Component()` as the prototype\n// - do not set `Suspense.prototype.constructor` to `Suspense`\nSuspenseList.prototype = new Component();\n\nSuspenseList.prototype._suspended = function(child) {\n\tconst list = this;\n\tconst delegated = suspended(list._vnode);\n\n\tlet node = list._map.get(child);\n\tnode[SUSPENDED_COUNT]++;\n\n\treturn unsuspend => {\n\t\tconst wrappedUnsuspend = () => {\n\t\t\tif (!list.props.revealOrder) {\n\t\t\t\t// Special case the undefined (falsy) revealOrder, as there\n\t\t\t\t// is no need to coordinate a specific order or unsuspends.\n\t\t\t\tunsuspend();\n\t\t\t} else {\n\t\t\t\tnode.push(unsuspend);\n\t\t\t\tresolve(list, child, node);\n\t\t\t}\n\t\t};\n\t\tif (delegated) {\n\t\t\tdelegated(wrappedUnsuspend);\n\t\t} else {\n\t\t\twrappedUnsuspend();\n\t\t}\n\t};\n};\n\nSuspenseList.prototype.render = function(props) {\n\tthis._next = null;\n\tthis._map = new Map();\n\n\tconst children = toChildArray(props.children);\n\tif (props.revealOrder && props.revealOrder[0] === 'b') {\n\t\t// If order === 'backwards' (or, well, anything starting with a 'b')\n\t\t// then flip the child list around so that the last child will be\n\t\t// the first in the linked list.\n\t\tchildren.reverse();\n\t}\n\t// Build the linked list. Iterate through the children in reverse order\n\t// so that `_next` points to the first linked list node to be resolved.\n\tfor (let i = children.length; i--; ) {\n\t\t// Create a new linked list node as an array of form:\n\t\t// \t[suspended_count, resolved_count, next_node]\n\t\t// where suspended_count and resolved_count are numeric counters for\n\t\t// keeping track how many times a node has been suspended and resolved.\n\t\t//\n\t\t// Note that suspended_count starts from 1 instead of 0, so we can block\n\t\t// processing callbacks until componentDidMount has been called. In a sense\n\t\t// node is suspended at least until componentDidMount gets called!\n\t\t//\n\t\t// Pending callbacks are added to the end of the node:\n\t\t// \t[suspended_count, resolved_count, next_node, callback_0, callback_1, ...]\n\t\tthis._map.set(children[i], (this._next = [1, 0, this._next]));\n\t}\n\treturn props.children;\n};\n\nSuspenseList.prototype.componentDidUpdate = SuspenseList.prototype.componentDidMount = function() {\n\t// Iterate through all children after mounting for two reasons:\n\t// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases\n\t// each node[RELEASED_COUNT] by 1, therefore balancing the counters.\n\t// The nodes can now be completely consumed from the linked list.\n\t// 2. Handle nodes that might have gotten resolved between render and\n\t// componentDidMount.\n\tthis._map.forEach((node, child) => {\n\t\tresolve(this, child, node);\n\t});\n};\n","import { EMPTY_OBJ } from './constants';\nimport { commitRoot, diff } from './diff/index';\nimport { createElement, Fragment } from './create-element';\nimport options from './options';\nimport { slice } from './util';\n\n/**\n * Render a Preact virtual node into a DOM element\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * render into\n * @param {import('./internal').PreactElement | object} [replaceNode] Optional: Attempt to re-use an\n * existing DOM tree rooted at `replaceNode`\n */\nexport function render(vnode, parentDom, replaceNode) {\n\tif (options._root) options._root(vnode, parentDom);\n\n\t// We abuse the `replaceNode` parameter in `hydrate()` to signal if we are in\n\t// hydration mode or not by passing the `hydrate` function instead of a DOM\n\t// element..\n\tlet isHydrating = typeof replaceNode === 'function';\n\n\t// To be able to support calling `render()` multiple times on the same\n\t// DOM node, we need to obtain a reference to the previous tree. We do\n\t// this by assigning a new `_children` property to DOM nodes which points\n\t// to the last rendered tree. By default this property is not present, which\n\t// means that we are mounting a new tree for the first time.\n\tlet oldVNode = isHydrating\n\t\t? null\n\t\t: (replaceNode && replaceNode._children) || parentDom._children;\n\n\tvnode = (\n\t\t(!isHydrating && replaceNode) ||\n\t\tparentDom\n\t)._children = createElement(Fragment, null, [vnode]);\n\n\t// List of effects that need to be called after diffing.\n\tlet commitQueue = [];\n\tdiff(\n\t\tparentDom,\n\t\t// Determine the new vnode tree and store it on the DOM element on\n\t\t// our custom `_children` property.\n\t\tvnode,\n\t\toldVNode || EMPTY_OBJ,\n\t\tEMPTY_OBJ,\n\t\tparentDom.ownerSVGElement !== undefined,\n\t\t!isHydrating && replaceNode\n\t\t\t? [replaceNode]\n\t\t\t: oldVNode\n\t\t\t? null\n\t\t\t: parentDom.firstChild\n\t\t\t? slice.call(parentDom.childNodes)\n\t\t\t: null,\n\t\tcommitQueue,\n\t\t!isHydrating && replaceNode\n\t\t\t? replaceNode\n\t\t\t: oldVNode\n\t\t\t? oldVNode._dom\n\t\t\t: parentDom.firstChild,\n\t\tisHydrating\n\t);\n\n\t// Flush all queued effects\n\tcommitRoot(commitQueue, vnode);\n}\n\n/**\n * Update an existing DOM element with data from a Preact virtual node\n * @param {import('./internal').ComponentChild} vnode The virtual node to render\n * @param {import('./internal').PreactElement} parentDom The DOM element to\n * update\n */\nexport function hydrate(vnode, parentDom) {\n\trender(vnode, parentDom, hydrate);\n}\n","import {render as preactRender} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {frequencyFromString} from 'src/helpers/frequencyFromString';\nimport {methodsFromString} from 'src/helpers/methodsFromString';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\nconst OBSERVER_OPTIONS = {\n\tchildList: true,\n\tsubtree: true,\n\tattributeFilter: ['href']\n};\n\ninterface CreateButtonProps extends Partial {\n\telement: Element;\n\tnonprofitSlug: string;\n\tonClick: () => void;\n\turl?: string;\n}\n\ninterface CreateWidgetProps extends Partial {\n\tnonprofitSlug: string;\n}\n\nlet shadowRoot: ShadowRoot;\nlet widgetContainer: HTMLElement;\n\nclass WidgetController {\n\toptions: CreateWidgetProps;\n\tmountPoint: HTMLElement;\n\tconstructor(options: CreateWidgetProps, mountPoint: HTMLElement) {\n\t\tthis.options = options;\n\t\tthis.mountPoint = mountPoint;\n\t}\n\n\thide() {\n\t\tthis.options.show = false;\n\t\tthis.render();\n\t}\n\n\tshow() {\n\t\tthis.options.show = true;\n\t\tthis.render();\n\t}\n\n\tsetOptions(options: WidgetConfig) {\n\t\tthis.options = options;\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tpreactRender(\n\t\t\t {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}}\n\t\t\t/>,\n\t\t\tthis.mountPoint\n\t\t);\n\t}\n}\n\nconst parseUrl = (\n\turlString: string\n): (Partial & {nonprofitSlug: string}) | undefined => {\n\tconst url = new URL(urlString);\n\n\tconst fundraiserSlug = url.pathname.split('/f/')[1];\n\tconst nonprofitSlug = url.pathname.split('/')[1];\n\n\tconst searchParameters = new URLSearchParams(url.search);\n\tconst methods = methodsFromString(searchParameters.get('method'));\n\tconst defaultFrequency = frequencyFromString(\n\t\tsearchParameters.get('frequency')\n\t);\n\tconst monthlyTitle = searchParameters.get('monthlyTitle') ?? undefined;\n\n\tconst lockMonthlyFrequency = defaultFrequency === DonationFrequency.Monthly;\n\n\tif (!nonprofitSlug) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\tfundraiserSlug,\n\t\tnonprofitSlug,\n\t\tdefaultFrequency,\n\t\tmethods,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle\n\t};\n};\n\nfunction mountShadowRoot() {\n\tconst shadowWidgetWrapper = document.createElement('div');\n\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\tdocument.body.append(shadowWidgetWrapper);\n\tshadowRoot = shadowWidgetWrapper.attachShadow({mode: 'open'});\n}\n\nfunction mountWidgetContainer() {\n\tif (!shadowRoot) {\n\t\tmountShadowRoot();\n\t}\n\n\twidgetContainer = document.createElement('div');\n\twidgetContainer.id = 'widget-container';\n\tshadowRoot.append(widgetContainer);\n\n\tconst everyStyles: HTMLStyleElement | null =\n\t\tdocument.querySelector('#every-styles');\n\n\tif (everyStyles) {\n\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t.map((rule) => rule.cssText)\n\t\t\t.join('\\n');\n\n\t\tconst everyShadowStyles = document.createElement('style');\n\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\twidgetContainer.append(everyShadowStyles);\n\t}\n}\n\nfunction createWidget(options: CreateWidgetProps) {\n\tif (!widgetContainer) {\n\t\tmountWidgetContainer();\n\t}\n\n\tconst widgetMountPoint = document.createElement('div');\n\twidgetContainer.append(widgetMountPoint);\n\n\treturn new WidgetController(options, widgetMountPoint);\n}\n\nfunction createButton({element, ...options}: CreateButtonProps) {\n\tif (!element.parentNode) {\n\t\treturn;\n\t}\n\n\tconst buttonContainer = element.parentNode as HTMLElement;\n\n\tpreactRender(, buttonContainer, element);\n}\n\nfunction findAndReplaceLinks() {\n\tconst links = document.querySelectorAll(\"*[href^='https://www.every.org/']\");\n\n\tlinks.forEach((link) => {\n\t\tconst urlString = link.getAttribute('href');\n\t\tif (urlString?.includes('#/donate')) {\n\t\t\tconst options = parseUrl(urlString);\n\n\t\t\tif (!options) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst widget = createWidget(options);\n\n\t\t\tif (link.getAttribute('data-every-style') === null) {\n\t\t\t\tlink.addEventListener('click', (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\twidget.show();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcreateButton({\n\t\t\t\t\telement: link,\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\twidget.show();\n\t\t\t\t\t},\n\t\t\t\t\t...options,\n\t\t\t\t\turl: urlString\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport default function autoPlayMode() {\n\tloadFonts();\n\tfindAndReplaceLinks();\n\n\tconst observer = new MutationObserver((mutations, observer) => {\n\t\t// disconnect before changing DOM so as not to cause an infinite loop\n\t\tobserver.disconnect();\n\n\t\tconst isLinksChanged = Boolean(\n\t\t\tmutations.some((mutation) => mutation.target.nodeName === 'A')\n\t\t);\n\n\t\tif (isLinksChanged) {\n\t\t\tfindAndReplaceLinks();\n\t\t}\n\n\t\tobserver.observe(document, OBSERVER_OPTIONS);\n\t});\n\n\tobserver.observe(document, OBSERVER_OPTIONS);\n}\n\ndeclare const window: Window &\n\ttypeof globalThis & {\n\t\tWebKitMutationObserver: MutationObserver;\n\t\tMozMutationObserver: MutationObserver;\n\t};\n\nconst MutationObserver =\n\twindow.MutationObserver ||\n\twindow.WebKitMutationObserver ||\n\twindow.MozMutationObserver;\n","import {\n\tAvailablePaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nexport function methodsFromString(string?: string | null) {\n\tif (!string) {\n\t\treturn;\n\t}\n\n\treturn string\n\t\t.split(',')\n\t\t.filter((method): method is PaymentMethod =>\n\t\t\tAvailablePaymentMethods.includes(method as PaymentMethod)\n\t\t);\n}\n","import {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\n\nexport function frequencyFromString(string?: string | null) {\n\tif (!string) {\n\t\treturn;\n\t}\n\n\treturn Object.values(DonationFrequency).find(\n\t\t(frequency) => frequency.toUpperCase() === string.toUpperCase()\n\t);\n}\n","export enum FontFamily {\n\tBasisGrotesque = `'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto,\n sans-serif`\n}\n","import cxs from 'cxs';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\n\ncxs.prefix('every-embedded-');\n\nexport const buttonCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\twidth: 'max-content',\n\tborder: 'none',\n\toutline: 'none',\n\tfontFamily: FontFamily.BasisGrotesque,\n\tfontWeight: 500,\n\tlineHeight: 1,\n\tcursor: 'pointer',\n\ttextDecoration: 'none',\n\tbackfaceVisibility: 'hidden',\n\ttransition: 'background-color 0.25s',\n\n\tpadding: '12px 20px',\n\tcolor: '#fff',\n\tbackgroundColor: '#00a380',\n\tborderRadius: '100px',\n\tfontSize: '16px',\n\t'&:hover': {backgroundColor: '#2F806D'}\n});\n\nexport const logoCss = cxs({\n\twidth: '16px',\n\theight: '16px',\n\tfill: '#fff',\n\tmarginRight: '8px'\n});\n\nexport const verticalCenterTextCss = cxs({\n\ttransform: 'translateY(0.08em)'\n});\n","export enum DonationFrequency {\n\tMonthly = 'monthly',\n\tOneTime = 'once',\n\tUnselected = ''\n}\n","export enum PaymentMethod {\n\tCREDIT_CARD = 'card',\n\tBANK = 'bank',\n\tPAYPAL = 'paypal',\n\tVENMO = 'venmo',\n\tPAYMENT_REQUEST = 'pay',\n\tCRYPTO = 'crypto',\n\tSTOCKS = 'stocks',\n\tDAF = 'daf'\n}\n\nexport const OneTimeFrequencyMethods = [\n\tPaymentMethod.VENMO,\n\tPaymentMethod.DAF,\n\tPaymentMethod.CRYPTO,\n\tPaymentMethod.STOCKS\n];\nexport const AvailablePaymentMethods = Object.values(PaymentMethod);\n","export const BASE_URL = 'https://www.every.org/';\nexport const BASE_API_URL = 'https://partners.every.org/v0.2/nonprofit';\nexport const BASE_CLOUDINARY_URL =\n\t'https://res.cloudinary.com/everydotorg/image/upload/';\n\nexport const SUPPORT_EMAIL = 'support@every.org';\nexport const TEAM_EMAIL = 'team@every.org';\nexport const CRYPTO_EMAIL = 'crypto@every.org';\n\nexport const TERMS_ROUTE = 'terms';\nexport const HELP_ROUTE = 'support';\nexport const PRIVACY_ROUTE = 'privacy';\nexport const ABOUT_ROUTE = 'about-us';\nexport const FUNDRAISER_ROUTE = 'fundraiser';\n\nexport const TERMS_URL = BASE_URL + TERMS_ROUTE;\nexport const HELP_URL = BASE_URL + HELP_ROUTE;\nexport const PRIVACY_URL = BASE_URL + PRIVACY_ROUTE;\nexport const ABOUT_URL = BASE_URL + ABOUT_ROUTE;\n","import {\n\tbuttonCss,\n\tlogoCss,\n\tverticalCenterTextCss\n} from 'src/components/embed-button/styles';\nimport {EmbedButtonOptions} from 'src/components/embed-button/types';\nimport {constructBasicDonateUrl} from 'src/helpers/constructDonateUrl';\n\n/**\n * Used to identify if a link is a donate button\n */\nconst EmbedButton = ({\n\twithLogo = true,\n\ttextColor = '#fff',\n\tbgColor = '#00a380',\n\tborderRadius = '100px',\n\tfontSize = '16px',\n\tpadding = '12px 20px',\n\tclassName,\n\tonClick,\n\ttarget = '_blank',\n\turl: initialUrl,\n\t...donateOptions\n}: EmbedButtonOptions) => {\n\tconst url = initialUrl ? initialUrl : constructBasicDonateUrl(donateOptions);\n\treturn (\n\t\t {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t>\n\t\t\t{withLogo && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\tDonate\n\t\t\n\t);\n};\n\nexport default EmbedButton;\n","export const loadFonts = () => {\n\tconst fonts = document.createElement('style');\n\tfonts.innerHTML = `\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format(\"woff2\");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format(\"woff2\");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format(\"woff2\");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n `;\n\tdocument.head.append(fonts);\n};\n","import deepMerge, {Options as DeepMergeOptions} from 'deepmerge';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {AvailablePaymentMethods} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst defaults: Partial = {\n\tmethods: Object.values(AvailablePaymentMethods),\n\tshow: false,\n\taddAmounts: [10, 50, 100],\n\tdefaultFrequency: DonationFrequency.OneTime,\n\tminDonationAmount: 5,\n\tprimaryColor: '#018669'\n};\n\nconst DEEP_MERGE_OPTIONS: DeepMergeOptions = {\n\t// Don't merge arrays, just overwrite them\n\n\tarrayMerge: (_, sourceArray) => sourceArray\n};\n\nexport const mergeConfig = (options: Partial): WidgetConfig => {\n\tconst filteredInputMethods = options.methods?.filter((method) =>\n\t\tAvailablePaymentMethods.includes(method)\n\t);\n\n\tconst methods =\n\t\tfilteredInputMethods && filteredInputMethods.length > 0\n\t\t\t? filteredInputMethods\n\t\t\t: AvailablePaymentMethods;\n\n\treturn deepMerge.all(\n\t\t[defaults, options, {methods}],\n\t\tDEEP_MERGE_OPTIONS\n\t);\n};\n","import {createContext, FunctionalComponent} from 'preact';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {mergeConfig} from 'src/helpers/optionsTypes';\n\nexport const ConfigContext = createContext({} as WidgetConfig);\n\nexport const ConfigContextProvider: FunctionalComponent<{\n\toptions: Partial;\n}> = ({options, children}) => {\n\tconst mergedConfig = mergeConfig(options);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","export enum BREAKPOINTS {\n\tPhoneOnly = '@media only screen and (max-width: 37.44em)',\n\tTabletUp = '@media only screen and (min-width: 37.5em)',\n\tTabletLandscapeUp = '@media only screen and (min-width: 56.25em)',\n\tDesktopUp = '@media only screen and (min-width: 75em)',\n\tBigDesktopUp = '@media only screen and (min-width: 112.5em)'\n}\n","export enum COLORS {\n\tLightGray = '#EAEDED',\n\tGray = '#f3f6f6',\n\tDarkGray = '#868A8A',\n\tBlack = '#272727',\n\tText = '#2E3434',\n\tTextGray = '#868383',\n\tTextOpaque = 'rgba(46, 52, 52, 0.6)',\n\tError = '#D95C35',\n\tErrorShadow = 'rgba(217, 92, 53, 0.2)',\n\tTransparent = 'transparent',\n\tWhite = '#fff'\n}\n","import {useContext} from 'preact/hooks';\nimport {ConfigContext} from 'src/components/widget/context/ConfigContext';\n\nexport const useConfigContext = () => useContext(ConfigContext);\n","// TODO: add more accurate type\nexport interface Fundraiser {\n\tid: string;\n\tslug: string;\n\ttitle: string;\n\tcoverImageCloudinaryId: string | null;\n\tactive: boolean;\n\tchildrenFundraiserIds: string | null;\n\tcreatedAt: string | null;\n\tcreatorNonprofitId: string | null;\n\tcreatorUserId: string | null;\n\tdescription: string | null;\n\tendDate: string | null;\n\tentityName: string | null;\n\teventIds: string | null;\n\tgoalAmount: string | null;\n\tgoalCurrency: string | null;\n\tmetadata: string | null;\n\tnonprofitId: string;\n\tparentFundraiserId: string | null;\n\tpinnedAt: string | null;\n\tstartDate: string | null;\n}\n\nexport const FundraiserFetchError = Symbol('FundraiserFetchError');\nexport const FundraiserFetching = Symbol('FundraiserFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getFundraiser} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tFundraiser,\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\ninterface FundraiserContextData {\n\tfundraiser?:\n\t\t| Fundraiser\n\t\t| typeof FundraiserFetchError\n\t\t| typeof FundraiserFetching;\n}\n\nexport const FundraiserContext = createContext({\n\tfundraiser: FundraiserFetching\n});\n\nexport const FundraiserContextProvider: FunctionalComponent = ({children}) => {\n\tconst {fundraiserSlug, nonprofitSlug} = useConfigContext();\n\tconst [fundraiser, setFundraiser] =\n\t\tuseState(FundraiserFetching);\n\n\tconst fetchFundraiser = useCallback(async () => {\n\t\tif (!fundraiserSlug) {\n\t\t\tsetFundraiser(undefined);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await getFundraiser(nonprofitSlug, fundraiserSlug);\n\t\t\tsetFundraiser(response);\n\t\t} catch {\n\t\t\tsetFundraiser(FundraiserFetchError);\n\t\t}\n\t}, [nonprofitSlug, fundraiserSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchFundraiser();\n\t}, [fetchFundraiser]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","// TODO: add more accurate type\nexport interface Nonprofit {\n\tid: string;\n\tein: string;\n\tname: string;\n\tprimarySlug: string;\n\tprofileUrl: string;\n\tdirectDisbursement?: boolean;\n\thasAdmin?: boolean;\n\tdescription: string | null;\n\tcoverImageCloudinaryId: string | null;\n\tcoverImageUrl: string | null;\n\tdescriptionLong: string | null;\n\tisDisbursable: boolean;\n\tlocationAddress: string | null;\n\tlogoCloudinaryId: string | null;\n\tlogoUrl: string | null;\n\tnteeCode: string | null;\n}\n\nexport const NonprofitFetchError = Symbol('NonprofitFetchError');\nexport const NonprofitFetching = Symbol('NonprofitFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getNonprofit} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tNonprofit,\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\ninterface NonprofitContextData {\n\tnonprofit: Nonprofit | typeof NonprofitFetchError | typeof NonprofitFetching;\n}\n\nexport const NonprofitContext = createContext({\n\tnonprofit: NonprofitFetching\n});\n\nexport const NonprofitContextProvider: FunctionalComponent = ({children}) => {\n\tconst {nonprofitSlug} = useConfigContext();\n\tconst [nonprofit, setNonprofit] =\n\t\tuseState(NonprofitFetching);\n\n\tconst fetchNonprofit = useCallback(async () => {\n\t\ttry {\n\t\t\tconst response = await getNonprofit(nonprofitSlug);\n\t\t\tsetNonprofit(response);\n\t\t} catch {\n\t\t\tsetNonprofit(NonprofitFetchError);\n\t\t}\n\t}, [nonprofitSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchNonprofit();\n\t}, [fetchNonprofit]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {createContext, FunctionalComponent} from 'preact';\nimport {StateUpdater, useEffect, useState} from 'preact/hooks';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {\n\tcheckPaymentRequest,\n\tPaymentRequestAvailable\n} from 'src/helpers/checkPaymentRequest';\n\ninterface WidgetContextProps {\n\tfrequency: DonationFrequency;\n\tsetFrequency: StateUpdater;\n\n\tdonationAmount?: number;\n\tsetDonationAmount: StateUpdater;\n\n\tsubmitError: string | null;\n\tsetSubmitError: StateUpdater;\n\n\tselectedPaymentMethod: PaymentMethod;\n\tsetSelectedPaymentMethod: StateUpdater;\n\n\tstockAmount?: number;\n\tsetStockAmount: StateUpdater;\n\n\tstockSymbol?: string;\n\tsetStockSymbol: StateUpdater;\n\n\tcryptoAmount?: number;\n\tsetCryptoAmount: StateUpdater;\n\n\tcryptoCurrency?: CryptoCurrency;\n\tsetCryptoCurrency: StateUpdater;\n\n\tpaymentRequestAvailable: PaymentRequestAvailable;\n\thideWidget: () => void;\n}\n\nexport const WidgetContext = createContext(\n\t{} as WidgetContextProps\n);\n\nexport const WidgetContextProvider: FunctionalComponent<{hide: () => void}> = ({\n\tchildren,\n\thide\n}) => {\n\tconst config = useConfigContext();\n\n\tconst [frequency, setFrequency] = useState(config.defaultFrequency);\n\tconst [donationAmount, setDonationAmount] = useState(\n\t\tconfig.defaultDonationAmount\n\t);\n\tconst [submitError, setSubmitError] = useState(null);\n\tconst [selectedPaymentMethod, setSelectedPaymentMethod] = useState(\n\t\tconfig.methods[0]\n\t);\n\n\tconst [stockAmount, setStockAmount] = useState();\n\tconst [stockSymbol, setStockSymbol] = useState();\n\n\tconst [cryptoAmount, setCryptoAmount] = useState();\n\tconst [cryptoCurrency, setCryptoCurrency] = useState();\n\n\tconst [paymentRequestAvailable, setPaymentRequestAvailable] =\n\t\tuseState({\n\t\t\tgooglePay: false,\n\t\t\tapplePay: false\n\t\t});\n\n\tuseEffect(() => {\n\t\tconst check = async () => {\n\t\t\tconst response = await checkPaymentRequest();\n\t\t\tsetPaymentRequestAvailable(response);\n\t\t};\n\n\t\tvoid check();\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {FunctionComponent} from 'preact';\nimport {ConfigContextProvider} from 'src/components/widget/context/ConfigContext';\nimport {FundraiserContextProvider} from 'src/components/widget/context/FundraiserContext';\nimport {NonprofitContextProvider} from 'src/components/widget/context/NonprofitContext';\nimport {WidgetContextProvider} from 'src/components/widget/context/WidgetContext';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nexport const ContextProvider: FunctionComponent<{\n\toptions: Partial;\n\thide: () => void;\n}> = ({options, hide, children}) => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t{children}\n\t\t\t\n\t\t\n\t\n);\n","import cxs from 'cxs';\n\nexport const smallText: cxs.CSSObject = {\n\tfontSize: '12px',\n\tlineHeight: '16px',\n\tletterSpacing: '0.01em'\n};\n\nexport const bodyText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const inputText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '16px'\n};\n\nexport const headingText: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading2Text: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading3Text: cxs.CSSObject = {\n\tfontSize: '20px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const buttonText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const textSize = {\n\txxl: {\n\t\tfontSize: '48px',\n\t\tlineHeight: '56px'\n\t},\n\txl: {\n\t\tfontSize: '32px',\n\t\tlineHeight: '36px'\n\t},\n\tl: {\n\t\tfontSize: '24px',\n\t\tlineHeight: '32px'\n\t},\n\tm: {\n\t\tfontSize: '20px',\n\t\tlineHeight: '24px'\n\t},\n\ts: {\n\t\tfontSize: '16px',\n\t\tlineHeight: '24px'\n\t},\n\txs: {\n\t\tfontSize: '14px',\n\t\tlineHeight: '20px'\n\t},\n\txxs: {\n\t\tfontSize: '12px',\n\t\tlineHeight: '16px'\n\t}\n};\n","import cxs from 'cxs';\n\nexport enum Spacing {\n\tEmpty = '0',\n\n\tXXS = '4px',\n\tXS = '8px',\n\tS = '12px',\n\tM = '16px',\n\tL = '20px',\n\tXL = '24px',\n\tXXL = '32px',\n\n\tStack_XXS = '0 0 4px 0',\n\tStack_XS = '0 0 8px 0',\n\tStack_S = '0 0 12px 0',\n\tStack_M = '0 0 16px 0',\n\tStack_L = '0 0 20px 0',\n\tStack_XL = '0 0 24px 0',\n\tStack_XXL = '0 0 32px 0',\n\n\tInset_XXS = '4px 4px 4px 4px',\n\tInset_XS = '8px 8px 8px 8px',\n\tInset_S = '12px 12px 12px 12px',\n\tInset_M = '16px 16px 16px 16px',\n\tInset_L = '20px 20px 20px 20px',\n\tInset_XL = '24px 24px 24px 24px',\n\tInset_XXL = '32px 32px 32px 32px',\n\n\tInsetSquish_XS = '8px 16px',\n\tInsetSquish_S = '12px 24px',\n\tInsetSquish_M = '16px 32px',\n\tInsetSquish_L = '20px 40px',\n\tInsetSquish_XL = '24px 48px',\n\n\tInline_XS = '0 8px 0 0',\n\tInline_S = '0 12px 0 0',\n\tInline_M = '0 16px 0 0',\n\tInline_L = '0 20px 0 0',\n\tInline_XL = '0 24px 0 0',\n\tInline_XXL = '0 24px 0 0'\n}\n\nconst verticalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t'> *:not(:last-child)': {\n\t\tmarginBottom: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\nconst horizontalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'row',\n\t'> *:not(:last-child)': {\n\t\tmarginRight: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\n\nexport const verticalStackCss = {\n\tclassName: (spacing: number | string) => cxs(verticalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => verticalStackCssObject(spacing)\n};\n\nexport const horizontalStackCss = {\n\tclassName: (spacing: number | string) =>\n\t\tcxs(horizontalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => horizontalStackCssObject(spacing)\n};\n","export enum Radii {\n\tSmall = '4px',\n\tDefault = '8px',\n\tMedium = '24px',\n\tBig = '100px',\n\tCircle = '100%'\n}\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const faqListCss = cxs({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tgap: Spacing.M\n});\n\nexport const rotateCss: cxs.CSSObject = {\n\tposition: 'relative',\n\ttop: '-1px',\n\ttransform: 'rotate(180deg)'\n};\n\nexport const descriptionBaseCss: cxs.CSSObject = {\n\t'> p': {\n\t\tmarginBottom: Spacing.XS\n\t}\n};\nexport const descriptionOpen = cxs({\n\t...descriptionBaseCss,\n\tmaxHeight: '1000px',\n\ttransition: 'all 1s',\n\topacity: '1'\n});\n\nexport const descriptionClose = cxs({\n\t...descriptionBaseCss,\n\topacity: '0',\n\toverflow: 'hidden',\n\tmaxHeight: '0',\n\ttransition: 'all 0.5s'\n});\n\nexport const faqItemConateinerCss = (mobileOnly?: boolean) =>\n\tcxs({\n\t\t...textSize.xs,\n\t\t...(mobileOnly\n\t\t\t? {\n\t\t\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\t\t\tpadding: 'none'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const faqItemButtonCss = (isOpen: boolean) =>\n\tcxs({\n\t\t...horizontalStackCss.cxs(Spacing.S),\n\t\t...textSize.xs,\n\t\talignItems: 'center',\n\t\tjustifyContent: 'space-between',\n\t\twidth: '100%',\n\t\tborder: 'none',\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: 0,\n\t\t':hover': {cursor: 'pointer'},\n\t\t'> svg': {\n\t\t\twidth: '16px',\n\t\t\theight: '16px',\n\t\t\t...(isOpen ? rotateCss : {})\n\t\t},\n\t\t...(isOpen\n\t\t\t? {\n\t\t\t\t\tfontWeight: 700\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tfontWeight: 500,\n\t\t\t\t\tcolor: COLORS.TextGray\n\t\t\t })\n\t});\n\nexport const faqLinkCss = cxs({\n\tcolor: COLORS.Text,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\n\nexport function isOfficialFundraiser(fundraiser: Fundraiser): boolean {\n\treturn fundraiser.nonprofitId === fundraiser.creatorNonprofitId;\n}\n\nexport const getTaxDeductibleStatement = (\n\tnonprofit: Nonprofit,\n\tfundraiser?: Fundraiser\n) => {\n\tconst base = `100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${nonprofit.name} on your behalf. \n As a legal matter, Every.org must provide any donations to ${nonprofit.name} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`;\n\n\tconst isUnofficialFundraiser =\n\t\tfundraiser && !isOfficialFundraiser(fundraiser);\n\n\tlet end = '';\n\n\tif (nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t} else if (!nonprofit.hasAdmin && !isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation.`;\n\t} else if (!nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t}\n\n\treturn (\n\t\t\n\t\t\t{base} {end}\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tbackgroundColor: 'white',\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tborderRadius: 'unset',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tborderRadius: '16px',\n\t\tpadding: Spacing.M\n\t}\n});\n","const joinClassNames = (classNames: Array) => {\n\treturn classNames.filter((className) => Boolean(className)).join(' ');\n};\n\nexport default joinClassNames;\n","import {FunctionalComponent} from 'preact';\nimport {cardCss} from 'src/components/widget/components/GridCard/styles';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CardProps {\n\tclassName?: string;\n}\n\nexport const GridCard: FunctionalComponent = ({\n\tchildren,\n\tclassName\n}) => {\n\treturn
    {children}
    ;\n};\n","import {useContext} from 'preact/hooks';\nimport {FundraiserContext} from 'src/components/widget/context/FundraiserContext';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\n\nexport const useFundraiser = () => useContext(FundraiserContext).fundraiser;\n\nexport const useFundraiserOrUndefined = () => {\n\tconst fundraiser = useFundraiser();\n\n\tif (\n\t\tfundraiser === FundraiserFetchError ||\n\t\tfundraiser === FundraiserFetching\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn fundraiser;\n};\n","import {useContext} from 'preact/hooks';\nimport {NonprofitContext} from 'src/components/widget/context/NonprofitContext';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nexport const useNonprofit = () => useContext(NonprofitContext).nonprofit;\n\nexport const useNonprofitOrError = () => {\n\tconst nonprofit = useNonprofit();\n\n\tif (nonprofit === NonprofitFetchError || nonprofit === NonprofitFetching) {\n\t\t// TODO: add more readable error\n\t\tthrow new Error('Nonprofit error');\n\t}\n\n\treturn nonprofit;\n};\n","import {useContext} from 'preact/hooks';\nimport {WidgetContext} from 'src/components/widget/context/WidgetContext';\n\nexport const useWidgetContext = () => useContext(WidgetContext);\n","export const ArrowIcon = () => (\n\t\n\t\t\n\t\n);\n","import {FunctionalComponent, VNode} from 'preact';\nimport {useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {\n\tgetDisbursementDescription,\n\tgetFeeDescription\n} from 'src/components/widget/components/Faq/helpers';\nimport {\n\tfaqItemConateinerCss,\n\tfaqItemButtonCss,\n\tdescriptionOpen,\n\tdescriptionClose,\n\tfaqLinkCss,\n\tfaqListCss\n} from 'src/components/widget/components/Faq/styles';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\ninterface FaqItemTypes {\n\tid: string;\n\ttitle: string;\n\tdescription: VNode;\n\tmobileOnly?: boolean;\n}\n\nconst FaqItem: FunctionalComponent<{faqData: FaqItemTypes}> = ({faqData}) => {\n\tconst [isOpen, setOpen] = useState(false);\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetOpen(!isOpen);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{faqData.title}\n\t\t\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t{faqData.description}\n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport const Faq = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tconst faqDataList: FaqItemTypes[] = [\n\t\t{\n\t\t\tid: 'intro',\n\t\t\ttitle: 'How does Every.org accept my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYour donation first goes to Every.org, a US 501(c)(3) public\n\t\t\t\t\t\tcharity, and we immediately issue a receipt for your charitable\n\t\t\t\t\t\tcontribution. {getDisbursementDescription(nonprofit)}\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tThis process ensures your eligibility for a tax-deduction,\n\t\t\t\t\t\tconsolidates records of your giving, and reduces the administrative\n\t\t\t\t\t\tburden on the nonprofits.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'fees',\n\t\t\ttitle: 'Are there any fees?',\n\t\t\tdescription: getFeeDescription(selectedPaymentMethod, nonprofit)\n\t\t},\n\t\t{\n\t\t\tid: 'tax',\n\t\t\ttitle: 'Is this donation tax-deductible?',\n\t\t\tdescription: (\n\t\t\t\t

    Yes, {getTaxDeductibleStatement(nonprofit, fundraiser)}

    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'receipt',\n\t\t\ttitle: 'Will I receive a receipt for my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYes, after your donation payment is confirmed, you will immediately\n\t\t\t\t\t\tget a receipt emailed to you.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tAdditionally, if you have an Every.org account, you can always get a\n\t\t\t\t\t\tsingle itemized receipt that shows all your donations in a given\n\t\t\t\t\t\tyear.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'p2p',\n\t\t\tmobileOnly: true,\n\t\t\ttitle: `How else can I support ${nonprofit.name}`,\n\t\t\tdescription: (\n\t\t\t\t

    \n\t\t\t\t\tYou can also rally your friends, family, and social networks to\n\t\t\t\t\tsupport this nonprofit by starting your own fundraiser for them.{' '}\n\t\t\t\t\t\n\t\t\t\t\t\tStart a fundraiser for {nonprofit.name}\n\t\t\t\t\t\n\t\t\t\t

    \n\t\t\t)\n\t\t}\n\t];\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t{faqDataList.map((item) => (\n\t\t\t\t\t\n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const footerCardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tbackgroundColor: 'unset',\n\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t...textSize.xs,\n\tcolor: COLORS.TextGray,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: `0px ${Spacing.L}`\n\t},\n\t'> p': {\n\t\tmargin: 0\n\t},\n\t'> p:not(:last-child)': {\n\t\tmarginBottom: Spacing.XS\n\t}\n});\n\nexport const footerLinkCss = cxs({\n\tcolor: COLORS.TextGray,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {\n\tfooterCardCss,\n\tfooterLinkCss\n} from 'src/components/widget/components/Footer/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {\n\tTERMS_URL,\n\tHELP_URL,\n\tPRIVACY_URL,\n\tSUPPORT_EMAIL\n} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nconst FEEDBACK_URL = mailToLink({address: SUPPORT_EMAIL});\ninterface FooterLinkProps\n\textends JSXInternal.HTMLAttributes {}\nconst FooterLink: FunctionComponent = ({\n\tchildren,\n\t...rest\n}) => (\n\t\n\t\t{children}\n\t\n);\n\nexport const Footer = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t{getTaxDeductibleStatement(nonprofit, fundraiser)}{' '}\n\t\t\t\tSee Terms\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tNeed help? See FAQs or contact us at our{' '}\n\t\t\t\tHelp Center.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tHave ideas for how we can build a better donation experience?{' '}\n\t\t\t\tSend us feedback.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tWe respect your privacy. To learn more, check out our{' '}\n\t\t\t\tPrivacy Policy.\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\n\nexport const linkCss = (primaryColor: string) =>\n\tcxs({\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\ttextDecoration: 'none',\n\t\t':hover': {\n\t\t\ttextDecoration: 'underline'\n\t\t}\n\t});\n\nexport const cardCss = cxs({\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {\n\tcardCss,\n\tlinkCss\n} from 'src/components/widget/components/FundraiserLink/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\nexport const FundraiserLink = () => {\n\tconst {primaryColor, nonprofitSlug} = useConfigContext();\n\n\tconst href = BASE_URL + nonprofitSlug + '/' + FUNDRAISER_ROUTE;\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t\n\t\t\t\t\tStart a fundraiser\n\t\t\t\t{' '}\n\t\t\t\tto rally your friends and family\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {FunctionalComponent} from 'preact';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst gridCss = cxs({\n\tdisplay: 'grid',\n\tgridGap: 0,\n\tgridTemplateColumns: '1fr',\n\tgridTemplateAreas: `\"header\"\n \"promoBanners\"\n \"nonprofitInfo\"\n \"paymentProcess\"\n \"fundraiserLink\"\n \"faq\"\n \"footer\"`,\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumnGap: Spacing.XL,\n\t\tgridTemplateColumns: '1fr 2fr',\n\t\tgridTemplateRows: 'auto auto auto auto auto 1fr',\n\t\tgridTemplateAreas: `\"header header\"\n \"promoBanners promoBanners\"\n \"nonprofitInfo paymentProcess\"\n \"fundraiserLink paymentProcess\"\n \"faq paymentProcess\"\n \"faq footer\"`,\n\t\t'& > div:not(:last-child):not(:empty)': {\n\t\t\tmarginBottom: Spacing.XL\n\t\t}\n\t},\n\n\t'& > #every-header': {\n\t\tgridArea: 'header',\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t},\n\t'& > #every-promoBanners': {gridArea: 'promoBanners'},\n\t'& > #every-nonprofitInfo': {gridArea: 'nonprofitInfo'},\n\t'& > #every-paymentProcess': {gridArea: 'paymentProcess'},\n\t'& > #every-faq': {gridArea: 'faq'},\n\t'& > #every-fundraiserLink': {gridArea: 'fundraiserLink'},\n\t'& > #every-footer': {gridArea: 'footer'}\n});\n\nexport const Grid: FunctionalComponent = ({children}) => {\n\treturn
    {children}
    ;\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const buttonCss = cxs({\n\tcursor: 'pointer',\n\tdisplay: 'inline-flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\tpadding: 0,\n\tborder: 'none',\n\tbackgroundColor: 'transparent',\n\tfontFamily: FontFamily.BasisGrotesque\n});\n\nexport const smallScreenCloseButtonCss = cxs({\n\tdisplay: 'block',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none'\n\t}\n});\n\nexport const largeScreenCloseButtonCss = cxs({\n\tposition: 'absolute',\n\tright: Spacing.XL,\n\ttop: Spacing.XL,\n\n\tpadding: Spacing.XXS,\n\tbackground: 'white',\n\tborderRadius: '8px',\n\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CloseIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {buttonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {CloseIcon} from 'src/components/widget/icons/CloseIcon';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const CloseButton = ({className}: {className?: string}) => {\n\tconst {hideWidget} = useWidgetContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const containerCss = cxs({\n\tdisplay: 'flex',\n\tjustifyContent: 'flex-end',\n\talignItems: 'center',\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: 0\n\t}\n});\n","import {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {smallScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {containerCss} from 'src/components/widget/components/Header/styles';\n\nexport const Header = () => {\n\treturn (\n\t\t
    \n\t\t\t\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\thorizontalStackCss,\n\tSpacing,\n\tverticalStackCss\n} from 'src/components/widget/theme/spacing';\n\nexport const nonprofitNameCss = cxs({\n\tlineHeight: '20px',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const logoImageCss = (logoUrl: string) =>\n\tcxs({\n\t\tborderRadius: Radii.Circle,\n\t\toverflow: 'hidden',\n\t\tdisplay: 'block',\n\t\tbackgroundImage: `url(${logoUrl})`,\n\t\tbackgroundSize: 'contain',\n\t\twidth: '40px',\n\t\theight: '40px',\n\t\tflexShrink: 0,\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\twidth: '64px',\n\t\t\theight: '64px'\n\t\t}\n\t});\n\nexport const cardCss = cxs({\n\tpadding: `${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(Spacing.S),\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const avatarAndNameWrapperCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.S),\n\talignItems: 'center'\n});\n\nexport const descriptionCss = cxs({\n\t...textSize.xs,\n\tcolor: 'rgba(0, 0, 0, 0.7)',\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","export enum Borders {\n\tNormal = '1px solid',\n\tBig = '4px solid'\n}\n\nexport const getColoredBorder = (border: Borders, color: string) =>\n\t`${border} ${color}`;\n","import {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tlogoImageCss,\n\tnonprofitNameCss,\n\tdescriptionCss,\n\tavatarAndNameWrapperCss,\n\tcardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nexport const NonprofitCard = () => {\n\tconst {name, logoCloudinaryId, hasAdmin} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{hasAdmin ? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{name} is using Every.org to accept this donation\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEvery.org created this page for {name}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\t

    \n\t\t\t\tEvery.org is a 501(c)(3) nonprofit building free, accessible giving\n\t\t\t\ttools for every person and every organization.\n\t\t\t

    \n\t\t\n\t);\n};\n","export const COVER_IMAGE_PLACEHOLDER_ID = 'profile_picture_placeholder_o56tme';\nexport const LOGO_IMAGE_PLACEHOLDER_ID = 'NonprofitAvatarPlaceholder';\n","import {NonprofitCard} from 'src/components/widget/components/NonprofitInfo/NonprofitCard';\n\nexport const NonprofitInfo = () => {\n\treturn ;\n};\n","export enum CryptoCurrency {\n\tALGO = 'ALGO',\n\tAPE = 'APE',\n\tAVAX = 'AVAX',\n\tBAT = 'BAT',\n\tBTC = 'BTC',\n\tDAI = 'DAI',\n\tDOGE = 'DOGE',\n\tDOT = 'DOT',\n\tETH = 'ETH',\n\tFIL = 'FIL',\n\tGRT = 'GRT',\n\tLINK = 'LINK',\n\tLTC = 'LTC',\n\tMATIC = 'MATIC',\n\tMOB = 'MOB',\n\tRAY = 'RAY',\n\tSAMO = 'SAMO',\n\tSBR = 'SBR',\n\tSHIB = 'SHIB',\n\tSOL = 'SOL',\n\tUNI = 'UNI',\n\tUSDC = 'USDC',\n\tUSDT = 'USDT',\n\tXTZ = 'XTZ',\n\tZEC = 'ZEC'\n}\n\nexport enum ContractType {\n\tERC20 = 'ERC-20',\n\tSPL = 'SPL'\n}\n\nexport interface SharedCryptoCurrencyConfig {\n\tdisplayName: string;\n\tabbreviation: string;\n\tdecimalOffset: number;\n\tcontractType?: ContractType;\n}\n\nexport const DISABLED_TOKENS = [CryptoCurrency.ALGO, CryptoCurrency.MOB];\n\n/**\n * Base configuration for crypto. Backend and frontend-specific configuration\n * are configured in //packages/api/src/helpers/cryptoCurrency.ts and\n * //packages/website-next/src/utility/cryptoCurrency.ts respectively.\n */\nexport const SharedCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.ALGO]: {\n\t\tdisplayName: 'Algorand',\n\t\tabbreviation: 'ALGO',\n\t\tdecimalOffset: 6\n\t},\n\t[CryptoCurrency.APE]: {\n\t\tdisplayName: 'Apecoin',\n\t\tabbreviation: 'APE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.AVAX]: {\n\t\tdisplayName: 'Avalanche',\n\t\tabbreviation: 'AVAX',\n\t\tdecimalOffset: 9\n\t},\n\t[CryptoCurrency.BAT]: {\n\t\tdisplayName: 'Basic Attention Token',\n\t\tabbreviation: 'BAT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.BTC]: {\n\t\tdisplayName: 'Bitcoin',\n\t\tabbreviation: 'BTC',\n\t\tdecimalOffset: 8\n\t},\n\t[CryptoCurrency.DOGE]: {\n\t\tdisplayName: 'DogeCoin',\n\t\tabbreviation: 'DOGE',\n\t\tdecimalOffset: 8\n\t},\n\t[CryptoCurrency.DAI]: {\n\t\tdisplayName: 'Dai',\n\t\tabbreviation: 'DAI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.DOT]: {\n\t\tdisplayName: 'Polkadot',\n\t\tabbreviation: 'DOT',\n\t\tdecimalOffset: 10\n\t},\n\t[CryptoCurrency.ETH]: {\n\t\tdisplayName: 'Ethereum',\n\t\tabbreviation: 'ETH',\n\t\tdecimalOffset: 18\n\t},\n\t[CryptoCurrency.FIL]: {\n\t\tdisplayName: 'Filecoin',\n\t\tabbreviation: 'FIL',\n\t\tdecimalOffset: 18\n\t},\n\t[CryptoCurrency.GRT]: {\n\t\tdisplayName: 'The Graph',\n\t\tabbreviation: 'GRT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.LINK]: {\n\t\tdisplayName: 'Chainlink',\n\t\tabbreviation: 'LINK',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.LTC]: {\n\t\tdisplayName: 'Litecoin',\n\t\tabbreviation: 'LTC',\n\t\tdecimalOffset: 8\n\t},\n\t[CryptoCurrency.MATIC]: {\n\t\tdisplayName: 'Polygon',\n\t\tabbreviation: 'MATIC',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.MOB]: {\n\t\tdisplayName: 'MobileCoin',\n\t\tabbreviation: 'MOB',\n\t\tdecimalOffset: 12\n\t},\n\t[CryptoCurrency.RAY]: {\n\t\tdisplayName: 'Raydium',\n\t\tabbreviation: 'RAY',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL\n\t},\n\t[CryptoCurrency.SAMO]: {\n\t\tdisplayName: 'Samoyed',\n\t\tabbreviation: 'SAMO',\n\t\tdecimalOffset: 9,\n\t\tcontractType: ContractType.SPL\n\t},\n\t[CryptoCurrency.SBR]: {\n\t\tdisplayName: 'Saber',\n\t\tabbreviation: 'SBR',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL\n\t},\n\t[CryptoCurrency.SHIB]: {\n\t\tdisplayName: 'Shiba Inu',\n\t\tabbreviation: 'SHIB',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.SOL]: {\n\t\tdisplayName: 'Solana',\n\t\tabbreviation: 'SOL',\n\t\tdecimalOffset: 9\n\t},\n\t[CryptoCurrency.UNI]: {\n\t\tdisplayName: 'Uniswap',\n\t\tabbreviation: 'UNI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.USDC]: {\n\t\tdisplayName: 'USD Coin',\n\t\tabbreviation: 'USDC',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.ERC20\n\t},\n\t[CryptoCurrency.USDT]: {\n\t\tdisplayName: 'Tether',\n\t\tabbreviation: 'USDT',\n\t\tdecimalOffset: 6\n\t},\n\t[CryptoCurrency.XTZ]: {\n\t\tdisplayName: 'Tezos',\n\t\tabbreviation: 'XTZ',\n\t\tdecimalOffset: 6\n\t},\n\t[CryptoCurrency.ZEC]: {\n\t\tdisplayName: 'ZCash',\n\t\tabbreviation: 'ZEC',\n\t\tdecimalOffset: 8\n\t}\n};\n\nexport interface CryptoCurrencyOption {\n\tvalue: CryptoCurrency;\n\tlabel: string;\n\tcontractType: string;\n}\n","import cxs from 'cxs';\nimport {rotateCss} from 'src/components/widget/components/Faq/styles';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const cryptoSelectorContainerCss = cxs({\n\tposition: 'relative',\n\n\t'& input': {\n\t\tfontSize: textSize.s.fontSize,\n\t\tlineHeight: textSize.s.fontSize,\n\t\tfontWeight: 400\n\t}\n});\n\nexport const cryptoSelectorDropDownContainerCss = cxs({\n\tposition: 'absolute',\n\ttop: '100%',\n\tleft: '0',\n\tright: '0',\n\toverflow: 'hidden',\n\tzIndex: 2,\n\tbackground: COLORS.White,\n\tborderRadius: `0 0 ${Radii.Default} ${Radii.Default}`,\n\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\tborderTop: 'none'\n});\n\nexport const cryptoSelectorInputContainerCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XXS\n});\nexport const cryptoSelectorDropDownContentCss = cxs({\n\toverflowY: 'scroll',\n\theight: '100%',\n\tmaxHeight: '200px'\n});\n\nexport const quickSelectOptionsListCss = cxs({\n\tborderBottom: getColoredBorder(Borders.Normal, COLORS.LightGray)\n});\n\nexport const cryptoSelectorDropDownItemCss = cxs({\n\tborder: 'none',\n\tbackground: 'none',\n\n\tpadding: `${Spacing.S} ${Spacing.M}`,\n\t...textSize.s,\n\twidth: '100%',\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS,\n\t':hover': {\n\t\tcursor: 'pointer'\n\t},\n\n\t'> span:last-of-type': {\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray\n\t}\n});\n\nexport const cryptoSelectorInputSufixCss = (\n\tprimaryColor: string,\n\tshowDropDown: boolean\n) =>\n\tcxs({\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray,\n\t\tdisplay: 'flex',\n\t\tgap: Spacing.XS,\n\t\talignItems: 'center',\n\t\t'> svg': {\n\t\t\tcolor: primaryColor,\n\t\t\t...(showDropDown ? rotateCss : {})\n\t\t}\n\t});\n\nexport const inputContainerWithDropDownCss = cxs({\n\tborderRadius: `${Radii.Default} ${Radii.Default} 0 0 `\n});\n\nexport const cryptoAmountInputContainerCss = cxs({\n\tgap: Spacing.XS,\n\t'> input': {\n\t\ttextAlign: 'right'\n\t}\n});\n\nexport const cryptoAmountInputCss = cxs({});\n","import cxs from 'cxs';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const inputContainerErrorCss = cxs({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const inputContainerCss = (color: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tpadding: Spacing.M,\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'row',\n\t\talignItems: 'center',\n\t\tborderRadius: Radii.Default,\n\t\tcolor: COLORS.Text,\n\t\tbackgroundColor: COLORS.Gray,\n\t\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\t\tcursor: 'text',\n\t\t':focus-within': {\n\t\t\tbackgroundColor: 'white',\n\t\t\tborderColor: color\n\t\t}\n\t});\n\nexport const inputCss = cxs({\n\tfontSize: textSize.l.fontSize,\n\tlineHeight: textSize.l.fontSize,\n\tfontFamily: 'inherit',\n\tfontWeight: 700,\n\tflex: 1,\n\tborder: 'none',\n\toutline: 'none',\n\tbackground: 'transparent',\n\twidth: '100%',\n\tminWidth: 'unset',\n\tpadding: 0,\n\tmargin: 0,\n\t'::placeholder': {\n\t\tfontWeight: 400\n\t},\n\t'::-webkit-outer-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'::-webkit-inner-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'-moz-appearance': 'textfield'\n});\n\nexport const inputPrefixCss = cxs({\n\t...textSize.l,\n\tfontWeight: 700,\n\tdisplay: 'inline-flex',\n\tmarginRight: Spacing.XXS\n});\n\nexport const inputSufixCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.m,\n\t\tfontWeight: 700,\n\t\tcolor: primaryColor,\n\t\tdisplay: 'inline-flex',\n\t\tmarginLeft: Spacing.XXS\n\t});\n\nexport const addAmountContainerCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.M),\n\tjustifyContent: 'center'\n});\n\nexport const addAmountButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.s,\n\t\tcolor: primaryColor,\n\t\tborderRadius: Radii.Big,\n\t\tfontWeight: 500,\n\t\tborder: `none`,\n\t\tpadding: 0,\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'unset',\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\t\tpadding: `${Spacing.XS} ${Spacing.L}`\n\t\t}\n\t});\n","export enum DafFlowView {\n\tSTART,\n\tMANUAL,\n\tAMOUNT\n}\n\nexport interface DafFlowViewProps {\n\tchangeView: (view: DafFlowView) => void;\n}\n","import {useMemo} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {cryptoAmountInputContainerCss} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {\n\tinputContainerCss,\n\tinputContainerErrorCss,\n\tinputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {getStepForCurrencyAmountInput} from 'src/helpers/getStepForCurrencyAmountInput';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const CryptoAmountInput = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\tconst {\n\t\tcryptoAmount,\n\t\tsetCryptoAmount,\n\t\tcryptoCurrency,\n\t\tsubmitError,\n\t\tsetSubmitError\n\t} = useWidgetContext();\n\n\tconst inputContainerClasses = joinClassNames([\n\t\tinputContainerCss(primaryColor),\n\t\tcryptoAmountInputContainerCss,\n\t\t...(submitError ? [inputContainerErrorCss] : [])\n\t]);\n\n\tconst onAmountInput = (\n\t\tevent: JSXInternal.TargetedEvent\n\t) => {\n\t\tconst stringValue = event.currentTarget.value;\n\t\tif (stringValue === '') {\n\t\t\tevent.currentTarget.value = stringValue;\n\t\t\tsetCryptoAmount(undefined);\n\t\t}\n\n\t\tconst floatValue = Number.parseFloat(stringValue);\n\n\t\tif (Number.isNaN(floatValue) || !/[+-]?(\\d*\\.)?\\d+/g.test(stringValue)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetCryptoAmount(floatValue);\n\t\tsetSubmitError(null);\n\t};\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t{cryptoCurrency}\n\t\t
    \n\t);\n};\n","export default __webpack_public_path__ + \"5982461fe2304c26f3a3cf4c50806dad.svg\";","export default __webpack_public_path__ + \"b31a89ce5555412a0c8a4c6463286584.svg\";","export default __webpack_public_path__ + \"26c9b1d3d7943e6e67cf13e039ba5ac8.svg\";","export default __webpack_public_path__ + \"9052c75387065f76bb3436b7e4ce12cd.svg\";","export default __webpack_public_path__ + \"3a5177b76709819ba4663556e60222f8.svg\";","export default __webpack_public_path__ + \"f8f4253f02d1fbc4bf04d0959a6e614c.svg\";","export default __webpack_public_path__ + \"4d81ee51fa2520df58ae092aeb3d0bd4.svg\";","export default __webpack_public_path__ + \"8098252f28e93069c75d6010d3ac6bc1.svg\";","export default __webpack_public_path__ + \"03c114f6e014588a4bde815d9bc85821.svg\";","export default __webpack_public_path__ + \"5450d3cada4fd0370ab8d885765f5cc3.svg\";","export default __webpack_public_path__ + \"cc9ce389e9a4e0f518e3caeb7b60912d.svg\";","export default __webpack_public_path__ + \"8f22b294629293d29895fddef0a8baea.svg\";","export default __webpack_public_path__ + \"f588feb3cbbcc0fb259a3630ec7e34ba.svg\";","export default __webpack_public_path__ + \"3e1eb932bdbaa2318584813bf468be53.svg\";","export default __webpack_public_path__ + \"badb98080214485db486794fb59a95cc.svg\";","export default __webpack_public_path__ + \"fc9295a4651c56d5b4e8c3aa13a93208.svg\";","export default __webpack_public_path__ + \"e4bfa8eb04696d4fd5ea04ca4c35469b.svg\";","export default __webpack_public_path__ + \"743324f8e09d34a894c21e91c396f289.svg\";","export default __webpack_public_path__ + \"b9021bb757262a32de6d8931015051d9.svg\";","export default __webpack_public_path__ + \"7ab9396038b4befda4354b2a476d9064.svg\";","export default __webpack_public_path__ + \"bc2c9e9d67b73656a6da5dd177aa10a2.svg\";","export default __webpack_public_path__ + \"6214ae0b42d798a0c9a51503a27a66bf.svg\";","export default __webpack_public_path__ + \"45bcde5a98dbbdf2a4e0769eca2154f1.svg\";","export default __webpack_public_path__ + \"88611c6e2f9450f29ece8d2b36641670.svg\";","import algorand from 'src/components/widget/icons/CryptoCurrencyIcon/algorand.svg';\nimport apecoin from 'src/components/widget/icons/CryptoCurrencyIcon/apecoin.svg';\nimport avalanche from 'src/components/widget/icons/CryptoCurrencyIcon/avalanche.svg';\nimport basic_attention_token from 'src/components/widget/icons/CryptoCurrencyIcon/basic-attention-token.svg';\nimport bitcoin from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin.svg';\nimport chainlink from 'src/components/widget/icons/CryptoCurrencyIcon/chainlink.svg';\nimport dai from 'src/components/widget/icons/CryptoCurrencyIcon/dai.svg';\nimport dogecoin from 'src/components/widget/icons/CryptoCurrencyIcon/dogecoin.svg';\nimport ethereum from 'src/components/widget/icons/CryptoCurrencyIcon/ethereum.svg';\nimport filecoin from 'src/components/widget/icons/CryptoCurrencyIcon/filecoin.svg';\nimport graph from 'src/components/widget/icons/CryptoCurrencyIcon/graph.svg';\nimport litecoin from 'src/components/widget/icons/CryptoCurrencyIcon/litecoin.svg';\nimport mobilecoin from 'src/components/widget/icons/CryptoCurrencyIcon/mobilecoin.svg';\nimport polkadot from 'src/components/widget/icons/CryptoCurrencyIcon/polkadot.svg';\nimport polygon from 'src/components/widget/icons/CryptoCurrencyIcon/polygon.svg';\nimport raydium from 'src/components/widget/icons/CryptoCurrencyIcon/raydium.svg';\nimport saber from 'src/components/widget/icons/CryptoCurrencyIcon/saber.svg';\nimport samoyed from 'src/components/widget/icons/CryptoCurrencyIcon/samoyed.svg';\nimport shiba_inu from 'src/components/widget/icons/CryptoCurrencyIcon/shiba-inu.svg';\nimport solana from 'src/components/widget/icons/CryptoCurrencyIcon/solana.svg';\nimport stellar from 'src/components/widget/icons/CryptoCurrencyIcon/stellar.svg';\nimport tether from 'src/components/widget/icons/CryptoCurrencyIcon/tether.svg';\nimport tezos from 'src/components/widget/icons/CryptoCurrencyIcon/tezos.svg';\nimport uniswap from 'src/components/widget/icons/CryptoCurrencyIcon/uniswap.svg';\nimport zcash from 'src/components/widget/icons/CryptoCurrencyIcon/zcash.svg';\nimport {CryptoCurrency} from 'src/components/widget/types/Crypto';\n\nconst IconForCurrency = {\n\t[CryptoCurrency.ALGO]: algorand,\n\t[CryptoCurrency.APE]: apecoin,\n\t[CryptoCurrency.AVAX]: avalanche,\n\t[CryptoCurrency.BAT]: basic_attention_token,\n\t[CryptoCurrency.BTC]: bitcoin,\n\t[CryptoCurrency.DOGE]: dogecoin,\n\t[CryptoCurrency.DAI]: dai,\n\t[CryptoCurrency.DOT]: polkadot,\n\t[CryptoCurrency.ETH]: ethereum,\n\t[CryptoCurrency.FIL]: filecoin,\n\t[CryptoCurrency.GRT]: graph,\n\t[CryptoCurrency.LINK]: chainlink,\n\t[CryptoCurrency.LTC]: litecoin,\n\t[CryptoCurrency.MATIC]: polygon,\n\t[CryptoCurrency.MOB]: mobilecoin,\n\t[CryptoCurrency.RAY]: raydium,\n\t[CryptoCurrency.SAMO]: samoyed,\n\t[CryptoCurrency.SBR]: saber,\n\t[CryptoCurrency.SHIB]: shiba_inu,\n\t[CryptoCurrency.SOL]: solana,\n\t[CryptoCurrency.UNI]: uniswap,\n\t[CryptoCurrency.USDC]: tether,\n\t[CryptoCurrency.USDT]: stellar,\n\t[CryptoCurrency.XTZ]: tezos,\n\t[CryptoCurrency.ZEC]: zcash\n};\n\nexport const CryptoCurrencyIcon = ({currency}: {currency: CryptoCurrency}) => {\n\treturn (\n\t\t\n\t);\n};\n","export default __webpack_public_path__ + \"58f20393bf2b41f944c6229c2af785b9.svg\";","export const SearchIcon = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const AppleIcon = () => (\n\t\n\t\t\n\t\t\n\t\n);\n","export const GoogleIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {VNode} from 'preact';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {AppleIcon} from 'src/components/widget/icons/AppleIcon';\nimport {BankIcon} from 'src/components/widget/icons/BankIcon';\nimport {CardIcon} from 'src/components/widget/icons/CardIcon';\nimport {CryptoIcon} from 'src/components/widget/icons/CryptoIcon';\nimport {DafIcon} from 'src/components/widget/icons/DafIcon';\nimport {GoogleIcon} from 'src/components/widget/icons/GoogleIcon';\nimport {PaypalIcon} from 'src/components/widget/icons/Paypalcon';\nimport {StocksIcon} from 'src/components/widget/icons/StocksIcon';\nimport {VenmoIcon} from 'src/components/widget/icons/VenmoIcon';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {PaymentRequestAvailable} from 'src/helpers/checkPaymentRequest';\n\ninterface IconForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nconst IconForPaymentMethodMap: {\n\t[key in Exclude]: VNode;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: ,\n\t[PaymentMethod.BANK]: ,\n\t[PaymentMethod.PAYPAL]: ,\n\t[PaymentMethod.VENMO]: ,\n\t[PaymentMethod.CRYPTO]: ,\n\t[PaymentMethod.STOCKS]: ,\n\t[PaymentMethod.DAF]: \n};\n\nfunction getIconForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? : ;\n\t}\n\n\treturn IconForPaymentMethodMap[method];\n}\n\nexport const IconForPaymentMethod = ({method}: IconForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\treturn getIconForPaymentMethod(method, paymentRequestAvailable);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CardIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const BankIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const PaypalIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","export const VenmoIcon = () => (\n\t\n\t\t\n\t\n);\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CryptoIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const StocksIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const DafIcon = () => (\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n);\n","import cxs from 'cxs';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {PaymentRequestAvailable} from 'src/helpers/checkPaymentRequest';\n\nconst NameForPaymentMethodMap: {\n\t[key in Exclude]: string;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: 'Card',\n\t[PaymentMethod.BANK]: 'Bank',\n\t[PaymentMethod.PAYPAL]: 'PayPal',\n\t[PaymentMethod.VENMO]: 'Venmo',\n\t[PaymentMethod.CRYPTO]: 'Crypto',\n\t[PaymentMethod.STOCKS]: 'Stocks',\n\t[PaymentMethod.DAF]: 'DAF'\n};\n\nfunction getNameForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? 'Apple Pay' : 'Google Pay';\n\t}\n\n\treturn NameForPaymentMethodMap[method];\n}\n\ninterface NameForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nexport const NameForPaymentMethod = ({method}: NameForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst name = getNameForPaymentMethod(method, paymentRequestAvailable);\n\treturn {name};\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: '0px'\n\t}\n});\n\nexport const fieldSetCss = cxs({\n\tborder: 'none',\n\tpadding: 0,\n\tmargin: 0,\n\tfontSize: '100%',\n\tfont: 'inherit',\n\tverticalAlign: 'baseline'\n});\n\nexport const legendCss = cxs({\n\tfontWeight: 700,\n\t...textSize.s,\n\tmarginBottom: Spacing.S\n});\n\nexport const formContainerCss = cxs({\n\t...verticalStackCss.cxs(Spacing.XL),\n\tpadding: '0px',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: Spacing.XXL\n\t}\n});\n\nexport const formCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr',\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridAutoFlow: 'column',\n\t\tgridTemplateColumns: 'auto 1fr'\n\t}\n});\n","import cxs from 'cxs';\nimport {fieldSetCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\tverticalStackCss,\n\thorizontalStackCss,\n\tSpacing\n} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const largePaymentMethodSelectListCss = cxs({\n\theight: '100%',\n\twidth: '100%',\n\tminWidth: '170px',\n\tflexGrow: 1,\n\tbackgroundColor: COLORS.LightGray,\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(0)\n\t}\n});\n\nexport const smallPaymentMethodFieldSetCss = joinClassNames([\n\tfieldSetCss,\n\tcxs({\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t})\n]);\n\nexport const smallPaymentMethodSelectListCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr 1fr',\n\tgridGap: Spacing.S\n});\n\nexport const paymentMethodButtonCssBase: cxs.CSSObject = {\n\t...horizontalStackCss.cxs(Spacing.XS),\n\talignItems: 'center',\n\tjustifyContent: 'flex-start',\n\twidth: '100%',\n\tbackground: 'transparent'\n};\n\nexport const largePaymentMethodButtonCss = (selected: boolean) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: 'none',\n\t\tpadding: Spacing.M,\n\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: 'white',\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: 'white'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const smallPaymentMethodButtonCss = (\n\tselected: boolean,\n\tprimaryColor: string\n) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: `${Spacing.XXS} ${Spacing.S}`,\n\t\tborderRadius: Radii.Default,\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t'& > svg': {\n\t\t\twidth: '20px',\n\t\t\theight: '20px'\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: primaryColor,\n\t\t\t\t\tborder: `1px solid ${primaryColor}`,\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t'& > svg': {\n\t\t\t\t\t\tfilter: 'brightness(0) invert(1)',\n\t\t\t\t\t\twidth: '20px',\n\t\t\t\t\t\theight: '20px'\n\t\t\t\t\t},\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: primaryColor\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n","import {useMemo} from 'preact/hooks';\nimport {IconForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/IconForPaymentMethod';\nimport {NameForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/NameForPaymentMethod';\nimport {\n\tlargePaymentMethodSelectListCss,\n\tlargePaymentMethodButtonCss,\n\tsmallPaymentMethodFieldSetCss,\n\tsmallPaymentMethodSelectListCss,\n\tsmallPaymentMethodButtonCss\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/styles';\nimport {legendCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst usePaymentMethods = () => {\n\tconst {methods, lockMonthlyFrequency} = useConfigContext();\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst filteredMethods = useMemo(\n\t\t() =>\n\t\t\tmethods.filter((method) => {\n\t\t\t\tif (lockMonthlyFrequency && OneTimeFrequencyMethods.includes(method)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tpaymentRequestAvailable.applePay ||\n\t\t\t\t\t\tpaymentRequestAvailable.googlePay\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}),\n\t\t[methods, lockMonthlyFrequency, paymentRequestAvailable]\n\t);\n\n\treturn filteredMethods;\n};\n\nexport const LargePaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
      \n\t\t\t{methods.map((method) => (\n\t\t\t\t
    • \n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    • \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nexport const SmallPaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {primaryColor} = useConfigContext();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\tPayment method\n\t\t\t
      \n\t\t\t\t{methods.map((method) => (\n\t\t\t\t\t
    • \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    • \n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {smallText} from 'src/components/widget/theme/font-sizes';\nimport {ABOUT_URL} from 'src/constants/url';\n\nconst containerCss = cxs({\n\twidth: '100%',\n\ttextAlign: 'center'\n});\n\nconst redirectTextCss = cxs({\n\t...smallText,\n\tcolor: COLORS.TextOpaque\n});\n\nconst linkCss = (color: string) =>\n\tcxs({\n\t\tcolor,\n\t\ttextDecoration: 'none',\n\t\tcursor: 'pointer'\n\t});\n\nexport const RedirectNotice = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\tEvery.org will process your donation.{' '}\n\t\t\t\t\n\t\t\t\t\tLearn More\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const btnCss = cxs({\n\t...bodyText,\n\toutline: 'none',\n\twidth: '100%',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tborderRadius: Radii.Big,\n\theight: '52px',\n\tfontWeight: 700,\n\tpadding: Spacing.XXS,\n\ttransition: 'opacity .3s'\n});\n\nexport const btnActiveColor = (color: string) =>\n\tcxs({\n\t\tcolor: COLORS.White,\n\t\tbackgroundColor: color,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n\nexport const btnDisabledCss = cxs({\n\tcolor: COLORS.White,\n\tbackgroundColor: COLORS.DarkGray,\n\tcursor: 'default',\n\t'& > span': {\n\t\topacity: '0.6'\n\t}\n});\n","import {ComponentChildren} from 'preact';\nimport {\n\tbtnCss,\n\tbtnDisabledCss,\n\tbtnActiveColor\n} from 'src/components/widget/components/PaymentProcess/SubmitButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface ButtonProps {\n\thandleClick?: () => void;\n\tchildren: ComponentChildren;\n\tdisabled?: boolean;\n}\n\nexport const SubmitButton = ({\n\thandleClick,\n\tdisabled,\n\tchildren\n}: ButtonProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","export const DEFAULT_CURRENCY = {\n\tname: 'USD',\n\tsymbol: '$'\n};\n","import {useCallback} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {\n\tconstructDonateStocksUrl,\n\tconstructDonateCryptoUrl,\n\tconstructDonateUrl\n} from 'src/helpers/constructDonateUrl';\n\nexport const useSubmitDonation = () => {\n\tconst config = useConfigContext();\n\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tsetSubmitError,\n\t\tselectedPaymentMethod,\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tcryptoAmount,\n\t\tcryptoCurrency\n\t} = useWidgetContext();\n\tconst {minDonationAmount} = useConfigContext();\n\n\tconst submitDonation = useCallback(\n\t\t(event: JSXInternal.TargetedEvent) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst target = config.completeDonationInNewTab ? '_blank' : '_self';\n\n\t\t\tconst baseParameters = {\n\t\t\t\tmethods: [selectedPaymentMethod],\n\t\t\t\tnonprofitSlug: config.nonprofitSlug,\n\t\t\t\tfundraiserSlug: config.fundraiserSlug\n\t\t\t};\n\t\t\tswitch (selectedPaymentMethod) {\n\t\t\t\tcase PaymentMethod.CRYPTO:\n\t\t\t\t\tif (!cryptoAmount || !cryptoCurrency) {\n\t\t\t\t\t\tsetSubmitError(`Please enter currency and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateCryptoUrl({\n\t\t\t\t\t\t\tcryptoAmount,\n\t\t\t\t\t\t\tcryptoCurrency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.STOCKS:\n\t\t\t\t\tif (!stockSymbol || !stockAmount) {\n\t\t\t\t\t\tsetSubmitError(`Please enter the symbol and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateStocksUrl({\n\t\t\t\t\t\t\tstockSymbol,\n\t\t\t\t\t\t\tstockAmount,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (!donationAmount || donationAmount < minDonationAmount) {\n\t\t\t\t\t\tsetSubmitError(\n\t\t\t\t\t\t\t`The minimum donation amount is ${DEFAULT_CURRENCY.symbol}${minDonationAmount}`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateUrl({\n\t\t\t\t\t\t\tamount: donationAmount,\n\t\t\t\t\t\t\tfrequency: OneTimeFrequencyMethods.includes(selectedPaymentMethod)\n\t\t\t\t\t\t\t\t? DonationFrequency.OneTime\n\t\t\t\t\t\t\t\t: frequency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tfrequency,\n\t\t\tdonationAmount,\n\t\t\tsetSubmitError,\n\t\t\tselectedPaymentMethod,\n\t\t\tconfig,\n\t\t\tminDonationAmount,\n\t\t\tstockAmount,\n\t\t\tstockSymbol,\n\t\t\tcryptoAmount,\n\t\t\tcryptoCurrency\n\t\t]\n\t);\n\n\treturn submitDonation;\n};\n","import cxs from 'cxs';\nimport {CryptoAmountInput} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoAmountInput';\nimport {CryptoSelector} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const CryptoFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {cryptoAmount, cryptoCurrency} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tCrypto currency\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\tAmount\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.CRYPTO, cryptoCurrency})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const backButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'none',\n\t\tfontWeight: 500,\n\t\ttransition: 'opacity .3s',\n\t\tcolor: primaryColor,\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\talignSelf: 'flex-start',\n\t\t...textSize.s,\n\t\topacity: 1,\n\t\tpadding: 0,\n\t\tgap: Spacing.XXS,\n\t\tmarginBottom: Spacing.XXL,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t},\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tpadding: Spacing.L,\n\t\t\tmarginBottom: 0\n\t\t}\n\t});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ArrowBackIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {backButtonCss} from 'src/components/widget/components/PaymentProcess/BackButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {ArrowBackIcon} from 'src/components/widget/icons/ArrowBackIcon';\n\nexport const BackButton = ({handleClick}: {handleClick?: () => void}) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\tBack\n\t\t\n\t);\n};\n","export const isTouchDevice = () =>\n\tBoolean('ontouchstart' in window || navigator.maxTouchPoints);\n","import cxs from 'cxs';\nimport {useEffect, useRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\taddAmountButtonCss,\n\taddAmountContainerCss,\n\tinputPrefixCss,\n\tinputSufixCss,\n\tinputContainerCss,\n\tinputContainerErrorCss,\n\tinputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {isTouchDevice} from 'src/helpers/isTouchDevice';\n\nconst preventDecimal = (\n\tevent: JSXInternal.TargetedEvent\n) => {\n\tif (event.key === '.') {\n\t\tevent.preventDefault();\n\t}\n};\n\nexport const DonationAmount = () => {\n\tconst inputRef = useRef(null);\n\n\tconst {primaryColor, addAmounts} = useConfigContext();\n\n\tconst {setDonationAmount, donationAmount, setSubmitError, submitError} =\n\t\tuseWidgetContext();\n\n\tconst autoFocusInput = () => {\n\t\tif (inputRef.current) {\n\t\t\tinputRef.current.focus();\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (!isTouchDevice()) {\n\t\t\tautoFocusInput();\n\t\t}\n\t}, []);\n\n\tconst inputContainerClasses = [inputContainerCss(primaryColor)]\n\t\t.concat(submitError ? [inputContainerErrorCss] : [])\n\t\t.join(' ');\n\n\treturn (\n\t\t\n\t\t\tDonation amount\n\t\t\t
    \n\t\t\t\t{DEFAULT_CURRENCY.symbol}\n\t\t\t\t {\n\t\t\t\t\t\tsetDonationAmount(Number(event.currentTarget.value));\n\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t\n\t\t\t\t\t{DEFAULT_CURRENCY.name}\n\t\t\t\t\n\t\t\t
    \n\t\t\t{addAmounts && addAmounts.length > 0 && (\n\t\t\t\t
    \n\t\t\t\t\t{addAmounts.map((amount) => (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetDonationAmount((previous) => {\n\t\t\t\t\t\t\t\t\treturn typeof previous === 'number'\n\t\t\t\t\t\t\t\t\t\t? previous + amount\n\t\t\t\t\t\t\t\t\t\t: amount;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t+{amount}\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t)}\n\t\t\n\t);\n};\n","import cxs from 'cxs';\n\nexport const inputLabelCss = (primaryColor: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\t\theight: '36px',\n\t\talignItems: 'center',\n\t\tjustifyContent: 'center',\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\tborder: `2px solid ${primaryColor}`,\n\t\tborderRight: ''\n\t});\n\nexport const inputItemCss = (primaryColor: string) =>\n\tcxs({\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'column',\n\t\tflex: '1 1 0px',\n\n\t\t'& > input': {\n\t\t\tappearance: 'none',\n\t\t\theight: 0\n\t\t},\n\n\t\t'& > input:checked + label': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t},\n\n\t\t'& > input:checked + label:hover': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t}\n\t});\n\nexport const inputContainerCss = (primaryColor: string) =>\n\tcxs({\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\n\t\t'& > div:first-of-type > label': {\n\t\t\tborderRadius: '6px 0 0 6px',\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '6px 0 0 6px'\n\t\t\t}\n\t\t},\n\n\t\t'& > div:last-of-type > label': {\n\t\t\tborderRadius: '0 6px 6px 0',\n\t\t\tborderRight: `2px solid ${primaryColor}`,\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '0 6px 6px 0'\n\t\t\t}\n\t\t}\n\t});\n","import {\n\tinputContainerCss,\n\tinputItemCss,\n\tinputLabelCss\n} from 'src/components/widget/components/PaymentProcess/Frequency/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst DEFAULT_MONTHLY_TITLE = 'Monthly donation';\n\nexport const Frequency = () => {\n\tconst {\n\t\tprimaryColor,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle = DEFAULT_MONTHLY_TITLE\n\t} = useConfigContext();\n\tconst {frequency, selectedPaymentMethod, setFrequency} = useWidgetContext();\n\n\tif (lockMonthlyFrequency) {\n\t\treturn

    {monthlyTitle}

    ;\n\t}\n\n\tif (OneTimeFrequencyMethods.includes(selectedPaymentMethod)) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\tFrequency\n\t\t\t\t

    \n\t\t\t\t\t{selectedPaymentMethod === PaymentMethod.DAF ? 'Chariot' : 'Venmo'}{' '}\n\t\t\t\t\tonly supports one-time donations\n\t\t\t\t

    \n\t\t\t
    \n\t\t);\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tFrequency\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.Monthly);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tGive Monthly\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.OneTime);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tOnce\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DafAmountView = ({changeView}: DafFlowViewProps) => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {donationAmount, selectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Connect your DAF with Chariot

    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.DAF})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\nimport {TEAM_EMAIL} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport const DafManualView = ({changeView}: DafFlowViewProps) => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Manual DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tPlease ask your provider to make a one-time or recurring grant to:\n\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\t

    \n\t\t\t\t\t\tEvery.org (EIN: 61-1913297)\n\t\t\t\t\t\t58 West Portal Ave #781 San Francisco, CA 94127\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tMemo: For every.org/themarshallproject from @darth.vader506\n\t\t\t\t\t\t\n\t\t\t\t\t\tContact info: Mark Ulrich, CEO\n\t\t\t\t\t\tEmail: team@every.org\n\t\t\t\t\t\tPhone number: +1 (415) 650-0503\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tYou may also email us at{' '}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{TEAM_EMAIL}\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\twith the memo or to let us know if you wish to share your contact\n\t\t\t\t\t\tinformation with the nonprofit/campaign. By default, we do not share\n\t\t\t\t\t\tyour contact information\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tWe will attribute the donation accordingly:\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive BOTH your @username and a nonprofit/campaign: we will\n\t\t\t\t\t\tadd a donation for that nonprofit/campaign to your account.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only your @username, we will credit your\n\t\t\t\t\t\taccount's gift card balance in the amount received, which you\n\t\t\t\t\t\tcan use to support as many nonprofits as you'd like.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only a nonprofit/campaign, we will send that amount to\n\t\t\t\t\t\tthat nonprofit/campaign as an anonymous donation.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we do not receive any information by the time the wire/ACH is\n\t\t\t\t\t\treceived, we will apply it towards running Every.org.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst CAHRIOT_GREEN = '#ADEFD1';\nconst CAHRIOT_DARK_GREEN = '#7ce6b6';\nconst CHARIOT_DARK_BLUE = '#00203F';\n\nexport const chariotButtonCss = cxs({\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tbackground: CAHRIOT_GREEN,\n\tcolor: CHARIOT_DARK_BLUE,\n\talignSelf: 'center',\n\tborderRadius: Radii.Big,\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tfontWeight: 500,\n\t...textSize.s,\n\tgap: Spacing.XS,\n\tcursor: 'pointer',\n\t':hover': {\n\t\tbackground: CAHRIOT_DARK_GREEN\n\t}\n});\n\nexport const manualButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tbackground: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcolor: primaryColor,\n\t\talignSelf: 'center',\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\tfontWeight: 500,\n\t\t...textSize.s,\n\t\tgap: Spacing.XS,\n\t\tcursor: 'pointer',\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n","import {\n\tchariotButtonCss,\n\tmanualButtonCss\n} from 'src/components/widget/components/PaymentProcess/DafFlow/styles';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ChariotLogo = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport const DafStartView = ({changeView}: DafFlowViewProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t

    Instant DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tWe use Chariot to verify your account info and automatically initiate\n\t\t\t\t\ta grant from your DAF, or you can get instructions for making the\n\t\t\t\t\tdonation manually.\n\t\t\t\t

    \n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.AMOUNT);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tDonate with\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.MANUAL);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tGet instructions for a manual DAF donation\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {useState} from 'preact/hooks';\nimport {DafAmountView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafAmountView';\nimport {DafManualView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafManualView';\nimport {DafStartView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafStartView';\nimport {DafFlowView} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\n\nexport const DafFlow = () => {\n\tconst [view, setView] = useState(DafFlowView.START);\n\n\t// eslint-disable-next-line default-case\n\tswitch (view) {\n\t\tcase DafFlowView.START:\n\t\t\treturn ;\n\t\tcase DafFlowView.MANUAL:\n\t\t\treturn ;\n\t\tcase DafFlowView.AMOUNT:\n\t\t\treturn ;\n\t}\n};\n","import {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DefaultFlow = () => {\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tselectedPaymentMethod,\n\t\tpaymentRequestAvailable\n\t} = useWidgetContext();\n\tconst submitDonation = useSubmitDonation();\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({\n\t\t\t\t\t\tmethod: selectedPaymentMethod,\n\t\t\t\t\t\tpaymentRequestIsApplePay: paymentRequestAvailable.applePay\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {\n\tinputContainerCss,\n\tinputContainerErrorCss,\n\tinputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const StocksFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\n\tconst {primaryColor} = useConfigContext();\n\n\tconst {\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tsetStockAmount,\n\t\tsetStockSymbol,\n\t\tsubmitError,\n\t\tsetSubmitError\n\t} = useWidgetContext();\n\n\tconst inputContainerClasses = [inputContainerCss(primaryColor)]\n\t\t.concat(submitError ? [inputContainerErrorCss] : [])\n\t\t.join(' ');\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tWhat is the symbol of the shares?\n\t\t\t\t\t\t\n\t\t\t\t\t\tExample: GOOG\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tsetStockSymbol(event.currentTarget.value);\n\t\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tHow many shares are you donating?\n\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tsetStockAmount(Number(event.currentTarget.value));\n\t\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.STOCKS})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import {GridCard} from 'src/components/widget/components/GridCard';\nimport {CryptoFlow} from 'src/components/widget/components/PaymentProcess/CryptoFlow';\nimport {DafFlow} from 'src/components/widget/components/PaymentProcess/DafFlow';\nimport {DefaultFlow} from 'src/components/widget/components/PaymentProcess/DefaultFlow';\nimport {StocksFlow} from 'src/components/widget/components/PaymentProcess/StocksFlow';\nimport {cardCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nconst DonateFlowForPaymentMethod = () => {\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tswitch (selectedPaymentMethod) {\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn ;\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn ;\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn ;\n\t\tdefault:\n\t\t\treturn ;\n\t}\n};\n\nexport const PaymentProcess = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {ContextProvider} from 'src/components/widget/context';\nimport Widget from 'src/components/widget/index';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nlet originalOverflow: string;\nconst getOriginalOverflow = () => {\n\tconst body = document.querySelector('body');\n\n\tif (!originalOverflow) {\n\t\toriginalOverflow = body?.style.overflow ? body.style.overflow : 'unset';\n\t}\n\n\treturn originalOverflow;\n};\n\nconst addOverflowToBody = () => {\n\tconst body = document.querySelector('body');\n\tif (body) {\n\t\tbody.style.overflow = 'hidden';\n\t}\n};\n\nconst removeOverflowFromBody = () => {\n\tconst body = document.querySelector('body');\n\tconst overflow = getOriginalOverflow();\n\tif (body) {\n\t\tbody.style.overflow = overflow;\n\t}\n};\n\ninterface WidgetLoaderProps {\n\toptions: Partial;\n\thide: () => void;\n}\n\nexport const WidgetLoader = ({options = {}, hide}: WidgetLoaderProps) => {\n\tremoveOverflowFromBody();\n\tif (!options.show) {\n\t\t// Not showing\n\t\treturn null;\n\t}\n\n\taddOverflowToBody();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","const AUTO_PLAY_PARAM = 'explicit';\n\nexport function shouldEnableAutoPlay() {\n\tconst parametersString = document.currentScript\n\t\t?.getAttribute('src')\n\t\t?.split('?')[1];\n\tconst parametersArray = parametersString\n\t\t?.split('&')\n\t\t.map((parameterString) => {\n\t\t\tconst [key, value] = parameterString.split('=');\n\t\t\treturn [key, value];\n\t\t});\n\tconst parametersObject =\n\t\tparametersArray && Object.fromEntries(parametersArray);\n\n\tif (parametersObject) {\n\t\treturn parametersObject[AUTO_PLAY_PARAM] !== '1';\n\t}\n\n\treturn true;\n}\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const widgetCss = (height: number | null) =>\n\tcxs({\n\t\tbackground: 'white',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\tborderRadius: 'unset',\n\t\tposition: 'relative',\n\t\toverflow: 'auto',\n\t\tpadding: `0`,\n\t\tpaddingBottom: Spacing.XXL,\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\theight: height ? `${height}px` : 'unset',\n\t\t\tbackground: '#f3f6f6',\n\t\t\tminHeight: '378px',\n\t\t\tmaxHeight: `calc(100vh - 2 * ${Spacing.XL})`,\n\t\t\twidth: '1000px',\n\t\t\toverflow: 'unset',\n\t\t\toverflowY: 'scroll',\n\t\t\t/* Hide sc rollbar */\n\t\t\t'-ms-overflow-style': 'none' /* IE and Edge */,\n\t\t\tscrollbarWidth: 'none' /* Firefox */,\n\t\t\t'::-webkit-scrollbar': {\n\t\t\t\tdisplay: 'none'\n\t\t\t},\n\t\t\tborderRadius: Radii.Medium,\n\t\t\tpadding: Spacing.XL\n\t\t}\n\t});\n","import {VNode} from 'preact';\nimport {forwardRef} from 'preact/compat';\nimport {widgetCss} from 'src/components/widget/components/WidgetCard/styles';\n\nexport const WidgetCard = forwardRef<\n\tHTMLDivElement,\n\tVNode<{height: number | null}>['props']\n>(({children, height}, ref) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n});\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const overlayCss = cxs({\n\t...textSize.s,\n\tposition: 'fixed',\n\theight: 'auto',\n\twidth: '100%',\n\tzIndex: 999,\n\ttop: 0,\n\tbottom: 0,\n\tleft: 0,\n\tright: 0,\n\tdisplay: 'flex',\n\tbackground: 'rgba(0, 0, 0, 0.5)',\n\tjustifyContent: 'center',\n\talignItems: 'center',\n\tcolor: COLORS.Text,\n\tfontFamily: FontFamily.BasisGrotesque,\n\tpadding: 0,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: Spacing.XL\n\t},\n\t// reset\n\tboxSizing: 'border-box',\n\t'-webkit-font-smoothing': 'antialiased',\n\t'-moz-osx-font-smoothing': 'grayscale',\n\t'& *': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:before': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:after': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'h1,h2,h3,h4,h5,h6': {fontWeight: 700},\n\n\th1: {\n\t\t...textSize.xl\n\t},\n\n\th2: {\n\t\t...textSize.l\n\t},\n\n\t'h3,h4,h5,h6': {\n\t\t...textSize.m\n\t}\n});\n","import {FunctionalComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {overlayCss} from 'src/components/widget/components/WidgetOverlay/styles';\n\ninterface WdigetOverlayProps {\n\tonClick: JSXInternal.MouseEventHandler;\n}\n\nexport const WidgetOverlay: FunctionalComponent = ({\n\tchildren,\n\tonClick\n}) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\n\nconst DEFAULT_LOADING_SIZE = 72;\n\nconst MASK = `data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A`;\nconst loadingSvgCss = cxs({\n\tdisplay: 'inline-block',\n\tverticalAlign: 'middle',\n\n\tmaskImage: `url(\"${MASK}\")`,\n\t'-webkit-mask-image': `url(\"${MASK}\")`,\n\t'-webkit-mask-size': 'cover',\n\tmaskSize: 'cover'\n});\n\nconst loadingPathCss = (color: string) =>\n\tcxs({\n\t\tfill: color\n\t});\ninterface LoadingIconProps {\n\tsize?: number;\n\tcolor?: string;\n}\n\nexport const LoadingIcon = ({\n\tsize = DEFAULT_LOADING_SIZE,\n\tcolor = COLORS.LightGray\n}: LoadingIconProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {JSXInternal} from 'preact/src/jsx';\nimport {Faq} from 'src/components/widget/components/Faq';\nimport {Footer} from 'src/components/widget/components/Footer';\nimport {FundraiserLink} from 'src/components/widget/components/FundraiserLink';\nimport {Grid} from 'src/components/widget/components/Grid';\nimport {Header} from 'src/components/widget/components/Header';\nimport {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {largeScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {NonprofitInfo} from 'src/components/widget/components/NonprofitInfo';\nimport {PaymentProcess} from 'src/components/widget/components/PaymentProcess';\nimport {WidgetCard} from 'src/components/widget/components/WidgetCard';\nimport {WidgetOverlay} from 'src/components/widget/components/WidgetOverlay';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiser} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nconst Widget = () => {\n\tconst {fundraiserSlug} = useConfigContext();\n\tconst {hideWidget} = useWidgetContext();\n\tconst findraiser = useFundraiser();\n\tconst nonprofit = useNonprofit();\n\n\tconst hideOnWrapperClick: JSXInternal.MouseEventHandler = (\n\t\tevent\n\t) => {\n\t\tif (event.target === event.currentTarget) {\n\t\t\thideWidget();\n\t\t}\n\t};\n\n\tif (\n\t\tnonprofit === NonprofitFetchError ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetchError)\n\t) {\n\t\thideWidget();\n\t\treturn null;\n\t}\n\n\tif (\n\t\tnonprofit === NonprofitFetching ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetching)\n\t) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport default Widget;\n","const resetcss = `\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n`;\n\nexport default resetcss;\n","import {render} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {CreateButtonInSelectorProps} from 'src/components/embed-button/types';\nimport {CreateWidgetInSelectorProps} from 'src/components/widget/types';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\ninterface GlobalExport {\n\tcreateButton: (options: CreateButtonInSelectorProps) => void;\n\tcreateWidget: (options: CreateWidgetInSelectorProps) => void;\n\tsetOptions: (options: Partial) => void;\n\tshowWidget: () => void;\n}\n\ndeclare const window: Window & {\n\teveryDotOrgDonateButton?: GlobalExport;\n};\n\nexport default function manualMode() {\n\tconst DEFAULT_HASH_OPEN_WIDGET = 'donate';\n\n\tconst baseOptions: Partial = {};\n\tconst options = {\n\t\tshow: false,\n\t\topenAt: DEFAULT_HASH_OPEN_WIDGET\n\t};\n\tlet instanceOptions: Partial = {};\n\n\tconst getNodeList = (element?: Element, selector?: string) =>\n\t\telement ? [element] : selector && document.querySelectorAll(selector);\n\n\tloadFonts();\n\n\t/**\n\t * Helper function to debug donate button issues\n\t */\n\tfunction log(...messages: unknown[]): void {\n\t\tconsole.info('Every.org Donate Button:', ...messages);\n\t}\n\n\tlet widgetMountPoint: HTMLElement;\n\n\tconst mountWidget = () => {\n\t\tconst shadowWidgetWrapper = document.createElement('div');\n\t\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\t\tdocument.body.append(shadowWidgetWrapper);\n\n\t\twidgetMountPoint = document.createElement('div');\n\t\tshadowWidgetWrapper.attachShadow({mode: 'open'}).append(widgetMountPoint);\n\n\t\tconst everyStyles: HTMLStyleElement | null =\n\t\t\tdocument.querySelector('#every-styles');\n\n\t\tif (everyStyles) {\n\t\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t\t.map((rule) => rule.cssText)\n\t\t\t\t.join('\\n');\n\n\t\t\tconst everyShadowStyles = document.createElement('style');\n\t\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\t\twidgetMountPoint.append(everyShadowStyles);\n\t\t}\n\t};\n\n\tconst renderWidget = () => {\n\t\tif (!widgetMountPoint) {\n\t\t\tmountWidget();\n\t\t}\n\n\t\tconst hash = window.location?.hash;\n\t\tconst shouldShowWidget =\n\t\t\thash ===\n\t\t\t`#${\n\t\t\t\tinstanceOptions?.openAt ?? baseOptions?.openAt ?? options?.openAt ?? ''\n\t\t\t}`;\n\n\t\tif (shouldShowWidget) {\n\t\t\tObject.assign(options, {show: true});\n\t\t}\n\n\t\tconst finalOptions: Partial = {\n\t\t\t...options,\n\t\t\t...baseOptions,\n\t\t\t...instanceOptions\n\t\t};\n\n\t\trender(\n\t\t\t,\n\t\t\twidgetMountPoint\n\t\t);\n\t};\n\n\tfunction showWidget() {\n\t\tObject.assign(options, {show: true});\n\t\trenderWidget();\n\t}\n\n\tfunction hideWidget() {\n\t\tObject.assign(options, {show: false});\n\t\trenderWidget();\n\t}\n\n\tfunction setOptions(newOptions: Partial) {\n\t\tObject.assign(baseOptions, newOptions);\n\t\trenderWidget();\n\t}\n\n\tfunction updateOptionsAndShowCb(newOptions: WidgetConfig) {\n\t\tconst optionsCopy = {...newOptions};\n\t\tObject.assign(options, {\n\t\t\topenAt: optionsCopy.openAt ?? DEFAULT_HASH_OPEN_WIDGET\n\t\t});\n\t\treturn (event: any) => {\n\t\t\tevent.preventDefault();\n\t\t\tinstanceOptions = optionsCopy;\n\t\t\tshowWidget();\n\t\t};\n\t}\n\n\tconst createButtonInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateButtonInSelectorProps) => {\n\t\tif (!element && !selector && !options.nonprofitSlug) {\n\t\t\tlog(\n\t\t\t\t'createButton():',\n\t\t\t\t'must provide element or selector or nonprofitSlug'\n\t\t\t);\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const buttonContainer of nodes) {\n\t\t\t// Search for an Every.org link inside the container\n\t\t\tconst buttonLink = buttonContainer.querySelector('a') ?? undefined;\n\t\t\tif (!options.nonprofitSlug && !buttonLink) {\n\t\t\t\tlog('no link in container', buttonContainer);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst href = buttonLink?.getAttribute('href') ?? undefined;\n\n\t\t\tif (!options.nonprofitSlug && !href) {\n\t\t\t\tlog('link lacks href', buttonLink);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We preserve it over any custom config passed\n\t\t\tconst finalOptions = {\n\t\t\t\t...instanceOptions,\n\t\t\t\t...options\n\t\t\t};\n\n\t\t\trender(, buttonContainer, buttonLink);\n\t\t}\n\t};\n\n\tconst createWidgetInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateWidgetInSelectorProps) => {\n\t\tif (!element && !selector) {\n\t\t\tlog('createWidget():', 'must provide element or selector');\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.nonprofitSlug) {\n\t\t\tlog('createWidget():', 'must provide nonprofitSlug');\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const node of nodes) {\n\t\t\tnode.addEventListener('click', updateOptionsAndShowCb(options));\n\t\t}\n\n\t\tObject.assign(baseOptions, options);\n\t\trenderWidget();\n\t};\n\n\twindow.everyDotOrgDonateButton = {\n\t\tcreateButton: createButtonInSelector,\n\t\tshowWidget,\n\t\tsetOptions,\n\t\tcreateWidget: createWidgetInSelector\n\t};\n}\n","import autoPlayMode from 'src/autoPlayMode';\nimport {shouldEnableAutoPlay} from 'src/helpers/shouldEnableAutoPlay';\nimport manualMode from 'src/manualMode';\n\nconst autoPlay = shouldEnableAutoPlay();\n\nif (autoPlay) {\n\tautoPlayMode();\n} else {\n\tmanualMode();\n}\n","'use strict';\n\nvar cache = {};\nvar prefix = 'x';\nvar rules = [];\nvar insert = function insert(rule) {\n return rules.push(rule);\n};\nvar hyph = function hyph(s) {\n return s.replace(/[A-Z]|^ms/g, '-$&').toLowerCase();\n};\nvar mx = function mx(rule, media) {\n return media ? media + '{' + rule + '}' : rule;\n};\nvar rx = function rx(cn, prop, val) {\n return '.' + cn + '{' + hyph(prop) + ':' + val + '}';\n};\nvar noAnd = function noAnd(s) {\n return s.replace(/&/g, '');\n};\n\nvar parse = function parse(obj) {\n var child = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var media = arguments[2];\n return Object.keys(obj).map(function (key) {\n var val = obj[key];\n if (val === null) return '';\n if (typeof val === 'object') {\n var m2 = /^@/.test(key) ? key : null;\n var c2 = m2 ? child : child + key;\n return parse(val, c2, m2 || media);\n }\n var _key = key + val + child + media;\n if (cache[_key]) return cache[_key];\n var className = prefix + rules.length.toString(36);\n insert(mx(rx(className + noAnd(child), key, val), media));\n cache[_key] = className;\n return className;\n }).join(' ');\n};\n\nmodule.exports = function () {\n for (var _len = arguments.length, styles = Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n styles[_key2] = arguments[_key2];\n }\n\n return styles.map(function (style) {\n return parse(style);\n }).join(' ').trim();\n};\n\nmodule.exports.css = function () {\n return rules.sort().join('');\n};\n\nmodule.exports.reset = function () {\n cache = {};\n while (rules.length) {\n rules.pop();\n }\n};\n\nmodule.exports.prefix = function (val) {\n return prefix = val;\n};\n\n\nif (typeof document !== 'undefined') {\n const styles = document.createElement('style')\n styles.id = 'every-styles'\n var sheet = document.head.appendChild(styles).sheet;\n\n insert = function insert(rule) {\n const shadowRoot = document.querySelector('#shadow-wrapper')\n\n if(shadowRoot) {\n const everyShadowStyles = shadowRoot.shadowRoot.querySelector('#every-shadow-styles')\n \n everyShadowStyles.innerHTML += rule\n }\n\n rules.push(rule);\n sheet.insertRule(rule, sheet.cssRules.length);\n };\n}","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/**\n * Asynchronously schedule a callback\n * @type {(cb: () => void) => void}\n */\n/* istanbul ignore next */\n// Note the following line isn't tree-shaken by rollup cuz of rollup/rollup#2566\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet queue;\n\twhile ((process._rerenderCount = rerenderQueue.length)) {\n\t\tqueue = rerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\trerenderQueue = [];\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\tqueue.some(c => {\n\t\t\tif (c._dirty) renderComponent(c);\n\t\t});\n\t}\n}\nprocess._rerenderCount = 0;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < renderResult.length; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
    {reuse}{reuse}
    ) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (Array.isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
    \n\t\t\t//
    {reuse}{reuse}
    \n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tnull,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Check if we find a corresponding element in oldChildren.\n\t\t// If found, delete the array item by setting to `undefined`.\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t// (holes).\n\t\toldVNode = oldChildren[i];\n\n\t\tif (\n\t\t\toldVNode === null ||\n\t\t\t(oldVNode &&\n\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t) {\n\t\t\toldChildren[i] = undefined;\n\t\t} else {\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t// We always match by type (in either case).\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toldVNode = null;\n\t\t\t}\n\t\t}\n\n\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (!refs) refs = [];\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\tchildVNode._children === oldVNode._children\n\t\t\t) {\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldDom,\n\t\t\t\t\tparentDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\toldChildren,\n\t\t\t\t\tnewDom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t} else if (\n\t\t\toldDom &&\n\t\t\toldVNode._dom == oldDom &&\n\t\t\toldDom.parentNode != parentDom\n\t\t) {\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\n\t\t\toldDom = getDomSibling(oldVNode);\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\t\t\t\tnewParentVNode._nextDom = getDomSibling(oldParentVNode, i + 1);\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tif (refs) {\n\t\tfor (i = 0; i < refs.length; i++) {\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tvnode,\n\t\t\t\t\tvnode,\n\t\t\t\t\tc,\n\t\t\t\t\tvnode._dom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(\n\tparentDom,\n\tchildVNode,\n\toldVNode,\n\toldChildren,\n\tnewDom,\n\toldDom\n) {\n\tlet nextDom;\n\tif (childVNode._nextDom !== undefined) {\n\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t// of last DOM child of this child VNode\n\t\tnextDom = childVNode._nextDom;\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t// can clean up the property\n\t\tchildVNode._nextDom = undefined;\n\t} else if (\n\t\toldVNode == null ||\n\t\tnewDom != oldDom ||\n\t\tnewDom.parentNode == null\n\t) {\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\tparentDom.appendChild(newDom);\n\t\t\tnextDom = null;\n\t\t} else {\n\t\t\t// `j href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (\n\t\t\tvalue != null &&\n\t\t\t(value !== false || (name[0] === 'a' && name[1] === 'r'))\n\t\t) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tthis._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\tthis._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original === oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\tc.props = newProps;\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) c._dirty = false;\n\t\t\t\t\tc._vnode = newVNode;\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc.state = c._nextState;\n\n\t\t\tif ((tmp = options._render)) tmp(newVNode);\n\n\t\t\tc._dirty = false;\n\t\t\tc._vnode = newVNode;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\tnewVNode._dom = oldDom;\n\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t// ^ could possibly be simplified to:\n\t\t\t// excessDomChildren.length = 0;\n\t\t}\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tArray.isArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\tif (\n\t\ttype == 'select' &&\n\t\tnormalizedProps.multiple &&\n\t\tArray.isArray(normalizedProps.value)\n\t) {\n\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tchild.props.selected =\n\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t});\n\t}\n\n\t// Adding support for defaultValue in select tag\n\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\tif (normalizedProps.multiple) {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t} else {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t}\n\t\t});\n\t}\n\n\tif (props.class && !props.className) {\n\t\tnormalizedProps.class = props.class;\n\t\tObject.defineProperty(\n\t\t\tnormalizedProps,\n\t\t\t'className',\n\t\t\tclassNameDescriptorNonEnumberable\n\t\t);\n\t} else if (props.className && !props.class) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t} else if (props.class && props.className) {\n\t\tnormalizedProps.class = normalizedProps.className = props.className;\n\t}\n\n\tvnode.props = normalizedProps;\n}\n\nlet oldVNodeHook = options.vnode;\noptions.vnode = vnode => {\n\t// only normalize props on Element nodes\n\tif (typeof vnode.type === 'string') {\n\t\thandleDomVNode(vnode);\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function (vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\nconst oldDiffed = options.diffed;\n/** @type {(vnode: import('./internal').VNode) => void} */\noptions.diffed = function (vnode) {\n\tif (oldDiffed) {\n\t\toldDiffed(vnode);\n\t}\n\n\tconst props = vnode.props;\n\tconst dom = vnode._dom;\n\n\tif (\n\t\tdom != null &&\n\t\tvnode.type === 'textarea' &&\n\t\t'value' in props &&\n\t\tprops.value !== dom.value\n\t) {\n\t\tdom.value = props.value == null ? '' : props.value;\n\t}\n\n\tcurrentComponent = null;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","import {\n\tCryptoCurrency,\n\tCryptoCurrencyConfig\n} from 'src/components/widget/types/Crypto';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nfunction getSrcForCryptoIcon(currency: CryptoCurrency) {\n\tconst config = CryptoCurrencyConfig[currency];\n\n\tif ('icon' in config) {\n\t\treturn config.icon;\n\t}\n\n\treturn getCloudinaryUrl(config.iconCloudinaryId, {width: 24, height: 24});\n}\n\nexport const CryptoCurrencyIcon = ({currency}: {currency: CryptoCurrency}) => {\n\treturn (\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {filter as fuzzyFilter} from 'fuzzy';\nimport {useRef, useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {\n\tcryptoSelectorDropDownItemCss,\n\tcryptoSelectorInputContainerCss,\n\tinputContainerWithDropDownCss,\n\tcryptoSelectorContainerCss,\n\tcryptoSelectorInputSufixCss,\n\tcryptoSelectorDropDownContainerCss,\n\tcryptoSelectorDropDownContentCss,\n\tquickSelectOptionsListCss\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {CryptoCurrencyIcon} from 'src/components/widget/icons/CryptoCurrencyIcon';\nimport {SearchIcon} from 'src/components/widget/icons/SearchIcon';\nimport {\n\tCryptoCurrency,\n\tSharedCryptoCurrencyConfig,\n\tCryptoCurrencyOption,\n\tDISABLED_TOKENS\n} from 'src/components/widget/types/Crypto';\nimport {CRYPTO_EMAIL} from 'src/constants/url';\nimport joinClassNames from 'src/helpers/joinClassNames';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport function displayLabelForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.displayName} (${config.abbreviation})`;\n}\n\nexport function displayContractTypeForCryptoCurrency(cc: CryptoCurrency) {\n\tconst config = SharedCryptoCurrencyConfig[cc];\n\treturn `${config.contractType ? `${config.contractType}` : ''}`;\n}\n\nfunction cryptoCurrencyToOption(cc: CryptoCurrency): CryptoCurrencyOption {\n\treturn {\n\t\tvalue: cc,\n\t\tlabel: displayLabelForCryptoCurrency(cc),\n\t\tcontractType: displayContractTypeForCryptoCurrency(cc)\n\t};\n}\n\nconst quickSelectTokens = new Set([\n\tCryptoCurrency.BTC,\n\tCryptoCurrency.ETH,\n\tCryptoCurrency.USDC\n]);\n\nconst enabledCryptoCurrencyOptions: CryptoCurrencyOption[] = [];\nconst quickSelectOptions: CryptoCurrencyOption[] = [];\nconst otherOptions: CryptoCurrencyOption[] = [];\n\nObject.values(CryptoCurrency).forEach((value) => {\n\tconst option = cryptoCurrencyToOption(value);\n\tif (!DISABLED_TOKENS.includes(value)) {\n\t\tenabledCryptoCurrencyOptions.push(option);\n\n\t\tif (quickSelectTokens.has(value)) {\n\t\t\tquickSelectOptions.push(option);\n\t\t} else {\n\t\t\totherOptions.push(option);\n\t\t}\n\t}\n});\n\nexport const MAX_CRYPTO_DECIMALS_FOR_DISPLAY = 7;\n\nconst CryptoSelectorDropDownItem = ({\n\tonClick,\n\toption\n}: {\n\tonClick: (option: CryptoCurrencyOption) => void;\n\toption: CryptoCurrencyOption;\n}) => (\n\t
  • \n\t\t {\n\t\t\t\tonClick(option);\n\t\t\t}}\n\t\t>\n\t\t\t\n\t\t\t{option.label}\n\t\t\t{option.contractType}\n\t\t\n\t
  • \n);\n\nconst CryptoSupprotLink = () => {\n\tconst nonprofit = useNonprofitOrError();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst cryptoSupportBody = `Contents: I would like to make a crypto donation to support https://www.every.org/${nonprofit.primarySlug}.\\n\\nMy name:\\nToken name:\\nToken symbol:\\nToken quantity:\\n\\nPlease reply back with an address where I can donate, as this is worth over $5,000 USD.`;\n\n\treturn (\n\t\t\n\t\t\t{CRYPTO_EMAIL}\n\t\t\n\t);\n};\n\nexport const CryptoSelector = () => {\n\tconst {submitError, cryptoCurrency, setCryptoCurrency} = useWidgetContext();\n\tconst {primaryColor} = useConfigContext();\n\n\tconst inputRef = useRef(null);\n\tconst [selectedOption, setSelectedOption] = useState<\n\t\tCryptoCurrencyOption | undefined\n\t>(\n\t\tenabledCryptoCurrencyOptions.find(\n\t\t\t(option) => option.value === cryptoCurrency\n\t\t)\n\t);\n\n\tconst [inputValue, setInputValue] = useState(selectedOption?.label);\n\n\tconst [showDropDown, setShowDrowDown] = useState(!selectedOption);\n\n\tconst handleItemClick = (option: CryptoCurrencyOption) => {\n\t\tsetSelectedOption(option);\n\t\tsetCryptoCurrency(option.value);\n\t\tsetInputValue(option.label);\n\t\tsetShowDrowDown(false);\n\t};\n\n\tconst handleInputFocus = () => {\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t\tsetInputValue('');\n\t};\n\n\tconst handleInput = (value: string) => {\n\t\tsetInputValue(value);\n\t\tsetSelectedOption(undefined);\n\t\tsetCryptoCurrency(undefined);\n\t\tsetShowDrowDown(true);\n\t};\n\n\tconst handleContainerClick = () => {\n\t\tinputRef.current?.focus();\n\t\thandleInputFocus();\n\t};\n\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoSelectorInputContainerCss,\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : []),\n\t\t...(showDropDown ? [inputContainerWithDropDownCss] : [])\n\t]);\n\n\tconst optionToListItem = (option: CryptoCurrencyOption) => (\n\t\t\n\t);\n\n\tconst filteredOptions = inputValue\n\t\t? fuzzyFilter(inputValue, enabledCryptoCurrencyOptions, {\n\t\t\t\textract: (option) => {\n\t\t\t\t\tconst config = SharedCryptoCurrencyConfig[option.value];\n\t\t\t\t\treturn [config.displayName, config.abbreviation].join(' ');\n\t\t\t\t}\n\t\t }).map((element) => element.original)\n\t\t: undefined;\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tprefixClassName={cxs({display: 'inline-flex'})}\n\t\t\t\tsufixClassName={cryptoSelectorInputSufixCss(primaryColor, showDropDown)}\n\t\t\t\tcontainerClassName={inputContainerClasses}\n\t\t\t\tsufix={\n\t\t\t\t\t\n\t\t\t\t\t\t{selectedOption?.contractType} \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tonInput={(event) => {\n\t\t\t\t\thandleInput(event.currentTarget.value);\n\t\t\t\t}}\n\t\t\t\tonFocus={handleInputFocus}\n\t\t\t/>\n\t\t\t{showDropDown && (\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t{filteredOptions ? (\n\t\t\t\t\t\t\tfilteredOptions.length === 0 ? (\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\tWe don't currently support this coin on our site, but for\n\t\t\t\t\t\t\t\t\tdonations worth over $5,000 USD we can do it manually. Please\n\t\t\t\t\t\t\t\t\temail to arrange.\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{filteredOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{quickSelectOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t
      \n\t\t\t\t\t\t\t\t\t{otherOptions.map((option) => optionToListItem(option))}\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t)}\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t)}\n\t\t
    \n\t);\n};\n","const DefaultLocale = 'en-US';\n\nexport function displayCurrencyValue(\n\tvalue: string | number,\n\tcurrency: string,\n\toptions?: {showCurrency?: boolean}\n): string {\n\tconst amountString = new Intl.NumberFormat(DefaultLocale, {\n\t\tstyle: 'currency',\n\t\tcurrency\n\t}).format(Number.parseFloat(value.toString()));\n\n\t// remove 0 cents if present, tolerant to different locale formats\n\t// https://stackoverflow.com/a/49724581\n\tconst formatted = `${amountString.replace(/\\D00(?=\\D*$)/, '')} ${\n\t\toptions?.showCurrency ? ` ${currency}` : ''\n\t}`;\n\n\treturn formatted;\n}\n","import {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nexport function getSubmitButtonText({\n\tmethod,\n\tpaymentRequestIsApplePay,\n\tcryptoCurrency\n}: {\n\tmethod: PaymentMethod;\n\tpaymentRequestIsApplePay?: boolean;\n\tcryptoCurrency?: CryptoCurrency;\n}) {\n\tconst base = 'Continue with ';\n\tswitch (method) {\n\t\tcase PaymentMethod.CREDIT_CARD:\n\t\t\treturn base + 'credit or debit';\n\t\tcase PaymentMethod.BANK:\n\t\t\treturn base + 'bank';\n\t\tcase PaymentMethod.PAYPAL:\n\t\t\treturn base + 'PayPal';\n\t\tcase PaymentMethod.VENMO:\n\t\t\treturn base + 'Venmo';\n\t\tcase PaymentMethod.PAYMENT_REQUEST:\n\t\t\treturn base + (paymentRequestIsApplePay ? 'Apple Pay' : 'Google Pay');\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn base + 'Chariot';\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn base + (cryptoCurrency ?? 'crypto');\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn 'Redeem gift card';\n\t\tdefault:\n\t\t\treturn 'Continue';\n\t}\n}\n","import {render as preactRender} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {parseDonateUrl} from 'src/helpers/parseDonateUrl';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\nconst OBSERVER_OPTIONS = {\n\tchildList: true,\n\tsubtree: true,\n\tattributeFilter: ['href']\n};\n\ninterface CreateButtonProps extends Partial {\n\telement: Element;\n\tnonprofitSlug: string;\n\tonClick: () => void;\n\turl?: string;\n}\n\ninterface CreateWidgetProps extends Partial {\n\tnonprofitSlug: string;\n}\n\nlet shadowRoot: ShadowRoot;\nlet widgetContainer: HTMLElement;\nconst widgetsMap = new Map();\n\nclass WidgetController {\n\toptions: CreateWidgetProps;\n\tmountPoint: HTMLElement;\n\tconstructor(options: CreateWidgetProps, mountPoint: HTMLElement) {\n\t\tthis.options = options;\n\t\tthis.mountPoint = mountPoint;\n\t}\n\n\thide() {\n\t\tthis.options.show = false;\n\t\tthis.render();\n\t}\n\n\tshow() {\n\t\tthis.options.show = true;\n\t\tthis.render();\n\t}\n\n\tsetOptions(options: WidgetConfig) {\n\t\tthis.options = options;\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tpreactRender(\n\t\t\t {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}}\n\t\t\t/>,\n\t\t\tthis.mountPoint\n\t\t);\n\t}\n}\n\nfunction mountShadowRoot() {\n\tconst shadowWidgetWrapper = document.createElement('div');\n\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\tshadowWidgetWrapper.style.position = 'absolute';\n\tshadowWidgetWrapper.style.zIndex = '20000000';\n\tdocument.body.append(shadowWidgetWrapper);\n\tshadowRoot = shadowWidgetWrapper.attachShadow({mode: 'open'});\n}\n\nfunction mountWidgetContainer() {\n\tif (!shadowRoot) {\n\t\tmountShadowRoot();\n\t}\n\n\twidgetContainer = document.createElement('div');\n\twidgetContainer.id = 'widget-container';\n\tshadowRoot.append(widgetContainer);\n\n\tconst everyStyles: HTMLStyleElement | null =\n\t\tdocument.querySelector('#every-styles');\n\n\tif (everyStyles) {\n\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t.map((rule) => rule.cssText)\n\t\t\t.join('\\n');\n\n\t\tconst everyShadowStyles = document.createElement('style');\n\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\twidgetContainer.append(everyShadowStyles);\n\t}\n}\n\nfunction createWidget(options: CreateWidgetProps, urlString: string) {\n\tif (!widgetContainer) {\n\t\tmountWidgetContainer();\n\t}\n\n\tconst widgetMountPoint = document.createElement('div');\n\twidgetContainer.append(widgetMountPoint);\n\n\tconst widget = new WidgetController(options, widgetMountPoint);\n\twidgetsMap.set(urlString, widget);\n\treturn widget;\n}\n\nfunction createButton({element, ...options}: CreateButtonProps) {\n\tif (!element.parentNode) {\n\t\treturn;\n\t}\n\n\tconst buttonContainer = element.parentNode as HTMLElement;\n\n\tpreactRender(, buttonContainer, element);\n}\n\nfunction findAndReplaceLinks() {\n\tconst links = document.querySelectorAll(\"*[href^='https://www.every.org/']\");\n\n\tlinks.forEach((link) => {\n\t\tconst urlString = link.getAttribute('href');\n\t\tif (urlString?.includes('#/donate')) {\n\t\t\tconst options = parseDonateUrl(urlString);\n\n\t\t\tif (!options) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst widget =\n\t\t\t\twidgetsMap.get(urlString) ?? createWidget(options, urlString);\n\n\t\t\tif (link.getAttribute('data-every-style') === null) {\n\t\t\t\tlink.addEventListener('click', (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\twidget.show();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tcreateButton({\n\t\t\t\t\telement: link,\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\twidget.show();\n\t\t\t\t\t},\n\t\t\t\t\t...options,\n\t\t\t\t\turl: urlString\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport default function autoPlayMode() {\n\tloadFonts();\n\tfindAndReplaceLinks();\n\n\tconst observer = new MutationObserver((mutations, observer) => {\n\t\t// disconnect before changing DOM so as not to cause an infinite loop\n\t\tobserver.disconnect();\n\n\t\tconst isLinksChanged = Boolean(\n\t\t\tmutations.some((mutation) => mutation.target.nodeName === 'A')\n\t\t);\n\n\t\tif (isLinksChanged) {\n\t\t\tfindAndReplaceLinks();\n\t\t}\n\n\t\tobserver.observe(document, OBSERVER_OPTIONS);\n\t});\n\n\tobserver.observe(document, OBSERVER_OPTIONS);\n}\n\ndeclare const window: Window &\n\ttypeof globalThis & {\n\t\tWebKitMutationObserver: MutationObserver;\n\t\tMozMutationObserver: MutationObserver;\n\t};\n\nconst MutationObserver =\n\twindow.MutationObserver ||\n\twindow.WebKitMutationObserver ||\n\twindow.MozMutationObserver;\n","export enum FontFamily {\n\tBasisGrotesque = `'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto,\n sans-serif`\n}\n","import cxs from 'cxs';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\n\ncxs.prefix('every-embedded-');\n\nexport const buttonCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\twidth: 'max-content',\n\tborder: 'none',\n\toutline: 'none',\n\tfontFamily: FontFamily.BasisGrotesque,\n\tfontWeight: 500,\n\tlineHeight: 1,\n\tcursor: 'pointer',\n\ttextDecoration: 'none',\n\tbackfaceVisibility: 'hidden',\n\ttransition: 'background-color 0.25s',\n\n\tpadding: '12px 20px',\n\tcolor: '#fff',\n\tbackgroundColor: '#00a380',\n\tborderRadius: '100px',\n\tfontSize: '16px',\n\t'&:hover': {backgroundColor: '#2F806D'}\n});\n\nexport const logoCss = cxs({\n\twidth: '16px',\n\theight: '16px',\n\tfill: '#fff',\n\tmarginRight: '8px'\n});\n\nexport const verticalCenterTextCss = cxs({\n\ttransform: 'translateY(0.08em)'\n});\n","export const BASE_URL = 'https://www.every.org/';\nexport const BASE_API_URL = 'https://partners.every.org/v0.2/nonprofit';\nexport const BASE_CLOUDINARY_URL =\n\t'https://res.cloudinary.com/everydotorg/image/upload/';\nexport const BASE_COINGECKO_URL = 'https://api.coingecko.com/api/v3';\n\nexport const SUPPORT_EMAIL = 'support@every.org';\nexport const TEAM_EMAIL = 'team@every.org';\nexport const CRYPTO_EMAIL = 'crypto@every.org';\n\nexport const TERMS_ROUTE = 'terms';\nexport const HELP_ROUTE = 'support';\nexport const PRIVACY_ROUTE = 'privacy';\nexport const ABOUT_ROUTE = 'about-us';\nexport const FUNDRAISER_ROUTE = 'fundraiser';\nexport const GIFT_CARD_ROUTE = 'gift';\n\nexport const TERMS_URL = BASE_URL + TERMS_ROUTE;\nexport const HELP_URL = BASE_URL + HELP_ROUTE;\nexport const PRIVACY_URL = BASE_URL + PRIVACY_ROUTE;\nexport const ABOUT_URL = BASE_URL + ABOUT_ROUTE;\nexport const GIFT_CARD_URL = BASE_URL + GIFT_CARD_ROUTE;\n","import {\n\tbuttonCss,\n\tlogoCss,\n\tverticalCenterTextCss\n} from 'src/components/embed-button/styles';\nimport {EmbedButtonOptions} from 'src/components/embed-button/types';\nimport {constructBasicDonateUrl} from 'src/helpers/constructDonateUrl';\n\n/**\n * Used to identify if a link is a donate button\n */\nconst EmbedButton = ({\n\twithLogo = true,\n\ttextColor = '#fff',\n\tbgColor = '#00a380',\n\tborderRadius = '100px',\n\tfontSize = '16px',\n\tpadding = '12px 20px',\n\tclassName,\n\tonClick,\n\ttarget = '_blank',\n\turl: initialUrl,\n\tlabel = 'Donate',\n\t...donateOptions\n}: EmbedButtonOptions) => {\n\tconst url = initialUrl ? initialUrl : constructBasicDonateUrl(donateOptions);\n\treturn (\n\t\t {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonClick();\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t>\n\t\t\t{withLogo && (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t\t{label}\n\t\t\n\t);\n};\n\nexport default EmbedButton;\n","export enum DonationFrequency {\n\tMonthly = 'monthly',\n\tOneTime = 'once',\n\tUnselected = ''\n}\n","export enum PaymentMethod {\n\tCREDIT_CARD = 'card',\n\tBANK = 'bank',\n\tPAYPAL = 'paypal',\n\tVENMO = 'venmo',\n\tPAYMENT_REQUEST = 'pay',\n\tCRYPTO = 'crypto',\n\tSTOCKS = 'stocks',\n\tDAF = 'daf',\n\tGIFT_CARD = 'gift'\n}\n\nexport const OneTimeFrequencyMethods = [\n\tPaymentMethod.VENMO,\n\tPaymentMethod.DAF,\n\tPaymentMethod.CRYPTO,\n\tPaymentMethod.STOCKS\n];\n\nexport const AvailablePaymentMethods = Object.values(PaymentMethod);\nexport const DefaultPaymentMethods = AvailablePaymentMethods.filter(\n\t(pm) => pm !== PaymentMethod.GIFT_CARD\n);\nexport interface PaymentRequestAvailable {\n\tgooglePay: boolean;\n\tapplePay: boolean;\n}\n","export const loadFonts = () => {\n\tconst fonts = document.createElement('style');\n\tfonts.innerHTML = `\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Regular-Pro.woff2) format(\"woff2\");\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Bold-Pro.woff2) format(\"woff2\");\n font-weight: bold;\n font-style: normal;\n font-display: swap;\n }\n @font-face {\n font-family: \"Basis Grotesque Pro\";\n src: local(\"Basis Grotesque Pro\"), local(\"Basis Grotesque Pro\"),\n url(https://assets.every.org/every-month/BasisGrotesque-Medium-Pro.woff2) format(\"woff2\");\n font-weight: 500;\n font-style: normal;\n font-display: swap;\n }\n `;\n\tdocument.head.append(fonts);\n};\n","import deepMerge, {Options as DeepMergeOptions} from 'deepmerge';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tAvailablePaymentMethods,\n\tDefaultPaymentMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nconst defaults: Partial = {\n\tmethods: Object.values(DefaultPaymentMethods),\n\tshow: false,\n\taddAmounts: [10, 50, 100],\n\tdefaultFrequency: DonationFrequency.OneTime,\n\tminDonationAmount: 5,\n\tprimaryColor: '#018669',\n\tshowGiftCardOption: false\n};\n\nconst DEEP_MERGE_OPTIONS: DeepMergeOptions = {\n\t// Don't merge arrays, just overwrite them\n\n\tarrayMerge: (_, sourceArray) => sourceArray\n};\n\nexport const mergeConfig = (options: Partial): WidgetConfig => {\n\tconst filteredInputMethods = options.methods?.filter((method) =>\n\t\tAvailablePaymentMethods.includes(method)\n\t);\n\n\tconst additionalMethods = options.showGiftCardOption\n\t\t? [PaymentMethod.GIFT_CARD]\n\t\t: [];\n\n\tconst methods = (\n\t\tfilteredInputMethods && filteredInputMethods.length > 0\n\t\t\t? filteredInputMethods\n\t\t\t: DefaultPaymentMethods\n\t).concat(additionalMethods);\n\n\treturn deepMerge.all(\n\t\t[defaults, options, {methods}],\n\t\tDEEP_MERGE_OPTIONS\n\t);\n};\n","import {createContext, FunctionalComponent} from 'preact';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {mergeConfig} from 'src/helpers/optionsTypes';\n\nexport const ConfigContext = createContext({} as WidgetConfig);\n\nexport const ConfigContextProvider: FunctionalComponent<{\n\toptions: Partial;\n}> = ({options, children}) => {\n\tconst mergedConfig = mergeConfig(options);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {useContext} from 'preact/hooks';\nimport {ConfigContext} from 'src/components/widget/context/ConfigContext';\n\nexport const useConfigContext = () => useContext(ConfigContext);\n","// TODO: add more accurate type\nexport interface Fundraiser {\n\tid: string;\n\tslug: string;\n\ttitle: string;\n\tcoverImageCloudinaryId: string | null;\n\tactive: boolean;\n\tchildrenFundraiserIds: string | null;\n\tcreatedAt: string | null;\n\tcreatorNonprofitId: string | null;\n\tcreatorUserId: string | null;\n\tdescription: string | null;\n\tendDate: string | null;\n\tentityName: string | null;\n\teventIds: string | null;\n\tgoalAmount: string | null;\n\tgoalCurrency: string | null;\n\tmetadata: string | null;\n\tnonprofitId: string;\n\tparentFundraiserId: string | null;\n\tpinnedAt: string | null;\n\tstartDate: string | null;\n}\n\nexport const FundraiserFetchError = Symbol('FundraiserFetchError');\nexport const FundraiserFetching = Symbol('FundraiserFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getFundraiser} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tFundraiser,\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\ninterface FundraiserContextData {\n\tfundraiser?:\n\t\t| Fundraiser\n\t\t| typeof FundraiserFetchError\n\t\t| typeof FundraiserFetching;\n}\n\nexport const FundraiserContext = createContext({\n\tfundraiser: FundraiserFetching\n});\n\nexport const FundraiserContextProvider: FunctionalComponent = ({children}) => {\n\tconst {fundraiserSlug, nonprofitSlug} = useConfigContext();\n\tconst [fundraiser, setFundraiser] =\n\t\tuseState(FundraiserFetching);\n\n\tconst fetchFundraiser = useCallback(async () => {\n\t\tif (!fundraiserSlug) {\n\t\t\tsetFundraiser(undefined);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await getFundraiser(nonprofitSlug, fundraiserSlug);\n\t\t\tsetFundraiser(response);\n\t\t} catch {\n\t\t\tsetFundraiser(FundraiserFetchError);\n\t\t}\n\t}, [nonprofitSlug, fundraiserSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchFundraiser();\n\t}, [fetchFundraiser]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\nimport {BASE_API_URL, BASE_COINGECKO_URL} from 'src/constants/url';\n\ntype NonprofitResponse = {\n\tmessage: string;\n\tdata: {\n\t\tnonprofit: Nonprofit;\n\t};\n};\n\ntype FundraiserResponse = {\n\tdata: {\n\t\tfundraiser: Fundraiser;\n\t\tnonprofits: Nonprofit[];\n\t};\n};\n\nexport async function getNonprofit(nonprofitSlug: string) {\n\tconst data: NonprofitResponse = await fetch(\n\t\t`${BASE_API_URL}/${nonprofitSlug}`\n\t).then(async (response) => response.json());\n\n\treturn data.data.nonprofit;\n}\n\nexport async function getFundraiser(\n\tnonprofitSlug: string,\n\tfundraiserSlug: string\n) {\n\tconst url = `${BASE_API_URL}/${nonprofitSlug}/fundraiser/${fundraiserSlug}`;\n\tconst data: FundraiserResponse = await fetch(url).then(async (response) =>\n\t\tresponse.json()\n\t);\n\n\treturn data.data.fundraiser;\n}\n\ninterface CoingeckoData {\n\tmarket_data: {\n\t\tcurrent_price: {\n\t\t\tusd: number;\n\t\t};\n\t};\n}\n\nexport async function getCoingeckoRate(coingeckoId: string) {\n\tconst url = `${BASE_COINGECKO_URL}/coins/${coingeckoId}`;\n\tconst data = await fetch(url).then(async (response) => response.json());\n\n\treturn (data as CoingeckoData).market_data.current_price.usd;\n}\n","// TODO: add more accurate type\nexport interface Nonprofit {\n\tid: string;\n\tein: string;\n\tname: string;\n\tprimarySlug: string;\n\tprofileUrl: string;\n\tdirectDisbursement?: boolean;\n\thasAdmin?: boolean;\n\tdescription: string | null;\n\tcoverImageCloudinaryId: string | null;\n\tcoverImageUrl: string | null;\n\tdescriptionLong: string | null;\n\tisDisbursable: boolean;\n\tlocationAddress: string | null;\n\tlogoCloudinaryId: string | null;\n\tlogoUrl: string | null;\n\tnteeCode: string | null;\n\tmetadata?: {\n\t\tdisablePrivateNotes?: boolean;\n\t\tprefixWithThe?: boolean;\n\t\thideFundraiseButton?: boolean;\n\t};\n}\n\nexport const NonprofitFetchError = Symbol('NonprofitFetchError');\nexport const NonprofitFetching = Symbol('NonprofitFetching');\n","import {createContext, FunctionalComponent} from 'preact';\nimport {useCallback, useEffect, useState} from 'preact/hooks';\nimport {getNonprofit} from 'src/components/widget/api';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {\n\tNonprofit,\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\ninterface NonprofitContextData {\n\tnonprofit: Nonprofit | typeof NonprofitFetchError | typeof NonprofitFetching;\n}\n\nexport const NonprofitContext = createContext({\n\tnonprofit: NonprofitFetching\n});\n\nexport const NonprofitContextProvider: FunctionalComponent = ({children}) => {\n\tconst {nonprofitSlug} = useConfigContext();\n\tconst [nonprofit, setNonprofit] =\n\t\tuseState(NonprofitFetching);\n\n\tconst fetchNonprofit = useCallback(async () => {\n\t\ttry {\n\t\t\tconst response = await getNonprofit(nonprofitSlug);\n\t\t\tsetNonprofit(response);\n\t\t} catch {\n\t\t\tsetNonprofit(NonprofitFetchError);\n\t\t}\n\t}, [nonprofitSlug]);\n\n\tuseEffect(() => {\n\t\t// eslint-disable-next-line @typescript-eslint/no-floating-promises\n\t\tfetchNonprofit();\n\t}, [fetchNonprofit]);\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"1.54.2\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n }\n\n script.addEventListener('load', function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n });\n script.addEventListener('error', function () {\n reject(new Error('Failed to load Stripe.js'));\n });\n } catch (error) {\n reject(error);\n return;\n }\n });\n return stripePromise;\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n// own script injection.\n\nvar stripePromise$1 = Promise.resolve().then(function () {\n return loadScript(null);\n});\nvar loadCalled = false;\nstripePromise$1[\"catch\"](function (err) {\n if (!loadCalled) {\n console.warn(err);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now();\n return stripePromise$1.then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","export const STRIPE_PUBLIC_KEY = 'pk_live_a5XJAcVaIqMs8ggZMtluZs8z00r2H4kYVG';\nexport const STRIPE_API_VERSION = '2022-11-15';\n","import {createContext, FunctionalComponent} from 'preact';\nimport {StateUpdater, useEffect, useState} from 'preact/hooks';\nimport {useCheckPaymentRequest} from 'src/components/widget/hooks/useCheckPaymentRequest';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CryptoCurrency} from 'src/components/widget/types/Crypto';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface WidgetContextProps {\n\tfrequency: DonationFrequency;\n\tsetFrequency: StateUpdater;\n\n\tdonationAmount?: number;\n\tsetDonationAmount: StateUpdater;\n\n\tsubmitError: string | null;\n\tsetSubmitError: StateUpdater;\n\n\tselectedPaymentMethod: PaymentMethod;\n\tsetSelectedPaymentMethod: StateUpdater;\n\n\tstockAmount?: number;\n\tsetStockAmount: StateUpdater;\n\n\tstockSymbol?: string;\n\tsetStockSymbol: StateUpdater;\n\n\tcryptoAmount?: number;\n\tsetCryptoAmount: StateUpdater;\n\n\tcryptoCurrency?: CryptoCurrency;\n\tsetCryptoCurrency: StateUpdater;\n\n\tpaymentRequestAvailable: PaymentRequestAvailable;\n\thideWidget: () => void;\n\n\tprivateNote?: string;\n\tsetPrivateNote: StateUpdater;\n}\n\nexport const WidgetContext = createContext(\n\t{} as WidgetContextProps\n);\n\nexport const WidgetContextProvider: FunctionalComponent<{hide: () => void}> = ({\n\tchildren,\n\thide\n}) => {\n\tconst config = useConfigContext();\n\n\tconst [frequency, setFrequency] = useState(config.defaultFrequency);\n\tconst [donationAmount, setDonationAmount] = useState(\n\t\tconfig.defaultDonationAmount\n\t);\n\tconst [submitError, setSubmitError] = useState(null);\n\tconst [selectedPaymentMethod, setSelectedPaymentMethod] = useState(\n\t\tconfig.methods[0]\n\t);\n\n\tconst [stockAmount, setStockAmount] = useState();\n\tconst [stockSymbol, setStockSymbol] = useState();\n\n\tconst [cryptoAmount, setCryptoAmount] = useState();\n\tconst [cryptoCurrency, setCryptoCurrency] = useState();\n\n\tconst paymentRequestAvailable = useCheckPaymentRequest();\n\n\tconst [privateNote, setPrivateNote] = useState();\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {FunctionComponent} from 'preact';\nimport {ConfigContextProvider} from 'src/components/widget/context/ConfigContext';\nimport {FundraiserContextProvider} from 'src/components/widget/context/FundraiserContext';\nimport {NonprofitContextProvider} from 'src/components/widget/context/NonprofitContext';\nimport {WidgetContextProvider} from 'src/components/widget/context/WidgetContext';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nexport const ContextProvider: FunctionComponent<{\n\toptions: Partial;\n\thide: () => void;\n}> = ({options, hide, children}) => (\n\t\n\t\t\n\t\t\t\n\t\t\t\t{children}\n\t\t\t\n\t\t\n\t\n);\n","export enum BREAKPOINTS {\n\tPhoneOnly = '@media only screen and (max-width: 37.44em)',\n\tTabletUp = '@media only screen and (min-width: 37.5em)',\n\tTabletLandscapeUp = '@media only screen and (min-width: 56.25em)',\n\tDesktopUp = '@media only screen and (min-width: 75em)',\n\tBigDesktopUp = '@media only screen and (min-width: 112.5em)'\n}\n","export enum COLORS {\n\tLightGray = '#EAEDED',\n\tGray = '#f3f6f6',\n\tDarkGray = '#868A8A',\n\tBlack = '#272727',\n\tText = '#2E3434',\n\tTextGray = '#868383',\n\tTextOpaque = 'rgba(46, 52, 52, 0.6)',\n\tError = '#D95C35',\n\tErrorShadow = 'rgba(217, 92, 53, 0.2)',\n\tTransparent = 'transparent',\n\tWhite = '#fff'\n}\n","import cxs from 'cxs';\n\nexport const smallText: cxs.CSSObject = {\n\tfontSize: '12px',\n\tlineHeight: '16px',\n\tletterSpacing: '0.01em'\n};\n\nexport const bodyText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const inputText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '16px'\n};\n\nexport const headingText: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading2Text: cxs.CSSObject = {\n\tfontSize: '24px',\n\tlineHeight: '28px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const heading3Text: cxs.CSSObject = {\n\tfontSize: '20px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.015em'\n};\n\nexport const buttonText: cxs.CSSObject = {\n\tfontSize: '16px',\n\tlineHeight: '24px',\n\tletterSpacing: '-0.01em'\n};\n\nexport const textSize = {\n\txxl: {\n\t\tfontSize: '48px',\n\t\tlineHeight: '56px'\n\t},\n\txl: {\n\t\tfontSize: '32px',\n\t\tlineHeight: '36px'\n\t},\n\tl: {\n\t\tfontSize: '24px',\n\t\tlineHeight: '32px'\n\t},\n\tm: {\n\t\tfontSize: '20px',\n\t\tlineHeight: '24px'\n\t},\n\ts: {\n\t\tfontSize: '16px',\n\t\tlineHeight: '24px'\n\t},\n\txs: {\n\t\tfontSize: '14px',\n\t\tlineHeight: '20px'\n\t},\n\txxs: {\n\t\tfontSize: '12px',\n\t\tlineHeight: '16px'\n\t}\n};\n","import cxs from 'cxs';\n\nexport enum Spacing {\n\tEmpty = '0',\n\n\tXXS = '4px',\n\tXS = '8px',\n\tS = '12px',\n\tM = '16px',\n\tL = '20px',\n\tXL = '24px',\n\tXXL = '32px',\n\n\tStack_XXS = '0 0 4px 0',\n\tStack_XS = '0 0 8px 0',\n\tStack_S = '0 0 12px 0',\n\tStack_M = '0 0 16px 0',\n\tStack_L = '0 0 20px 0',\n\tStack_XL = '0 0 24px 0',\n\tStack_XXL = '0 0 32px 0',\n\n\tInset_XXS = '4px 4px 4px 4px',\n\tInset_XS = '8px 8px 8px 8px',\n\tInset_S = '12px 12px 12px 12px',\n\tInset_M = '16px 16px 16px 16px',\n\tInset_L = '20px 20px 20px 20px',\n\tInset_XL = '24px 24px 24px 24px',\n\tInset_XXL = '32px 32px 32px 32px',\n\n\tInsetSquish_XS = '8px 16px',\n\tInsetSquish_S = '12px 24px',\n\tInsetSquish_M = '16px 32px',\n\tInsetSquish_L = '20px 40px',\n\tInsetSquish_XL = '24px 48px',\n\n\tInline_XS = '0 8px 0 0',\n\tInline_S = '0 12px 0 0',\n\tInline_M = '0 16px 0 0',\n\tInline_L = '0 20px 0 0',\n\tInline_XL = '0 24px 0 0',\n\tInline_XXL = '0 24px 0 0'\n}\n\nconst verticalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t'> *:not(:last-child)': {\n\t\tmarginBottom: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\nconst horizontalStackCssObject = (spacing: number | string): cxs.CSSObject => ({\n\tdisplay: 'flex',\n\tflexDirection: 'row',\n\t'> *:not(:last-child)': {\n\t\tmarginRight: typeof spacing === 'number' ? `${spacing}px` : spacing\n\t}\n});\n\nexport const verticalStackCss = {\n\tclassName: (spacing: number | string) => cxs(verticalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => verticalStackCssObject(spacing)\n};\n\nexport const horizontalStackCss = {\n\tclassName: (spacing: number | string) =>\n\t\tcxs(horizontalStackCssObject(spacing)),\n\tcxs: (spacing: number | string) => horizontalStackCssObject(spacing)\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const faqListCss = cxs({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\tgap: Spacing.M\n});\n\nexport const rotateCss: cxs.CSSObject = {\n\tposition: 'relative',\n\ttop: '-1px',\n\ttransform: 'rotate(180deg)'\n};\n\nexport const descriptionBaseCss: cxs.CSSObject = {\n\t'> p': {\n\t\tmarginBottom: Spacing.XS\n\t}\n};\nexport const descriptionOpen = cxs({\n\t...descriptionBaseCss,\n\tmaxHeight: '1000px',\n\ttransition: 'all 1s',\n\topacity: '1'\n});\n\nexport const descriptionClose = cxs({\n\t...descriptionBaseCss,\n\topacity: '0',\n\toverflow: 'hidden',\n\tmaxHeight: '0',\n\ttransition: 'all 0.5s'\n});\n\nexport const faqItemConateinerCss = (mobileOnly?: boolean) =>\n\tcxs({\n\t\t...textSize.xs,\n\t\t...(mobileOnly\n\t\t\t? {\n\t\t\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\t\t\tpadding: 'none'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const faqItemButtonCss = (isOpen: boolean) =>\n\tcxs({\n\t\t...horizontalStackCss.cxs(Spacing.S),\n\t\t...textSize.xs,\n\t\talignItems: 'center',\n\t\tjustifyContent: 'space-between',\n\t\twidth: '100%',\n\t\tborder: 'none',\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: 0,\n\t\t':hover': {cursor: 'pointer'},\n\t\t'> svg': {\n\t\t\twidth: '16px',\n\t\t\theight: '16px',\n\t\t\t...(isOpen ? rotateCss : {})\n\t\t},\n\t\t...(isOpen\n\t\t\t? {\n\t\t\t\t\tfontWeight: 700\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tfontWeight: 500,\n\t\t\t\t\tcolor: COLORS.TextGray\n\t\t\t })\n\t});\n\nexport const faqLinkCss = cxs({\n\tcolor: COLORS.Text,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {getNonprofitName} from 'src/components/widget/components/Faq/helpers';\nimport {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {Nonprofit} from 'src/components/widget/types/Nonprofit';\n\nexport function isOfficialFundraiser(fundraiser: Fundraiser): boolean {\n\treturn fundraiser.nonprofitId === fundraiser.creatorNonprofitId;\n}\n\nexport const getTaxDeductibleStatement = (\n\tnonprofit: Nonprofit,\n\tfundraiser?: Fundraiser\n) => {\n\tconst base = `100% of your donation is tax-deductible to the extent allowed by US law. \n Your donation is made to Every.org, a tax-exempt US 501(c)(3) charity that\n grants unrestricted funds to ${getNonprofitName(\n\t\t\t\tnonprofit\n\t\t\t)} on your behalf. \n As a legal matter, Every.org must provide any donations to ${getNonprofitName(\n\t\t\t\tnonprofit\n\t\t\t)} on an\n unrestricted basis, regardless of any designations or restrictions made by\n you.`;\n\n\tconst isUnofficialFundraiser =\n\t\tfundraiser && !isOfficialFundraiser(fundraiser);\n\n\tlet end = '';\n\n\tif (nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t} else if (!nonprofit.hasAdmin && !isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation.`;\n\t} else if (!nonprofit.hasAdmin && isUnofficialFundraiser) {\n\t\tend = `Please note ${nonprofit.name} has not provided permission for this solicitation or reviewed or approved the content of this peer-to-peer fundraiser.`;\n\t}\n\n\treturn (\n\t\t\n\t\t\t{base} {end}\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tbackgroundColor: 'white',\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tborderRadius: 'unset',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tborderRadius: '16px',\n\t\tpadding: Spacing.M\n\t}\n});\n","const joinClassNames = (classNames: Array) => {\n\treturn classNames.filter((className) => Boolean(className)).join(' ');\n};\n\nexport default joinClassNames;\n","import {FunctionalComponent} from 'preact';\nimport {cardCss} from 'src/components/widget/components/GridCard/styles';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CardProps {\n\tclassName?: string;\n}\n\nexport const GridCard: FunctionalComponent = ({\n\tchildren,\n\tclassName\n}) => {\n\treturn
    {children}
    ;\n};\n","import {useContext} from 'preact/hooks';\nimport {FundraiserContext} from 'src/components/widget/context/FundraiserContext';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\n\nexport const useFundraiser = () => useContext(FundraiserContext).fundraiser;\n\nexport const useFundraiserOrUndefined = () => {\n\tconst fundraiser = useFundraiser();\n\n\tif (\n\t\tfundraiser === FundraiserFetchError ||\n\t\tfundraiser === FundraiserFetching\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn fundraiser;\n};\n","import {useContext} from 'preact/hooks';\nimport {NonprofitContext} from 'src/components/widget/context/NonprofitContext';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nexport const useNonprofit = () => useContext(NonprofitContext).nonprofit;\n\nexport const useNonprofitOrError = () => {\n\tconst nonprofit = useNonprofit();\n\n\tif (nonprofit === NonprofitFetchError || nonprofit === NonprofitFetching) {\n\t\t// TODO: add more readable error\n\t\tthrow new Error('Nonprofit error');\n\t}\n\n\treturn nonprofit;\n};\n","import {useContext} from 'preact/hooks';\nimport {WidgetContext} from 'src/components/widget/context/WidgetContext';\n\nexport const useWidgetContext = () => useContext(WidgetContext);\n","export const ArrowIcon = () => (\n\t\n\t\t\n\t\n);\n","import {FunctionalComponent, VNode} from 'preact';\nimport {useState} from 'preact/hooks';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {\n\tgetFeeDescription,\n\tgetNonprofitName\n} from 'src/components/widget/components/Faq/helpers';\nimport {\n\tfaqItemConateinerCss,\n\tfaqItemButtonCss,\n\tdescriptionOpen,\n\tdescriptionClose,\n\tfaqLinkCss,\n\tfaqListCss\n} from 'src/components/widget/components/Faq/styles';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {ArrowIcon} from 'src/components/widget/icons/ArrowIcon';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\ninterface FaqItemTypes {\n\tid: string;\n\ttitle: string;\n\tdescription: VNode;\n\tmobileOnly?: boolean;\n\thideSlugList?: string[];\n}\n\nconst FaqItem: FunctionalComponent<{faqData: FaqItemTypes}> = ({faqData}) => {\n\tconst [isOpen, setOpen] = useState(false);\n\tconst {nonprofitSlug} = useConfigContext();\n\n\tif (faqData.hideSlugList?.includes(nonprofitSlug)) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetOpen(!isOpen);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{faqData.title}\n\t\t\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t{faqData.description}\n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport const Faq = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tconst faqDataList: FaqItemTypes[] = [\n\t\t{\n\t\t\tid: 'intro',\n\t\t\ttitle: 'How does Every.org accept my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYour donation is made to Every.org, a US 501(c)(3) public charity.\n\t\t\t\t\t\tEvery.org will immediately send you a receipt by email. On a weekly\n\t\t\t\t\t\tbasis, Every.org sends funds to {getNonprofitName(nonprofit)}.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tThis process ensures your eligibility for a tax deduction, enables\n\t\t\t\t\t\tyou to consolidate your gift records, and reduces the burden on{' '}\n\t\t\t\t\t\t{getNonprofitName(nonprofit)}.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'fees',\n\t\t\ttitle: 'Are there any fees?',\n\t\t\tdescription: getFeeDescription(selectedPaymentMethod, nonprofit)\n\t\t},\n\t\t{\n\t\t\tid: 'tax',\n\t\t\ttitle: 'Is this donation tax-deductible?',\n\t\t\tdescription: (\n\t\t\t\t

    Yes, {getTaxDeductibleStatement(nonprofit, fundraiser)}

    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'receipt',\n\t\t\ttitle: 'Will I receive a receipt for my donation?',\n\t\t\tdescription: (\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t\tYes, after your donation payment is confirmed, you will immediately\n\t\t\t\t\t\tget a receipt emailed to you.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tAdditionally, if you have an Every.org account, you can always get a\n\t\t\t\t\t\tsingle itemized receipt that shows all your donations in a given\n\t\t\t\t\t\tyear.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t)\n\t\t},\n\t\t{\n\t\t\tid: 'p2p',\n\t\t\tmobileOnly: true,\n\t\t\thideSlugList: ['irc'],\n\t\t\ttitle: `How else can I support ${nonprofit.name}?`,\n\t\t\tdescription: (\n\t\t\t\t

    \n\t\t\t\t\tYou can also rally your friends, family, and social networks to\n\t\t\t\t\tsupport this nonprofit by starting your own fundraiser for them.{' '}\n\t\t\t\t\t\n\t\t\t\t\t\tStart a fundraiser for {nonprofit.name}\n\t\t\t\t\t\n\t\t\t\t

    \n\t\t\t)\n\t\t}\n\t];\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t{faqDataList.map((item) => (\n\t\t\t\t\t\n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const footerCardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\tbackgroundColor: 'unset',\n\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\t...textSize.xs,\n\tcolor: COLORS.TextGray,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: `0px ${Spacing.L}`\n\t},\n\t'> p': {\n\t\tmargin: 0\n\t},\n\t'> p:not(:last-child)': {\n\t\tmarginBottom: Spacing.XS\n\t}\n});\n\nexport const footerLinkCss = cxs({\n\tcolor: COLORS.TextGray,\n\tfontWeight: 500,\n\ttextDecoration: 'none',\n\t':hover': {\n\t\ttextDecoration: 'underline'\n\t}\n});\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {getTaxDeductibleStatement} from 'src/components/widget/components/Footer/helpers';\nimport {\n\tfooterCardCss,\n\tfooterLinkCss\n} from 'src/components/widget/components/Footer/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {\n\tTERMS_URL,\n\tHELP_URL,\n\tPRIVACY_URL,\n\tSUPPORT_EMAIL\n} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nconst FEEDBACK_URL = mailToLink({address: SUPPORT_EMAIL});\ninterface FooterLinkProps\n\textends JSXInternal.HTMLAttributes {}\nconst FooterLink: FunctionComponent = ({\n\tchildren,\n\t...rest\n}) => (\n\t\n\t\t{children}\n\t\n);\n\nexport const Footer = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t{getTaxDeductibleStatement(nonprofit, fundraiser)}{' '}\n\t\t\t\tSee Terms\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tNeed help? See FAQs or contact us at our{' '}\n\t\t\t\tHelp Center.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tHave ideas for how we can build a better donation experience?{' '}\n\t\t\t\tSend us feedback.\n\t\t\t

    \n\t\t\t

    \n\t\t\t\tWe respect your privacy. To learn more, check out our{' '}\n\t\t\t\tPrivacy Policy.\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\n\nexport const linkCss = (primaryColor: string) =>\n\tcxs({\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\ttextDecoration: 'none',\n\t\t':hover': {\n\t\t\ttextDecoration: 'underline'\n\t\t}\n\t});\n\nexport const cardCss = cxs({\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {\n\tcardCss,\n\tlinkCss\n} from 'src/components/widget/components/FundraiserLink/styles';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {BASE_URL, FUNDRAISER_ROUTE} from 'src/constants/url';\n\nexport const FundraiserLink = () => {\n\tconst {primaryColor, nonprofitSlug} = useConfigContext();\n\tconst nonprofit = useNonprofitOrError();\n\n\tif (nonprofit.metadata?.hideFundraiseButton) {\n\t\treturn null;\n\t}\n\n\tconst href = BASE_URL + nonprofitSlug + '/' + FUNDRAISER_ROUTE;\n\n\treturn (\n\t\t\n\t\t\t

    \n\t\t\t\t\n\t\t\t\t\tStart a fundraiser\n\t\t\t\t{' '}\n\t\t\t\tto rally your friends and family\n\t\t\t

    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {FunctionalComponent} from 'preact';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst gridCss = cxs({\n\tdisplay: 'grid',\n\tgridGap: 0,\n\tgridTemplateColumns: '1fr',\n\tgridTemplateAreas: `\"header\"\n \"promoBanners\"\n \"nonprofitInfo\"\n \"paymentProcess\"\n \"fundraiserLink\"\n \"faq\"\n \"footer\"`,\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumnGap: Spacing.XL,\n\t\tgridTemplateColumns: '1fr 2fr',\n\t\tgridTemplateRows: 'auto auto auto auto auto 1fr',\n\t\tgridTemplateAreas: `\"header header\"\n \"promoBanners promoBanners\"\n \"nonprofitInfo paymentProcess\"\n \"fundraiserLink paymentProcess\"\n \"faq paymentProcess\"\n \"faq footer\"`,\n\t\t'& > div:not(:last-child):not(:empty)': {\n\t\t\tmarginBottom: Spacing.XL\n\t\t}\n\t},\n\n\t'& > #every-header': {\n\t\tgridArea: 'header',\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t},\n\t'& > #every-promoBanners': {gridArea: 'promoBanners'},\n\t'& > #every-nonprofitInfo': {gridArea: 'nonprofitInfo'},\n\t'& > #every-paymentProcess': {gridArea: 'paymentProcess'},\n\t'& > #every-faq': {gridArea: 'faq'},\n\t'& > #every-fundraiserLink': {gridArea: 'fundraiserLink'},\n\t'& > #every-footer': {gridArea: 'footer'}\n});\n\nexport const Grid: FunctionalComponent = ({children}) => {\n\treturn
    {children}
    ;\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const buttonCss = cxs({\n\tcursor: 'pointer',\n\tdisplay: 'inline-flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\tpadding: 0,\n\tborder: 'none',\n\tbackgroundColor: 'transparent',\n\tfontFamily: FontFamily.BasisGrotesque\n});\n\nexport const smallScreenCloseButtonCss = cxs({\n\tdisplay: 'block',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none'\n\t}\n});\n\nexport const largeScreenCloseButtonCss = cxs({\n\tposition: 'absolute',\n\tright: Spacing.XL,\n\ttop: Spacing.XL,\n\n\tpadding: Spacing.XXS,\n\tbackground: 'white',\n\tborderRadius: '8px',\n\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CloseIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {buttonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {CloseIcon} from 'src/components/widget/icons/CloseIcon';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const CloseButton = ({className}: {className?: string}) => {\n\tconst {hideWidget} = useWidgetContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const containerCss = cxs({\n\tdisplay: 'flex',\n\tjustifyContent: 'flex-end',\n\talignItems: 'center',\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: 0\n\t}\n});\n","import {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {smallScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {containerCss} from 'src/components/widget/components/Header/styles';\n\nexport const Header = () => {\n\treturn (\n\t\t
    \n\t\t\t\n\t\t
    \n\t);\n};\n","export enum Radii {\n\tSmall = '4px',\n\tDefault = '8px',\n\tMedium = '24px',\n\tBig = '100px',\n\tCircle = '100%'\n}\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\thorizontalStackCss,\n\tSpacing,\n\tverticalStackCss\n} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const nonprofitNameCss = cxs({\n\tlineHeight: '20px',\n\tfontWeight: 'unset',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const fundraiserNameCss = cxs({\n\tlineHeight: '20px',\n\tfontWeight: 'unset',\n\t'> span': {\n\t\tfontWeight: 700\n\t}\n});\n\nexport const logoImageCss = (logoUrl: string) =>\n\tcxs({\n\t\tborderRadius: Radii.Circle,\n\t\toverflow: 'hidden',\n\t\tdisplay: 'block',\n\t\tbackgroundImage: `url(${logoUrl})`,\n\t\tbackgroundSize: 'contain',\n\t\twidth: '40px',\n\t\theight: '40px',\n\t\tflexShrink: 0,\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\twidth: '64px',\n\t\t\theight: '64px'\n\t\t}\n\t});\n\nexport const fundraiserCardLogoCss = (logoUrl: string) =>\n\tjoinClassNames([\n\t\tlogoImageCss(logoUrl),\n\t\tcxs({\n\t\t\twidth: '32px',\n\t\t\theight: '32px',\n\t\t\tflexShrink: 0,\n\t\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\t\twidth: '40px',\n\t\t\t\theight: '40px'\n\t\t\t}\n\t\t})\n\t]);\n\nexport const nonprofitCardCss = cxs({\n\tpadding: `${Spacing.XL}`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(Spacing.S),\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const largeFundraiserCardCss = cxs({\n\tdisplay: 'none',\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'flex',\n\t\tgap: `${Spacing.S}`,\n\t\tflexDirection: 'column',\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const smallFundraiserCardCss = cxs({\n\tdisplay: 'flex',\n\tgap: `${Spacing.S}`,\n\tpadding: `${Spacing.XL}`,\n\toverflow: 'hidden',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'none',\n\t\tflexDirection: 'column',\n\t\tpadding: `${Spacing.L}`\n\t}\n});\n\nexport const avatarAndNameWrapperCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.S),\n\talignItems: 'center'\n});\n\nexport const fundraiserAvatarAndNameWrapperCss = cxs({\n\tdisplay: 'flex',\n\tgap: `${Spacing.S}`,\n\talignItems: 'center',\n\n\t'& > .every-embedded-fundraiser-card__nonprofit-name': {\n\t\tdisplay: 'none',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'block'\n\t\t}\n\t}\n});\n\nexport const descriptionCss = cxs({\n\t...textSize.xs,\n\tcolor: 'rgba(0, 0, 0, 0.7)',\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tdisplay: 'block'\n\t}\n});\n\nexport const truncatedTextCss = (numberLines: number) =>\n\tcxs({\n\t\toverflow: 'hidden',\n\t\toverflowWrap: 'anywhere',\n\t\twordBreak: 'break-word',\n\t\ttextOverflow: 'ellipsis',\n\t\tdisplay: '-webkit-box',\n\t\t'-webkit-box-orient': 'vertical',\n\t\t'-webkit-line-clamp': numberLines,\n\t\talignItems: 'start'\n\t});\n","export const COVER_IMAGE_PLACEHOLDER_ID = 'profile_picture_placeholder_o56tme';\nexport const LOGO_IMAGE_PLACEHOLDER_ID = 'NonprofitAvatarPlaceholder';\n","import {BASE_CLOUDINARY_URL} from 'src/constants/url';\n\ninterface CloudinaryOptions {\n\twidth?: number;\n\theight?: number;\n\tfillMode?: 'fill' | 'lfill';\n}\n\nconst FLAGS = 'f_auto,q_auto';\n\nexport function fillDimensionsTransform(options: CloudinaryOptions) {\n\tif (options.width === 0 || options.height === 0) {\n\t\tthrow new Error('dimensions cannot be 0');\n\t}\n\n\treturn [\n\t\t`c_${options.fillMode ?? 'lfill'}`,\n\t\toptions.width ? `w_${Math.floor(options.width)}` : undefined,\n\t\toptions.height ? `h_${Math.floor(options.height)}` : undefined\n\t]\n\t\t.filter((value?: string) => value !== undefined)\n\t\t.join(',');\n}\n\nexport const getCloudinaryUrl = (\n\tcloudinaryId: string,\n\toptions?: CloudinaryOptions\n) => {\n\treturn `${BASE_CLOUDINARY_URL}${FLAGS}${\n\t\toptions ? `,${fillDimensionsTransform(options)}` : ''\n\t}/${cloudinaryId}`;\n};\n","import cxs from 'cxs';\nimport {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tnonprofitNameCss,\n\tdescriptionCss,\n\ttruncatedTextCss,\n\tfundraiserCardLogoCss,\n\tfundraiserAvatarAndNameWrapperCss,\n\tlargeFundraiserCardCss,\n\tsmallFundraiserCardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {Fundraiser} from 'src/components/widget/types/Fundraiser';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nconst coverImageCss = (url: string) =>\n\tcxs({\n\t\tbackgroundImage: `url(${url})`,\n\t\tbackgroundSize: 'cover',\n\t\twidth: 'calc(100% + 25px + 25px)',\n\t\theight: '160px',\n\t\tposition: 'relative',\n\t\tleft: '-25px'\n\t});\n\ninterface FundraiserCardProps {\n\tfundraiser: Fundraiser;\n}\n\nexport const FundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nconst LargeFundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\tconst {\n\t\tname: nonprofitName,\n\t\tlogoCloudinaryId,\n\t\tcoverImageCloudinaryId,\n\t\thasAdmin\n\t} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\tconst coverImageUrl =\n\t\tcoverImageCloudinaryId &&\n\t\tgetCloudinaryUrl(coverImageCloudinaryId, {width: 320});\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t

    {nonprofitName}

    \n\t\t\t\t\t{fundraiser.creatorNonprofitId === fundraiser.nonprofitId && (\n\t\t\t\t\t\t

    Official fundraiser

    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t{coverImageUrl &&
    }\n\t\t\t

    \n\t\t\t\t{fundraiser.title}\n\t\t\t

    \n\t\t\t{fundraiser.description && (\n\t\t\t\t

    \n\t\t\t\t\t{fundraiser.description}\n\t\t\t\t

    \n\t\t\t)}\n\t\t\n\t);\n};\n\nconst SmallFundraiserCard = ({fundraiser}: FundraiserCardProps) => {\n\tconst {\n\t\tname: nonprofitName,\n\t\tlogoCloudinaryId,\n\t\tcoverImageCloudinaryId,\n\t\thasAdmin\n\t} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\tconst coverImageUrl =\n\t\tcoverImageCloudinaryId && getCloudinaryUrl(coverImageCloudinaryId);\n\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{fundraiser.title}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\n\t);\n};\n","import {Fragment} from 'preact/jsx-runtime';\nimport {GridCard} from 'src/components/widget/components/GridCard';\nimport {\n\tlogoImageCss,\n\tnonprofitNameCss,\n\tdescriptionCss,\n\tavatarAndNameWrapperCss,\n\tnonprofitCardCss\n} from 'src/components/widget/components/NonprofitInfo/styles';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {LOGO_IMAGE_PLACEHOLDER_ID} from 'src/constants/placeholders';\nimport {getCloudinaryUrl} from 'src/helpers/getCloudinaryUrl';\n\nexport const NonprofitCard = () => {\n\tconst {name, logoCloudinaryId, hasAdmin} = useNonprofitOrError();\n\tconst logoUrl = getCloudinaryUrl(\n\t\tlogoCloudinaryId ?? LOGO_IMAGE_PLACEHOLDER_ID\n\t);\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t

    \n\t\t\t\t\t{hasAdmin ? (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{name} is using Every.org to accept this donation\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEvery.org created this page for {name}\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t

    \n\t\t\t
    \n\t\t\t

    \n\t\t\t\tEvery.org is a 501(c)(3) nonprofit inspiring generosity and philanthropy\n\t\t\t\tfor everyone.\n\t\t\t

    \n\t\t\n\t);\n};\n","import {FundraiserCard} from 'src/components/widget/components/NonprofitInfo/FundraiserCard';\nimport {NonprofitCard} from 'src/components/widget/components/NonprofitInfo/NonprofitCard';\nimport {useFundraiserOrUndefined} from 'src/components/widget/hooks/useFundraiser';\n\nexport const NonprofitInfo = () => {\n\tconst fundraiser = useFundraiserOrUndefined();\n\n\tif (fundraiser) {\n\t\treturn ;\n\t}\n\n\treturn ;\n};\n","export enum Borders {\n\tNormal = '1px solid',\n\tBig = '4px solid'\n}\n\nexport const getColoredBorder = (border: Borders, color: string) =>\n\t`${border} ${color}`;\n","import cxs from 'cxs';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const textInputContainerErrorCss = cxs({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const textInputContainerCss = (color: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tpadding: Spacing.M,\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'row',\n\t\talignItems: 'center',\n\t\tborderRadius: Radii.Default,\n\t\tcolor: COLORS.Text,\n\t\tbackgroundColor: COLORS.Gray,\n\t\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\t\tcursor: 'text',\n\t\t':focus-within': {\n\t\t\tbackgroundColor: 'white',\n\t\t\tborderColor: color\n\t\t}\n\t});\n\nexport const textInputCss = cxs({\n\tfontSize: textSize.s.fontSize,\n\tlineHeight: textSize.s.fontSize,\n\tfontFamily: 'inherit',\n\tflex: 1,\n\tborder: 'none',\n\toutline: 'none',\n\tbackground: 'transparent',\n\twidth: '100%',\n\tminWidth: 'unset',\n\tpadding: 0,\n\tmargin: 0,\n\t'::placeholder': {\n\t\tfontWeight: 400\n\t},\n\t'::-webkit-outer-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'::-webkit-inner-spin-button': {\n\t\t'-webkit-appearance': 'none',\n\t\tmargin: 0\n\t},\n\t'-moz-appearance': 'textfield'\n});\n","import cxs from 'cxs';\nimport {rotateCss} from 'src/components/widget/components/Faq/styles';\nimport {textInputContainerCss} from 'src/components/widget/components/TextInput/styles';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText, textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const cryptoSelectorContainerCss = cxs({\n\tmaxHeight: '250px',\n\t'& input': {\n\t\tfontSize: textSize.s.fontSize,\n\t\tlineHeight: textSize.s.fontSize,\n\t\tfontWeight: 400\n\t}\n});\n\nexport const cryptoSelectorDropDownContainerCss = cxs({\n\tbackground: COLORS.White,\n\tborderRadius: `0 0 ${Radii.Default} ${Radii.Default}`,\n\tborder: getColoredBorder(Borders.Normal, COLORS.LightGray),\n\tborderTop: 'none'\n});\n\nexport const cryptoSelectorInputContainerCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XXS\n});\n\nexport const cryptoSelectorDropDownContentCss = cxs({\n\toverflowY: 'scroll',\n\theight: '100%',\n\tmaxHeight: '200px'\n});\n\nexport const quickSelectOptionsListCss = cxs({\n\tborderBottom: getColoredBorder(Borders.Normal, COLORS.LightGray)\n});\n\nexport const cryptoSelectorDropDownItemCss = cxs({\n\tborder: 'none',\n\tbackground: 'none',\n\n\tpadding: `${Spacing.S} ${Spacing.M}`,\n\t...textSize.s,\n\twidth: '100%',\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS,\n\t':hover': {\n\t\tcursor: 'pointer'\n\t},\n\n\t'> span:last-of-type': {\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray\n\t}\n});\n\nexport const cryptoSelectorInputSufixCss = (\n\tprimaryColor: string,\n\tshowDropDown: boolean\n) =>\n\tcxs({\n\t\tmarginLeft: 'auto',\n\t\t...textSize.xs,\n\t\tcolor: COLORS.TextGray,\n\t\tdisplay: 'flex',\n\t\tgap: Spacing.XS,\n\t\talignItems: 'center',\n\t\t'> svg': {\n\t\t\tcolor: primaryColor,\n\t\t\t...(showDropDown ? rotateCss : {})\n\t\t}\n\t});\n\nexport const inputContainerWithDropDownCss = cxs({\n\tborderRadius: `${Radii.Default} ${Radii.Default} 0 0 `\n});\n\nexport const cryptoAmountInputContainerCss = (primaryColor: string) =>\n\tjoinClassNames([textInputContainerCss(primaryColor)]);\n\nexport const cryptoAmountInputColumns = cxs({\n\tdisplay: 'flex',\n\twidth: '100%',\n\tgap: Spacing.S,\n\talignItems: 'flex-end',\n\tfontWeight: 500\n});\n\nexport const cryptoAmountInputFirstColumn = cxs({\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\twidth: '100%',\n\tgap: Spacing.XXS,\n\t'> input': {\n\t\twidth: '100%',\n\t\ttextAlign: 'right',\n\t\tfontWeight: 700,\n\t\t...textSize.l\n\t},\n\ttextAlign: 'right'\n});\n\nexport const cryptoAmountInputSecondColumn = cxs({\n\tgap: Spacing.XXS,\n\tdisplay: 'flex',\n\tflexDirection: 'column'\n});\n\nexport const changeModeButtonCss = cxs({\n\t...bodyText,\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tpadding: Spacing.XXS,\n\ttransform: 'rotate(90deg)',\n\tcolor: COLORS.TextGray,\n\t'> svg': {\n\t\tstrokeWidth: '2px'\n\t}\n});\n","import cxs from 'cxs';\nimport {getColoredBorder, Borders} from 'src/components/widget/theme/borders';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {horizontalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const donationAmountInputContainerErrorCss = cxs({\n\tborder: getColoredBorder(Borders.Normal, COLORS.Error)\n});\n\nexport const donationAmountInputCss = cxs({\n\tfontSize: textSize.l.fontSize,\n\tlineHeight: textSize.l.fontSize,\n\tfontWeight: 700\n});\n\nexport const donationAmountInputPrefixCss = cxs({\n\t...textSize.l,\n\tfontWeight: 700,\n\tdisplay: 'inline-flex',\n\tmarginRight: Spacing.XXS\n});\n\nexport const donationAmountInputSufixCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.m,\n\t\tfontWeight: 700,\n\t\tcolor: primaryColor,\n\t\tdisplay: 'inline-flex',\n\t\tmarginLeft: Spacing.XXS\n\t});\n\nexport const donationAmountAddAmountContainerCss = cxs({\n\t...horizontalStackCss.cxs(Spacing.M),\n\tjustifyContent: 'center'\n});\n\nexport const donationAmountAddAmountButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\t...textSize.s,\n\t\tcolor: primaryColor,\n\t\tborderRadius: Radii.Big,\n\t\tfontWeight: 500,\n\t\tborder: `none`,\n\t\tpadding: 0,\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'unset',\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\t\tpadding: `${Spacing.XS} ${Spacing.L}`\n\t\t}\n\t});\n","import {forwardRef} from 'preact/compat';\nimport {useRef, MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextAreaProps\n\textends JSXInternal.HTMLAttributes {\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n}\n\nconst TextArea = forwardRef(\n\t(props, ref) => {\n\t\tconst inputRef = useRef();\n\t\tconst {primaryColor} = useConfigContext();\n\n\t\tconst {containerClassName, inputClassName, containerOnClick, ...rest} =\n\t\t\tprops;\n\n\t\treturn (\n\t\t\t {\n\t\t\t\t\tinputRef.current?.focus();\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t {\n\t\t\t\t\t\tif (element) {\n\t\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t
    \n\t\t);\n\t}\n);\n\nexport default TextArea;\n","import {ComponentChild} from 'preact';\nimport {forwardRef, useRef} from 'preact/compat';\nimport {MutableRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\ttextInputContainerCss,\n\ttextInputCss\n} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface TextInputProps\n\textends Omit<\n\t\tJSXInternal.HTMLAttributes,\n\t\t'sufix' | 'prefix'\n\t> {\n\tsufix?: ComponentChild;\n\tsufixClassName?: string;\n\tprefix?: ComponentChild;\n\tprefixClassName?: string;\n\tcontainerClassName?: string;\n\tinputClassName?: string;\n\tcontainerOnClick?: () => void;\n}\n\nconst TextInput = forwardRef((props, ref) => {\n\tconst {\n\t\tsufix,\n\t\tsufixClassName,\n\t\tprefix,\n\t\tprefixClassName,\n\t\tcontainerClassName,\n\t\tinputClassName,\n\t\tcontainerOnClick,\n\t\t...rest\n\t} = props;\n\tconst inputRef = useRef();\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t {\n\t\t\t\tif (containerOnClick) {\n\t\t\t\t\tcontainerOnClick();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tinputRef.current?.focus();\n\t\t\t}}\n\t\t>\n\t\t\t{prefix &&
    {prefix}
    }\n\t\t\t {\n\t\t\t\t\tif (element) {\n\t\t\t\t\t\tinputRef.current = element;\n\t\t\t\t\t\tif (ref) {\n\t\t\t\t\t\t\t(ref as MutableRef).current = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tclassName={joinClassNames([textInputCss, inputClassName])}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t\t{sufix &&
    {sufix}
    }\n\t\t
    \n\t);\n});\n\nexport default TextInput;\n","export default __webpack_public_path__ + \"58f20393bf2b41f944c6229c2af785b9.svg\";","export default __webpack_public_path__ + \"5982461fe2304c26f3a3cf4c50806dad.svg\";","export default __webpack_public_path__ + \"b31a89ce5555412a0c8a4c6463286584.svg\";","export default __webpack_public_path__ + \"26c9b1d3d7943e6e67cf13e039ba5ac8.svg\";","export default __webpack_public_path__ + \"ddb1f3b63e33585263e5905706d6ff6d.svg\";","export default __webpack_public_path__ + \"ad80427b5a2980f1d19884ede42b29de.svg\";","export default __webpack_public_path__ + \"9052c75387065f76bb3436b7e4ce12cd.svg\";","export default __webpack_public_path__ + \"3a5177b76709819ba4663556e60222f8.svg\";","export default __webpack_public_path__ + \"f8f4253f02d1fbc4bf04d0959a6e614c.svg\";","export default __webpack_public_path__ + \"4d81ee51fa2520df58ae092aeb3d0bd4.svg\";","export default __webpack_public_path__ + \"8098252f28e93069c75d6010d3ac6bc1.svg\";","export default __webpack_public_path__ + \"03c114f6e014588a4bde815d9bc85821.svg\";","export default __webpack_public_path__ + \"5450d3cada4fd0370ab8d885765f5cc3.svg\";","export default __webpack_public_path__ + \"cc9ce389e9a4e0f518e3caeb7b60912d.svg\";","export default __webpack_public_path__ + \"8f22b294629293d29895fddef0a8baea.svg\";","export default __webpack_public_path__ + \"f588feb3cbbcc0fb259a3630ec7e34ba.svg\";","export default __webpack_public_path__ + \"3e1eb932bdbaa2318584813bf468be53.svg\";","export default __webpack_public_path__ + \"badb98080214485db486794fb59a95cc.svg\";","export default __webpack_public_path__ + \"fc9295a4651c56d5b4e8c3aa13a93208.svg\";","export default __webpack_public_path__ + \"e4bfa8eb04696d4fd5ea04ca4c35469b.svg\";","export default __webpack_public_path__ + \"743324f8e09d34a894c21e91c396f289.svg\";","export default __webpack_public_path__ + \"b9021bb757262a32de6d8931015051d9.svg\";","export default __webpack_public_path__ + \"7ab9396038b4befda4354b2a476d9064.svg\";","export default __webpack_public_path__ + \"bc2c9e9d67b73656a6da5dd177aa10a2.svg\";","export default __webpack_public_path__ + \"6214ae0b42d798a0c9a51503a27a66bf.svg\";","export default __webpack_public_path__ + \"45bcde5a98dbbdf2a4e0769eca2154f1.svg\";","export default __webpack_public_path__ + \"8798fcc6fd2d5d3aeccea6ee3fcfec89.svg\";","export default __webpack_public_path__ + \"88611c6e2f9450f29ece8d2b36641670.svg\";","import algorand from 'src/components/widget/icons/CryptoCurrencyIcon/algorand.svg';\nimport apecoin from 'src/components/widget/icons/CryptoCurrencyIcon/apecoin.svg';\nimport avalanche from 'src/components/widget/icons/CryptoCurrencyIcon/avalanche.svg';\nimport basic_attention_token from 'src/components/widget/icons/CryptoCurrencyIcon/basic-attention-token.svg';\nimport binance from 'src/components/widget/icons/CryptoCurrencyIcon/binance.svg';\nimport bitcoincash from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin-cash.svg';\nimport bitcoin from 'src/components/widget/icons/CryptoCurrencyIcon/bitcoin.svg';\nimport chainlink from 'src/components/widget/icons/CryptoCurrencyIcon/chainlink.svg';\nimport dai from 'src/components/widget/icons/CryptoCurrencyIcon/dai.svg';\nimport dogecoin from 'src/components/widget/icons/CryptoCurrencyIcon/dogecoin.svg';\nimport ethereum from 'src/components/widget/icons/CryptoCurrencyIcon/ethereum.svg';\nimport filecoin from 'src/components/widget/icons/CryptoCurrencyIcon/filecoin.svg';\nimport graph from 'src/components/widget/icons/CryptoCurrencyIcon/graph.svg';\nimport litecoin from 'src/components/widget/icons/CryptoCurrencyIcon/litecoin.svg';\nimport mobilecoin from 'src/components/widget/icons/CryptoCurrencyIcon/mobilecoin.svg';\nimport polkadot from 'src/components/widget/icons/CryptoCurrencyIcon/polkadot.svg';\nimport polygon from 'src/components/widget/icons/CryptoCurrencyIcon/polygon.svg';\nimport raydium from 'src/components/widget/icons/CryptoCurrencyIcon/raydium.svg';\nimport saber from 'src/components/widget/icons/CryptoCurrencyIcon/saber.svg';\nimport samoyed from 'src/components/widget/icons/CryptoCurrencyIcon/samoyed.svg';\nimport shiba_inu from 'src/components/widget/icons/CryptoCurrencyIcon/shiba-inu.svg';\nimport solana from 'src/components/widget/icons/CryptoCurrencyIcon/solana.svg';\nimport stellar from 'src/components/widget/icons/CryptoCurrencyIcon/stellar.svg';\nimport tether from 'src/components/widget/icons/CryptoCurrencyIcon/tether.svg';\nimport tezos from 'src/components/widget/icons/CryptoCurrencyIcon/tezos.svg';\nimport uniswap from 'src/components/widget/icons/CryptoCurrencyIcon/uniswap.svg';\nimport usdcoin from 'src/components/widget/icons/CryptoCurrencyIcon/usd-coin.svg';\nimport zcash from 'src/components/widget/icons/CryptoCurrencyIcon/zcash.svg';\n\nexport enum CryptoCurrency {\n\tAAVE = 'AAVE',\n\tALCX = 'ALCX',\n\tALGO = 'ALGO',\n\tAMP = 'AMP',\n\tANKR = 'ANKR',\n\tAPE = 'APE',\n\tAPI3 = 'API3',\n\tAUDIO = 'AUDIO',\n\tAVAX = 'AVAX',\n\tAXS = 'AXS',\n\tBAT = 'BAT',\n\tBCH = 'BCH',\n\tBNB = 'BNB',\n\tBNT = 'BNT',\n\tBOND = 'BOND',\n\tBTC = 'BTC',\n\tCHZ = 'CHZ',\n\tCOMP = 'COMP',\n\tCRV = 'CRV',\n\tCUBE = 'CUBE',\n\tCVC = 'CVC',\n\tDAI = 'DAI',\n\tDOGE = 'DOGE',\n\tDOT = 'DOT',\n\tELON = 'ELON',\n\tENS = 'ENS',\n\tETH = 'ETH',\n\tFET = 'FET',\n\tFIL = 'FIL',\n\tFTM = 'FTM',\n\tGAL = 'GAL',\n\tGALA = 'GALA',\n\tGMT = 'GMT',\n\tGRT = 'GRT',\n\tGUSD = 'GUSD',\n\tINJ = 'INJ',\n\tJAM = 'JAM',\n\tKNC = 'KNC',\n\tKP3R = 'KP3R',\n\tLDO = 'LDO',\n\tLINK = 'LINK',\n\tLPT = 'LPT',\n\tLRC = 'LRC',\n\tLTC = 'LTC',\n\tMANA = 'MANA',\n\tMASK = 'MASK',\n\tMATIC = 'MATIC',\n\tMCO2 = 'MCO2',\n\tMKR = 'MKR',\n\tMOB = 'MOB',\n\tNMR = 'NMR',\n\tOXT = 'OXT',\n\tPAXG = 'PAXG',\n\tQNT = 'QNT',\n\tQRDO = 'QRDO',\n\tRAY = 'RAY',\n\tREN = 'REN',\n\tRNDR = 'RNDR',\n\tSAMO = 'SAMO',\n\tSAND = 'SAND',\n\tSBR = 'SBR',\n\tSHIB = 'SHIB',\n\tSKL = 'SKL',\n\tSLP = 'SLP',\n\tSNX = 'SNX',\n\tSOL = 'SOL',\n\tSTORJ = 'STORJ',\n\tSUSHI = 'SUSHI',\n\tUMA = 'UMA',\n\tUNI = 'UNI',\n\tUSDC = 'USDC',\n\tUSDT = 'USDT',\n\tXLM = 'XLM',\n\tXRP = 'XRP',\n\tXTZ = 'XTZ',\n\tYFI = 'YFI',\n\tZBC = 'ZBC',\n\tZEC = 'ZEC',\n\tZRX = 'ZRX'\n}\n\nexport enum ContractType {\n\tERC20 = 'ERC-20',\n\tSPL = 'SPL'\n}\n\nexport interface SharedCryptoCurrencyConfig {\n\tdisplayName: string;\n\tabbreviation: string;\n\tdecimalOffset: number;\n\tcontractType?: ContractType;\n\tcoingeckoId: string;\n}\n\nexport const DISABLED_TOKENS = [\n\tCryptoCurrency.ALGO,\n\tCryptoCurrency.MOB,\n\tCryptoCurrency.XLM,\n\tCryptoCurrency.BNB\n];\n\nexport const SharedCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.AAVE]: {\n\t\tdisplayName: 'Aave',\n\t\tabbreviation: 'AAVE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'aave'\n\t},\n\t[CryptoCurrency.ALCX]: {\n\t\tdisplayName: 'Alchemix',\n\t\tabbreviation: 'ALCX',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'alchemix'\n\t},\n\t[CryptoCurrency.ALGO]: {\n\t\tdisplayName: 'Algorand',\n\t\tabbreviation: 'ALGO',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'algorand'\n\t},\n\t[CryptoCurrency.AMP]: {\n\t\tdisplayName: 'Amp',\n\t\tabbreviation: 'AMP',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'amp-token'\n\t},\n\t[CryptoCurrency.ANKR]: {\n\t\tdisplayName: 'Ankr',\n\t\tabbreviation: 'ANKR',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'ankr'\n\t},\n\t[CryptoCurrency.APE]: {\n\t\tdisplayName: 'Apecoin',\n\t\tabbreviation: 'APE',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'apecoin'\n\t},\n\t[CryptoCurrency.API3]: {\n\t\tdisplayName: 'API3',\n\t\tabbreviation: 'API3',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'api3'\n\t},\n\t[CryptoCurrency.AUDIO]: {\n\t\tdisplayName: 'Audius',\n\t\tabbreviation: 'AUDIO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'audius'\n\t},\n\t[CryptoCurrency.AVAX]: {\n\t\tdisplayName: 'Avalanche',\n\t\tabbreviation: 'AVAX',\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'avalanche-2'\n\t},\n\t[CryptoCurrency.AXS]: {\n\t\tdisplayName: 'Axie Infinity',\n\t\tabbreviation: 'AXS',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'axs'\n\t},\n\t[CryptoCurrency.BAT]: {\n\t\tdisplayName: 'Basic Attention Token',\n\t\tabbreviation: 'BAT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'basic-attention-token'\n\t},\n\t[CryptoCurrency.BCH]: {\n\t\tdisplayName: 'Bitcoin Cash',\n\t\tabbreviation: 'BCH',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'bitcoin-cash'\n\t},\n\t[CryptoCurrency.BNB]: {\n\t\tdisplayName: 'Binance Coin',\n\t\tabbreviation: 'BNB',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'binancecoin'\n\t},\n\t[CryptoCurrency.BNT]: {\n\t\tdisplayName: 'Bancor',\n\t\tabbreviation: 'BNT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'bancor'\n\t},\n\t[CryptoCurrency.BOND]: {\n\t\tdisplayName: 'BarnBridge',\n\t\tabbreviation: 'BOND',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'barnbridge'\n\t},\n\t[CryptoCurrency.BTC]: {\n\t\tdisplayName: 'Bitcoin',\n\t\tabbreviation: 'BTC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'bitcoin'\n\t},\n\t[CryptoCurrency.CHZ]: {\n\t\tdisplayName: 'Chiliz',\n\t\tabbreviation: 'CHZ',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'chiliz'\n\t},\n\t[CryptoCurrency.COMP]: {\n\t\tdisplayName: 'Compound',\n\t\tabbreviation: 'COMP',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'compound-governance-token'\n\t},\n\t[CryptoCurrency.CRV]: {\n\t\tdisplayName: 'Curve DAO Token',\n\t\tabbreviation: 'CRV',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'curve-dao-token'\n\t},\n\t[CryptoCurrency.CUBE]: {\n\t\tdisplayName: 'Cube',\n\t\tabbreviation: 'CUBE',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'somnium-space-cubes'\n\t},\n\t[CryptoCurrency.CVC]: {\n\t\tdisplayName: 'Civic',\n\t\tabbreviation: 'CVC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'civic'\n\t},\n\t[CryptoCurrency.DAI]: {\n\t\tdisplayName: 'Dai',\n\t\tabbreviation: 'DAI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'dai'\n\t},\n\t[CryptoCurrency.DOGE]: {\n\t\tdisplayName: 'DogeCoin',\n\t\tabbreviation: 'DOGE',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'dogecoin'\n\t},\n\t[CryptoCurrency.DOT]: {\n\t\tdisplayName: 'Polkadot',\n\t\tabbreviation: 'DOT',\n\t\tdecimalOffset: 10,\n\t\tcoingeckoId: 'polkadot'\n\t},\n\t[CryptoCurrency.ELON]: {\n\t\tdisplayName: 'Dogelon Mars',\n\t\tabbreviation: 'ELON',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'dogelon-mars'\n\t},\n\t[CryptoCurrency.ENS]: {\n\t\tdisplayName: 'Ethereum Name Service',\n\t\tabbreviation: 'ENS',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'ethereum-name-service'\n\t},\n\t[CryptoCurrency.ETH]: {\n\t\tdisplayName: 'Ethereum',\n\t\tabbreviation: 'ETH',\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'ethereum'\n\t},\n\t[CryptoCurrency.FET]: {\n\t\tdisplayName: 'Fetch.ai',\n\t\tabbreviation: 'FET',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'fetch-ai'\n\t},\n\t[CryptoCurrency.FIL]: {\n\t\tdisplayName: 'Filecoin',\n\t\tabbreviation: 'FIL',\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'filecoin'\n\t},\n\t[CryptoCurrency.FTM]: {\n\t\tdisplayName: 'Fantom',\n\t\tabbreviation: 'FTM',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'fantom'\n\t},\n\t[CryptoCurrency.GAL]: {\n\t\tdisplayName: 'Galaxe',\n\t\tabbreviation: 'GAL',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'project-galaxy'\n\t},\n\t[CryptoCurrency.GALA]: {\n\t\tdisplayName: 'Gala',\n\t\tabbreviation: 'GALA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'gala'\n\t},\n\t[CryptoCurrency.GMT]: {\n\t\tdisplayName: 'STEPN',\n\t\tabbreviation: 'GMT',\n\t\tcontractType: ContractType.SPL,\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'stepn'\n\t},\n\t[CryptoCurrency.GRT]: {\n\t\tdisplayName: 'The Graph',\n\t\tabbreviation: 'GRT',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'the-graph'\n\t},\n\t[CryptoCurrency.GUSD]: {\n\t\tdisplayName: 'Gemini Dollar',\n\t\tabbreviation: 'GUSD',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'gemini-dollar'\n\t},\n\t[CryptoCurrency.INJ]: {\n\t\tdisplayName: 'Injective Protocol',\n\t\tabbreviation: 'INJ',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'injective-protocol'\n\t},\n\t[CryptoCurrency.JAM]: {\n\t\tdisplayName: 'Geojam',\n\t\tabbreviation: 'JAM',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'geojam'\n\t},\n\t[CryptoCurrency.KNC]: {\n\t\tdisplayName: 'Kyber types.Network',\n\t\tabbreviation: 'KNC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'kyber-network-crystal'\n\t},\n\t[CryptoCurrency.KP3R]: {\n\t\tdisplayName: 'Keep3rV1',\n\t\tabbreviation: 'KP3R',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'keep3rv1'\n\t},\n\t[CryptoCurrency.LDO]: {\n\t\tdisplayName: 'Lido DAO',\n\t\tabbreviation: 'LDO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'lido-dao'\n\t},\n\t[CryptoCurrency.LINK]: {\n\t\tdisplayName: 'Chainlink',\n\t\tabbreviation: 'LINK',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'chainlink'\n\t},\n\t[CryptoCurrency.LPT]: {\n\t\tdisplayName: 'Livepeer',\n\t\tabbreviation: 'LPT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'livepeer'\n\t},\n\t[CryptoCurrency.LRC]: {\n\t\tdisplayName: 'Loopring',\n\t\tabbreviation: 'LRC',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'loopring'\n\t},\n\t[CryptoCurrency.LTC]: {\n\t\tdisplayName: 'Litecoin',\n\t\tabbreviation: 'LTC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'litecoin'\n\t},\n\t[CryptoCurrency.MANA]: {\n\t\tdisplayName: 'Mana',\n\t\tabbreviation: 'MANA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'decentraland'\n\t},\n\t[CryptoCurrency.MASK]: {\n\t\tdisplayName: 'Mask Network',\n\t\tabbreviation: 'MASK',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'mask-network'\n\t},\n\t[CryptoCurrency.MATIC]: {\n\t\tdisplayName: 'Polygon',\n\t\tabbreviation: 'MATIC',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'matic-network'\n\t},\n\t[CryptoCurrency.MCO2]: {\n\t\tdisplayName: 'Moss Carbon Credit',\n\t\tabbreviation: 'MCO2',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'moss-carbon-credit'\n\t},\n\t[CryptoCurrency.MKR]: {\n\t\tdisplayName: 'Maker',\n\t\tabbreviation: 'MKR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'maker'\n\t},\n\t[CryptoCurrency.MOB]: {\n\t\tdisplayName: 'MobileCoin',\n\t\tabbreviation: 'MOB',\n\t\tdecimalOffset: 12,\n\t\tcoingeckoId: 'mobilecoin'\n\t},\n\t[CryptoCurrency.NMR]: {\n\t\tdisplayName: 'Numeraire',\n\t\tabbreviation: 'NMR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'numeraire'\n\t},\n\t[CryptoCurrency.OXT]: {\n\t\tdisplayName: 'Orchid',\n\t\tabbreviation: 'OXT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'orchid-protocol'\n\t},\n\t[CryptoCurrency.PAXG]: {\n\t\tdisplayName: 'PAX Gold',\n\t\tabbreviation: 'PAXG',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'pax-gold'\n\t},\n\t[CryptoCurrency.QNT]: {\n\t\tdisplayName: 'Quant',\n\t\tabbreviation: 'QNT',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'quant-network'\n\t},\n\t[CryptoCurrency.QRDO]: {\n\t\tdisplayName: 'Qredo',\n\t\tabbreviation: 'QRDO',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'qredo'\n\t},\n\t[CryptoCurrency.RAY]: {\n\t\tdisplayName: 'Raydium',\n\t\tabbreviation: 'RAY',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'raydium'\n\t},\n\t[CryptoCurrency.REN]: {\n\t\tdisplayName: 'Ren',\n\t\tabbreviation: 'REN',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'republic-protocol'\n\t},\n\t[CryptoCurrency.RNDR]: {\n\t\tdisplayName: 'Render Token',\n\t\tabbreviation: 'RNDR',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'render-token'\n\t},\n\t[CryptoCurrency.SAMO]: {\n\t\tdisplayName: 'Samoyed',\n\t\tabbreviation: 'SAMO',\n\t\tdecimalOffset: 9,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'samoyedcoin'\n\t},\n\t[CryptoCurrency.SAND]: {\n\t\tdisplayName: 'Sandbox',\n\t\tabbreviation: 'SAND',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'the-sandbox'\n\t},\n\t[CryptoCurrency.SBR]: {\n\t\tdisplayName: 'Saber',\n\t\tabbreviation: 'SBR',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.SPL,\n\t\tcoingeckoId: 'saber'\n\t},\n\t[CryptoCurrency.SHIB]: {\n\t\tdisplayName: 'Shiba Inu',\n\t\tabbreviation: 'SHIB',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'shiba-inu'\n\t},\n\t[CryptoCurrency.SKL]: {\n\t\tdisplayName: 'Skale',\n\t\tabbreviation: 'SKL',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'skale'\n\t},\n\t[CryptoCurrency.SLP]: {\n\t\tdisplayName: 'Smooth Love Potion',\n\t\tabbreviation: 'SLP',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'smooth-love-potion'\n\t},\n\t[CryptoCurrency.SNX]: {\n\t\tdisplayName: 'Synthetix',\n\t\tabbreviation: 'SNX',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'havven'\n\t},\n\t[CryptoCurrency.SOL]: {\n\t\tdisplayName: 'Solana',\n\t\tabbreviation: 'SOL',\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'solana'\n\t},\n\t[CryptoCurrency.STORJ]: {\n\t\tdisplayName: 'Storj',\n\t\tabbreviation: 'STORJ',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'storj'\n\t},\n\t[CryptoCurrency.SUSHI]: {\n\t\tdisplayName: 'SushiSwap',\n\t\tabbreviation: 'SUSHI',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'sushi'\n\t},\n\t[CryptoCurrency.UMA]: {\n\t\tdisplayName: 'UMA',\n\t\tabbreviation: 'UMA',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'uma'\n\t},\n\t[CryptoCurrency.UNI]: {\n\t\tdisplayName: 'Uniswap',\n\t\tabbreviation: 'UNI',\n\t\tdecimalOffset: 18,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'uniswap'\n\t},\n\t[CryptoCurrency.USDC]: {\n\t\tdisplayName: 'USD Coin',\n\t\tabbreviation: 'USDC',\n\t\tdecimalOffset: 6,\n\t\tcontractType: ContractType.ERC20,\n\t\tcoingeckoId: 'usd-coin'\n\t},\n\t[CryptoCurrency.USDT]: {\n\t\tdisplayName: 'Tether',\n\t\tabbreviation: 'USDT',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'tether'\n\t},\n\t[CryptoCurrency.XLM]: {\n\t\tdisplayName: 'Stellar',\n\t\tabbreviation: 'XLM',\n\t\tdecimalOffset: 7,\n\t\tcoingeckoId: 'stellar'\n\t},\n\t[CryptoCurrency.XRP]: {\n\t\tdisplayName: 'XRP',\n\t\tabbreviation: 'XRP',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'ripple'\n\t},\n\t[CryptoCurrency.XTZ]: {\n\t\tdisplayName: 'Tezos',\n\t\tabbreviation: 'XTZ',\n\t\tdecimalOffset: 6,\n\t\tcoingeckoId: 'tezos'\n\t},\n\t[CryptoCurrency.YFI]: {\n\t\tdisplayName: 'Yearn Finance',\n\t\tabbreviation: 'YFI',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: 'yearn-finance'\n\t},\n\t[CryptoCurrency.ZBC]: {\n\t\tdisplayName: 'Zebec Protocol',\n\t\tabbreviation: 'ZBC',\n\t\tcontractType: ContractType.SPL,\n\t\tdecimalOffset: 9,\n\t\tcoingeckoId: 'zebec-protocol'\n\t},\n\t[CryptoCurrency.ZEC]: {\n\t\tdisplayName: 'ZCash',\n\t\tabbreviation: 'ZEC',\n\t\tdecimalOffset: 8,\n\t\tcoingeckoId: 'zcash'\n\t},\n\t[CryptoCurrency.ZRX]: {\n\t\tdisplayName: '0x',\n\t\tabbreviation: 'ZRX',\n\t\tcontractType: ContractType.ERC20,\n\t\tdecimalOffset: 18,\n\t\tcoingeckoId: '0x'\n\t}\n};\n\nexport interface CryptoCurrencyOption {\n\tvalue: CryptoCurrency;\n\tlabel: string;\n\tcontractType: string;\n}\n\ntype WebsiteCryptoCurrencyConfig =\n\t| {\n\t\t\ticon: string;\n\t }\n\t| {\n\t\t\ticonCloudinaryId: string;\n\t };\n\nconst WebsiteCryptoCurrencyConfig: {\n\t[key in CryptoCurrency]: WebsiteCryptoCurrencyConfig;\n} = {\n\t[CryptoCurrency.AAVE]: {iconCloudinaryId: 'crypto/aave_oszkzj'},\n\t[CryptoCurrency.ALCX]: {iconCloudinaryId: 'crypto/alcx_agfvh3'},\n\t[CryptoCurrency.AMP]: {iconCloudinaryId: 'crypto/amp_zrgutx'},\n\t[CryptoCurrency.ANKR]: {iconCloudinaryId: 'crypto/ankr_vipelu'},\n\t[CryptoCurrency.ALGO]: {icon: algorand},\n\t[CryptoCurrency.APE]: {icon: apecoin},\n\t[CryptoCurrency.AVAX]: {icon: avalanche},\n\t[CryptoCurrency.AXS]: {iconCloudinaryId: 'crypto/axs_vdwbc0'},\n\t[CryptoCurrency.BAT]: {icon: basic_attention_token},\n\t[CryptoCurrency.BCH]: {icon: bitcoincash},\n\t[CryptoCurrency.BNB]: {icon: binance},\n\t[CryptoCurrency.BTC]: {icon: bitcoin},\n\t[CryptoCurrency.CHZ]: {iconCloudinaryId: 'crypto/chiliz_j11blm'},\n\t[CryptoCurrency.DAI]: {icon: dai},\n\t[CryptoCurrency.DOGE]: {icon: dogecoin},\n\t[CryptoCurrency.DOT]: {icon: polkadot},\n\t[CryptoCurrency.ETH]: {icon: ethereum},\n\t[CryptoCurrency.FIL]: {icon: filecoin},\n\t[CryptoCurrency.GRT]: {icon: graph},\n\t[CryptoCurrency.LINK]: {icon: chainlink},\n\t[CryptoCurrency.LTC]: {icon: litecoin},\n\t[CryptoCurrency.MATIC]: {icon: polygon},\n\t[CryptoCurrency.MOB]: {icon: mobilecoin},\n\t[CryptoCurrency.RAY]: {icon: raydium},\n\t[CryptoCurrency.SAMO]: {icon: samoyed},\n\t[CryptoCurrency.SBR]: {icon: saber},\n\t[CryptoCurrency.SHIB]: {icon: shiba_inu},\n\t[CryptoCurrency.SLP]: {iconCloudinaryId: 'crypto/slp_clp71c'},\n\t[CryptoCurrency.SOL]: {icon: solana},\n\t[CryptoCurrency.UNI]: {icon: uniswap},\n\t[CryptoCurrency.USDC]: {icon: usdcoin},\n\t[CryptoCurrency.USDT]: {icon: tether},\n\t[CryptoCurrency.XLM]: {icon: stellar},\n\t[CryptoCurrency.XRP]: {iconCloudinaryId: 'crypto/xrp_uwcehg'},\n\t[CryptoCurrency.XTZ]: {icon: tezos},\n\t[CryptoCurrency.ZEC]: {icon: zcash},\n\t[CryptoCurrency.API3]: {iconCloudinaryId: 'crypto/xb8xoz6kxev0uytaejlo'},\n\t[CryptoCurrency.AUDIO]: {iconCloudinaryId: 'crypto/ucctvvgwedku9hexplp7'},\n\t[CryptoCurrency.BNT]: {iconCloudinaryId: 'crypto/jgb6ub5gckohghdrt1ig'},\n\t[CryptoCurrency.BOND]: {iconCloudinaryId: 'crypto/cidlkxmdqdoi2ezygfjj'},\n\t[CryptoCurrency.COMP]: {iconCloudinaryId: 'crypto/ayjushqknohuz9x3hcx5'},\n\t[CryptoCurrency.CRV]: {iconCloudinaryId: 'crypto/txyb4aa9a0skuhoyjcti'},\n\t[CryptoCurrency.CUBE]: {iconCloudinaryId: 'crypto/n8su92fe1atqx79hrhqf'},\n\t[CryptoCurrency.CVC]: {iconCloudinaryId: 'crypto/cw8ahifxtnfw8pbgh5o9'},\n\t[CryptoCurrency.ELON]: {iconCloudinaryId: 'crypto/fvsarijyyz1v9j5w1sh2'},\n\t[CryptoCurrency.ENS]: {iconCloudinaryId: 'crypto/naiw9tgamtvxcxctwxog'},\n\t[CryptoCurrency.FET]: {iconCloudinaryId: 'crypto/mwfznnuw28qqeia4uwov'},\n\t[CryptoCurrency.FTM]: {iconCloudinaryId: 'crypto/laq3m7el5wdfmlhwwtk0'},\n\t[CryptoCurrency.GAL]: {iconCloudinaryId: 'crypto/a5km5rat7dpiz6ckkvfi'},\n\t[CryptoCurrency.GALA]: {iconCloudinaryId: 'crypto/rifljrw1ry9wu1i7mxji'},\n\t[CryptoCurrency.GMT]: {iconCloudinaryId: 'crypto/uyyddnskoabbpei7olin'},\n\t[CryptoCurrency.GUSD]: {iconCloudinaryId: 'crypto/w8zltgl5ngsz1lqch17g'},\n\t[CryptoCurrency.INJ]: {iconCloudinaryId: 'crypto/gi0voz42gn33azwaa11a'},\n\t[CryptoCurrency.JAM]: {iconCloudinaryId: 'crypto/xmn1xxzccz84xiej1esw'},\n\t[CryptoCurrency.KNC]: {iconCloudinaryId: 'crypto/mqdyhpc07mle6dkfomye'},\n\t[CryptoCurrency.KP3R]: {iconCloudinaryId: 'crypto/eoabgtxyhpqqfhv1bxud'},\n\t[CryptoCurrency.LDO]: {iconCloudinaryId: 'crypto/thmvnuxks9z3gthhypwb'},\n\t[CryptoCurrency.LPT]: {iconCloudinaryId: 'crypto/setl154mkwd9kpfly7om'},\n\t[CryptoCurrency.LRC]: {iconCloudinaryId: 'crypto/sazpx9zyfsgbmprmfag9'},\n\t[CryptoCurrency.MANA]: {iconCloudinaryId: 'crypto/ekefdi1p3jgoeb08oszc'},\n\t[CryptoCurrency.MASK]: {iconCloudinaryId: 'crypto/ykwym7djaofb2q6lcn5n'},\n\t[CryptoCurrency.MCO2]: {iconCloudinaryId: 'crypto/ysuyysfrukryu1jw2wrh'},\n\t[CryptoCurrency.MKR]: {iconCloudinaryId: 'crypto/tpdipvaap6m150j2hdec'},\n\t[CryptoCurrency.NMR]: {iconCloudinaryId: 'crypto/bqecgq3rawel0k99tohj'},\n\t[CryptoCurrency.OXT]: {iconCloudinaryId: 'crypto/ietkmjcp0yj71vlg0zjy'},\n\t[CryptoCurrency.PAXG]: {iconCloudinaryId: 'crypto/yb5x1aizhhdn8mprrn2m'},\n\t[CryptoCurrency.QNT]: {iconCloudinaryId: 'crypto/dwdx02ifn9fsvbw1pgfz'},\n\t[CryptoCurrency.QRDO]: {iconCloudinaryId: 'crypto/jzbmlpvwoogroaaazkxz'},\n\t[CryptoCurrency.REN]: {iconCloudinaryId: 'crypto/ili8nkjwnifmbfra20ly'},\n\t[CryptoCurrency.RNDR]: {iconCloudinaryId: 'crypto/tm0klwno0hqjbcxsuvrp'},\n\t[CryptoCurrency.SAND]: {iconCloudinaryId: 'crypto/w6g6ep4ghqpsz54vqzmy'},\n\t[CryptoCurrency.SKL]: {iconCloudinaryId: 'crypto/zccvwa5yin8r32s4sfqy'},\n\t[CryptoCurrency.SNX]: {iconCloudinaryId: 'crypto/sxvudvsjujuhdupwssvz'},\n\t[CryptoCurrency.STORJ]: {iconCloudinaryId: 'crypto/le1ikh3apsrxyttjxg64'},\n\t[CryptoCurrency.SUSHI]: {iconCloudinaryId: 'crypto/iivxx5mfdz1bckmhom1f'},\n\t[CryptoCurrency.UMA]: {iconCloudinaryId: 'crypto/imxydvsf4mydmyjukbel'},\n\t[CryptoCurrency.YFI]: {iconCloudinaryId: 'crypto/mal5muwn4fcsbuuyhohz'},\n\t[CryptoCurrency.ZBC]: {iconCloudinaryId: 'crypto/hhiopvuac8qbpcnupgle'},\n\t[CryptoCurrency.ZRX]: {iconCloudinaryId: 'crypto/ge5jqonw89ffg200z0in'}\n};\n\nexport const CryptoCurrencyConfig = Object.fromEntries(\n\tObject.values(CryptoCurrency).map((cc: CryptoCurrency) => [\n\t\tcc,\n\t\t{...SharedCryptoCurrencyConfig[cc], ...WebsiteCryptoCurrencyConfig[cc]}\n\t])\n) as {\n\t[key in CryptoCurrency]: SharedCryptoCurrencyConfig &\n\t\tWebsiteCryptoCurrencyConfig;\n};\n","export const SearchIcon = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {ContextProvider} from 'src/components/widget/context';\nimport Widget from 'src/components/widget/index';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\n\nlet originalOverflow: string;\nconst getOriginalOverflow = () => {\n\tconst body = document.querySelector('body');\n\n\tif (!originalOverflow) {\n\t\toriginalOverflow = body?.style.overflow ? body.style.overflow : 'unset';\n\t}\n\n\treturn originalOverflow;\n};\n\nconst addOverflowToBody = () => {\n\tconst body = document.querySelector('body');\n\tif (body) {\n\t\tbody.style.overflow = 'hidden';\n\t}\n};\n\nconst removeOverflowFromBody = () => {\n\tconst body = document.querySelector('body');\n\tconst overflow = getOriginalOverflow();\n\tif (body) {\n\t\tbody.style.overflow = overflow;\n\t}\n};\n\ninterface WidgetLoaderProps {\n\toptions: Partial;\n\thide: () => void;\n}\n\nexport const WidgetLoader = ({options = {}, hide}: WidgetLoaderProps) => {\n\tremoveOverflowFromBody();\n\tif (!options.show) {\n\t\t// Not showing\n\t\treturn null;\n\t}\n\n\taddOverflowToBody();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","const AUTO_PLAY_PARAM = 'explicit';\n\nexport function shouldEnableAutoPlay() {\n\tconst parametersString = document.currentScript\n\t\t?.getAttribute('src')\n\t\t?.split('?')[1];\n\tconst parametersArray = parametersString\n\t\t?.split('&')\n\t\t.map((parameterString) => {\n\t\t\tconst [key, value] = parameterString.split('=');\n\t\t\treturn [key, value];\n\t\t});\n\tconst parametersObject =\n\t\tparametersArray && Object.fromEntries(parametersArray);\n\n\tif (parametersObject) {\n\t\treturn parametersObject[AUTO_PLAY_PARAM] !== '1';\n\t}\n\n\treturn true;\n}\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\n\nconst DEFAULT_LOADING_SIZE = 72;\n\nconst MASK = `data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='logoMask' stroke-dasharray='170px' d='M32.547 43C39.081 43 48 38.895 48 29.5C48 20.104 38.132 12.5 29.5 12.5C20.868 12.5 9 19.506 9 36C9 52.495 23.805 59.345 32.547 59.345C41.288 59.345 62.5 54.104 62.5 29.5' stroke='white' stroke-width='10'/%3E%3Canimate attributeType='XML' attributeName='stroke-dashoffset' from='170px' to='-170px' dur='1.25s' repeatCount='indefinite'/%3E%3C/svg%3E%0A`;\nconst loadingSvgCss = cxs({\n\tdisplay: 'inline-block',\n\tverticalAlign: 'middle',\n\n\tmaskImage: `url(\"${MASK}\")`,\n\t'-webkit-mask-image': `url(\"${MASK}\")`,\n\t'-webkit-mask-size': 'cover',\n\tmaskSize: 'cover'\n});\n\nconst loadingPathCss = (color: string) =>\n\tcxs({\n\t\tfill: color\n\t});\ninterface LoadingIconProps {\n\tsize?: number;\n\tcolor?: string;\n}\n\nexport const LoadingIcon = ({\n\tsize = DEFAULT_LOADING_SIZE,\n\tcolor = COLORS.LightGray\n}: LoadingIconProps) => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const RepeatIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {Big} from 'big.js';\nimport cxs from 'cxs';\nimport {useState, useRef, useEffect, useCallback} from 'preact/hooks';\nimport {MAX_CRYPTO_DECIMALS_FOR_DISPLAY} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tchangeModeButtonCss,\n\tcryptoAmountInputColumns,\n\tcryptoAmountInputContainerCss,\n\tcryptoAmountInputFirstColumn,\n\tcryptoAmountInputSecondColumn\n} from 'src/components/widget/components/PaymentProcess/CryptoFlow/styles';\nimport {donationAmountInputContainerErrorCss} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {textInputCss} from 'src/components/widget/components/TextInput/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {RepeatIcon} from 'src/components/widget/icons/RepeatIcon';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {displayCurrencyValue} from 'src/helpers/displayCurrencyValue';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface CryptoAmountInputProps {\n\tcryptoTokenRate: number | null;\n\tcryptoTokenLoading: boolean;\n}\nexport const CryptoAmountInput = ({\n\tcryptoTokenLoading,\n\tcryptoTokenRate\n}: CryptoAmountInputProps) => {\n\tconst [cryptoAmountString, setCryptoAmountString] = useState('');\n\tconst {cryptoAmount, setCryptoAmount, cryptoCurrency, submitError} =\n\t\tuseWidgetContext();\n\n\tconst {primaryColor} = useConfigContext();\n\tconst inputContainerClasses = joinClassNames([\n\t\tcryptoAmountInputContainerCss(primaryColor),\n\t\t...(submitError ? [donationAmountInputContainerErrorCss] : [])\n\t]);\n\n\tconst [amountWarning, setAmountWarning] = useState(\n\t\tundefined\n\t);\n\tconst [isCryptoInput, setIsCryptoInput] = useState(true);\n\n\tconst amountInputRef = useRef(null);\n\n\tuseEffect(() => {\n\t\tif (cryptoCurrency && amountInputRef && amountInputRef.current) {\n\t\t\tamountInputRef.current.focus();\n\t\t}\n\t}, [cryptoCurrency]);\n\n\tconst setDonationAmount = useCallback(\n\t\t(newAmount: string) => {\n\t\t\tconst newAmountBig =\n\t\t\t\tnewAmount && newAmount !== '' ? new Big(newAmount) : undefined;\n\t\t\tif (isCryptoInput) {\n\t\t\t\tsetCryptoAmountString(newAmountBig?.toString() ?? '');\n\t\t\t\tsetCryptoAmount(newAmountBig?.toNumber() ?? 0);\n\t\t\t} else {\n\t\t\t\tconst usdAmountBig =\n\t\t\t\t\tnewAmountBig && cryptoTokenRate\n\t\t\t\t\t\t? newAmountBig\n\t\t\t\t\t\t\t\t.div(cryptoTokenRate)\n\t\t\t\t\t\t\t\t.round(MAX_CRYPTO_DECIMALS_FOR_DISPLAY)\n\t\t\t\t\t\t: new Big(0);\n\t\t\t\tsetCryptoAmountString(usdAmountBig.toString());\n\t\t\t\tsetCryptoAmount(usdAmountBig.toNumber());\n\t\t\t}\n\t\t},\n\t\t[setCryptoAmount, isCryptoInput, cryptoTokenRate]\n\t);\n\n\tconst amountValue =\n\t\tcryptoTokenRate &&\n\t\tcryptoAmount &&\n\t\tnew Big(cryptoAmount).times(cryptoTokenRate).round(2).toString();\n\n\tuseEffect(() => {\n\t\tif (!amountWarning) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst timer = setTimeout(() => {\n\t\t\tsetAmountWarning(undefined);\n\t\t}, 1000);\n\t\treturn () => {\n\t\t\tclearTimeout(timer);\n\t\t};\n\t}, [amountWarning]);\n\n\tconst onAmountChanged = useCallback(\n\t\t(stringValue: string) => {\n\t\t\tsetAmountWarning(undefined);\n\t\t\tif (stringValue === '') {\n\t\t\t\tsetDonationAmount('');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tsetAmountWarning(undefined);\n\t\t\ttry {\n\t\t\t\tconst bigValue = new Big(stringValue);\n\t\t\t\tif (bigValue.lt(0)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (bigValue.gt(Number.MAX_SAFE_INTEGER)) {\n\t\t\t\t\tsetAmountWarning('Amount is too large');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tsetDonationAmount(stringValue);\n\t\t\treturn true;\n\t\t},\n\t\t[setDonationAmount]\n\t);\n\n\tconst zeroRate = cryptoTokenRate === 0;\n\n\treturn (\n\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t onAmountChanged(event.currentTarget.value)}\n\t\t\t\t\t/>\n\t\t\t\t\t{!zeroRate && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{cryptoTokenRate === null && cryptoTokenLoading ? (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : isCryptoInput ? (\n\t\t\t\t\t\t\t\tdisplayCurrencyValue(amountValue ?? 0, 'USD', {\n\t\t\t\t\t\t\t\t\tshowCurrency: false\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\tcryptoAmount ?? 0\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    {isCryptoInput ? cryptoCurrency : 'USD'}
    \n\t\t\t\t\t{!zeroRate && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t{isCryptoInput ? 'USD' : cryptoCurrency}*\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t
    \n\t\t\t
    \n\t\t\t{!zeroRate && (\n\t\t\t\t {\n\t\t\t\t\t\tsetIsCryptoInput(!isCryptoInput);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","export const AppleIcon = () => (\n\t\n\t\t\n\t\t\n\t\n);\n","export const GiftIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\n);\n","export const GoogleIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","import {VNode} from 'preact';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {AppleIcon} from 'src/components/widget/icons/AppleIcon';\nimport {BankIcon} from 'src/components/widget/icons/BankIcon';\nimport {CardIcon} from 'src/components/widget/icons/CardIcon';\nimport {CryptoIcon} from 'src/components/widget/icons/CryptoIcon';\nimport {DafIcon} from 'src/components/widget/icons/DafIcon';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {GoogleIcon} from 'src/components/widget/icons/GoogleIcon';\nimport {PaypalIcon} from 'src/components/widget/icons/Paypalcon';\nimport {StocksIcon} from 'src/components/widget/icons/StocksIcon';\nimport {VenmoIcon} from 'src/components/widget/icons/VenmoIcon';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\ninterface IconForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nconst IconForPaymentMethodMap: {\n\t[key in Exclude]: VNode;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: ,\n\t[PaymentMethod.BANK]: ,\n\t[PaymentMethod.PAYPAL]: ,\n\t[PaymentMethod.VENMO]: ,\n\t[PaymentMethod.CRYPTO]: ,\n\t[PaymentMethod.STOCKS]: ,\n\t[PaymentMethod.DAF]: ,\n\t[PaymentMethod.GIFT_CARD]: \n};\n\nfunction getIconForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? : ;\n\t}\n\n\treturn IconForPaymentMethodMap[method];\n}\n\nexport const IconForPaymentMethod = ({method}: IconForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\treturn getIconForPaymentMethod(method, paymentRequestAvailable);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CardIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const BankIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const PaypalIcon = () => (\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n);\n","export const VenmoIcon = () => (\n\t\n\t\t\n\t\n);\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const CryptoIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const StocksIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n","export const DafIcon = () => (\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n);\n","import cxs from 'cxs';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {\n\tPaymentMethod,\n\tPaymentRequestAvailable\n} from 'src/components/widget/types/PaymentMethod';\n\nconst NameForPaymentMethodMap: {\n\t[key in Exclude]: string;\n} = {\n\t[PaymentMethod.CREDIT_CARD]: 'Card',\n\t[PaymentMethod.BANK]: 'Bank',\n\t[PaymentMethod.PAYPAL]: 'PayPal',\n\t[PaymentMethod.VENMO]: 'Venmo',\n\t[PaymentMethod.GIFT_CARD]: 'Gift card',\n\t[PaymentMethod.CRYPTO]: 'Crypto',\n\t[PaymentMethod.STOCKS]: 'Stocks',\n\t[PaymentMethod.DAF]: 'DAF'\n};\n\nfunction getNameForPaymentMethod(\n\tmethod: PaymentMethod,\n\tpaymentRequestAvailable: PaymentRequestAvailable\n) {\n\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\treturn paymentRequestAvailable.applePay ? 'Apple Pay' : 'Google Pay';\n\t}\n\n\treturn NameForPaymentMethodMap[method];\n}\n\ninterface NameForPaymentMethodProps {\n\tmethod: PaymentMethod;\n}\n\nexport const NameForPaymentMethod = ({method}: NameForPaymentMethodProps) => {\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst name = getNameForPaymentMethod(method, paymentRequestAvailable);\n\treturn {name};\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\n\nexport const cardCss = cxs({\n\tpadding: `${Spacing.XL} ${Spacing.XL} 0px`,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: '0px'\n\t}\n});\n\nexport const fieldSetCss = cxs({\n\tborder: 'none',\n\tpadding: 0,\n\tmargin: 0,\n\tfontSize: '100%',\n\tfont: 'inherit',\n\tverticalAlign: 'baseline'\n});\n\nexport const legendCss = cxs({\n\tfontWeight: 700,\n\t...textSize.s,\n\tmarginBottom: Spacing.S\n});\n\nexport const formContainerCss = cxs({\n\t...verticalStackCss.cxs(Spacing.XL),\n\tpadding: '0px',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridColumn: '2/3',\n\t\tpadding: Spacing.XXL\n\t}\n});\n\nexport const formCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr',\n\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tgridAutoFlow: 'column',\n\t\tgridTemplateColumns: 'auto 1fr'\n\t}\n});\n","import cxs from 'cxs';\nimport {fieldSetCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {\n\tverticalStackCss,\n\thorizontalStackCss,\n\tSpacing\n} from 'src/components/widget/theme/spacing';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\nexport const largePaymentMethodSelectListCss = cxs({\n\theight: '100%',\n\twidth: '100%',\n\tminWidth: '170px',\n\tflexGrow: 1,\n\tbackgroundColor: COLORS.LightGray,\n\tdisplay: 'none',\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t...verticalStackCss.cxs(0)\n\t}\n});\n\nexport const smallPaymentMethodFieldSetCss = joinClassNames([\n\tfieldSetCss,\n\tcxs({\n\t\tdisplay: 'block',\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tdisplay: 'none'\n\t\t}\n\t})\n]);\n\nexport const smallPaymentMethodSelectListCss = cxs({\n\tdisplay: 'grid',\n\tgridTemplateColumns: '1fr 1fr',\n\tgridGap: Spacing.S\n});\n\nexport const paymentMethodButtonCssBase: cxs.CSSObject = {\n\t...horizontalStackCss.cxs(Spacing.XS),\n\talignItems: 'center',\n\tjustifyContent: 'flex-start',\n\twidth: '100%',\n\tbackground: 'transparent'\n};\n\nexport const largePaymentMethodButtonCss = (selected: boolean) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: 'none',\n\t\tpadding: Spacing.M,\n\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: 'white',\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: 'white'\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n\nexport const smallPaymentMethodButtonCss = (\n\tselected: boolean,\n\tprimaryColor: string\n) =>\n\tcxs({\n\t\t...paymentMethodButtonCssBase,\n\t\tborder: `1px solid ${COLORS.DarkGray}`,\n\t\tbackground: 'transparent',\n\t\ttextAlign: 'start',\n\t\tpadding: `${Spacing.XXS} ${Spacing.S}`,\n\t\tborderRadius: Radii.Default,\n\t\t':hover': {\n\t\t\tcursor: 'pointer',\n\t\t\tbackground: COLORS.Gray\n\t\t},\n\t\t'& > svg': {\n\t\t\twidth: '20px',\n\t\t\theight: '20px'\n\t\t},\n\t\t...(selected\n\t\t\t? {\n\t\t\t\t\tbackground: primaryColor,\n\t\t\t\t\tborder: `1px solid ${primaryColor}`,\n\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\tcolor: 'white',\n\t\t\t\t\t'& > svg': {\n\t\t\t\t\t\tfilter: 'brightness(0) invert(1)',\n\t\t\t\t\t\twidth: '20px',\n\t\t\t\t\t\theight: '20px'\n\t\t\t\t\t},\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tbackground: primaryColor\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t: {})\n\t});\n","import {useMemo} from 'preact/hooks';\nimport {IconForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/IconForPaymentMethod';\nimport {NameForPaymentMethod} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/NameForPaymentMethod';\nimport {\n\tlargePaymentMethodSelectListCss,\n\tlargePaymentMethodButtonCss,\n\tsmallPaymentMethodFieldSetCss,\n\tsmallPaymentMethodSelectListCss,\n\tsmallPaymentMethodButtonCss\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect/styles';\nimport {legendCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst usePaymentMethods = () => {\n\tconst {methods, lockMonthlyFrequency} = useConfigContext();\n\tconst {paymentRequestAvailable} = useWidgetContext();\n\n\tconst filteredMethods = useMemo(\n\t\t() =>\n\t\t\tmethods.filter((method) => {\n\t\t\t\tif (lockMonthlyFrequency && OneTimeFrequencyMethods.includes(method)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (method === PaymentMethod.PAYMENT_REQUEST) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tpaymentRequestAvailable.applePay ||\n\t\t\t\t\t\tpaymentRequestAvailable.googlePay\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}),\n\t\t[methods, lockMonthlyFrequency, paymentRequestAvailable]\n\t);\n\n\treturn filteredMethods;\n};\n\nexport const LargePaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\tif (methods.length === 1) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
      \n\t\t\t{methods.map((method) => (\n\t\t\t\t
    • \n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
    • \n\t\t\t))}\n\t\t
    \n\t);\n};\n\nexport const SmallPaymentMethodSelect = () => {\n\tconst methods = usePaymentMethods();\n\tconst {primaryColor} = useConfigContext();\n\tconst {selectedPaymentMethod, setSelectedPaymentMethod} = useWidgetContext();\n\n\tif (methods.length === 1) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tPayment method\n\t\t\t
      \n\t\t\t\t{methods.map((method) => (\n\t\t\t\t\t
    • \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetSelectedPaymentMethod(method);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    • \n\t\t\t\t))}\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\n/* Hide checkbox visually but remain accessible to screen readers.\n Source: https://polished.js.org/docs/#hidevisually */\nexport const hiddenCheckboxCss = cxs({\n\tborder: 0,\n\tclip: 'rect(0 0 0 0)',\n\tclipPath: 'inset(50%)',\n\theight: '1px',\n\tmargin: '-1px',\n\toverflow: 'hidden',\n\tpadding: '0',\n\tposition: 'absolute',\n\twhiteSpace: 'nowrap',\n\twidth: '1px'\n});\n\nexport const checkboxCss = ({\n\tchecked,\n\tprimaryColor\n}: {\n\tchecked?: boolean;\n\tprimaryColor: string;\n}) =>\n\tcxs({\n\t\tcursor: 'pointer',\n\t\twidth: '24px',\n\t\tminWidth: '24px',\n\t\theight: '24px',\n\t\tdisplay: 'flex',\n\t\tborderRadius: '4px',\n\t\tjustifyContent: 'center',\n\t\talignItems: 'center',\n\t\tborder: `1.5px solid ${checked ? primaryColor : COLORS.DarkGray}`,\n\t\t...(checked ? {background: primaryColor} : {})\n\t});\n\nexport const checkMarkIconCss = cxs({\n\twidth: '16px',\n\theight: '16px',\n\t'& > path': {\n\t\tstroke: 'white',\n\t\tstrokeWidth: '2px'\n\t}\n});\n\nexport const checkboxLabelTextCss = cxs({\n\tcursor: 'pointer'\n});\n\nexport const checkboxLabelContainerCss = cxs({\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tgap: Spacing.XS\n});\n","export const CheckMarkIcon = ({className}: {className?: string}) => (\n\t\n\t\t\n\t\n);\n","import {FunctionComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\tcheckboxLabelContainerCss,\n\thiddenCheckboxCss,\n\tcheckboxCss,\n\tcheckMarkIconCss,\n\tcheckboxLabelTextCss\n} from 'src/components/widget/components/Checkbox/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {CheckMarkIcon} from 'src/components/widget/icons/CheckMarkIcon';\n\ninterface CheckboxProps extends JSXInternal.HTMLAttributes {}\n\nexport const Checkbox: FunctionComponent = ({\n\tchildren,\n\tchecked,\n\tclassName,\n\t...rest\n}) => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {useState} from 'preact/hooks';\nimport {Checkbox} from 'src/components/widget/components/Checkbox';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextArea} from 'src/components/widget/components/TextInput';\nimport {useNonprofitOrError} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\n\nexport const PrivateNote = () => {\n\tconst nonprofit = useNonprofitOrError();\n\tconst enablePrivateNoteField =\n\t\tnonprofit.hasAdmin && !nonprofit.metadata?.disablePrivateNotes;\n\n\tconst {privateNote, setPrivateNote} = useWidgetContext();\n\tconst [showPrivateNoteField, setShowPrivateNoteField] = useState(\n\t\tBoolean(privateNote)\n\t);\n\n\tif (!enablePrivateNoteField) return null;\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tsetShowPrivateNoteField((previous) => !previous);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tAdd note for {nonprofit.name}\n\t\t\t\n\t\t\t{showPrivateNoteField && (\n\t\t\t\t\n\t\t\t\t\tPrivate note\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetPrivateNote(currentTarget.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t)}\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {smallText} from 'src/components/widget/theme/font-sizes';\nimport {ABOUT_URL} from 'src/constants/url';\n\nconst containerCss = cxs({\n\twidth: '100%',\n\ttextAlign: 'center'\n});\n\nconst redirectTextCss = cxs({\n\t...smallText,\n\tcolor: COLORS.TextOpaque\n});\n\nconst linkCss = (color: string) =>\n\tcxs({\n\t\tcolor,\n\t\ttextDecoration: 'none',\n\t\tcursor: 'pointer'\n\t});\n\nexport const RedirectNotice = () => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t\tEvery.org will accept your donation.{' '}\n\t\t\t\t\n\t\t\t\t\tLearn More\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {bodyText} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const btnCss = cxs({\n\t...bodyText,\n\toutline: 'none',\n\twidth: '100%',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tcursor: 'pointer',\n\tborderRadius: Radii.Big,\n\theight: '52px',\n\tfontWeight: 700,\n\tpadding: Spacing.XXS,\n\ttransition: 'opacity .3s'\n});\n\nexport const btnActiveColor = (color: string) =>\n\tcxs({\n\t\tcolor: COLORS.White,\n\t\tbackgroundColor: color,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n\nexport const btnDisabledCss = cxs({\n\tcolor: COLORS.White,\n\tbackgroundColor: COLORS.DarkGray,\n\tcursor: 'default',\n\t'& > span': {\n\t\topacity: '0.6'\n\t}\n});\n","import {ComponentChildren} from 'preact';\nimport {\n\tbtnCss,\n\tbtnDisabledCss,\n\tbtnActiveColor\n} from 'src/components/widget/components/PaymentProcess/SubmitButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport joinClassNames from 'src/helpers/joinClassNames';\n\ninterface ButtonProps {\n\thandleClick?: () => void;\n\tchildren: ComponentChildren;\n\tdisabled?: boolean;\n}\n\nexport const SubmitButton = ({\n\thandleClick,\n\tdisabled,\n\tchildren\n}: ButtonProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t{children}\n\t\t\n\t);\n};\n","import {useEffect, useState} from 'preact/hooks';\nimport {getCoingeckoRate} from 'src/components/widget/api';\n\nexport const useCoingeckoRate = (\n\tcoingeckoId?: string\n): [number | null, boolean, string | null] => {\n\tconst [rate, setRate] = useState(null);\n\tconst [error, setError] = useState(null);\n\tconst [loading, setLoading] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (!coingeckoId) {\n\t\t\tsetRate(null);\n\t\t\tsetError(null);\n\t\t\tsetLoading(false);\n\t\t\treturn;\n\t\t}\n\n\t\tsetLoading(true);\n\t\tgetCoingeckoRate(coingeckoId)\n\t\t\t.then((rate) => {\n\t\t\t\tsetRate(rate);\n\t\t\t\tsetError(null);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tsetRate(null);\n\t\t\t\tsetError(error.message);\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\tsetLoading(false);\n\t\t\t});\n\t}, [coingeckoId]);\n\n\treturn [rate, loading, error];\n};\n\nexport default useCoingeckoRate;\n","export const DEFAULT_CURRENCY = {\n\tname: 'USD',\n\tsymbol: '$'\n};\n","import {useCallback} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {\n\tconstructDonateStocksUrl,\n\tconstructDonateCryptoUrl,\n\tconstructDonateUrl,\n\tconstructGiftCardUrl\n} from 'src/helpers/constructDonateUrl';\n\nexport const useSubmitDonation = () => {\n\tconst config = useConfigContext();\n\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tsetSubmitError,\n\t\tselectedPaymentMethod,\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tcryptoAmount,\n\t\tcryptoCurrency,\n\t\tprivateNote\n\t} = useWidgetContext();\n\tconst {minDonationAmount} = useConfigContext();\n\n\tconst submitDonation = useCallback(\n\t\t(event: JSXInternal.TargetedEvent) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst target = config.completeDonationInNewTab ? '_blank' : '_self';\n\n\t\t\tconst baseParameters = {\n\t\t\t\tmethods: [selectedPaymentMethod],\n\t\t\t\tnonprofitSlug: config.nonprofitSlug,\n\t\t\t\tfundraiserSlug: config.fundraiserSlug,\n\t\t\t\tutmSource: config.utmSource,\n\t\t\t\tprivateNote\n\t\t\t};\n\t\t\tswitch (selectedPaymentMethod) {\n\t\t\t\tcase PaymentMethod.CRYPTO:\n\t\t\t\t\tif (!cryptoAmount || !cryptoCurrency) {\n\t\t\t\t\t\tsetSubmitError(`Please enter currency and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateCryptoUrl({\n\t\t\t\t\t\t\tcryptoAmount,\n\t\t\t\t\t\t\tcryptoCurrency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.STOCKS:\n\t\t\t\t\tif (!stockSymbol || !stockAmount) {\n\t\t\t\t\t\tsetSubmitError(`Please enter the symbol and amount`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateStocksUrl({\n\t\t\t\t\t\t\tstockSymbol,\n\t\t\t\t\t\t\tstockAmount,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\t\t\twindow.open(constructGiftCardUrl(config.nonprofitSlug), target);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (!donationAmount || donationAmount < minDonationAmount) {\n\t\t\t\t\t\tsetSubmitError(\n\t\t\t\t\t\t\t`The minimum donation amount is ${DEFAULT_CURRENCY.symbol}${minDonationAmount}`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tconstructDonateUrl({\n\t\t\t\t\t\t\tamount: donationAmount,\n\t\t\t\t\t\t\tfrequency: OneTimeFrequencyMethods.includes(selectedPaymentMethod)\n\t\t\t\t\t\t\t\t? DonationFrequency.OneTime\n\t\t\t\t\t\t\t\t: frequency,\n\t\t\t\t\t\t\t...baseParameters\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttarget\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tfrequency,\n\t\t\tdonationAmount,\n\t\t\tsetSubmitError,\n\t\t\tselectedPaymentMethod,\n\t\t\tconfig,\n\t\t\tminDonationAmount,\n\t\t\tstockAmount,\n\t\t\tstockSymbol,\n\t\t\tcryptoAmount,\n\t\t\tcryptoCurrency,\n\t\t\tprivateNote\n\t\t]\n\t);\n\n\treturn submitDonation;\n};\n","import cxs from 'cxs';\nimport {CryptoAmountInput} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoAmountInput';\nimport {CryptoSelector} from 'src/components/widget/components/PaymentProcess/CryptoFlow/CryptoSelector';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport useCoingeckoRate from 'src/components/widget/hooks/useCoingeckoRate';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {CryptoCurrencyConfig} from 'src/components/widget/types/Crypto';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {displayCurrencyValue} from 'src/helpers/displayCurrencyValue';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const CryptoFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {cryptoAmount, cryptoCurrency} = useWidgetContext();\n\n\tconst [cryptoTokenRate, cryptoTokenLoading] = useCoingeckoRate(\n\t\tcryptoCurrency && CryptoCurrencyConfig[cryptoCurrency]?.coingeckoId\n\t);\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\tCrypto currency\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t{cryptoCurrency && (\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\tAmount\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.CRYPTO, cryptoCurrency})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{cryptoCurrency && cryptoTokenRate && cryptoTokenRate > 0 && (\n\t\t\t\t\t

    \n\t\t\t\t\t\t*Estimated exchange rate of{' '}\n\t\t\t\t\t\t{displayCurrencyValue(cryptoTokenRate, 'USD', {showCurrency: true})}{' '}\n\t\t\t\t\t\t/ {cryptoCurrency} is provided by CoinGecko. Final rate will be\n\t\t\t\t\t\tdetermined by our brokerage at time of transaction conversion.\n\t\t\t\t\t

    \n\t\t\t\t)}\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const backButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcursor: 'pointer',\n\t\tbackground: 'none',\n\t\tfontWeight: 500,\n\t\ttransition: 'opacity .3s',\n\t\tcolor: primaryColor,\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\talignSelf: 'flex-start',\n\t\t...textSize.s,\n\t\topacity: 1,\n\t\tpadding: 0,\n\t\tgap: Spacing.XXS,\n\t\tmarginBottom: Spacing.XXL,\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t},\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\tpadding: Spacing.L,\n\t\t\tmarginBottom: 0\n\t\t}\n\t});\n","import {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ArrowBackIcon = () => {\n\tconst {primaryColor} = useConfigContext();\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import {backButtonCss} from 'src/components/widget/components/PaymentProcess/BackButton/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {ArrowBackIcon} from 'src/components/widget/icons/ArrowBackIcon';\n\nexport const BackButton = ({handleClick}: {handleClick?: () => void}) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\tBack\n\t\t\n\t);\n};\n","export enum DafFlowView {\n\tSTART,\n\tMANUAL,\n\tAMOUNT\n}\n\nexport interface DafFlowViewProps {\n\tchangeView: (view: DafFlowView) => void;\n}\n","import cxs from 'cxs';\nimport {useEffect, useRef} from 'preact/hooks';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {\n\tdonationAmountAddAmountButtonCss,\n\tdonationAmountAddAmountContainerCss,\n\tdonationAmountInputPrefixCss,\n\tdonationAmountInputSufixCss,\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {DEFAULT_CURRENCY} from 'src/constants/currency';\nimport {isTouchDevice} from 'src/helpers/isTouchDevice';\n\nconst preventDecimal = (\n\tevent: JSXInternal.TargetedEvent\n) => {\n\tif (event.key === '.') {\n\t\tevent.preventDefault();\n\t}\n};\n\nconst abbreviateNumber = (n: number, significantDigits?: number): string => {\n\tif (n < 1e3) {\n\t\treturn n.toString();\n\t}\n\n\tlet symbol = '';\n\tlet denom = 1;\n\tif (n >= 1e3 && n < 1e6) {\n\t\tdenom = 1e3;\n\t\tsymbol = 'k';\n\t} else if (n >= 1e6 && n < 1e9) {\n\t\tdenom = 1e6;\n\t\tsymbol = 'm';\n\t} else if (n >= 1e9 && n < 1e12) {\n\t\tdenom = 1e9;\n\t\tsymbol = 'b';\n\t} else if (n >= 1e12) {\n\t\tdenom = 1e12;\n\t\tsymbol = 't';\n\t}\n\n\tif (significantDigits === undefined) {\n\t\treturn (n / denom).toFixed(3).replace(/\\.?0+$/, '') + symbol;\n\t}\n\n\treturn (n / denom).toFixed(significantDigits) + symbol;\n};\n\nexport const DonationAmount = () => {\n\tconst inputRef = useRef(null);\n\n\tconst {primaryColor, addAmounts} = useConfigContext();\n\n\tconst {setDonationAmount, donationAmount, setSubmitError, submitError} =\n\t\tuseWidgetContext();\n\n\tconst autoFocusInput = () => {\n\t\tif (inputRef.current) {\n\t\t\tinputRef.current.focus();\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (!isTouchDevice()) {\n\t\t\tautoFocusInput();\n\t\t}\n\t}, []);\n\n\treturn (\n\t\t\n\t\t\tDonation amount\n\t\t\t {\n\t\t\t\t\tsetDonationAmount(Number(event.currentTarget.value));\n\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{addAmounts && addAmounts.length > 0 && (\n\t\t\t\t
    \n\t\t\t\t\t{addAmounts.map((amount) => (\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetDonationAmount((previous) => {\n\t\t\t\t\t\t\t\t\treturn typeof previous === 'number'\n\t\t\t\t\t\t\t\t\t\t? previous + amount\n\t\t\t\t\t\t\t\t\t\t: amount;\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t+{abbreviateNumber(amount)}\n\t\t\t\t\t\t\n\t\t\t\t\t))}\n\t\t\t\t
    \n\t\t\t)}\n\t\t\n\t);\n};\n","export const isTouchDevice = () =>\n\tBoolean('ontouchstart' in window || navigator.maxTouchPoints);\n","import cxs from 'cxs';\n\nexport const inputLabelCss = (primaryColor: string) =>\n\tcxs({\n\t\tposition: 'relative',\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\t\theight: '36px',\n\t\talignItems: 'center',\n\t\tjustifyContent: 'center',\n\t\tcolor: primaryColor,\n\t\tfontWeight: 500,\n\t\tborder: `2px solid ${primaryColor}`,\n\t\tborderRight: 'none'\n\t});\n\nexport const inputItemCss = (primaryColor: string) =>\n\tcxs({\n\t\tcursor: 'pointer',\n\t\tdisplay: 'flex',\n\t\tflexDirection: 'column',\n\t\tflex: '1 1 0px',\n\n\t\t'& > input': {\n\t\t\tappearance: 'none',\n\t\t\theight: 0\n\t\t},\n\n\t\t'& > input:checked + label': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t},\n\n\t\t'& > input:checked + label:hover': {\n\t\t\tbackgroundColor: primaryColor,\n\t\t\tcolor: 'white'\n\t\t}\n\t});\n\nexport const inputContainerCss = (primaryColor: string) =>\n\tcxs({\n\t\tdisplay: 'flex',\n\t\twidth: '100%',\n\n\t\t'& > div:first-of-type > label': {\n\t\t\tborderRadius: '6px 0 0 6px',\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '6px 0 0 6px'\n\t\t\t}\n\t\t},\n\n\t\t'& > div:last-of-type > label': {\n\t\t\tborderRadius: '0 6px 6px 0',\n\t\t\tborderRight: `2px solid ${primaryColor}`,\n\t\t\t'&::after': {\n\t\t\t\tborderRadius: '0 6px 6px 0'\n\t\t\t}\n\t\t}\n\t});\n","import {\n\tinputContainerCss,\n\tinputItemCss,\n\tinputLabelCss\n} from 'src/components/widget/components/PaymentProcess/Frequency/styles';\nimport {\n\tfieldSetCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {\n\tOneTimeFrequencyMethods,\n\tPaymentMethod\n} from 'src/components/widget/types/PaymentMethod';\n\nconst DEFAULT_MONTHLY_TITLE = 'Monthly donation';\n\nexport const Frequency = () => {\n\tconst {\n\t\tprimaryColor,\n\t\tlockMonthlyFrequency,\n\t\tmonthlyTitle = DEFAULT_MONTHLY_TITLE\n\t} = useConfigContext();\n\tconst {frequency, selectedPaymentMethod, setFrequency} = useWidgetContext();\n\n\tif (lockMonthlyFrequency) {\n\t\treturn

    {monthlyTitle}

    ;\n\t}\n\n\tif (OneTimeFrequencyMethods.includes(selectedPaymentMethod)) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\tFrequency\n\t\t\t\t

    \n\t\t\t\t\t{selectedPaymentMethod === PaymentMethod.DAF ? 'Chariot' : 'Venmo'}{' '}\n\t\t\t\t\tonly supports one-time donations\n\t\t\t\t

    \n\t\t\t
    \n\t\t);\n\t}\n\n\treturn (\n\t\t
    \n\t\t\tFrequency\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.Monthly);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tGive Monthly\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetFrequency(DonationFrequency.OneTime);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tOnce\n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DafAmountView = ({changeView}: DafFlowViewProps) => {\n\tconst submitDonation = useSubmitDonation();\n\tconst {donationAmount, selectedPaymentMethod} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Connect your DAF with Chariot

    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.DAF})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {linkCss} from 'src/components/widget/components/FundraiserLink/styles';\nimport {BackButton} from 'src/components/widget/components/PaymentProcess/BackButton';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {Spacing, verticalStackCss} from 'src/components/widget/theme/spacing';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\nimport {TEAM_EMAIL} from 'src/constants/url';\nimport {mailToLink} from 'src/helpers/mailToLink';\n\nexport const DafManualView = ({changeView}: DafFlowViewProps) => {\n\tconst {nonprofitSlug, primaryColor} = useConfigContext();\n\tconst nonprofit = useNonprofit();\n\tconst nonprofitName =\n\t\tnonprofit === NonprofitFetching || nonprofit === NonprofitFetchError\n\t\t\t? 'the nonprofit'\n\t\t\t: nonprofit.name;\n\treturn (\n\t\t
    \n\t\t\t {\n\t\t\t\t\tchangeView(DafFlowView.START);\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t
    \n\t\t\t\t

    Manual DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tPlease ask your provider to make a one-time or recurring grant to:\n\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\t

    \n\t\t\t\t\t\tEvery.org (EIN: 61-1913297)\n\t\t\t\t\t\t58 West Portal Ave #781 San Francisco, CA 94127\n\t\t\t\t\t\tMemo: every.org/{nonprofitSlug}\n\t\t\t\t\t\tContact info: Mark Ulrich, CEO\n\t\t\t\t\t\tEmail: team@every.org\n\t\t\t\t\t\tPhone number: +1 (415) 650-0503\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tYou may also email us at{' '}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{TEAM_EMAIL}\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\twith the memo or to let us know if you wish to share your contact\n\t\t\t\t\t\tinformation with the nonprofit/campaign. By default, your name and\n\t\t\t\t\t\temail will be shared with {nonprofitName} if included in the grant\n\t\t\t\t\t\tletter from your DAF.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tWe will attribute the donation accordingly:\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive BOTH your @username and a nonprofit/campaign: we will\n\t\t\t\t\t\tadd a donation for that nonprofit/campaign to your account.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only your @username, we will credit your\n\t\t\t\t\t\taccount's gift card balance in the amount received, which you\n\t\t\t\t\t\tcan use to support as many nonprofits as you'd like.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we receive only a nonprofit/campaign, we will send that amount to\n\t\t\t\t\t\tthat nonprofit/campaign.\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t\t\tIf we do not receive any information by the time the wire/ACH is\n\t\t\t\t\t\treceived, we will apply it towards running Every.org.\n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n","import cxs from 'cxs';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nconst CAHRIOT_GREEN = '#ADEFD1';\nconst CAHRIOT_DARK_GREEN = '#7ce6b6';\nconst CHARIOT_DARK_BLUE = '#00203F';\n\nexport const chariotButtonCss = cxs({\n\toutline: 'none',\n\tborder: 'none',\n\tfontFamily: 'inherit',\n\tbackground: CAHRIOT_GREEN,\n\tcolor: CHARIOT_DARK_BLUE,\n\talignSelf: 'center',\n\tborderRadius: Radii.Big,\n\tpadding: `${Spacing.M} ${Spacing.XL}`,\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tfontWeight: 500,\n\t...textSize.s,\n\tgap: Spacing.XS,\n\tcursor: 'pointer',\n\t':hover': {\n\t\tbackground: CAHRIOT_DARK_GREEN\n\t}\n});\n\nexport const manualButtonCss = (primaryColor: string) =>\n\tcxs({\n\t\toutline: 'none',\n\t\tborder: 'none',\n\t\tbackground: 'none',\n\t\tfontFamily: 'inherit',\n\t\tcolor: primaryColor,\n\t\talignSelf: 'center',\n\t\tdisplay: 'flex',\n\t\talignItems: 'center',\n\t\tfontWeight: 500,\n\t\t...textSize.s,\n\t\tgap: Spacing.XS,\n\t\tcursor: 'pointer',\n\t\t':hover': {\n\t\t\topacity: 0.9\n\t\t}\n\t});\n","import {\n\tchariotButtonCss,\n\tmanualButtonCss\n} from 'src/components/widget/components/PaymentProcess/DafFlow/styles';\nimport {\n\tDafFlowViewProps,\n\tDafFlowView\n} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\n\nexport const ChariotLogo = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n};\n\nexport const DafStartView = ({changeView}: DafFlowViewProps) => {\n\tconst {primaryColor} = useConfigContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t

    Instant DAF donation

    \n\t\t\t\t

    \n\t\t\t\t\tWe use Chariot to verify your account info and automatically initiate\n\t\t\t\t\ta grant from your DAF, or you can get instructions for making the\n\t\t\t\t\tdonation manually.\n\t\t\t\t

    \n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.AMOUNT);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tDonate with\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t {\n\t\t\t\t\t\tchangeView(DafFlowView.MANUAL);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tGet instructions for a manual DAF donation\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t
    \n\t);\n};\n","import {useState} from 'preact/hooks';\nimport {DafAmountView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafAmountView';\nimport {DafManualView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafManualView';\nimport {DafStartView} from 'src/components/widget/components/PaymentProcess/DafFlow/Views/DafStartView';\nimport {DafFlowView} from 'src/components/widget/components/PaymentProcess/DafFlow/types';\n\nexport const DafFlow = () => {\n\tconst [view, setView] = useState(DafFlowView.START);\n\n\t// eslint-disable-next-line default-case\n\tswitch (view) {\n\t\tcase DafFlowView.START:\n\t\t\treturn ;\n\t\tcase DafFlowView.MANUAL:\n\t\t\treturn ;\n\t\tcase DafFlowView.AMOUNT:\n\t\t\treturn ;\n\t}\n};\n","import {DonationAmount} from 'src/components/widget/components/PaymentProcess/DonationAmount';\nimport {Frequency} from 'src/components/widget/components/PaymentProcess/Frequency';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformContainerCss,\n\tformCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {DonationFrequency} from 'src/components/widget/types/DonationFrequency';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const DefaultFlow = () => {\n\tconst {\n\t\tfrequency,\n\t\tdonationAmount,\n\t\tselectedPaymentMethod,\n\t\tpaymentRequestAvailable\n\t} = useWidgetContext();\n\tconst submitDonation = useSubmitDonation();\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({\n\t\t\t\t\t\tmethod: selectedPaymentMethod,\n\t\t\t\t\t\tpaymentRequestIsApplePay: paymentRequestAvailable.applePay\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\n\nexport const giftCardIconCss = cxs({\n\tdisplay: 'block',\n\twidth: '80px',\n\theight: '80px',\n\talignSelf: 'center',\n\t'& > path': {\n\t\tstrokeWidth: '1'\n\t}\n});\n","import {giftCardIconCss} from 'src/components/widget/components/PaymentProcess/GiftCardFlow/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tformCss,\n\tformContainerCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {GiftIcon} from 'src/components/widget/icons/GiftIcon';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const GiftCardFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t

    Redeem a gift card to add donation credits to your account.

    \n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.GIFT_CARD})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {\n\tdonationAmountInputContainerErrorCss,\n\tdonationAmountInputCss\n} from 'src/components/widget/components/PaymentProcess/DonationAmount/styles';\nimport {\n\tLargePaymentMethodSelect,\n\tSmallPaymentMethodSelect\n} from 'src/components/widget/components/PaymentProcess/PaymentMethodSelect';\nimport {PrivateNote} from 'src/components/widget/components/PaymentProcess/PrivateNote';\nimport {RedirectNotice} from 'src/components/widget/components/PaymentProcess/RedirectNotice';\nimport {SubmitButton} from 'src/components/widget/components/PaymentProcess/SubmitButton';\nimport {\n\tfieldSetCss,\n\tformContainerCss,\n\tformCss,\n\tlegendCss\n} from 'src/components/widget/components/PaymentProcess/styles';\nimport {TextInput} from 'src/components/widget/components/TextInput';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useSubmitDonation} from 'src/components/widget/hooks/useSubmitDonation';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {verticalStackCss, Spacing} from 'src/components/widget/theme/spacing';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\nimport {getSubmitButtonText} from 'src/helpers/getSubmitButtonText';\n\nexport const StocksFlow = () => {\n\tconst submitDonation = useSubmitDonation();\n\n\tconst {primaryColor} = useConfigContext();\n\n\tconst {\n\t\tstockAmount,\n\t\tstockSymbol,\n\t\tsetStockAmount,\n\t\tsetStockSymbol,\n\t\tsubmitError,\n\t\tsetSubmitError\n\t} = useWidgetContext();\n\n\treturn (\n\t\t
    \n\t\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tWhat is the symbol of the shares?\n\t\t\t\t\t\t\n\t\t\t\t\t\tExample: AAPL\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockSymbol(event.currentTarget.value);\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t\tHow many shares are you donating?\n\t\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetStockAmount(Number(event.currentTarget.value));\n\t\t\t\t\t\t\t\tsetSubmitError(null);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{getSubmitButtonText({method: PaymentMethod.STOCKS})}\n\t\t\t\t\n\t\t\t\t\n\t\t\t
    \n\t\t\n\t);\n};\n","import {GridCard} from 'src/components/widget/components/GridCard';\nimport {CryptoFlow} from 'src/components/widget/components/PaymentProcess/CryptoFlow';\nimport {DafFlow} from 'src/components/widget/components/PaymentProcess/DafFlow';\nimport {DefaultFlow} from 'src/components/widget/components/PaymentProcess/DefaultFlow';\nimport {GiftCardFlow} from 'src/components/widget/components/PaymentProcess/GiftCardFlow';\nimport {StocksFlow} from 'src/components/widget/components/PaymentProcess/StocksFlow';\nimport {cardCss} from 'src/components/widget/components/PaymentProcess/styles';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {PaymentMethod} from 'src/components/widget/types/PaymentMethod';\n\nconst DonateFlowForPaymentMethod = () => {\n\tconst {selectedPaymentMethod} = useWidgetContext();\n\n\tswitch (selectedPaymentMethod) {\n\t\tcase PaymentMethod.CRYPTO:\n\t\t\treturn ;\n\t\tcase PaymentMethod.STOCKS:\n\t\t\treturn ;\n\t\tcase PaymentMethod.DAF:\n\t\t\treturn ;\n\t\tcase PaymentMethod.GIFT_CARD:\n\t\t\treturn ;\n\t\tdefault:\n\t\t\treturn ;\n\t}\n};\n\nexport const PaymentProcess = () => {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n};\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {Radii} from 'src/components/widget/theme/radii';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const widgetCss = (height: number | null) =>\n\tcxs({\n\t\tbackground: 'white',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\tborderRadius: 'unset',\n\t\tposition: 'relative',\n\t\toverflow: 'auto',\n\t\tpadding: `0`,\n\t\tpaddingBottom: Spacing.XXL,\n\n\t\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\t\theight: height ? `${height}px` : 'unset',\n\t\t\tbackground: '#f3f6f6',\n\t\t\tminHeight: '378px',\n\t\t\tmaxHeight: `calc(100vh - 2 * ${Spacing.XL})`,\n\t\t\twidth: '1000px',\n\t\t\toverflow: 'unset',\n\t\t\toverflowY: 'scroll',\n\t\t\t/* Hide sc rollbar */\n\t\t\t'-ms-overflow-style': 'none' /* IE and Edge */,\n\t\t\tscrollbarWidth: 'none' /* Firefox */,\n\t\t\t'::-webkit-scrollbar': {\n\t\t\t\tdisplay: 'none'\n\t\t\t},\n\t\t\tborderRadius: Radii.Medium,\n\t\t\tpadding: Spacing.XL\n\t\t}\n\t});\n","import {VNode} from 'preact';\nimport {forwardRef} from 'preact/compat';\nimport {widgetCss} from 'src/components/widget/components/WidgetCard/styles';\n\nexport const WidgetCard = forwardRef<\n\tHTMLDivElement,\n\tVNode<{height: number | null}>['props']\n>(({children, height}, ref) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n});\n","import cxs from 'cxs';\nimport {BREAKPOINTS} from 'src/components/widget/theme/breakpoints';\nimport {COLORS} from 'src/components/widget/theme/colors';\nimport {FontFamily} from 'src/components/widget/theme/font-family';\nimport {textSize} from 'src/components/widget/theme/font-sizes';\nimport {Spacing} from 'src/components/widget/theme/spacing';\n\nexport const overlayCss = cxs({\n\t...textSize.s,\n\tposition: 'fixed',\n\theight: 'auto',\n\twidth: '100%',\n\tzIndex: 999,\n\ttop: 0,\n\tbottom: 0,\n\tleft: 0,\n\tright: 0,\n\tdisplay: 'flex',\n\tbackground: 'rgba(0, 0, 0, 0.5)',\n\tjustifyContent: 'center',\n\talignItems: 'center',\n\tcolor: COLORS.Text,\n\tfontFamily: FontFamily.BasisGrotesque,\n\tpadding: 0,\n\t[BREAKPOINTS.TabletLandscapeUp]: {\n\t\tpadding: Spacing.XL\n\t},\n\t// reset\n\tboxSizing: 'border-box',\n\t'-webkit-font-smoothing': 'antialiased',\n\t'-moz-osx-font-smoothing': 'grayscale',\n\t'& *': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:before': {\n\t\tboxSizing: 'inherit'\n\t},\n\t'& *:after': {\n\t\tboxSizing: 'inherit'\n\t}\n});\n","import {FunctionalComponent} from 'preact';\nimport {JSXInternal} from 'preact/src/jsx';\nimport {overlayCss} from 'src/components/widget/components/WidgetOverlay/styles';\n\ninterface WdigetOverlayProps {\n\tonClick: JSXInternal.MouseEventHandler;\n}\n\nexport const WidgetOverlay: FunctionalComponent = ({\n\tchildren,\n\tonClick\n}) => {\n\treturn (\n\t\t
    \n\t\t\t{children}\n\t\t
    \n\t);\n};\n","import {JSXInternal} from 'preact/src/jsx';\nimport {Faq} from 'src/components/widget/components/Faq';\nimport {Footer} from 'src/components/widget/components/Footer';\nimport {FundraiserLink} from 'src/components/widget/components/FundraiserLink';\nimport {Grid} from 'src/components/widget/components/Grid';\nimport {Header} from 'src/components/widget/components/Header';\nimport {CloseButton} from 'src/components/widget/components/Header/CloseButton';\nimport {largeScreenCloseButtonCss} from 'src/components/widget/components/Header/CloseButton/styles';\nimport {NonprofitInfo} from 'src/components/widget/components/NonprofitInfo';\nimport {PaymentProcess} from 'src/components/widget/components/PaymentProcess';\nimport {WidgetCard} from 'src/components/widget/components/WidgetCard';\nimport {WidgetOverlay} from 'src/components/widget/components/WidgetOverlay';\nimport {useConfigContext} from 'src/components/widget/hooks/useConfigContext';\nimport {useFundraiser} from 'src/components/widget/hooks/useFundraiser';\nimport {useNonprofit} from 'src/components/widget/hooks/useNonprofit';\nimport {useWidgetContext} from 'src/components/widget/hooks/useWidgetContext';\nimport {LoadingIcon} from 'src/components/widget/icons/LoadingIcon';\nimport {\n\tFundraiserFetchError,\n\tFundraiserFetching\n} from 'src/components/widget/types/Fundraiser';\nimport {\n\tNonprofitFetchError,\n\tNonprofitFetching\n} from 'src/components/widget/types/Nonprofit';\n\nconst Widget = () => {\n\tconst {fundraiserSlug} = useConfigContext();\n\tconst {hideWidget} = useWidgetContext();\n\tconst findraiser = useFundraiser();\n\tconst nonprofit = useNonprofit();\n\n\tconst hideOnWrapperClick: JSXInternal.MouseEventHandler = (\n\t\tevent\n\t) => {\n\t\tif (event.target === event.currentTarget) {\n\t\t\thideWidget();\n\t\t}\n\t};\n\n\tif (\n\t\tnonprofit === NonprofitFetchError ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetchError)\n\t) {\n\t\thideWidget();\n\t\treturn null;\n\t}\n\n\tif (\n\t\tnonprofit === NonprofitFetching ||\n\t\t(fundraiserSlug && findraiser === FundraiserFetching)\n\t) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t
    \n\t);\n};\n\nexport default Widget;\n","const resetcss = `\n\n html, body, div, span, applet, object, iframe,\n h1, h2, h3, h4, h5, h6, p, blockquote, pre,\n a, abbr, acronym, address, big, cite, code,\n del, dfn, em, img, ins, kbd, q, s, samp,\n small, strike, strong, sub, sup, tt, var,\n b, u, i, center,\n dl, dt, dd, ol, ul, li,\n fieldset, form, label, legend,\n table, caption, tbody, tfoot, thead, tr, th, td,\n article, aside, canvas, details, embed, \n figure, figcaption, footer, header, hgroup, \n menu, nav, output, ruby, section, summary,\n time, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n font-family: 'Basis Grotesque Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Roboto, sans-serif;\n vertical-align: baseline;\n }\n /* HTML5 display-role reset for older browsers */\n article, aside, details, figcaption, figure, \n footer, header, hgroup, menu, nav, section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol, ul {\n list-style: none;\n }\n blockquote, q {\n quotes: none;\n }\n blockquote:before, blockquote:after,\n q:before, q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n button {\n color: unset;\n background: unset;\n }\n\n h1, h2, h3, h4, h4, h6 {\n font-weight: 700\n }\n`;\n\nexport default resetcss;\n","import {render} from 'preact';\nimport EmbedButton from 'src/components/embed-button';\nimport {CreateButtonInSelectorProps} from 'src/components/embed-button/types';\nimport {CreateWidgetInSelectorProps} from 'src/components/widget/types';\nimport {WidgetConfig} from 'src/components/widget/types/WidgetConfig';\nimport {loadFonts} from 'src/loadFonts';\nimport {WidgetLoader} from 'src/loaders/Widgetloader';\nimport resetcss from 'src/resetCss';\n\ninterface GlobalExport {\n\tcreateButton: (options: CreateButtonInSelectorProps) => void;\n\tcreateWidget: (options: CreateWidgetInSelectorProps) => void;\n\tsetOptions: (options: Partial) => void;\n\tshowWidget: () => void;\n}\n\ndeclare const window: Window & {\n\teveryDotOrgDonateButton?: GlobalExport;\n};\n\nexport default function manualMode() {\n\tconst DEFAULT_HASH_OPEN_WIDGET = 'donate';\n\n\tconst baseOptions: Partial = {};\n\tconst options = {\n\t\tshow: false,\n\t\topenAt: DEFAULT_HASH_OPEN_WIDGET\n\t};\n\tlet instanceOptions: Partial = {};\n\n\tconst getNodeList = (element?: Element, selector?: string) =>\n\t\telement ? [element] : selector && document.querySelectorAll(selector);\n\n\tloadFonts();\n\n\t/**\n\t * Helper function to debug donate button issues\n\t */\n\tfunction log(...messages: unknown[]): void {\n\t\tconsole.info('Every.org Donate Button:', ...messages);\n\t}\n\n\tlet widgetMountPoint: HTMLElement;\n\n\tconst mountWidget = () => {\n\t\tconst shadowWidgetWrapper = document.createElement('div');\n\t\tshadowWidgetWrapper.id = 'shadow-wrapper';\n\t\tshadowWidgetWrapper.style.position = 'absolute';\n\t\tshadowWidgetWrapper.style.zIndex = '20000000';\n\t\tdocument.body.append(shadowWidgetWrapper);\n\n\t\twidgetMountPoint = document.createElement('div');\n\t\tshadowWidgetWrapper.attachShadow({mode: 'open'}).append(widgetMountPoint);\n\n\t\tconst everyStyles: HTMLStyleElement | null =\n\t\t\tdocument.querySelector('#every-styles');\n\n\t\tif (everyStyles) {\n\t\t\tconst rules = Object.values(everyStyles.sheet?.cssRules ?? {})\n\t\t\t\t.map((rule) => rule.cssText)\n\t\t\t\t.join('\\n');\n\n\t\t\tconst everyShadowStyles = document.createElement('style');\n\t\t\teveryShadowStyles.id = 'every-shadow-styles';\n\t\t\teveryShadowStyles.innerHTML = resetcss + rules;\n\n\t\t\twidgetMountPoint.append(everyShadowStyles);\n\t\t}\n\t};\n\n\tconst renderWidget = () => {\n\t\tif (!widgetMountPoint) {\n\t\t\tmountWidget();\n\t\t}\n\n\t\tconst hash = window.location?.hash;\n\t\tconst shouldShowWidget =\n\t\t\thash ===\n\t\t\t`#${\n\t\t\t\tinstanceOptions?.openAt ?? baseOptions?.openAt ?? options?.openAt ?? ''\n\t\t\t}`;\n\n\t\tif (shouldShowWidget) {\n\t\t\tObject.assign(options, {show: true});\n\t\t}\n\n\t\tconst finalOptions: Partial = {\n\t\t\t...options,\n\t\t\t...baseOptions,\n\t\t\t...instanceOptions\n\t\t};\n\n\t\trender(\n\t\t\t,\n\t\t\twidgetMountPoint\n\t\t);\n\t};\n\n\tfunction showWidget() {\n\t\tObject.assign(options, {show: true});\n\t\trenderWidget();\n\t}\n\n\tfunction hideWidget() {\n\t\tObject.assign(options, {show: false});\n\t\trenderWidget();\n\t}\n\n\tfunction setOptions(newOptions: Partial) {\n\t\tObject.assign(baseOptions, newOptions);\n\t\trenderWidget();\n\t}\n\n\tfunction updateOptionsAndShowCb(newOptions: WidgetConfig) {\n\t\tconst optionsCopy = {...newOptions};\n\t\tObject.assign(options, {\n\t\t\topenAt: optionsCopy.openAt ?? DEFAULT_HASH_OPEN_WIDGET\n\t\t});\n\t\treturn (event: any) => {\n\t\t\tevent.preventDefault();\n\t\t\tinstanceOptions = optionsCopy;\n\t\t\tshowWidget();\n\t\t};\n\t}\n\n\tconst createButtonInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateButtonInSelectorProps) => {\n\t\tif (!element && !selector && !options.nonprofitSlug) {\n\t\t\tlog(\n\t\t\t\t'createButton():',\n\t\t\t\t'must provide element or selector or nonprofitSlug'\n\t\t\t);\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const buttonContainer of nodes) {\n\t\t\t// Search for an Every.org link inside the container\n\t\t\tconst buttonLink = buttonContainer.querySelector('a') ?? undefined;\n\t\t\tif (!options.nonprofitSlug && !buttonLink) {\n\t\t\t\tlog('no link in container', buttonContainer);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst href = buttonLink?.getAttribute('href') ?? undefined;\n\n\t\t\tif (!options.nonprofitSlug && !href) {\n\t\t\t\tlog('link lacks href', buttonLink);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We preserve it over any custom config passed\n\t\t\tconst finalOptions = {\n\t\t\t\t...instanceOptions,\n\t\t\t\t...options\n\t\t\t};\n\n\t\t\trender(, buttonContainer, buttonLink);\n\t\t}\n\t};\n\n\tconst createWidgetInSelector = ({\n\t\telement,\n\t\tselector,\n\t\t...options\n\t}: CreateWidgetInSelectorProps) => {\n\t\tif (!element && !selector) {\n\t\t\tlog('createWidget():', 'must provide element or selector');\n\t\t}\n\n\t\tconst nodes = getNodeList(element, selector);\n\t\tif (!nodes) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.nonprofitSlug) {\n\t\t\tlog('createWidget():', 'must provide nonprofitSlug');\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const node of nodes) {\n\t\t\tnode.addEventListener('click', updateOptionsAndShowCb(options));\n\t\t}\n\n\t\tObject.assign(baseOptions, options);\n\t\trenderWidget();\n\t};\n\n\twindow.everyDotOrgDonateButton = {\n\t\tcreateButton: createButtonInSelector,\n\t\tshowWidget,\n\t\tsetOptions,\n\t\tcreateWidget: createWidgetInSelector\n\t};\n}\n","import autoPlayMode from 'src/autoPlayMode';\nimport {shouldEnableAutoPlay} from 'src/helpers/shouldEnableAutoPlay';\nimport manualMode from 'src/manualMode';\n\nconst autoPlay = shouldEnableAutoPlay();\n\nif (autoPlay) {\n\tautoPlayMode();\n} else {\n\tmanualMode();\n}\n","'use strict';\n\nvar cache = {};\nvar prefix = 'x';\nvar rules = [];\nvar insert = function insert(rule) {\n return rules.push(rule);\n};\nvar hyph = function hyph(s) {\n return s.replace(/[A-Z]|^ms/g, '-$&').toLowerCase();\n};\nvar mx = function mx(rule, media) {\n return media ? media + '{' + rule + '}' : rule;\n};\nvar rx = function rx(cn, prop, val) {\n return '.' + cn + '{' + hyph(prop) + ':' + val + '}';\n};\nvar noAnd = function noAnd(s) {\n return s.replace(/&/g, '');\n};\n\nvar parse = function parse(obj) {\n var child = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var media = arguments[2];\n return Object.keys(obj).map(function (key) {\n var val = obj[key];\n if (val === null) return '';\n if (typeof val === 'object') {\n var m2 = /^@/.test(key) ? key : null;\n var c2 = m2 ? child : child + key;\n return parse(val, c2, m2 || media);\n }\n var _key = key + val + child + media;\n if (cache[_key]) return cache[_key];\n var className = prefix + rules.length.toString(36);\n insert(mx(rx(className + noAnd(child), key, val), media));\n cache[_key] = className;\n return className;\n }).join(' ');\n};\n\nmodule.exports = function () {\n for (var _len = arguments.length, styles = Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n styles[_key2] = arguments[_key2];\n }\n\n return styles.map(function (style) {\n return parse(style);\n }).join(' ').trim();\n};\n\nmodule.exports.css = function () {\n return rules.sort().join('');\n};\n\nmodule.exports.reset = function () {\n cache = {};\n while (rules.length) {\n rules.pop();\n }\n};\n\nmodule.exports.prefix = function (val) {\n return prefix = val;\n};\n\n\nif (typeof document !== 'undefined') {\n const styles = document.createElement('style')\n styles.id = 'every-styles'\n var sheet = document.head.appendChild(styles).sheet;\n\n insert = function insert(rule) {\n const shadowRoot = document.querySelector('#shadow-wrapper')\n\n if(shadowRoot) {\n const everyShadowStyles = shadowRoot.shadowRoot.querySelector('#every-shadow-styles')\n \n everyShadowStyles.innerHTML += rule\n }\n\n rules.push(rule);\n sheet.insertRule(rule, sheet.cssRules.length);\n };\n}","import { EMPTY_ARR } from './constants';\n\nexport const isArray = Array.isArray;\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [],\n\t\t\trefQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tcommitRoot(commitQueue, vnode, refQueue);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort(depthSort);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { isArray } from '../util';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet i,\n\t\tj,\n\t\toldVNode,\n\t\tchildVNode,\n\t\tnewDom,\n\t\tfirstChildDom,\n\t\tskew = 0;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length,\n\t\tremainingOldChildren = oldChildrenLength,\n\t\tnewChildrenLength = renderResult.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < newChildrenLength; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (\n\t\t\tchildVNode == null ||\n\t\t\ttypeof childVNode == 'boolean' ||\n\t\t\ttypeof childVNode == 'function'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
    {reuse}{reuse}
    ) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
    \n\t\t\t//
    {reuse}{reuse}
    \n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\toldVNode = oldChildren[i];\n\t\t\tif (oldVNode && oldVNode.key == null && oldVNode._dom) {\n\t\t\t\tif (oldVNode._dom == oldDom) {\n\t\t\t\t\toldDom = getDomSibling(oldVNode);\n\t\t\t\t}\n\n\t\t\t\tunmount(oldVNode, oldVNode, false);\n\t\t\t\toldChildren[i] = null;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\tlet skewedIndex = i + skew;\n\t\tconst matchingIndex = findMatchingIndex(\n\t\t\tchildVNode,\n\t\t\toldChildren,\n\t\t\tskewedIndex,\n\t\t\tremainingOldChildren\n\t\t);\n\n\t\tif (matchingIndex === -1) {\n\t\t\toldVNode = EMPTY_OBJ;\n\t\t} else {\n\t\t\toldVNode = oldChildren[matchingIndex] || EMPTY_OBJ;\n\t\t\toldChildren[matchingIndex] = undefined;\n\t\t\tremainingOldChildren--;\n\t\t}\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (oldVNode.ref) {\n\t\t\t\tapplyRef(oldVNode.ref, null, childVNode);\n\t\t\t}\n\t\t\trefQueue.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tlet isMounting = oldVNode === EMPTY_OBJ || oldVNode._original === null;\n\t\t\tif (isMounting) {\n\t\t\t\tif (matchingIndex == -1) {\n\t\t\t\t\tskew--;\n\t\t\t\t}\n\t\t\t} else if (matchingIndex !== skewedIndex) {\n\t\t\t\tif (matchingIndex === skewedIndex + 1) {\n\t\t\t\t\tskew++;\n\t\t\t\t} else if (matchingIndex > skewedIndex) {\n\t\t\t\t\tif (remainingOldChildren > newChildrenLength - skewedIndex) {\n\t\t\t\t\t\tskew += matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// ### Change from keyed: I think this was missing from the algo...\n\t\t\t\t\t\tskew--;\n\t\t\t\t\t}\n\t\t\t\t} else if (matchingIndex < skewedIndex) {\n\t\t\t\t\tif (matchingIndex == skewedIndex - 1) {\n\t\t\t\t\t\tskew = matchingIndex - skewedIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tskew = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tskew = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tskewedIndex = i + skew;\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex ||\n\t\t\t\t\toldVNode._children === childVNode._children)\n\t\t\t) {\n\t\t\t\toldDom = reorderChildren(childVNode, oldDom, parentDom);\n\t\t\t} else if (\n\t\t\t\ttypeof childVNode.type != 'function' &&\n\t\t\t\t(matchingIndex !== skewedIndex || isMounting)\n\t\t\t) {\n\t\t\t\toldDom = placeChild(parentDom, newDom, oldDom);\n\t\t\t} else if (childVNode._nextDom !== undefined) {\n\t\t\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t\t\t// of last DOM child of this child VNode\n\t\t\t\toldDom = childVNode._nextDom;\n\n\t\t\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t\t\t// can clean up the property\n\t\t\t\tchildVNode._nextDom = undefined;\n\t\t\t} else {\n\t\t\t\toldDom = newDom.nextSibling;\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\n\t\t\t\tnewParentVNode._nextDom = oldChildren[i]._dom.nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(parentDom, newDom, oldDom) {\n\tif (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\tparentDom.insertBefore(newDom, null);\n\t} else if (newDom != oldDom || newDom.parentNode == null) {\n\t\tparentDom.insertBefore(newDom, oldDom);\n\t}\n\n\treturn newDom.nextSibling;\n}\n\n/**\n * @param {import('../internal').VNode | string} childVNode\n * @param {import('../internal').VNode[]} oldChildren\n * @param {number} skewedIndex\n * @param {number} remainingOldChildren\n * @returns {number}\n */\nfunction findMatchingIndex(\n\tchildVNode,\n\toldChildren,\n\tskewedIndex,\n\tremainingOldChildren\n) {\n\tconst key = childVNode.key;\n\tconst type = childVNode.type;\n\tlet x = skewedIndex - 1;\n\tlet y = skewedIndex + 1;\n\tlet oldVNode = oldChildren[skewedIndex];\n\n\tif (\n\t\toldVNode === null ||\n\t\t(oldVNode && key == oldVNode.key && type === oldVNode.type)\n\t) {\n\t\treturn skewedIndex;\n\t} else if (remainingOldChildren > (oldVNode != null ? 1 : 0)) {\n\t\twhile (x >= 0 || y < oldChildren.length) {\n\t\t\tif (x >= 0) {\n\t\t\t\toldVNode = oldChildren[x];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t\tx--;\n\t\t\t}\n\n\t\t\tif (y < oldChildren.length) {\n\t\t\t\toldVNode = oldChildren[y];\n\t\t\t\tif (oldVNode && key == oldVNode.key && type === oldVNode.type) {\n\t\t\t\t\treturn y;\n\t\t\t\t}\n\t\t\t\ty++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/(PointerCapture)$|Capture$/, '$1'));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname !== 'rowSpan' &&\n\t\t\tname !== 'colSpan' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name[4] === '-')) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type + false](options.event ? options.event(e) : e);\n}\n\nfunction eventProxyCapture(e) {\n\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, isArray, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating,\n\trefQueue\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\touter: if (typeof newType == 'function') {\n\t\ttry {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!c._force &&\n\t\t\t\t\t((c.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\t\tnewVNode._original === oldVNode._original)\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\t\t\tc._force = false;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tisArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tnewVNode._original = null;\n\t\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\t\tnewVNode._dom = oldDom;\n\t\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t\t// ^ could possibly be simplified to:\n\t\t\t\t// excessDomChildren.length = 0;\n\t\t\t}\n\t\t\toptions._catchError(e, newVNode, oldVNode);\n\t\t}\n\t} else if (\n\t\texcessDomChildren == null &&\n\t\tnewVNode._original === oldVNode._original\n\t) {\n\t\tnewVNode._children = oldVNode._children;\n\t\tnewVNode._dom = oldVNode._dom;\n\t} else {\n\t\tnewVNode._dom = diffElementNodes(\n\t\t\toldVNode._dom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\tisHydrating,\n\t\t\trefQueue\n\t\t);\n\t}\n\n\tif ((tmp = options.diffed)) tmp(newVNode);\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root, refQueue) {\n\tfor (let i = 0; i < refQueue.length; i++) {\n\t\tapplyRef(refQueue[i], refQueue[++i], refQueue[++i]);\n\t}\n\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @param {Array} refQueue an array of elements needed to invoke refs\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating,\n\trefQueue\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tisArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating,\n\t\t\t\trefQueue\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix