1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3562],{45222:function(e,t){t.Z={src:"/_next/static/media/social-contribute.71bd62da.png",height:945,width:1800,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAAKlBMVEX7+fb18/H////a2NjYy77ApYmFgnXq6Ob04M2ulneDZE3Gq6FeX1RSV1fIeXhzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAJUlEQVR4nAXBhwEAMAzDINkZ3f+/WwDAuS4jInx2gyRnNRJ41vsIOgB7sKE1fQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:4}},86438:function(e,t,l){l.d(t,{D:function(){return F}});var r=l(85893),n=l(67294),i=l(41664),o=l.n(i),s=l(25675),a=l.n(s),c=l(29887),d=l(12515),u=l(79648);let p=e=>{let{label:t,value:l,onChange:n,...i}=e;return(0,r.jsx)("div",{className:"box-border",children:(0,r.jsxs)("label",{className:"block font-semibold text-[16px]/7",style:{color:i.disabled?"var(--color-text-secondary)":void 0},children:[t,(0,r.jsx)("div",{className:"relative flex items-center w-full h-[52px] overflow-hidden border border-[#d5dbe1] rounded mt-3 focus-within:[outline:5px_auto_-webkit-focus-ring-color]",children:(0,r.jsx)("input",{...i,value:l,onChange:e=>n(e.target.value),className:"flex-[1_1_auto] w-full p-3 font-semibold text-[16px]/7 border-none outline-none placeholder:font-medium focus:outline-none disabled:cursor-not-allowed"})})]})})};var m=l(5405),h=l(76299),x=l(8556),f=l(61451),b=l(89738),g=l(31284),j=l(26541),y=l(1463),v=l(11163);let w=new c.Decimal("0.03"),A=new c.Decimal("0.035"),_=[{value:"climsku_frontier_offtake_portfolio_2027",delivery_year:2027,label:"Frontier's 2027 offtake portfolio",image:y.Z.src,price:new c.Decimal(550)}],N=(0,j.B)(g.N.locale);function k(e){let t=e%1!=0;return g.N.formatNumber(e,{style:"currency",currency:"usd",maximumFractionDigits:e?void 0:0,minimumFractionDigits:t?N.usd.precision:0})}function D(e,t){return e.toString()?e.mul(t).toDecimalPlaces(N.usd.precision).toString():""}let S=(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_2912_4367)",children:[(0,r.jsx)("path",{d:"M8 7.66992V11.0033",stroke:"#B9B2A9",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M8 5.01367L8.01 5.00256",stroke:"#B9B2A9",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M8.00004 14.67C11.6819 14.67 14.6667 11.6852 14.6667 8.00334C14.6667 4.32144 11.6819 1.33667 8.00004 1.33667C4.31814 1.33667 1.33337 4.32144 1.33337 8.00334C1.33337 11.6852 4.31814 14.67 8.00004 14.67Z",stroke:"#B9B2A9",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_2912_4367",children:(0,r.jsx)("rect",{width:"16",height:"16",fill:"white",transform:"translate(0 0.0032959)"})})})]});function C(e){let{value:t,onChange:l,onBlur:n}=e,{amount:i,currency:o}=t;return(0,r.jsxs)("div",{className:"currency-input box-border",children:[(0,r.jsx)("label",{className:"block mb-[14px] font-semibold text-[16px]/[28px]",htmlFor:"amount",children:"Amount"}),(0,r.jsxs)("div",{className:"currency-input-input relative flex items-center w-full h-[52px] overflow-hidden border border-[#d5dbe1] rounded focus-within:[outline:5px_auto_-webkit-focus-ring-color]",children:[null!==N[o].symbol&&o.toUpperCase()!==N[o].symbol?(0,r.jsx)("div",{className:"currency-input-symbol p-3 pr-0 text-[16px]/[28px]",children:N[o].symbol}):null,(0,r.jsx)("input",{id:"amount",name:"amount",type:"number",placeholder:"0.00",value:i,onChange:e=>l({amount:e.target.value,currency:o}),required:!0,onBlur:n,className:"flex-[1_1_auto] w-full p-3 font-semibold text-[16px]/7 border-none outline-none placeholder:font-medium focus:outline-none"})]})]})}let B=e=>{let{innerProps:t,innerRef:l,data:n}=e;return(0,r.jsx)(u.c.Option,{...e,className:"border-b last:border-b-none",children:(0,r.jsxs)("article",{...t,ref:l,className:"flex gap-3 py-1 px-3 text-[14px]/[24px]",children:[(0,r.jsx)(a(),{src:n.image,width:"48",height:"48",alt:n.label,className:"rounded-sm"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:n.label}),(0,r.jsx)("br",{}),(0,r.jsxs)("span",{className:"text-brown-500 font-normal",children:[k(n.price.toNumber()),"/ton"]})]})]})})};function F(e){let{isDonation:t=!1}=e,l=new URLSearchParams((0,v.useRouter)().asPath.split("?").slice(1).join("")),{frontierServiceHost:i}=(0,f.A)(),[s,a]=n.useState(_),u=s.sort((e,t)=>
1e.label.startsWith("Frontier")!==t.label.startsWith("Frontier")?e.label.startsWith("Frontier")?-1:1:e.label.localeCompare(t.label)),[j,F]=n.useState(l.get("tons")||"1"),[E,L]=n.useState(""),[T,Z]=n.useState(u[0]),[P,I]=n.useState(""),z=T.price,[R,M]=n.useState(z.mul(new c.Decimal(l.get("tons")||1)).toString()),q=e=>{Z(e),M(D(new c.Decimal(j),e.price))},O=n.useRef(()=>{});O.current=()=>{let e=l.get("product");if(e){let t=u.find(t=>t.value===e);t&&q(t)}},n.useEffect(()=>{u.length>1&&O.current()},[u.length]);let[W,$]=n.useState(!1),[U,X]=n.useState(null),[V,J]=n.useState(0),Y=new c.Decimal(R||0),H=Y.mul(w),K=Y.plus(H).mul(t?A.div(new c.Decimal(1).minus(A)):0),G=t?null:(0,r.jsx)("h4",{children:"Order details"}),Q=t?`Donation will go towards Frontier's offtake portfolio with estimated delivery in ${T.delivery_year}.`:`${g.N.formatNumber(Number(j))} ${1===Number(j)?"ton":"tons"} from ${T.label.replace(/\d+/g,"")} with estimated delivery in ${T.delivery_year}.`,ee=t?(0,r.jsxs)("span",{children:["Interested in donating based on estimated flight emissions? Check out our"," ",(0,r.jsx)(o(),{href:"/donate/flights",children:"flight calculator"}),"."]}):null;return(n.useEffect(()=>{fetch(`${i}/orders/products`).then(e=>e.json()).then(e=>{if(e.data)return a(e.data.reverse().map(e=>({value:e.id,delivery_year:e.delivery_year,label:e.name,image:e.image||y.Z.src,price:new c.Decimal(e.price/Math.pow(10,N.usd.precision))})))}).catch(()=>{})},[i]),2===V)?(0,r.jsx)(b.l0,{children:(0,r.jsxs)(b.fb,{children:[(0,r.jsx)("h2",{children:"Order submitted"}),t?(0,r.jsxs)("p",{style:{marginTop:8}
1,children:["Thank you for your order. The Frontier team will contact you via email with detailed information on how to complete your order with our non-profit partners. Please"," ",(0,r.jsx)(o(),{href:"mailto:[email protected]",target:"_blank",style:{display:"inline"},children:"contact us"})," ","with any questions."]}):(0,r.jsxs)("p",{style:{marginTop:8},children:["Thank you for your order. You'll receive an invoice from the Frontier team shortly. Please"," ",(0,r.jsx)(o(),{href:"mailto:[email protected]",target:"_blank",style:{display:"inline"},children:"contact us"})," ","with any questions."]})]})}):1===V?(0,r.jsxs)(b.l0,{style:{marginTop:0},onSubmit:async e=>{e.preventDefault();let l=new FormData(e.target);l.set("product",T.value),l.set("amount",R),l.set("currency","usd"),l.set("email",P),l.set("beneficiary",E),l.set("is_donation",t.toString());try{$(!0);let e=await fetch(`${i}/orders/invoices`,{method:"POST",body:l}),t=await e.json();t.error?X(t.error.message):J(e=>e+1)}catch(e){X(e.message)}finally{$(!1)}},children:[(0,r.jsxs)(b.fb,{children:[(0,r.jsxs)("div",{children:[G,(0,r.jsx)("p",{style:{color:"var(--color-text-secondary)"},children:Q})]}),(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8,marginTop:16},children:(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,r.jsxs)("label",{className:"row-between gap-2 leading-7",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:["Frontierâs offtake portfolio","climsku_frontier_offtake_portfolio_2027"===T.value?(0,r.jsx)(x.Z,{content:"Based on the estimated average price per ton across all offtake suppliers in our portfolio.",placement:"top-start",children:S}):null]}),(0,r.jsxs)("span",{className:"text-secondary text-[14px]/7",children:[j," tons x ",k(z.toNumber())]})]}),(0,r.jsx)("span",{children:k(Number(R))})]}),H.toNumber()?(0,r.jsxs)("label",{className:"row-between gap-2 leading-7",children:[(0,r.jsxs)("div",{children:[t?"Frontier fee":"Fee"," ",(0,r.jsx)("br",{}),(0,r.jsxs)("span",{className:"text-secondary text-[14px]/7",children:["A ",w.mul(100).toString(),"% Frontier fee is applied"]})]}),(0,r.jsx)("span",{children:k(H.toNumber())})]}):null,t?(0,r.jsxs)("label",{className:"row-between gap-2 leading-7",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:["Non-profit fee",(0,r.jsx)(x.Z,{content:"These orders can't be used for net zero or carbon neutrality claims.",placement:"top-start",children:S})]}),(0,r.jsxs)("span",{className:"text-secondary text-[14px]/7",children:["A ",A.mul(100).toString(),"% 501 (c)(3) fee is applied to donations"]})]}),(0,r.jsx)("span",{children:k(K.toNumber())})]}):null,(0,r.jsx)("div",{style:{height:1,backgroundColor:"var(--color-border)"}}),(0,r.jsxs)("label",{className:"row-between gap-2 leading-7",children:[(0,r.jsx)("strong",{children:"Total"}),(0,r.jsx)("span",{children:k(Y.plus(K).plus(H).toNumber())})]})]})}),null===U?null:(0,r.jsx)("div",{className:"text-critical-500 font-medium text-[14px]/5",children:U})]}),(0,r.jsxs)(b.ZL,{hasBorder:!1,children:[(0,r.jsx)(x.Z,{content:"After submitting this request, you'll receive an invoice from Frontier to complete the order.",placement:"top-end",children:(0,r.jsx)("div",{children:(0,r.jsx)(m.z,{color:"black",type:"submit",size:"large",disabled:W,children:"Submit request"})})}),(0,r.jsxs)(m.Z,{color:"sienna",onClick:()=>J(e=>e-1),children:[(0,r.jsx)(d.Ao2,{size:"16px"}),"Back"]})]})]}):(0,r.jsxs)(b.l0,{style:{marginTop:0},onSubmit:async e=>{e.preventDefault(),J(e=>e+1)},footnoteContent:ee,children:[(0,r.jsxs)(b.fb,{children:[G,(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1.5rem",paddingRight:4},children:[t?null:(0,r.jsxs)("label",{className:"column gap-3 font-semibold text-base",children:["Product",(0,r.jsx)(h.Lt,{value:T,options:u,onChange:q,Option:B})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"1rem",width:"fit-content"},children:[(0,r.jsx)(C,{value:{amount:R,currency:"usd"},onChange:e=>{if(e.amount){let t=new c.Decimal(e.amount).toDecimalPlaces(N.usd.precision);M(t.toString()||""),F(t.toString()?t.div(z).toDecimalPlaces(0).toString():"")}else F(""),M("")},onBlur:()=>M(D(new c.Decimal(j),z))}),(0,r.jsx)(p,{label:"Tons",value:j,onChange:e=>{if(e){let t=new c.Decimal(Number(e)).toDecimalPlaces(0);F(t.toString()||""),M(D(t,z))}else M(""),F("")},placeholder:"0",type:"number",min:"1",step:"1"})]}),t?null:(0,r.jsx)(p,{required:!0,name:"beneficiary",label:(0,r.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,r.jsx)("span",{children:"Beneficiary "}),(0,r.jsx)(x.Z,{content:"The entity to whom the carbon removal will ultimately be delivered.",placement:"top-start",children:S})]}),value:E,onChange:L,placeholder:"Acme Inc."}),(0,r.jsx)(p,{required:!0,name:"email",label:"Email",value:P,onChange:I,placeholder:"[email protected]",type:"email"})]})]}),(0,r.jsx)(b.ZL,{hasBorder:!1,children:(0,r.jsxs)(m.z,{color:"black",type:"submit",size:"large",children:["Next",(0,r.jsx)(d.Rgz,{size:"16px"})]})})]})}},76299:function(e,t,l){l.d(t,{Lt:function(){return p}});var r=l(85893),n=l(40645),i=l.n(n);
1l(67294);var o=l(79648),s=l(93862),a=l(12515);let c=e=>{let{children:t,selectProps:l}=e,{menuListHeaderLabel:n,menuListHeaderDescription:i}=l;return(0,r.jsx)(o.c.MenuList,{...e,children:(0,r.jsxs)("div",{children:[n||i?(0,r.jsxs)("div",{className:"row-between p-3 text-black font-bold text-[12px]/[18px]",children:[n?(0,r.jsx)("div",{children:n}):null,i?(0,r.jsx)("div",{children:i}):null]}):null,t]})})},d=e=>(0,r.jsx)(o.c.DropdownIndicator,{...e,children:(0,r.jsx)(a.bTu,{size:"16px"})}),u=e=>{let{innerProps:t,innerRef:l,data:n}=e;return(0,r.jsx)(o.c.Option,{...e,children:(0,r.jsxs)("article",{ref:l,...t,className:"flex items-center justify-between pt-3 pr-3 pl-3 text-black font-medium text-[14px]/[24px] first-of-type:pt-0",children:[(0,r.jsx)("span",{children:n.label}),n.description?(0,r.jsx)("div",{className:"text-slate text-[14px]/[24px]",children:n.description}):null]})})};function p(e){let{options:t,onChange:l,Option:n=u,menuWidth:o,...a}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.ZP,{className:"react-select-container",classNamePrefix:"react-select",isSearchable:!1,options:t,onChange:l,components:{MenuList:c,Option:n,DropdownIndicator:d,IndicatorSeparator:()=>null},...a}),(0,r.jsx)(i(),{id:"677d8a35c18e9248",dynamic:[o||"100%"],children:`.react-select-container .react-select__option{padding-right:0;padding-left:0;color:var(--color-black)}.react-select-container .react-select__option:active{background-color:var(--color-neutral-light)}.react-select-container .react-select__option--is-focused{background-color:var(--color-neutral-light)}.react-select-container .react-select__option--is-selected{background-color:var(--color-neutral-light)}.react-select-container .react-select__menu-list{padding:0}.react-select-container .react-select__control{height:44px;border-color:var(--color-beige)}.react-select-container .react-select__control--is-focused{border-color:transparent;outline:5px auto Highlight!important;outline:5px auto -webkit-focus-ring-color!important;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.react-select-container .react-select__dropdown-indicator{color:var(--color-black)}.react-select-container .react-select__menu{width:${o||"100%"}}@media only screen and (min-width:768px){.react-select-container .react-select__menu{right:0}}`})]})}},8556:function(e,t,l){l.d(t,{Z:function(){return n}});var r=l(67294);function n(e){return r.cloneElement(e.children,{"data-tooltip-id":"global-tooltip","data-tooltip-html":e.content,"data-tooltip-place":e.placement||"bottom","data-tooltip-delay-show":e.delayShow})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.