function scrollToIframeCenter(n){let t=document.querySelector(n);t.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});t.focus()}function removeLoader(n){let t=document.querySelectorAll(`${n} .loadingcircle`);t&&t.forEach(n=>n.remove())}function resizeWidget(n,t){let i=document.querySelector(n);i?i.height=`${t}px`:console.error(`iframe with this selector ${n} doesn't exist'`)}function sendMessageToIframe(n,t){var i=document.querySelector(n);i.contentWindow.postMessage(t,"*")}function createToast(n,t,i,r){const u=new WgtToast;u.showToast(n,t,i,r)}function initWidgetModals(){document.querySelectorAll(".wgt-modal").forEach(n=>{new WgtModal(n)});document.addEventListener("click",n=>{Object.values(WgtModal.instances).forEach(t=>{n.target!==t.element||t.isStatic||t.hide()})})}function createModal(n,t,i){document.body.insertAdjacentHTML("beforeend",t);let r=document.getElementById(n);if(r){const n=new WgtModal(r);n.show()}else console.error(`Dom element with id '${n}' not found`);i&&i.trim()&&executeScript(i)}function executeScript(n){const t=document.createElement("script");t.textContent=n;document.body.appendChild(t);t.remove()}function closeModal(n){const t=WgtModal.instances[n];t?t.destroy():console.error(`Modal instance with id '${idModale}' not found`)}function setNestedProperty(n,t,i){const r=t.split(/[.[\]]/).filter(n=>n!=="");let u=n;for(let n=0;n{n.preventDefault();const f=new FormData(r),u={};for(const[t,n]of f.entries()){const i=n==="on"?!0:n;setNestedProperty(u,t,i)}sendCustomModalResponse(i,t,JSON.stringify(u))}}async function handleChangeCallNewContent(n,t){await fetch(n).then(n=>n.text()).then(n=>$(t).html(n))}async function handleCallDotNetMethodAsync(n){var t={action:"callDotNetMethod",args:[...arguments]};return sendMessageToIframe(n,t),new Promise(function(n){window.addEventListener("message",function t(i){i.data.action=="callDotNetMethodResponse"&&(n(i.data.response),window.removeEventListener("click",t))})})}function sendConfirmationModalResponse(n,t,i){var r={action:"confirmation",response:i};sendMessageToIframe(n,r);closeModal(t)}function sendCustomModalResponse(n,t,i){var r={action:"customResponse",response:i};sendMessageToIframe(n,r);closeModal(t)}var sWCustomersUrl="https://test2.themisweb.fr/widgets/customers/2.1.0/",widgetCustomerUrl;(function(){function f(n,t){var r=!1,i;for(typeof n!="object"&&(n=n.toString().split(".")),typeof t!="object"&&(t=t.toString().split(".")),i=0;i<\/iframe>");o(t);e==!1&&(document.getElementById("sWCustomer_"+s).onload=function(){r(t);$(window).resize()},window.removeEventListener("message",i),window.addEventListener("message",i))}function e(t,i,r){var u=t.replace(/[^a-zA-Z0-9]/g,""),f=this.document.body;n(f).find(t).html("