1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[311],{28796:(e,t,r)=>{"use strict";r.d(t,{y$:()=>c});var n=r(15383),i=r(71705);let s=(0,i.i7)(["from{background-color:var(--color-xe-primary-600);}to{background-color:white;}"]);i.Ay.span.withConfig({componentId:"sc-500d7ed3-0"})(["display:inline-block;height:14px;width:14px;border-radius:5px;animation:"," 0.9s linear infinite;animation-direction:alternate;"],s),i.Ay.div.withConfig({componentId:"sc-500d7ed3-1"})(["display:inline-block;white-space:nowrap;"]);let a=(0,i.i7)(["from{transform:rotate(0deg);}to{transform:rotate(360deg);}"]),l=i.Ay.svg.withConfig({componentId:"sc-500d7ed3-2"})(["animation:"," linear 1s infinite;width:1em;height:1em;color:currentColor;"],a),c=e=>(0,n.jsx)(l,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 18 18","aria-hidden":"true",...e,children:(0,n.jsx)("path",{fill:"currentColor",d:"M13.377 16.58a8.75 8.75 0 003.202-11.954l-1.082.625A7.5 7.5 0 119 1.501V.25a8.75 8.75 0 104.375 16.33z"})})},43418:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[locale]/currencyconverter/extension-widget",function(){return r(68642)}])},68642:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>j,default:()=>N});var n=r(15383),i=r(86049),s=r.n(i),a=r(14343),l=r(47049),c=r(46683),o=r(11929),d=r(28796),m=r(18534),u=r(6678),x=r(18079),h=r(48320),f=r(3768),p=r(57588),y=r(57180),g=r(84163);let b=Object.entries(r(84423)).filter(([e])=>!y.R9.has(e));function v({initialFrom:e,initialTo:t,ratesData:r,className:i}){let s=(0,l.c)("converter"),{rates:c,timestamp:o}=r,[d,u]=(0,a.useState)(e),[y,w]=(0,a.useState)(t),j=d===y?1:c[y]/c[d];if(isNaN(j))throw Error("Unable to get rates for this pair at this time. Please try different currencies.");let N=(0,g.ix)({year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hourCycle:"h23",timeZone:"UTC",timeZoneName:"short"});return(0,a.useEffect)(()=>{window.parent.postMessage({type:"rate",data:{fromCurrency:d,toCurrency:y,rate:j}},"*")},[d,y,j]),(0,n.jsxs)("div",{className:(0,m.cn)("mx-auto",i),children:[(0,n.jsxs)("div",{className:"relative flex flex-col items-center text-xl font-semibold",children:[(0,n.jsx)("label",{htmlFor:"from",className:"text-xe-neutral-800 mb-2 w-full text-left text-sm",children:"Select currency on this page"}),(0,n.jsx)("div",{className:(0,m.cn)("border-gray-250 mb-4 inline-flex w-full grow items-center rounded-md border border-solid bg-white px-6 py-4 ring-black focus-within:ring-1 focus-within:ring-inset hover:ring-1 hover:ring-inset"),children:(0,n.jsxs)("div",{className:(0,m.cn)("relative flex w-full items-center"),children:[(0,n.jsx)(p.p,{currencyCode:d}),(0,n.jsx)("select",{id:"from",className:"w-full appearance-none bg-white pr-5 pl-8 text-clip",value:d,onChange:e=>{u(e.target.value)},children:b.map(([e])=>(0,n.jsx)("option",{value:e,children:e},e))}),(0,n.jsx)(h.b,{className:"pointer-events-none absolute right-0",size:20})]})}),(0,n.jsx)("label",{htmlFor:"to",className:"text-xe-neutral-800 mb-2 w-full text-left text-sm",children:"Select a currency for conversion on this page"}),(0,n.jsx)("div",{className:(0,m.cn)("border-gray-250 inline-flex w-full grow items-center rounded-md border border-solid bg-white px-6 py-4 ring-black focus-within:ring-1 focus-within:ring-inset hover:ring-1 hover:ring-inset"),children:(0,n.jsxs)("div",{className:(0,m.cn)("relative flex w-full items-center"),children:[(0,n.jsx)(p.p,{currencyCode:y}),(0,n.jsx)("select",{className:"w-full appearance-none bg-white pr-5 pl-8 text-clip",id:"to",value:y,onChange:e=>{w(e.target.value)},children:b.map(([e])=>(0,n.jsx)("option",{value:e,children:e},e))}),(0,n.jsx)(h.b,{className:"pointer-events-none absolute right-0",size:20})]})})]}),(0,n.jsx)("div",{className:"mt-6 space-y-1",children:(0,n.jsx)("div",{className:"flex flex-col items-center text-center font-semibold md:flex-row md:justify-between md:text-left!",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-xe-neutral-700 text-xs font-normal",children:s("timestamp",{date:N.format(o)})}),(0,n.jsx)("p",{className:"text-xe-neutral-700 text-xs font-normal",children:"We use the mid-market rate for our Converter."})]})})}),(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsxs)(x.N_,{prefetch:!1,href:`https://www.xe.com/currencyconverter/convert/?Amount=1&From=${d}&To=${y}`,className:"text-greyblue-400 mt-6 flex items-center justify-center gap-1 text-sm underline [&_svg]:ml-1",target:"_blank",children:["Data by ",(0,n.jsx)(f.A,{style:{width:"20px",height:"20px"}})]})})]})}
1let w=[{label:"Price conversion",id:"price_conversion_tab"},{label:"Currency converter",id:"currency_converter_tab"}];var j=!0;function N({priceConversionFromCcy:e,priceConversionToCcy:t,currencyConverterFromCcy:r,currencyConverterToCcy:i,amount:x,boxShadow:h,showLoadingIndicator:f}){let p=(0,l.c)("misc"),{data:y,error:g,isLoading:b}=(0,c.u)("/api/protected/midmarket-converter/",{revalidateOnMount:!0}),[j,_]=(0,a.useState)("price_conversion_tab");return(0,n.jsxs)("div",{className:"jsx-16412e0c7025a764 mx-auto p-2",children:[(0,n.jsxs)("div",{className:"jsx-16412e0c7025a764 "+((0,m.cn)("flex flex-col justify-center rounded-3xl bg-white p-6",h&&"shadow-md")||""),children:[g&&(0,n.jsxs)("p",{className:"jsx-16412e0c7025a764 mt-3 flex flex-col gap-1 text-red-400",children:[(0,n.jsx)(o.m,{}),p("misc.ratesFreshnessMessage")]}),b&&f&&(0,n.jsx)("div",{className:"jsx-16412e0c7025a764 flex min-h-69 items-center justify-center md:min-h-40",children:(0,n.jsx)(d.y$,{className:"size-8!"})}),!b&&!g&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"jsx-16412e0c7025a764 bg-xe-neutral-400 mx-auto mb-6 inline-flex rounded-full p-1.5",children:w.map(e=>(0,n.jsx)("button",{onClick:()=>{var t;return t=e.id,void(window.parent.postMessage({type:"tab_changed",data:{tab:t}},"*"),_(t))},className:"jsx-16412e0c7025a764 "+((0,m.cn)("rounded-full bg-transparent px-4 py-2 text-sm font-semibold text-gray-800 transition-colors duration-300",j===e.id&&"text-xe-neutral-1000 bg-white")||""),children:e.label},e.id))}),(0,n.jsx)("div",{className:"jsx-16412e0c7025a764",children:(0,n.jsx)(v,{className:(0,m.cn)("price_conversion_tab"!==j&&"hidden"),initialFrom:e,initialTo:t,ratesData:y})}),(0,n.jsx)("div",{className:"jsx-16412e0c7025a764",children:(0,n.jsx)(u.A,{className:(0,m.cn)("currency_converter_tab"!==j&&"hidden"),initialAmount:x,initialFrom:r,initialTo:i,ratesData:y,currencyLabelFormat:"symbol"})})]})]}),(0,n.jsx)(s(),{id:"16412e0c7025a764",children:".yie-outer-element{display:none}body{background:transparent!important;overflow:hidden}"})]})}},84163:(e,t,r)=>{"use strict";r.d(t,{VU:()=>c,gq:()=>l,ix:()=>o});var n=r(14343),i=r(78090);let s=new Set(["BTC","XAU","XAG","XPT","XPD","DOGE","LUNA","ETH","ADA","XLM","BCH","DOT","LINK","LTC","UNI"]),a=new Set(["XCD","HKD","CAD","NZD","AUD"]),l=(e={})=>{let t=(0,i.Ym)(),r=JSON.stringify(e);return(0,n.useMemo)(()=>{let e=JSON.parse(r);return"currency"===e.style&&s.has(e.currency)&&(e.maximumFractionDigits=15),"currency"===e.style&&a.has(e.currency)&&(e.currencyDisplay="code"),e.currency?.length>3&&(e.currency="BTC"),new Intl.NumberFormat(t,e)},[t,r])},c=()=>{let e=(0,i.Ym)();return(t,r="USD")=>{if(null==t)return"";let n=Math.abs(t),i="",s="",a=new Intl.NumberFormat(e,{currencyDisplay:"narrowSymbol",style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:0});if(n>=1e9)i=(t/1e9).toFixed(2).replace(/\.00$/,""),s="Bn";else{if(!(n>=1e6))return a.format(t);i=(t/1e6).toFixed(2).replace(/\.00$/,""),s="M"}let l=a.formatToParts(t),c=l.find(e=>"currency"===e.type)?.value||"";return l.findIndex(e=>"currency"===e.type)<l.findIndex(e=>"integer"===e.type)?`${c}${i}${s}`:`${i}${s}${c}`}},o=(e={})=>{let t=(0,i.Ym)(),r=JSON.stringify(e);return(0,n.useMemo)(()=>new Intl.DateTimeFormat(t,JSON.parse(r)),[t,r])}}},e=>{e.O(0,[9082,6678,636,6593,8792],()=>e(e.s=43418)),_N_E=e.O()}]);
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.