1const debug=!1,initiateFbScripts=()=>{if("function"==typeof window.fbAsyncInit)return log("| XFBML parse"),void window.FB?.XFBML.parse();log("| initiate FB"),window.fbAsyncInit=()=>{FB.init({appId:pkfacebook.general_appid,cookie:!0,xfbml:!0,status:!0,version:"v16.0",autoLogAppEvents:!0}),FB.AppEvents.logPageView()};const e=prestashop.language.locale.replace("-","_");var t,o,n,a,i;t=document,o="script",n="facebook-jssdk",i=t.getElementsByTagName(o)[0],t.getElementById(n)||((a=t.createElement(o)).id=n,a.src=`//connect.facebook.net/${e}/sdk/xfbml.customerchat.js`,i.parentNode.insertBefore(a,i))},addFbButton=()=>{log("| append fb:login-button to parent element"),$(pkfacebook.login_parent).append(`<fb:login-button class="fb_login_button" data-size="large" data-button-type="login_with" scope="public_profile,email" onlogin="checkLoginState();">\n ${pkfacebook.phrases.login}\n </fb:login-button>`)},pfFbLogin=({first_name:e,last_name:t,email:o,id:n,gender:a})=>{$.ajax({type:"POST",url:pkfacebook.controller,data:{id:n,email:o,gender:a,lastname:t,firstname:e},success:()=>{"no_redirect"==pkfacebook.login_redirect&&window.location.reload(),"authentication_page"==pkfacebook.login_redirect&&(window.location.href=pkfacebook.login_destination)}})},tryToLogin=()=>{FB.login((e=>{e.authResponse&&FB.api("/me",{fields:"id,first_name,last_name,email,gender"},(e=>pfFbLogin(e)))}))},checkLoginState=()=>{FB.getLoginStatus((e=>statusChangeCallback(e)))},statusChangeCallback=({status:e})=>{"connected"===e&&FB.login((e=>{e.authResponse&&FB.api("/me",{fields:"id,first_name,last_name,email,gender"},(e=>pfFbLogin(e)))}))},testAPI=()=>{console.log("Welcome! Fetching your information.... "),FB.api("/me",{fields:"id,name,email"},(e=>{console.log(e)}))},addAndInit=()=>{log("| append fb:login-button to parent element"),$(pkfacebook.login_parent).append(`<fb:login-button class="fb_login_button" data-size="large" data-button-type="login_with" scope="public_profile,email" onlogin="checkLoginState();">\n ${pkfacebook.phrases.login}\n </fb:login-button>`),initiateFbScripts()},log=e=>false;!function(e){"use strict";jQuery(document).ready((function(){if(void 0===pkfacebook.general_appid||""===pkfacebook.general_appid)return console.warn("Facebook module is enabled but not configured");const{page:{page_name:e},customer:{is_logged:t}}=prestashop;if((1===parseInt(pkfacebook.chat_state)||(()=>"product"===e&&1===parseInt(pkfacebook.comments_state)))&&(log("chat || comments"),initiateFbScripts()),1===parseInt(pkfacebook.login_state)&&!1===t){if(log("| login_state && logged"),"authentication"===e&&(log(" â authentication"),addAndInit()),"authentication"!==e){log(" â !authentication");const e=document.querySelector(".pk-signin");if(!e)return;log(" â loginSidebar exist"),e.addEventListener("click",(()=>{log(" â sidebar is triggered");const e=document.querySelector(pkfacebook.login_parent);if(!e)return;log(" â parent button exists");!e.querySelector(".fb_login_button")&&addAndInit()}))}"checkout"===e&&(pkfacebook.redirect="no_redirect")}}))}();
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.