PageSourceSearch

https://www.conad.it/etc.clientlibs/conad-common/clientlibs/client…-ff3a62d61705cbee22934354428ab6f7-lc.min.js

js conad.it collected 2026-10-02 02:53:01 UTC 4,423 bytes, 145 lines download raw bytes

1(function(){
2
3    window.gpUUID = function() {
4        return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
5            /[xy]/g,
6            function (c) {
7                const r = (Math.random() * 16) | 0,
8                    v = c == "x" ? r : (r & 0x3) | 0x8;
9                return v.toString(16);
10            }
11        );
12    }
13
14    window.gpGetCookie =  function (name) {
15        var mt = document.cookie.match(
16            "(^|;)\\s*" + name + "\\s*=\\s*([^;]+)"
17        );
18        if (mt) return mt.pop();
19        return "";
20    }
21
22    window.gpSetCookie = function (name, value, domain) {
23        document.cookie =
24            name + "=" + value + ";domain=" + domain + ";path=/";
25    }
26
27    window.gpDomain = function(){
28        //read domain
29        var domainParts = location.hostname.split(".");
30        var domain = location.hostname;
31        if (domainParts.length >= 2) {
32            domain = "." + domainParts.slice(-2).join(".");
33        }
34        return domain;
35    }
36
37})();
38(function() {
39
40    // check server uuid only on aem rendered pages, cached pages server uuid on page doesn't have any significate an in that pages is not reported
41    if(!window.ecServerUUID) return;
42
43    // read cookies
44    const uuid = window.gpGetCookie("ecServerUUID");
45    const domain = window.gpDomain();
46
47    //write uuid
48    if ( !uuid || uuid != window.ecServerUUID ) {
49        window.gpSetCookie( "ecServerUUID", window.ecServerUUID, domain);
50    }
51
52})();
53(function(){
54
55    // load current session and domain
56    const session = window.gpGetCookie("ecSess");
57    const domain = window.gpDomain();
58
59    // write session if not already present
60    if (!session) {
61        window.gpSetCookie("ecSess", window.gpUUID(), domain);
62    }
63
64})();
65(function(){
66
67    const thumbPromise = (import('/etc.clientlibs/conad-common/clientlibs/clientlib-global-protection/resources/chunks/thumbmark.js').then(() => {
68        ThumbmarkJS.setOption('exclude', ['canvas', 'plugins', 'permissions', 'webgl', 'system.browser.version']);
69        return ThumbmarkJS;
70    }).then((thumbmark) => thumbmark.getFingerprint()));
71
72    // create thumbmark getFingerprint
73    window.gpGetFingerprint = async () => {
74        return await thumbPromise;
75    }
76
77})();
78
79
80(function(){
81
82
83    // Initialize an agent at application startup, once per page/app.
84    const botdPromise = import('/etc.clientlibs/conad-common/clientlibs/clientlib-global-protection/resources/chunks/botd.js').then((Botd) => Botd.load())
85    let v2Id = undefined;
86    
87    window.gpGetProtectionToken = async (action, infos = null) => {
88
89        // botd
90        const botd = await botdPromise;
91        const detection = await botd.detect();
92
93        // fingerprint
94        const fingerprint = await window.gpGetFingerprint();
95
96        // make request
97        const responseStep0 = await fetch("/api/common/protection.json?step=zero", {
98            method: "POST",
99            headers: {
100                "Content-Type": "application/json",
101            },
102            body: JSON.stringify({
103                feBot: detection.bot,
104                fingerprint,
105                action,
106                infos
107            })
108        });
109
110        // verify step 0
111        const dataStep0 = (await responseStep0.json())?.data;
112        if(!dataStep0) throw "Sorry, Something goes wrong";
113        if(dataStep0.ok) return dataStep0.token;
114
115        // captcha enterprise
116        const captchaEnterprisePromise = new Promise((resolve) => {
117            grecaptcha.enterprise.ready(() => {
118                grecaptcha.enterprise.execute(window.recaptchaEnterpriseSitekey, { action }).then((token) => {
119                    resolve(token);
120                });
121            });
122        });
123        const captchaEnterpriseToken = await captchaEnterprisePromise;
124
125        // make request
126        const responseStep1 = await fetch("/api/common/protection.json?step=one", {
127            method: "POST",
128            headers: {
129                "Content-Type": "application/json",
130            },
131            body: JSON.stringify({
132                token: dataStep0.token,
133                captchaToken: captchaEnterpriseToken,
134                fingerprint
135            })
136        });
137        const dataStep1 = (await responseStep1.json())?.data;
138        if(!dataStep1) throw "Sorry, Something goes wrong";
139        if(dataStep1.ok) return dataStep1.token;
140
141        throw "Sorry, I think you are a bot"
142    }
143
144
145})();

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.