PageSourceSearch

https://www.haadtien.com/wp-content/themes/haadtien/js/tl-booking/tl-booking.min.js?ver=1539895420

js haadtien.com collected 2026-09-27 01:13:53 UTC 6,350 bytes, 142 lines download raw bytes

1"use strict";
2
3var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
4    return typeof e;
5} : function(e) {
6    return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
7};
8
9!function(d) {
10    function f(e) {
11        var t = e[h.name], n = d(e).find(t.codeSelector).val(), o = t.secretCode;
12        return "" !== n ? n : null !== o && o, "" !== n ? n : null !== o && o;
13    }
14    function u(e, t, n) {
15        var o, r, i = e, a = e[h.name], c = d(e), l = a.baseuri, u = {};
16        if (d.isNumeric(a.propertyId) ? r = a.propertyId : c.find(a.propertyId).length ? r = c.find(a.propertyId).val() : console.error("Property ID is not set or invalid format"), 
17        m(u, "propertyId", r), m(u, "onlineId", a.onlineId), m(u, "checkin", t.val()), m(u, "checkout", n.val()), 
18        c.find(a.adultSelector).length && m(u, "numofadult", c.find(a.adultSelector).val()), 
19        c.find(a.childSelector).length && m(u, "numofchild", c.find(a.childSelector).val()), 
20        c.find(a.roomSelector).length && m(u, "numofroom", c.find(a.roomSelector).val()), 
21        f(i) && m(u, "accesscode", f(i)), null !== a.propertyGroup && m(u, "pgroup", a.propertyGroup), 
22        null !== a.currency && m(u, "currency", a.currency), null !== a.confl && m(u, "confl", a.confl), 
23        null !== a.language && m(u, "lang", a.language), o = l + "?" + d.param(u), a.debug) return console.info(o), 
24        !1;
25        window.open(function(n, e) {
26            var o = n;
27            try {
28                if (!ga) return o;
29                ga(function(e) {
30                    if (null == e && (e = ga.getAll()[0]), !e) return o;
31                    if (!e.get("linkerParam")) return o;
32                    var t = new window.gaplugins.Linker(e);
33                    o = t.decorate(n);
34                });
35            } catch (e) {
36                console.info(e.message);
37            }
38            return o;
39        }(o));
40    }
41    function m(e, t, n) {
42        return "object" === (void 0 === e ? "undefined" : _typeof(e)) && (e[t] = n, !0);
43    }
44    function p(e, t) {
45        var n = 24 * t * 60 * 60 * 1e3;
46        return new Date(new Date(e).getTime() + n);
47    }
48    var h = {
49        name: "booking",
50        version: "1.4.4"
51    }, s = {
52        options: {
53            baseuri: "https://reservation.travelanium.net/propertyibe2",
54            checkInSelector: '[name="checkin"]',
55            checkOutSelector: '[name="checkout"]',
56            adultSelector: '[name="numofadult"]',
57            childSelector: '[name="numofchild"]',
58            roomSelector: '[name="numofroom"]',
59            codeSelector: '[name="accesscode"]',
60            submitSelector: '[name="search"]',
61            propertyId: '[name="propertyId"]',
62            onlineId: 4,
63            builtinDatepicker: {
64                enabled: !0,
65                dateFormat: "dd M yy",
66                altCheckin: "alt_checkin",
67                altCheckout: "alt_checkout"
68            },
69            secretCode: null,
70            propertyGroup: null,
71            language: null,
72            currency: null,
73            confl: null,
74            validate: function() {
75                return !0;
76            },
77            beforeSubmit: function() {},
78            afterSubmit: function() {},
79            debug: !1
80        },
81        init: function(e, t) {
82            var n, o, r, i, a = e[h.name] = d.extend({
83                element: e
84            }, this.options, t), c = e, l = d(e);
85            a.builtinDatepicker.enabled ? (!function(e) {
86                var t = e[h.name], n = d(e), o = n.find(t.checkInSelector).attr("readonly", !0), r = n.find(t.checkOutSelector).attr("readonly", !0), i = d("<input/>").attr({
87                    type: "hidden",
88                    name: t.builtinDatepicker.altCheckin
89                }), a = d("<input/>").attr({
90                    type: "hidden",
91                    name: t.builtinDatepicker.altCheckout
92                });
93                n.append(i), n.append(a);
94                var c = new Date(), l = p(c, 1);
95                o.datepicker({
96                    minDate: c,
97                    changeMonth: !1,
98                    changeYear: !1,
99                    dateFormat: t.builtinDatepicker.dateFormat,
100                    altFormat: "yy-mm-dd",
101                    altField: i,
102                    numberOfMonths: 1,
103                    onSelect: function(e, t) {
104                        r.datepicker("option", "minDate", p(e, 1)), setTimeout(function() {
105                            r.datepicker("show");
106                        }, 350);
107                    }
108                }), r.datepicker({
109                    minDate: l,
110                    changeMonth: !1,
111                    changeYear: !1,
112                    dateFormat: t.builtinDatepicker.dateFormat,
113                    altFormat: "yy-mm-dd",
114                    altField: a,
115                    numberOfMonths: 1
116                }), o.datepicker("setDate", c), r.datepicker("setDate", l);
117            }(c), n = l.find('[name="' + a.builtinDatepicker.altCheckin + '"]'), o = l.find('[name="' + a.builtinDatepicker.altCheckout + '"]')) : (n = l.find(a.checkInSelector), 
118            o = l.find(a.checkOutSelector)), l.on("submit", function(e) {
119                e.preventDefault(), a.validate(c) && (a.beforeSubmit(c), u(c, n, o), a.afterSubmit(c));
120            }), l.find(a.submitSelector).on("click", function(e) {
121                e.preventDefault(), a.validate(c) && (a.beforeSubmit(c), u(c, n, o), a.afterSubmit(c));
122            }), a.debug && (r = t, i = {
123                Element: c,
124                PluginName: h.name,
125                Version: h.version,
126                defaults: s.options,
127                configs: r
128            }, console.info(i));
129        },
130        update: function(e, t, n) {
131            n[h.name][e] = t;
132        }
133    };
134    d.fn[h.name] = function(e, t, n) {
135        return "object" == (void 0 === e ? "undefined" : _typeof(e)) || null == e ? this.each(function() {
136            null == this[h.name] && s.init(this, e);
137        }) : "string" == typeof e && s[e] ? this.each(function() {
138            s[e](t, n, this);
139        }) : void d.error("No " + e + " method of $.fn.booking");
140    };
141}(jQuery);
142//# sourceMappingURL=tl-booking.min.js.map

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.