function initMap(n,t){let i;var r=JSON.parse(n),u=JSON.parse(t);const f=new google.maps.Polygon({paths:r}),e=i=google.maps.geometry.poly.containsLocation(u,f)?!0:!1;return i}function makerPDF(n){var t,i,r;let f={idProductoOrden:4545,idOrden:54545,cveProducto:"FLETE",cantidad:1,precio:n.orden.montoEnvio,tituloTienda:"Envío\n\n",marcaProducto:"",urlImagen:"jfhdjfhjd"};const e=document.querySelector("img#barcode");t=e.src;n.productosOrden.push(f);let c=n.orden.totalPagado.toString();i={returnJsPDFDocObject:!0,fileName:"ReciboBigAutoOnline"+n.orden.cveSistema+"-"+n.orden.cveSucursal+n.orden.folioKepler,orientationLandscape:!1,compress:!0,logo:{src:"https://res.cloudinary.com/bigauto/image/upload/f_png,w_quality:best,c_thumb,w_auto,h_200/v1730130248/logos/logo-rojo-azul.webp",type:"PNG",width:40.33,height:8.66,margin:{top:0,left:0}},stamp:{inAllPages:!0,src:t,type:"JEPG",width:70,height:20,margin:{top:0,left:0}},business:{name:"BIGAUTO",address:"Jesus Maria Aguascalientes, Carretera panamericana #327-10\n Parque Industrial Satex Col J.Gomez Portugal",phone:"\n(449) 252-90-75",email:"\nbigauto.ecommerce@bigauto.mx",email_1:"",website:""},contact:{label:"Recibo de compra:",name:n.orden.nombreCliente,address:n.direccionOrden.calle+" "+n.direccionOrden.numero+", "+n.direccionOrden.colonia+" CP "+n.direccionOrden.codigoPostal+"\n"+n.direccionOrden.municipio+" "+n.direccionOrden.estado,phone:(()=>{const i=n.direccionOrden.telefono.replace(/\D/g,""),t=i.match(/^(\d{3})(\d{3})(\d{4})$/);return t?` (${t[1]}) ${t[2]}-${t[3]}`:"\n"+i})(),email:"\n"+n.orden.emailCliente,otherInfo:"\n"},invoice:{label:"",num:"",invGenDate:(()=>{const t=new Date(n.orden.fechaCreacion);return"\nPedido realizado: "+t.toLocaleString("es-MX",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})})(),headerBorder:!1,tableBodyBorder:!1,header:[{title:"CveProducto",style:{width:30}},{title:"Marca",style:{width:30}},{title:"Artículo",style:{width:80}},{title:"Precio"}],table:Array.from(n.productosOrden,n=>[n.cveProducto,n.marcaProducto,n.tituloTienda,n.cantidad+" X $"+n.precio.toFixed(2)]),additionalRows:[{col1:"Total:",col2:"$"+n.orden.totalPagado.toFixed(2),col3:"MXN"}]},footer:{text:""},pageEnable:!0,pageLabel:"Page "};r=jsPDFInvoiceTemplate.default(i);const o=r.jsPDFDocObject,s=o.output("blob"),h=URL.createObjectURL(s),u=window.open();u?u.document.write(``):alert("Por favor, habilita las ventanas emergentes para ver el PDF.")}function generateBarCode(n){JsBarcode("#barcode",n)}function topFunction(){window.scrollTo({top:0,behavior:"smooth"})}function gotoPosition(n){screen.width<800&&window.scrollTo(0,n)}function gotoId(n){const t=document.getElementById(n);t.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}function btnScrollTop(){var n=document.querySelector(".btnScrollToUp"),i=document.querySelector(".vehiculoIcon");let r,t=()=>{let t=window.window.scrollY;n.classList.remove("hidden");let u=document.documentElement.clientHeight-document.body.clientHeight,r=Math.round(Math.floor(t)*100/u)*-1;t>100?(n.style.display="flex",document.getElementById("hideOnScroll").style.top="-500px",document.getElementById("busquedaScroll").style.top="0",i.style.display="flex",document.getElementById("btnBusquedaVehiculo").style.display="none"):(n.style.display="none",document.getElementById("hideOnScroll").style.top="0",screen.width<=950?(document.getElementById("busquedaScroll").style.top="45px",i.style.display="none",document.getElementById("btnBusquedaVehiculo").style.display="flex"):document.getElementById("busquedaScroll").style.top="45px");n.style.background=`conic-gradient(red ${r}%, white ${r}%)`};const u=()=>{clearTimeout(r),r=setTimeout(()=>{n.classList.add("hidden")},2e3)};n.addEventListener("click",function(){window.scrollTo({top:0,behavior:"smooth"})});window.addEventListener("scroll",()=>{t(),n.classList.remove("hidden"),u()});window.onscroll=t;window.onload=t}function btnScrollTopFunction(){window.scrollTo({top:0,behavior:"smooth"})}function lupasEfect(){var n=document.querySelectorAll(".magnifying_area");n.forEach(n=>{var t=document.querySelector(".magnifying_img");n.addEventListener("mousemove",function(i){clientX=i.clientX-n.offsetLeft;clientY=i.clientY-n.offsetTop;var r=n.offsetWidth,u=n.offsetHeight;clientX=clientX/r*100-70;clientY=clientY/u*100-50;t.style.transform="translate(-"+clientX+"%, -"+clientY+"%) scale(2)"});n.addEventListener("mouseleave",function(){t.style.transform="translate(-50%,-50%) scale(1)"})})}function corrector(n){document.documentElement.style.setProperty("--mud-zindex-popover",n)}function display(n){document.querySelector(n).style.display="flex"}function screenSize(){return screen.width}function LoadSwipperBolsaT(n){const t=new Swiper(".bolsaT",{slidesPerView:n,spaceBetween:50,loop:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})}function swipers2(n){if(n)var t=new Swiper(".swiperTabsTendencias",{slidesPerView:1,spaceBetween:1,navigation:{nextEl:"#NextBtnTendencias",prevEl:"#PrevBtnTendencias"},lazy:{loadPrevNext:!0,loadOnTransitionStart:!0},watchSlidesVisibility:!0,breakpoints:{640:{slidesPerView:1,spaceBetween:1},768:{slidesPerView:2,spaceBetween:1},1024:{slidesPerView:3,spaceBetween:1},1441:{slidesPerView:4,spaceBetween:1}}})}function swipers(n){if(n)var t=new Swiper(".swiperTabs1",{slidesPerView:1,spaceBetween:1,navigation:{nextEl:"#NextBtn",prevEl:"#PrevBtn"},lazy:{loadPrevNext:!0,loadOnTransitionStart:!0},watchSlidesVisibility:!0,breakpoints:{640:{slidesPerView:1,spaceBetween:1},768:{slidesPerView:2,spaceBetween:1},1024:{slidesPerView:3,spaceBetween:1},1441:{slidesPerView:4,spaceBetween:1}}})}function funcionMarcas(n){if(n){let n=document.querySelector("#paginadorMarcas");var t=new Swiper(".mySwiperMarcas",{slidesPerView:1,spaceBetween:1,autoplay:{delay:6e3,disableOnInteraction:!1},navigation:{nextEl:"#NextBtnMarcas",prevEl:"#PrevBtnMarcas"},lazy:{loadPrevNext:!0,loadOnTransitionStart:!0},watchSlidesVisibility:!0,breakpoints:{300:{slidesPerView:2,spaceBetween:1},640:{slidesPerView:4,spaceBetween:1},768:{slidesPerView:5,spaceBetween:1},1024:{slidesPerView:6,spaceBetween:1}}})}}function lafuncion(){let n=document.querySelector("#paginadorLineas");var t=new Swiper(".mySwiperLienas",{slidesPerView:1,spaceBetween:1,autoplay:{delay:6e3,disableOnInteraction:!1},navigation:{nextEl:"#NextBtnLigados",prevEl:"#PrevBtnLigados"},lazy:{loadPrevNext:!0,loadOnTransitionStart:!0},watchSlidesVisibility:!0,breakpoints:{640:{slidesPerView:2,spaceBetween:1},768:{slidesPerView:2,spaceBetween:1},1025:{slidesPerView:4,spaceBetween:1}}})}function funcionSwipper(){let n=document.querySelector(".swiper-anuncios");var t;t=new Swiper(".swiper-anuncios",{slidesPerView:1,autoplay:{delay:14e4,disableOnInteraction:!1}});n.style.visibility="visible"}function LoadSwipperProductoDetalle(){var n=new Swiper(".mySwiper",{loop:!1,spaceBetween:10,slidesPerView:3,freeMode:!0,watchSlidesProgress:!0,direction:"vertical"}),t=new Swiper(".mySwiper2",{loop:!1,spaceBetween:10,zoom:!0,navigation:{nextEl:"#NextBtnProductoDetalle",prevEl:"#PrevBtnProductoDetalle",clickable:!0},thumbs:{swiper:n}})}function LoadSwipperProductoLigados(n){var t=n>=4?4:n,i=new Swiper(".mySwiperLigados",{loop:!1,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:"#NextBtnProductoDetalleLigados",prevEl:"#PrevBtnProductoDetalleLigados"},lazy:{loadPrevNext:!0,loadOnTransitionStart:!0},watchSlidesVisibility:!0,breakpoints:{640:{slidesPerView:1,spaceBetween:1},768:{slidesPerView:2,spaceBetween:1},1024:{slidesPerView:t,spaceBetween:1}}})}function testzoom(){const n=window.innerWidth<=740?!0:!1;if(!n){const n=document.querySelectorAll(".image-container");n.forEach(n=>{const t=n.querySelector(".zoom-image");n.addEventListener("mouseover",()=>{t.style.transform="scale(2.5)"});n.addEventListener("mousemove",i=>{const r=n.getBoundingClientRect(),u=i.clientX-r.left,f=i.clientY-r.top,e=u/r.width*100,o=f/r.height*100;t.style.transformOrigin=`${e}% ${o}%`});n.addEventListener("mouseout",()=>{t.style.transform="scale(1)",t.style.transformOrigin="center center"})})}}function isResponsiveMode(){return window.innerWidth<=740?!0:!1}function initializeSwiperMobil(){var n=new Swiper(".mySwiperFull",{spaceBetween:10,slidesPerView:4,freeMode:!0,watchSlidesProgress:!0}),t=new Swiper(".mySwiper2Full",{spaceBetween:10,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},thumbs:{swiper:n}})}function toggleFullscreen(n){const t=document.querySelector(n);document.fullscreenElement?document.exitFullscreen():t.requestFullscreen().catch(n=>{console.error("Error al entrar en pantalla completa:",n)})}var nativeShare;window.resizeDetector={init:function(n){window.addEventListener("resize",function(){n.invokeMethodAsync("OnResize",window.innerWidth,window.innerHeight)})}};window.ChangeUrl=function(n){history.pushState(null,"",n)};nativeShare=function(){return navigator.share&&navigator.share({title:"titulo",text:"texto",url:"URL"}),!1};window.Back=function(n){console.log(n);history.go(-n)};window.ChangeUrl=function(n){history.pushState(null,"",n)};nativeShare=function(){return navigator.share&&navigator.share({title:"titulo",text:"texto",url:"URL"}),!1};window.redirigir=function(n){window.location.href=n};