PageSourceSearch

https://rubywatertech.com/cdn/shop/t/8/assets/jquery.currencies.min.js?v=58281493255991795991663157375

js rubywatertech.com collected 2026-10-04 07:51:05 UTC 19,599 bytes, 642 lines download raw bytes

1/*
2 * Cookie plugin
3 *
4 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
5 * Dual licensed under the MIT and GPL licenses:
6 * http://www.opensource.org/licenses/mit-license.php
7 * http://www.gnu.org/licenses/gpl.html
8 *
9 */
10
11jQuery.cookie = function(b, j, m) {
12    if (typeof j != "undefined") {
13        m = m || {};
14        if (j === null) {
15            j = "";
16            m.expires = -1
17        }
18        var e = "";
19        if (m.expires && (typeof m.expires == "number" || m.expires.toUTCString)) {
20            var f;
21            if (typeof m.expires == "number") {
22                f = new Date();
23                f.setTime(f.getTime() + (m.expires * 24 * 60 * 60 * 1000))
24            } else {
25                f = m.expires
26            }
27            e = "; expires=" + f.toUTCString()
28        }
29        var l = m.path ? "; path=" + (m.path) : "";
30        var g = m.domain ? "; domain=" + (m.domain) : "";
31        var a = m.secure ? "; secure" : "";
32        document.cookie = [b, "=", encodeURIComponent(j), e, l, g, a].join("")
33    } else {
34        var d = null;
35        if (document.cookie && document.cookie != "") {
36            var k = document.cookie.split(";");
37            for (var h = 0; h < k.length; h++) {
38                var c = jQuery.trim(k[h]);
39                if (c.substring(0, b.length + 1) == (b + "=")) {
40                    d = decodeURIComponent(c.substring(b.length + 1));
41                    break
42                }
43            }
44        }
45        return d
46    }
47};
48
49/*
50 * Currency tools
51 *
52 * Copyright (c) 2015 Caroline Schnapp ([email protected])
53 * Licensed under the MIT license:
54 * http://www.opensource.org/licenses/mit-license.php
55 *
56 */
57
58
59if (typeof Currency === "undefined") {
60    var Currency = {}
61}
62Currency.cookie = {
63    configuration: {
64        expires: 365,
65        path: "/",
66        domain: window.location.hostname
67    },
68    name: "currency",
69    write: function(a) {
70        jQuery.cookie(this.name, a, this.configuration)
71    },
72    read: function() {
73        return jQuery.cookie(this.name)
74    },
75    destroy: function() {
76        jQuery.cookie(this.name, null, this.configuration)
77    }
78};
79Currency.moneyFormats = {
80    USD: {
81        money_format: "${{amount}}",
82        money_with_currency_format: "${{amount}} USD"
83    },
84    EUR: {
85        money_format: "€{{amount}}",
86        money_with_currency_format: "€{{amount}} EUR"
87    },
88    GBP: {
89        money_format: "£{{amount}}",
90        money_with_currency_format: "£{{amount}} GBP"
91    },
92    CAD: {
93        money_format: "${{amount}}",
94        money_with_currency_format: "${{amount}} CAD"
95    },
96    ALL: {
97        money_format: "Lek {{amount}}",
98        money_with_currency_format: "Lek {{amount}} ALL"
99    },
100    DZD: {
101        money_format: "DA {{amount}}",
102        money_with_currency_format: "DA {{amount}} DZD"
103    },
104    AOA: {
105        money_format: "Kz{{amount}}",
106        money_with_currency_format: "Kz{{amount}} AOA"
107    },
108    ARS: {
109        money_format: "${{amount_with_comma_separator}}",
110        money_with_currency_format: "${{amount_with_comma_separator}} ARS"
111    },
112    AMD: {
113        money_format: "{{amount}} AMD",
114        money_with_currency_format: "{{amount}} AMD"
115    },
116    AWG: {
117        money_format: "Afl{{amount}}",
118        money_with_currency_format: "Afl{{amount}} AWG"
119    },
120    AUD: {
121        money_format: "${{amount}}",
122        money_with_currency_format: "${{amount}} AUD"
123    },
124    BBD: {
125        money_format: "${{amount}}",
126        money_with_currency_format: "${{amount}} Bds"
127    },
128    AZN: {
129        money_format: "m.{{amount}}",
130        money_with_currency_format: "m.{{amount}} AZN"
131    },
132    BDT: {
133        money_format: "Tk {{amount}}",
134        money_with_currency_format: "Tk {{amount}} BDT"
135    },
136    BSD: {
137        money_format: "BS${{amount}}",
138        money_with_currency_format: "BS${{amount}} BSD"
139    },
140    BHD: {
141        money_format: "{{amount}}0 BD",
142        money_with_currency_format: "{{amount}}0 BHD"
143    },
144    BYR: {
145        money_format: "Br {{amount}}",
146        money_with_currency_format: "Br {{amount}} BYR"
147    },
148    BZD: {
149        money_format: "BZ${{amount}}",
150        money_with_currency_format: "BZ${{amount}} BZD"
151    },
152    BTN: {
153        money_format: "Nu {{amount}}",
154        money_with_currency_format: "Nu {{amount}} BTN"
155    },
156    BAM: {
157        money_format: "KM {{amount_with_comma_separator}}",
158        money_with_currency_format: "KM {{amount_with_comma_separator}} BAM"
159    },
160    BRL: {
161        money_format: "R$ {{amount_with_comma_separator}}",
162        money_with_currency_format: "R$ {{amount_with_comma_separator}} BRL"
163    },
164    BOB: {
165        money_format: "Bs{{amount_with_comma_separator}}",
166        money_with_currency_format: "Bs{{amount_with_comma_separator}} BOB"
167    },
168    BWP: {
169        money_format: "P{{amount}}",
170        money_with_currency_format: "P{{amount}} BWP"
171    },
172    BND: {
173        money_format: "${{amount}}",
174        money_with_currency_format: "${{amount}} BND"
175    },
176    BGN: {
177        money_format: "{{amount}} лв",
178        money_with_currency_format: "{{amount}} лв BGN"
179    },
180    MMK: {
181        money_format: "K{{amount}}",
182        money_with_currency_format: "K{{amount}} MMK"
183    },
184    KHR: {
185        money_format: "KHR{{amount}}",
186        money_with_currency_format: "KHR{{amount}}"
187    },
188    KYD: {
189        money_format: "${{amount}}",
190        money_with_currency_format: "${{amount}} KYD"
191    },
192    XAF: {
193        money_format: "FCFA{{amount}}",
194        money_with_currency_format: "FCFA{{amount}} XAF"
195    },
196    CLP: {
197        money_format: "${{amount_no_decimals}}",
198        money_with_currency_format: "${{amount_no_decimals}} CLP"
199    },
200    CNY: {
201        money_format: "Â¥{{amount}}",
202        money_with_currency_format: "Â¥{{amount}} CNY"
203    },
204    COP: {
205        money_format: "${{amount_with_comma_separator}}",
206        money_with_currency_format: "${{amount_with_comma_separator}} COP"
207    },
208    CRC: {
209        money_format: "₡ {{amount_with_comma_separator}}",
210        money_with_currency_format: "₡ {{amount_with_comma_separator}} CRC"
211    },
212    HRK: {
213        money_format: "{{amount_with_comma_separator}} kn",
214        money_with_currency_format: "{{amount_with_comma_separator}} kn HRK"
215    },
216    CZK: {
217        money_format: "{{amount_with_comma_separator}} Kč",
218        money_with_currency_format: "{{amount_with_comma_separator}} Kč"
219    },
220    DKK: {
221        money_format: "{{amount_with_comma_separator}}",
222        money_with_currency_format: "kr.{{amount_with_comma_separator}}"
223    },
224    DOP: {
225        money_format: "RD$ {{amount}}",
226        money_with_currency_format: "RD$ {{amount}}"
227    },
228    XCD: {
229        money_format: "${{amount}}",
230        money_with_currency_format: "EC${{amount}}"
231    },
232    EGP: {
233        money_format: "LE {{amount}}",
234        money_with_currency_format: "LE {{amount}} EGP"
235    },
236    ETB: {
237        money_format: "Br{{amount}}",
238        money_with_currency_format: "Br{{amount}} ETB"
239    },
240    XPF: {
241        money_format: "{{amount_no_decimals_with_comma_separator}} XPF",
242        money_with_currency_format: "{{amount_no_decimals_with_comma_separator}} XPF"
243    },
244    FJD: {
245        money_format: "${{amount}}",
246        money_with_currency_format: "FJ${{amount}}"
247    },
248    GMD: {
249        money_format: "D {{amount}}",
250        money_with_currency_format: "D {{amount}} GMD"
251    },
252    GHS: {
253        money_format: "GH₵{{amount}}",
254        money_with_currency_format: "GH₵{{amount}}"
255    },
256    GTQ: {
257        money_format: "Q{{amount}}",
258        money_with_currency_format: "{{amount}} GTQ"
259    },
260    GYD: {
261        money_format: "G${{amount}}",
262        money_with_currency_format: "${{amount}} GYD"
263    },
264    GEL: {
265        money_format: "{{amount}} GEL",
266        money_with_currency_format: "{{amount}} GEL"
267    },
268    HNL: {
269        money_format: "L {{amount}}",
270        money_with_currency_format: "L {{amount}} HNL"
271    },
272    HKD: {
273        money_format: "${{amount}}",
274        money_with_currency_format: "HK${{amount}}"
275    },
276    HUF: {
277        money_format: "{{amount_no_decimals_with_comma_separator}}",
278        money_with_currency_format: "{{amount_no_decimals_with_comma_separator}} Ft"
279    },
280    ISK: {
281        money_format: "{{amount_no_decimals}} kr",
282        money_with_currency_format: "{{amount_no_decimals}} kr ISK"
283    },
284    INR: {
285        money_format: "Rs. {{amount}}",
286        money_with_currency_format: "Rs. {{amount}}"
287    },
288    IDR: {
289        money_format: "{{amount_with_comma_separator}}",
290        money_with_currency_format: "Rp {{amount_with_comma_separator}}"
291    },
292    ILS: {
293        money_format: "{{amount}} NIS",
294        money_with_currency_format: "{{amount}} NIS"
295    },
296    JMD: {
297        money_format: "${{amount}}",
298        money_with_currency_format: "${{amount}} JMD"
299    },
300    JPY: {
301        money_format: "Â¥{{amount_no_decimals}}",
302        money_with_currency_format: "Â¥{{amount_no_decimals}} JPY"
303    },
304    JEP: {
305        money_format: "£{{amount}}",
306        money_with_currency_format: "£{{amount}} JEP"
307    },
308    JOD: {
309        money_format: "{{amount}}0 JD",
310        money_with_currency_format: "{{amount}}0 JOD"
311    },
312    KZT: {
313        money_format: "{{amount}} KZT",
314        money_with_currency_format: "{{amount}} KZT"
315    },
316    KES: {
317        money_format: "KSh{{amount}}",
318        money_with_currency_format: "KSh{{amount}}"
319    },
320    KWD: {
321        money_format: "{{amount}}0 KD",
322        money_with_currency_format: "{{amount}}0 KWD"
323    },
324    KGS: {
325        money_format: "лв{{amount}}",
326        money_with_currency_format: "лв{{amount}}"
327    },
328    LVL: {
329        money_format: "Ls {{amount}}",
330        money_with_currency_format: "Ls {{amount}} LVL"
331    },
332    LBP: {
333        money_format: "L£{{amount}}",
334        money_with_currency_format: "L£{{amount}} LBP"
335    },
336    LTL: {
337        money_format: "{{amount}} Lt",
338        money_with_currency_format: "{{amount}} Lt"
339    },
340    MGA: {
341        money_format: "Ar {{amount}}",
342        money_with_currency_format: "Ar {{amount}} MGA"
343    },
344    MKD: {
345        money_format: "ден {{amount}}",
346        money_with_currency_format: "ден {{amount}} MKD"
347    },
348    MOP: {
349        money_format: "MOP${{amount}}",
350        money_with_currency_format: "MOP${{amount}}"
351    },
352    MVR: {
353        money_format: "Rf{{amount}}",
354        money_with_currency_format: "Rf{{amount}} MRf"
355    },
356    MXN: {
357        money_format: "$ {{amount}}",
358        money_with_currency_format: "$ {{amount}} MXN"
359    },
360    MYR: {
361        money_format: "RM{{amount}} MYR",
362        money_with_currency_format: "RM{{amount}} MYR"
363    },
364    MUR: {
365        money_format: "Rs {{amount}}",
366        money_with_currency_format: "Rs {{amount}} MUR"
367    },
368    MDL: {
369        money_format: "{{amount}} MDL",
370        money_with_currency_format: "{{amount}} MDL"
371    },
372    MAD: {
373        money_format: "{{amount}} dh",
374        money_with_currency_format: "Dh {{amount}} MAD"
375    },
376    MNT: {
377        money_format: "{{amount_no_decimals}} ₮",
378        money_with_currency_format: "{{amount_no_decimals}} MNT"
379    },
380    MZN: {
381        money_format: "{{amount}} Mt",
382        money_with_currency_format: "Mt {{amount}} MZN"
383    },
384    NAD: {
385        money_format: "N${{amount}}",
386        money_with_currency_format: "N${{amount}} NAD"
387    },
388    NPR: {
389        money_format: "Rs{{amount}}",
390        money_with_currency_format: "Rs{{amount}} NPR"
391    },
392    ANG: {
393        money_format: "ƒ{{amount}}",
394        money_with_currency_format: "{{amount}} NAƒ"
395    },
396    NZD: {
397        money_format: "${{amount}}",
398        money_with_currency_format: "${{amount}} NZD"
399    },
400    NIO: {
401        money_format: "C${{amount}}",
402        money_with_currency_format: "C${{amount}} NIO"
403    },
404    NGN: {
405        money_format: "₦{{amount}}",
406        money_with_currency_format: "₦{{amount}} NGN"
407    },
408    NOK: {
409        money_format: "kr {{amount_with_comma_separator}}",
410        money_with_currency_format: "kr {{amount_with_comma_separator}} NOK"
411    },
412    OMR: {
413        money_format: "{{amount_with_comma_separator}} OMR",
414        money_with_currency_format: "{{amount_with_comma_separator}} OMR"
415    },
416    PKR: {
417        money_format: "Rs.{{amount}}",
418        money_with_currency_format: "Rs.{{amount}} PKR"
419    },
420    PGK: {
421        money_format: "K {{amount}}",
422        money_with_currency_format: "K {{amount}} PGK"
423    },
424    PYG: {
425        money_format: "Gs. {{amount_no_decimals_with_comma_separator}}",
426        money_with_currency_format: "Gs. {{amount_no_decimals_with_comma_separator}} PYG"
427    },
428    PEN: {
429        money_format: "S/. {{amount}}",
430        money_with_currency_format: "S/. {{amount}} PEN"
431    },
432    PHP: {
433        money_format: "₱{{amount}}",
434        money_with_currency_format: "₱{{amount}} PHP"
435    },
436    PLN: {
437        money_format: "{{amount_with_comma_separator}} zl",
438        money_with_currency_format: "{{amount_with_comma_separator}} zl PLN"
439    },
440    QAR: {
441        money_format: "QAR {{amount_with_comma_separator}}",
442        money_with_currency_format: "QAR {{amount_with_comma_separator}}"
443    },
444    RON: {
445        money_format: "{{amount_with_comma_separator}} lei",
446        money_with_currency_format: "{{amount_with_comma_separator}} lei RON"
447    },
448    RUB: {
449        money_format: "руб{{amount_with_comma_separator}}",
450        money_with_currency_format: "руб{{amount_with_comma_separator}} RUB"
451    },
452    RWF: {
453        money_format: "{{amount_no_decimals}} RF",
454        money_with_currency_format: "{{amount_no_decimals}} RWF"
455    },
456    WST: {
457        money_format: "WS$ {{amount}}",
458        money_with_currency_format: "WS$ {{amount}} WST"
459    },
460    SAR: {
461        money_format: "{{amount}} SR",
462        money_with_currency_format: "{{amount}} SAR"
463    },
464    STD: {
465        money_format: "Db {{amount}}",
466        money_with_currency_format: "Db {{amount}} STD"
467    },
468    RSD: {
469        money_format: "{{amount}} RSD",
470        money_with_currency_format: "{{amount}} RSD"
471    },
472    SCR: {
473        money_format: "Rs {{amount}}",
474        money_with_currency_format: "Rs {{amount}} SCR"
475    },
476    SGD: {
477        money_format: "${{amount}}",
478        money_with_currency_format: "${{amount}} SGD"
479    },
480    SYP: {
481        money_format: "S£{{amount}}",
482        money_with_currency_format: "S£{{amount}} SYP"
483    },
484    ZAR: {
485        money_format: "R {{amount}}",
486        money_with_currency_format: "R {{amount}} ZAR"
487    },
488    KRW: {
489        money_format: "₩{{amount_no_decimals}}",
490        money_with_currency_format: "₩{{amount_no_decimals}} KRW"
491    },
492    LKR: {
493        money_format: "Rs {{amount}}",
494        money_with_currency_format: "Rs {{amount}} LKR"
495    },
496    SEK: {
497        money_format: "{{amount_no_decimals}} kr",
498        money_with_currency_format: "{{amount_no_decimals}} kr SEK"
499    },
500    CHF: {
501        money_format: "SFr. {{amount}}",
502        money_with_currency_format: "SFr. {{amount}} CHF"
503    },
504    TWD: {
505        money_format: "${{amount}}",
506        money_with_currency_format: "${{amount}} TWD"
507    },
508    THB: {
509        money_format: "{{amount}} ฿",
510        money_with_currency_format: "{{amount}} ฿ THB"
511    },
512    TZS: {
513        money_format: "{{amount}} TZS",
514        money_with_currency_format: "{{amount}} TZS"
515    },
516    TTD: {
517        money_format: "${{amount}}",
518        money_with_currency_format: "${{amount}} TTD"
519    },
520    TND: {
521        money_format: "{{amount}}",
522        money_with_currency_format: "{{amount}} DT"
523    },
524    TRY: {
525        money_format: "{{amount}}TL",
526        money_with_currency_format: "{{amount}}TL"
527    },
528    UGX: {
529        money_format: "Ush {{amount_no_decimals}}",
530        money_with_currency_format: "Ush {{amount_no_decimals}} UGX"
531    },
532    UAH: {
533        money_format: "₴{{amount}}",
534        money_with_currency_format: "₴{{amount}} UAH"
535    },
536    AED: {
537        money_format: "Dhs. {{amount}}",
538        money_with_currency_format: "Dhs. {{amount}} AED"
539    },
540    UYU: {
541        money_format: "${{amount_with_comma_separator}}",
542        money_with_currency_format: "${{amount_with_comma_separator}} UYU"
543    },
544    VUV: {
545        money_format: "${{amount}}",
546        money_with_currency_format: "${{amount}}VT"
547    },
548    VEF: {
549        money_format: "Bs. {{amount_with_comma_separator}}",
550        money_with_currency_format: "Bs. {{amount_with_comma_separator}} VEF"
551    },
552    VND: {
553        money_format: "{{amount_no_decimals_with_comma_separator}}₫",
554        money_with_currency_format: "{{amount_no_decimals_with_comma_separator}} VND"
555    },
556    XBT: {
557        money_format: "{{amount_no_decimals}} BTC",
558        money_with_currency_format: "{{amount_no_decimals}} BTC"
559    },
560    XOF: {
561        money_format: "CFA{{amount}}",
562        money_with_currency_format: "CFA{{amount}} XOF"
563    },
564    ZMW: {
565        money_format: "K{{amount_no_decimals_with_comma_separator}}",
566        money_with_currency_format: "ZMW{{amount_no_decimals_with_comma_separator}}"
567    }
568};
569Currency.formatMoney = function(b, g) {
570    if (typeof Shopify.formatMoney === "function") {
571        return Shopify.formatMoney(b, g)
572    }
573    if (typeof b == "string") {
574        b = b.replace(".", "")
575    }
576    var f = "";
577    var e = /\{\{\s*(\w+)\s*\}\}/;
578    var a = g || "${{amount}}";
579
580    function c(h, i) {
581        return (typeof h == "undefined" ? i : h)
582    }
583    function d(m, k, l, j) {
584        k = c(k, 2);
585        l = c(l, ",");
586        j = c(j, ".");
587        if (isNaN(m) || m == null) {
588            return 0
589        }
590        m = (m / 100).toFixed(k);
591        var n = m.split("."),
592            i = n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + l),
593            h = n[1] ? (j + n[1]) : "";
594        return i + h
595    }
596    switch (a.match(e)[1]) {
597        case "amount":
598            f = d(b, 2);
599            break;
600        case "amount_no_decimals":
601            f = d(b, 0);
602            break;
603        case "amount_with_comma_separator":
604            f = d(b, 2, ".", ",");
605            break;
606        case "amount_no_decimals_with_comma_separator":
607            f = d(b, 0, ".", ",");
608            break
609    }
610    return a.replace(e, f)
611};
612Currency.currentCurrency = "";
613Currency.format = "money_with_currency_format";
614Currency.convertAll = function(c, b, a, d) {
615    jQuery(a || "span.money").each(function() {
616        if (jQuery(this).attr("data-currency") === b) {
617            return
618        }
619        if (jQuery(this).attr("data-currency-" + b)) {
620            jQuery(this).html(jQuery(this).attr("data-currency-" + b))
621        } else {
622            var e = 0;
623            var f = Currency.moneyFormats[c][d || Currency.format] || "{{amount}}";
624            var g = Currency.moneyFormats[b][d || Currency.format] || "{{amount}}";
625            if (f.indexOf("amount_no_decimals") !== -1) {
626                e = Currency.convert(parseInt(jQuery(this).html().replace(/[^0-9]/g, ""), 10) * 100, c, b)
627            } else {
628                if (c === "JOD" || c == "KWD" || c == "BHD") {
629                    e = Currency.convert(parseInt(jQuery(this).html().replace(/[^0-9]/g, ""), 10) / 10, c, b)
630                } else {
631                    e = Currency.convert(parseInt(jQuery(this).html().replace(/[^0-9]/g, ""), 10), c, b)
632                }
633            }
634            var h = Currency.formatMoney(e, g);
635            jQuery(this).html(h);
636            jQuery(this).attr("data-currency-" + b, h)
637        }
638        jQuery(this).attr("data-currency", b)
639    });
640    this.currentCurrency = b;
641    this.cookie.write(b)
642};

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.