PageSourceSearch

https://hooandja.ee/assets/currency-z3gkSfUF.js

js hooandja.ee collected 2026-10-02 07:20:34 UTC 10,372 bytes, 2 lines download raw bytes

1var W={defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},q={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function O(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(i){return typeof i}:O=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},O(t)}function L(t){return z(t)||Y(t)||Z(t)||G()}function z(t){if(Array.isArray(t))return t}function Y(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Z(t,i){if(t){if(typeof t=="string")return C(t,i);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(t,i)}}function C(t,i){(i==null||i>t.length)&&(i=t.length);for(var r=0,n=new Array(i);r<i;r++)n[r]=t[r];return n}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var V={normalizePrecision:function(i){var r=i.reduce(function(n,e){return Math.max(n.getPre
2cision(),e.getPrecision())});return i.map(function(n){return n.getPrecision()!==r?n.convertPrecision(r):n})},minimum:function(i){var r=L(i),n=r[0],e=r.slice(1),u=n;return e.forEach(function(g){u=u.lessThan(g)?u:g}),u},maximum:function(i){var r=L(i),n=r[0],e=r.slice(1),u=n;return e.forEach(function(g){u=u.greaterThan(g)?u:g}),u}};function j(t){return!isNaN(parseInt(t))&&isFinite(t)}function J(t){return j(t)&&t<=100&&t>=0}function k(t){return t.length>0&&t.every(function(i){return i>=0})&&t.some(function(i){return i>0})}function U(t){return t%2===0}function N(t){return j(t)&&!Number.isInteger(t)}function X(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=t.toString();if(i.indexOf("e-")>0)return parseInt(i.split("e-")[1]);var r=i.split(".")[1];return r?r.length:0}function M(t){return Math.abs(t)%1===.5}function B(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(r,n){var e=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){e.readyState===4&&(e.status>=200&&e.status<400?r(JSON.parse(e.responseText)):n(new Error(e.statusText)))},onerror:function(){n(new Error("Network error"))}});e.open("GET",t,!0),K(e,i.headers),e.send()})}function K(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var r in i)t.setRequestHeader(r,i[r]);return t}function b(t){return typeof t>"u"}function H(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",r={};return Object.entries(t).forEach(function(n){if(O(n[1])==="object"){var e=H(n[1]);Object.entries(e).forEach(function(u){r[n[0]+i+u[0]]=u[1]})}else r[n[0]]=n[1]}),r}function Q(t){return!!t&&(O(t)==="object"||typeof t=="function")&&typeof t.then=="function"}function w(){var t=function(n,e){var u=function(v){return Math.pow(10,X(v))},g=Math.max(u(n),u(e));return Math.round(n*g)*Math.round(e*g)/(g*g)},i={HALF_ODD:function(n){var e=Math.round(n);return M(n)&&U(e)?e-1:e},HALF_EVEN:function(n){var e=Math.round(n);return M(n)?U(e)?e:e-1:e},HALF_UP:function(n){return Math.round(n)},HALF_DOWN:function(n){return M(n)?Math.floor(n):Math.round(n)},HALF_TOWARDS_ZERO:function(n){return M(n)?Math.sign(n)*Math.floor(Math.abs(n)):Math.round(n)},HALF_AWAY_FROM_ZERO:function(n){return M(n)?Math.sign(n)*Math.ceil(Math.abs(n)):Math.round(n)},DOWN:function(n){return Math.floor(n)}};return{add:function(n,e){return n+e},subtract:function(n,e){return n-e},multiply:function(n,e){return N(n)||N(e)?t(n,e):n*e},divide:function(n,e){return n/e},modulo:function(n,e){return n%e},round:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"HALF_EVEN";return i[e](n)}}}var tt=w();function nt(t){var i=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(t);return{getMatches:function(){return i!==null?i.slice(1).filter(function(n){return!b(n)}):[]},getMinimumFractionDigits:function(){var n=function(u){return u==="."};return b(this.getMatches().find(n))?0:this.getMatches()[tt.add(this.getMatches().findIndex(n),1)].split("").length},getCurrencyDisplay:function(){var n={USD:"code",dollar:"name",$:"symbol"};return n[this.getMatches().find(function(e){return e==="USD"||e==="dollar"||e==="$"})]},getStyle:function(){return b(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!b(this.getMatches().find(function(n){return n===","}))}}}function et(t){var i=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1?arguments[1]:void 0;for(var g in u)e=e.replace("{{".concat(g,"}}"),u[g]);return e},r=function(e,u){return B(i(t.endpoint,{from:e,to:u}),{headers:t.headers})};return{getExchangeRate:function(e,u){return(Q(t.endpoint)?t.endpoint:r(e,u)).then(function(g){return H(g)[i(t.propertyPath,{from:e,to:u})]})}}}function E(t,i){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!t)throw new r(i)}function rt(t){E(J(t),"You must provide a numeric value between 0 and 100.",RangeError)}function ot(t){E(k(t),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function S(t){E(Number.isInteger(t),"You must provide an integer.",TypeError)}var c=w(),it=function t(i){var r=Object.assign({},{amount:t.defaultAmount,currency:t.defaultCurrency,precision:t.defaultPrecision},i),n=r.amount,e=r.currency,u=r.precision;S(n),S(u);var g=t.globalLocale,_=t.globalFormat,v=t.globalRoundingMode,R=t.globalFormatRoundingMode,F=Object.assign({},t.globalExchangeRatesApi),f=function(o){var a=Object.assign({},Object.assign({},{amount:n,currency:e,precision:u},o),Object.assign({},{locale:this.locale},o));return Object.assign(t({amount:a.amount,currency:a.currency,precision:a.precision}),{locale:a.locale})},A=function(o){E(this.hasSameCurrency(o),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return n},getCurrency:function(){return e},getLocale:function(){return this.locale||g},setLocale:function(o){return f.call(this,{locale:o})},getPrecision:function(){return u},convertPrecision:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R;S(o);
2var l=this.getPrecision(),d=o>l,h=d?c.multiply:c.divide,m=d?[o,l]:[l,o],p=Math.pow(10,c.subtract.apply(c,m));return f.call(this,{amount:c.round(h(this.getAmount(),p),a),precision:o})},add:function(o){A.call(this,o);var a=t.normalizePrecision([this,o]);return f.call(this,{amount:c.add(a[0].getAmount(),a[1].getAmount()),precision:a[0].getPrecision()})},subtract:function(o){A.call(this,o);var a=t.normalizePrecision([this,o]);return f.call(this,{amount:c.subtract(a[0].getAmount(),a[1].getAmount()),precision:a[0].getPrecision()})},multiply:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v;return f.call(this,{amount:c.round(c.multiply(this.getAmount(),o),a)})},divide:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v;return f.call(this,{amount:c.round(c.divide(this.getAmount(),o),a)})},percentage:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v;return rt(o),this.multiply(c.divide(o,100),a)},allocate:function(o){var a=this;ot(o);for(var l=o.reduce(function(p,y){return c.add(p,y)}),d=this.getAmount(),h=o.map(function(p){var y=Math.floor(c.divide(c.multiply(a.getAmount(),p),l));return d=c.subtract(d,y),f.call(a,{amount:y})}),m=0;d>0;)o[m]>0&&(h[m]=h[m].add(f.call(this,{amount:1})),d=c.subtract(d,1)),m+=1;return h},convert:function(o){var a=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=l.endpoint,h=d===void 0?F.endpoint:d,m=l.propertyPath,p=m===void 0?F.propertyPath||"rates.{{to}}":m,y=l.headers,$=y===void 0?F.headers:y,P=l.roundingMode,I=P===void 0?v:P,T=Object.assign({},{endpoint:h,propertyPath:p,headers:$,roundingMode:I});return et(T).getExchangeRate(this.getCurrency(),o).then(function(D){return E(!b(D),'No rate was found for the destination currency "'.concat(o,'".'),TypeError),f.call(a,{amount:c.round(c.multiply(a.getAmount(),parseFloat(D)),T.roundingMode),currency:o})})},equalsTo:function(o){return this.hasSameAmount(o)&&this.hasSameCurrency(o)},lessThan:function(o){A.call(this,o);var a=t.normalizePrecision([this,o]);return a[0].getAmount()<a[1].getAmount()},lessThanOrEqual:function(o){A.call(this,o);var a=t.normalizePrecision([this,o]);return a[0].getAmount()<=a[1].getAmount()},greaterThan:function(o){A.call(this,o);var a=t.normalizePrecision([this,o]);return a[0].getAmount()>a[1].getAmount()},greaterThanOrEqual:function(o){A.call(this,o);var a=t.normalizePrecision([this,o]);return a[0].getAmount()>=a[1].getAmount()},isZero:function(){return this.getAmount()===0},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return c.modulo(this.getAmount(),Math.pow(10,u))!==0},hasCents:function(){return c.modulo(this.getAmount(),Math.pow(10,u))!==0},hasSameCurrency:function(o){return this.getCurrency()===o.getCurrency()},hasSameAmount:function(o){var a=t.normalizePrecision([this,o]);return a[0].getAmount()===a[1].getAmount()},toFormat:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,l=nt(o);return this.toRoundedUnit(l.getMinimumFractionDigits(),a).toLocaleString(this.getLocale(),{currencyDisplay:l.getCurrencyDisplay(),useGrouping:l.getUseGrouping(),minimumFractionDigits:l.getMinimumFractionDigits(),style:l.getStyle(),currency:this.getCurrency()})},toUnit:function(){return c.divide(this.getAmount(),Math.pow(10,u))},toRoundedUnit:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,l=Math.pow(10,o);return c.divide(c.round(c.multiply(this.toUnit(),l),a),l)},toObject:function(){return{amount:n,currency:e,precision:u}},toJSON:function(){return this.toObject()}}},x=Object.assign(it,W,q,V);function at(t){return x({amount:t??0,currency:"EUR"}).toRoundedUnit(2)+" €"}function ut(t,i=2){return x({amount:t??0,currency:"EUR"}).toRoundedUnit(i)}export{ut as a,at as f};

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.