PageSourceSearch

https://cdn.holded.com/frontend-next-gen/app-shared-utils-useNumberFormatter.DnZU_gDq.js

js holded.com collected 2026-09-24 09:10:32 UTC 1,818 bytes, 1 lines download raw bytes

1import{o as e}from"./rolldown-runtime.DAXXjFlN.js";import{nn as t}from"./vendor-datadog.CbXwTgUc.js";import{t as n}from"./vendor-react-react-cjs-jsx-runtime.BfiOPkxk.js";import{r}from"./platform-platform-infrastructure-useGlobalData.CUvVDtPq.js";var i=e(t()),a=(e,t)=>e.formatToParts(t??0),o={currencyDisplay:`narrowSymbol`,currencySign:`accounting`,style:`unit`},s=new Set([`signDisplay`,`compactDisplay`]),c=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>!s.has(e)&&!Object.values(o).includes(t))),l=(e,t={})=>{try{return new Intl.NumberFormat(e,t)}catch{console.log(`NumberFormat error: Intl.NumberFormat( ${JSON.stringify(e)}, ${JSON.stringify(t)} )`)}try{return new Intl.NumberFormat(e,c(t))}catch{return new Intl.NumberFormat(e)}},u=({options:e={},currencies:t})=>{let{decimalSeparator:n,thousandsSeparator:r}=e,i=e.locale===`es`||e.locale===`es-ES`?`de-DE`:e.locale??`en`;return{formatter:(e,t={})=>l(i,t).formatToParts(e).map(({type:e,value:t})=>{switch(e){case`decimal`:return n??t;case`group`:return r??t;default:return t}}).reduce((e,t)=>`${e}${t}`),getCurrencySymbol:e=>t[e]?.symbol||e,getCurrencyPosition:e=>{let t=a(l(i,{style:`currency`,currency:e}));return t.indexOf(t.find(({type:e})=>e===`integer`))>t.indexOf(t.find(({type:e})=>e===`currency`))?`start`:`end`},getCurrencyPrecision:e=>t[e]?.precision||2,decimalSeparator:n??a(l(i),10.02).find(({type:e})=>e===`decimal`).value,thousandsSeparator:r??a(l(i),3579100.35).find(({type:e})=>e===`group`).value}},d=n(),f=(0,i.createContext)(void 0),p=({options:e={},children:t})=>{let{currencies:n}=r(),i=u({options:e,currencies:n});return(0,d.jsx)(f.Provider,{value:i,children:t})},m=()=>{let e=(0,i.useContext)(f);if(e===void 0)throw Error(`useNumberFormatter must be used within a NumberFormatterProvider`);return e};export{p as n,u as r,m as t};

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.