/** Shopify CDN: Minification failed

Line 11:1 Unexpected "("
Line 24:93 Unterminated string token
Line 25:73 Unterminated string token
Line 27:117 Unterminated string token
Line 30:93 Unterminated string token
Line 35:81 Expected ")" to go with "("

**/
 (function(){var P='0927618748',U='https://line.me/ti/p/tuttomotor';var T=null,t=0,i=[];window.tp4Open=function(){var
  e=document.getElementById('tp4-cart-total'),f=document.getElementById('tp4-cart-items-json');if(e)t=parseFloat(e.value
  )||0;if(f){try{i=JSON.parse(f.value)||[]}catch(e){i=[]}}if(t<=0){return}document.getElementById('tp4-overlay').classLi
  st.add('active');document.body.style.overflow='hidden';var a=document.getElementById('tp4-amount-display');if(a)a.text
  Content=t.toLocaleString('th-TH',{minimumFractionDigits:2,maximumFractionDigits:2});var
  q=document.getElementById('tp4-qr-img');if(q)q.src='https://promptpay.io/'+P+'/'+t.toFixed(2);var
  ai=document.getElementById('tp4-form-amount');if(ai)ai.value=t.toFixed(2)};window.tp4Close=function(){document.getElem
  entById('tp4-overlay').classList.remove('active');document.body.style.overflow='';if(T){clearInterval(T);T=null}docume
  nt.getElementById('tp4-form').style.display='block';document.getElementById('tp4-success').style.display='none'};windo
  w.tp4CopyPP=function(){var
  t='0927618748';if(navigator.clipboard)navigator.clipboard.writeText(t)};window.tp4CopyBank=function(b){var
  n=b==='kbank'?'056-3-41791-9':'';if(!n)return;if(navigator.clipboard)navigator.clipboard.writeText(n)};window.tp4Submi
  t=function(){var n=document.getElementById('tp4-name').value.trim(),p=document.getElementById('tp4-phone').value.trim(
  ),t=document.getElementById('tp4-trans').value.trim();if(!n||!p||!t){alert('Please fill all
  fields');return}document.getElementById('tp4-submit').disabled=true;var
  am=document.getElementById('tp4-form-amount').value.trim();var fd=new
  FormData();fd.append('form_type','contact');fd.append('utf8','');fd.append('contact[subject]','TUTTO Payment '+am+'
  THB');fd.append('contact[name]',n);fd.append('contact[phone]',p);fd.append('contact[body]','Payment: '+am+' THB -
  '+n+' - '+p);fetch('/contact#contact_form',{method:'POST',body:fd}).catch(function(){});document.getElementById('tp4-f
  orm').style.display='none';document.getElementById('tp4-success').style.display='block';var
  s=5;T=setInterval(function(){s--;if(s<=0){clearInterval(T);window.open(U,'_blank')}},1000)};document.addEventListener(
  'DOMContentLoaded',function(){var
  e=document.getElementById('tp4-cart-total'),r=document.querySelector('.tp4-trigger');if(e&&r){var
  v=parseFloat(e.value)||0;if(v<=0){r.disabled=true;r.style.opacity='0.5'}}var o=document.getElementById('tp4-overlay');
  if(o)o.addEventListener('click',function(e){if(e.target===o)tp4Close()})})})();