u in p?I(p,u,enumerable:!0,configurable:!0,writable:!0,value:d):p[u]=d;var a=(p,u,d)=>A(p,typeof u!=”symbol”?u+””:u,d);(function().comconsiderRedirect(t)t.redirectPath&&!s.pathname.endsWith(t.redirectPath))return this.log(“Hiding page to redirect for template test”),this.hidePage(),!0;return this.log(“Not redirecting”),!1redirect(t)if(this.log(“Redirecting to hypothesis ‘%s’”,t.id),t.isControl)return;const e=new URL(window.location.toString());if(t.redirectPath)const s=RegExp(“^(/w2-w2)/”).exec(e.pathname);if(s&&s.length>1)const i=s[1];e.pathname=`$i$t.redirectPath`else e.pathname=t.redirectPathelse t.type===”theme”?(e.searchParams.set(“_ab”,”0″),e.searchParams.set(“_fd”,”0″),e.searchParams.set(“_sc”,”1″),e.searchParams.set(“preview_theme_id”,t.themeId.toString())):t.type!==”urlRedirect”&&e.searchParams.set(“view”,t.affix);this.queueRedirect(e)buildBaseVisitor()const t=this.getDeviceType(),e=this.getUTMValue(“utm_source”)??””,s=this.getUTMValue(“utm_medium”)??””,i=this.getUTMValue(“utm_campaign”)??””,o=this.getUTMValue(“utm_content”)??””,n=window.document.referrer;returnshopifyAnalyticsId:this.shopifyAnalyticsId,device:t!==”tablet”?t:”mobile”,utmSource:e,utmMedium:s,utmCampaign:i,utmContent:o,referrer:ncheckForThemePreview()this.state.essential.visitorTests.some(t=>t.isThemeTest&&!this.getHypothesis(t.hypothesisId)&&(t.themeId==nulltestsForUrl(t)const e=new URL(window.location.href),s=this.typeFromTemplate();return t.filter(i=>i.hypotheses.some(o=>o.isControl&&o.type===s&&o.affix===template.suffixasync filterTestsByAudience(t,e,s)this.visitorCreatedDuringTestActive(o.statusHistory)))&&(this.log(“Visitor is in audience for test ‘%s’”,o.id),i.push(o));return iasync isTargetAudience(t,e,s)c.reduce((r,l)=>r&&l(e,s,o,i),!0),!1))visitorCreatedDuringTestActive(t)let e=””;for(const s of t)i.type===2).some(i=>i.timestampe.concat(s.hypotheses),[]).find(e=>this.state.essential.visitorTests.some(s=>s.hypothesisId===e.id))getHypothesis(t)return this.testConfigs.filter(e=>e.hypotheses.some(s=>s.id===t)).map(e=>e.hypotheses.find(s=>s.id===t))[0]hasThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type===”theme”))hasTestThatIsNotThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type!==”theme”))hasThemeAndOtherTestTypes(t)return this.hasThemeTest(t)&&this.hasTestThatIsNotThemeTest(t)visitorActiveTestType()const t=this.state.essential.visitorTests.filter(e=>this.testConfigs.some(s=>s.hypotheses.some(i=>i.id==e.hypothesisId)));return t.length===0?null:t.some(e=>e.isThemeTest)?”theme”:”templateOrUrlRedirect”pickHypothesis(t)let e=Math.random();const s=t.hypotheses.reduce((o,n)=>o+n.visitorCount,0);return t.hypotheses.sort((o,n)=>o.isControl?n.isControl?0:-1:n.isControl?1:0).reduce((o,n)=>t.type===2)typeFromTemplate()switch(template.type)case”collection-list”:return”collectionList”;case”page”:return”landing”;case”article”:case”blog”:case”cart”:case”collection”:case”index”:case”product”:case”search”:return template.type;default:return nullqueueRedirect(t)this.saveState(),window.setTimeout(()=>window.location.assign(t),0)async syncAllEvents()const t=async()=>if(this.isSyncing)window.setTimeout(()=>void(async()=>await t())(),500);returntrythis.isSyncing=!0,await this.syncEvents(),this.syncGAEvents()finallythis.isSyncing=!1;await […]
u in p?I(p,u,enumerable:!0,configurable:!0,writable:!0,value:d):p[u]=d;var a=(p,u,d)=>A(p,typeof u!=”symbol”?u+””:u,d);(function()^jobconsiderRedirect(t)if(this.log(“Considering redirect for hypothesis ‘%s'”,t.id),t.isControl)return this.log(“Skipping redirect for control”),!1;const e=this.state.essential.visitorTests.find(i=>i.hypothesisId===t.id),s=new URL(window.location.toString());if(t.type===”theme”)if(!(t.themeId===themeId))return!1else if(t.affix!==template.suffixredirect(t)if(this.log(“Redirecting to hypothesis ‘%s'”,t.id),t.isControl)return;const e=new URL(window.location.toString());if(t.redirectPath)const s=RegExp(“^(/w2-w2)/”).exec(e.pathname);if(s&&s.length>1)const i=s[1];e.pathname=`$i$t.redirectPath`else e.pathname=t.redirectPathelse t.type===”theme”?(e.searchParams.set(“_ab”,”0″),e.searchParams.set(“_fd”,”0″),e.searchParams.set(“_sc”,”1″),e.searchParams.set(“preview_theme_id”,t.themeId.toString())):t.type!==”urlRedirect”&&e.searchParams.set(“view”,t.affix);this.queueRedirect(e)buildBaseVisitor()const t=this.getDeviceType(),e=this.getUTMValue(“utm_source”)??””,s=this.getUTMValue(“utm_medium”)??””,i=this.getUTMValue(“utm_campaign”)??””,o=this.getUTMValue(“utm_content”)??””,n=window.document.referrer;returnshopifyAnalyticsId:this.shopifyAnalyticsId,device:t!==”tablet”?t:”mobile”,utmSource:e,utmMedium:s,utmCampaign:i,utmContent:o,referrer:ncheckForThemePreview()testsForUrl(t)async filterTestsByAudience(t,e,s)async isTargetAudience(t,e,s)let i=null;t.requiresCountry&&(this.log(“Hiding page to check geoip”),this.hidePage(),i=await this.makeJsonRequest(method:”get”,url:`$this.host/api/v0/visitors/get-country`,signal:AbortSignal.timeout(this.getCountryTimeout)).catch(n=>(this.log(“Error getting country”,n),null)));const o=this.getChannel(e);return(t.device===”all”visitorCreatedDuringTestActive(t)let e=””;for(const s of t)if(this.state.analytics.visitor!==null&&this.state.analytics.visitor.createdAti.type===1getHypothesis(t)return this.testConfigs.filter(e=>e.hypotheses.some(s=>s.id===t)).map(e=>e.hypotheses.find(s=>s.id===t))[0]hasThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type===”theme”))hasTestThatIsNotThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type!==”theme”))hasThemeAndOtherTestTypes(t)return this.hasThemeTest(t)&&this.hasTestThatIsNotThemeTest(t)visitorActiveTestType()const t=this.state.essential.visitorTests.filter(e=>this.testConfigs.some(s=>s.hypotheses.some(i=>i.id==e.hypothesisId)));return t.length===0?null:t.some(e=>e.isThemeTest)?”theme”:”templateOrUrlRedirect”pickHypothesis(t)let e=Math.random();const s=t.hypotheses.reduce((o,n)=>o+n.visitorCount,0);return t.hypotheses.sort((o,n)=>o.isControl?n.isControl?0:-1:n.isControl?1:0).reduce((o,n)=>typeFromTemplate()switch(template.type)case”collection-list”:return”collectionList”;case”page”:return”landing”;case”article”:case”blog”:case”cart”:case”collection”:case”index”:case”product”:case”search”:return template.type;default:return nullqueueRedirect(t)this.saveState(),window.setTimeout(()=>window.location.assign(t),0)async syncAllEvents()const t=async()=>if(this.isSyncing)window.setTimeout(()=>void(async()=>await t())(),500);returntrythis.isSyncing=!0,await this.syncEvents(),this.syncGAEvents()finallythis.isSyncing=!1;await t()async syncEvents()!this.shopifyAnalyticsIdsyncGAEvents()sendGtagEvent(t,e)this.log(“Sending gtag event for”,t,e);const s=exp_variant_string:`SL-$t-$e`;this.shopliftDebug&&Object.assign(s,debug_mode:!0),gtag(“event”,”experience_impression”,s)async getRemoteVisitor(t)return await this.makeJsonRequest(method:”get”,url:`$this.host/api/v0/visitors/$t`)async updateShopifyAnalyticsId(t,e)return await this.makeJsonRequest(method:”put”,url:`$this.host/api/v0/visitors/$t`,data:JSON.stringify(shop:this.shop,shopifyAnalyticsId:e))getUTMValue(t)const s=decodeURIComponent(window.location.search.substring(1)).split(“&”);for(let i=0;it&&window.document.documentElement.classList.remove(t)async getCartState()trylet t=await this.makeJsonRequest(method:”get”,url:`$window.location.origin/cart.js`);return t.note===null&&(t=await this.makeJsonRequest(method:”post”,url:`$window.location.origin/cart/update.js`,data:JSON.stringify(note:””))),tcatch(t)return this.log(“Error sending cart info”,t),nullasync makeJsonRequest(t)return(await this.makeRequest(t)).json()async makeRequest(t))(); )(“/”, suffix: “”, type: “index” , “main”, 138374545561, false)]]> Plug Refurbished Laptops/Tablets/Watches & Unlocked Phones `form[action*=’/$t’]:not([data-nocaptcha=’true’]) input[name=’form_type’][value=’$e’]`)).join(‘,’);function s(t,e,n=!1)tryconst o=window.sessionStorage;for(const[n,c]of Object.entries(JSON.parse(o.getItem(e))))t.elements[n]&&(t.elements[n].value=c);n&&o.removeItem(e)catchconst a=’form_key’,i=[‘recaptcha-v3-token’,’g-recaptcha-response’,’h-captcha-response’,’password’],u=()=>tryreturn window.sessionStoragecatchreturn,m=t=>t.elements[a],f=’form_type’,d=’cptcha’;function p(t)t.dataset[d]=!0const l=window,h=l.document,_=’Shopify’,y=’ce_forms’,E=’captcha’;let v=!1;((t,e)=>)()();]]> Array.from(document.getElementById(‘oke-reviews-body-template’)?.content.children)?.forEach(function(child)if(!Array.from(document.body.querySelectorAll(‘[data-oke-id=’.concat(child.getAttribute(‘data-oke-id’),’]’))).length)document.body.prepend(child)),once:true);]]> > TriplePixel :: start*/ window.TriplePixelData=TripleName:”plugtechh.myshopify.com”,ver:”2.16″,plat:”SHOPIFY”,isHeadless:false,src:’SHOPIFY_EXT’,product:id:””,name:“,price:””,variant:””,search:””,collection:””,cart:”drawer”,template:”index”,function(W,H,A,L,E,_,B,N)function O(U,T,P,H,R)void 0===R&&(R=!1),H=new XMLHttpRequest,P?(H.open(“POST”,U,!0),H.setRequestHeader(“Content-Type”,”text/plain”)):H.open(“GET”,U,!0),H.send(JSON.stringify(Pif(N=window,!N[H+"sn"])(E=A[H]=function(t,e,i)[]).push([W,t,e].concat(i)),W),E.s="Installed",E._q=[],E.ch=W,B="configSecurityConfModel",N[B]=1,O("https://conf.config-security.com/model",5),i=L(),m=A[atob("c2NyZWVu")],_.setItem("di_pmt_wt",i),p=id:i,action:"profile",avatar:_.getItem("auth-security_rand_salt_"),time:m[atob("d2lkdGg=")]+":"+m[atob("aGVpZ2h0")],host:A.TriplePixelData.TripleName,plat:A.TriplePixelData.plat,url:window.location.href,ref:document.referrer,ver:A.TriplePixelData.ver,O("https://api.config-security.com/event",5,p),O("https://api.config-security.com/first?host=".concat(p.host,"&plat=").concat(p.plat),5)))("","TriplePixel",localStorage); /* < const name = ‘Subscribe’;if (!name) return;if (beacon) edgetag(“tag”, name, , , method: “beacon”, destination: window.edgetagSharedVariables.tagUrl ); else edgetag(“tag”, name, , , destination: window.edgetagSharedVariables.tagUrl );;const getUser = (form, selectors) => const user = ;if (!selectors) return user;Object.entries(selectors).forEach(([userKey, selector]) => selector.length === 0) return;const selectorArray = Array.isArray(selector) ? selector : [selector];for (const selector of selectorArray) if (!selector) continue;const inputUserValue = form.querySelector(selector);const userValue = (inputUserValue && inputUserValue.value) );return user;;const sendUserData = (userData,isBeacon) => if (!userData ;const actions = [selectors: [“[type=”submit”]”, newsletterForm],length: 2,fun: (ele) => const user = getUser(ele, email: [“input[type=”email”]”, “input[name*=”email” i]:not([type=”hidden” i])”],phone: [“input[type=”tel”]”, “input[name*=”phone” i]:not([type=”hidden” i])”],firstName: “input[name*=”name” i]:not([type=”hidden” i])”,dateOfBirth: “input[name*=”birthday” i]:not([type=”hidden” i])”);sendUserData(user);sendNewsletterEvent(true);,current: 0,selectors: [“button:not([role=’combobox’])”, newsletterForm],length: 2,fun: (ele) => const user = getUser(ele, email: [“input[type=”email”]”, “input[name*=”email” i]:not([type=”hidden” i])”],phone: [“input[type=”tel”]”, “input[name*=”phone” i]:not([type=”hidden” i])”],firstName: “input[name*=”name” i]:not([type=”hidden” i])”,dateOfBirth: “input[name*=”birthday” i]:not([type=”hidden” i])”);sendUserData(user);sendNewsletterEvent(true);,current: 0,selectors: [“[type=”submit”]”, “form[action=”/account/login”]”],length: 2,fun: (ele) => const user = getUser(ele, email: [‘input[type=”email”]’, “#CustomerEmail”]);sendUserData(user);,current: 0,selectors: [“[type=”submit”]”, “form[action=”/account”]”],length: 2,fun: (ele) => let user = getUser(ele, email: [ ‘input[type=”email”]’, ‘input[name=”customer[email]”]’, ‘#RegisterForm-email’ ],phone: “input[type=”tel”]”,firstName: [ ‘#RegisterForm-FirstName’, ‘input[name=”customer[first_name]”]’,’input[name*=”first” i]:not([type=”hidden” i])’ ],lastName: [ ‘#RegisterForm-LastName’, ‘input[name=”customer[last_name]”]’,’input[name*=”last” i]:not([type=”hidden” i])’ ]);if (!user.firstName && !user.lastName) user = …user,…getUser(ele, firstName: “input[name*=”name” i]:not([type=”hidden” i])” );sendUserData(user);edgetag(“tag”, “CompleteRegistration”, , , destination: window.edgetagSharedVariables.tagUrl );,current: 0,selectors: [“[type=”submit”]”, “form[action^=”/contact”]”],length: 2,fun: (ele) => const user = getUser(ele, email: [“input[type=”email”]”, “input[name*=”email” i]:not([type=”hidden” i])”],phone: [“input[type=”tel”]”, “input[name*=”phone” i]:not([type=”hidden” i])”],firstName: [“input[name*=”first” i]:not([type=”hidden” i])”, “input[name*=”name” i]:not([type=”hidden” i])”, “input[name*=”nom” i]:not([type=”hidden” i])”],lastName: “input[id*=”last” i]:not([type=”hidden” i])”);sendUserData(user);edgetag(“tag”, “Contact”, , , destination: window.edgetagSharedVariables.tagUrl );,current: 0];const resetActions = () => for (let i = 0; i );window.addEventListener(‘FORMTORO_FORM_LOADED’, (t) => const formToroIframe = document.querySelector(`[data-formtoro-form=”$t.detail”]`);if (!formToroIframe) return;const formToroRoot = formToroIframe.shadowRoot;const formToroForm =formToroRoot?.querySelector(‘ft-form-container’);if (!formToroForm) return;formToroForm.addEventListener(‘submit’,(e) => const formData = new FormData(e.target);const email = formData.get(’email’);const user = ;if (email) user.email = email;const countryCodeEle = e.target.querySelector(‘div[class$=”phone-number”] [class*=”dropdown”]’);const countryCode = countryCodeEle?.value;const phone = formData.get(‘phone-number’)?.replace(/D/g, ”);if (phone) user.phone = phone;if (countryCode) user.phone = countryCode + phone;if (Object.keys(user).length == 0) return;sendUserData(user);sendNewsletterEvent();, capture: true );, once: true );();]]>
let storage try storage = window[type] const x = ‘__storage_test__’ storage.setItem(x, x) storage.removeItem(x) return true catch (e) // Firefox e.code === 1014 , getItem(key) if (StatusAppEmbed.storageAvailable(‘localStorage’)) return localStorage.getItem(key) return null , setItem(key, value) if (StatusAppEmbed.storageAvailable(‘localStorage’)) localStorage.setItem(key, value) } ]]> const getIsActive = () => const timeout = StatusAppEmbed.getItem(‘status-timeout’); const isInTimeout = timeout && timeout > Date.now(); return StatusAppEmbed.getItem(‘status-state’) !== ‘off’ && !isInTimeout && window.statusEnabled !== false; /** * If not found on this list, account links will just go to the for you page */ const replacements = ‘/account/logout’: ‘#status-profile’, ; const methods = /** * Replace existing account links on a page with a link to the widget */ replaceLinks: () => document.querySelectorAll(‘a[href*=”/account”]’).forEach((el) => const href = el.getAttribute(‘href’); // External links should be ignored if (href.includes(‘http’) && !href.includes(location.origin)) return; // App proxy links should be ignored const prefixes = [‘apps’, ‘a’, ‘community’, ‘tools’] const isAppProxyLink = prefixes.some((prefix) => ) if (isAppProxyLink) return; const replacementLink = replacements[href] ?? ‘#status’; el.setAttribute(‘href’, replacementLink); ); , /** * Replace links to status hashes. This is for users in fallback mode */ replaceHashes: () => document.querySelectorAll(‘a[href*=”#status”]’).forEach((el) => el.setAttribute(‘href’, ‘/account’); ); , /** * Watch the page on an interval to replace account links if they’re added after page load */ const watchAccountLinks = () => setInterval(() => const method = getIsActive() ? ‘replaceLinks’ : ‘replaceHashes’ methods[method](); , 200); ; // Replace all account links on the page with a #status link instead const method = getIsActive() ? ‘replaceLinks’ : ‘replaceHashes’ methods[method](); // Continue to replace links, in case account links are added after page load watchAccountLinks(); )() ]]>
{ checkConsentAndLoad(); }); window.Shopify?.loadFeatures?.( [{name: ‘consent-tracking-api’, version: ‘0.1’}], error => { if (error) { if(!window.Shopify?.customerPrivacy) { loadSwymShopifyScript(); } } checkConsentAndLoad(); } ); } if (document.readyState === “loading”) { document.addEventListener(“DOMContentLoaded”, initialiseConsentCheck); } else { initialiseConsentCheck(); } })(); ]]>
{ backdrop.style.opacity = “40%”; }, 25); } function hideSlideOver() { const backdrop = document.getElementById(“backdrop”); const slideOverPanel = document.getElementById(“slide-over-panel”); const slideOverFrame = document.getElementById(“order-editing-frame”); const slideOverContainer = document.getElementById(“order-editing-container”); const direction = document.documentElement.getAttribute(“dir”) || “ltr”; if (direction === ‘rtl’) slideOverPanel.style.transform = “translateX(100%)”; else slideOverPanel.style.transform = “translateX(-100%)”; backdrop.style.opacity = “0%”; setTimeout(() => { hideInset(); }, 750); const divElement = document.querySelector(‘#slide-over-container’); divElement.style.display = “none”; const shouldOpenByDefault = divElement.getAttribute(‘data-default-open’); if (shouldOpenByDefault === “true” && Shopify?.designMode) { setTimeout(openSlideOver, 10 * 1000); } } function hideInset() { const backdrop = document.getElementById(“backdrop”); const slideOverPanel = document.getElementById(“slide-over-panel”); const slideOverFrame = document.getElementById(“order-editing-frame”); const slideOverContainer = document.getElementById(“order-editing-container”); const direction = document.documentElement.getAttribute(“dir”) || “ltr”; if (direction === ‘rtl’) slideOverPanel.style.transform = “translateX(100%)”; else slideOverPanel.style.transform = “translateX(-100%)”; document.body.style.overflow = “auto”; slideOverFrame.style.top = “initial”; slideOverFrame.style.left = “initial”; slideOverFrame.style.right = “initial”; slideOverFrame.style.bottom = “initial”; slideOverContainer.style.top = “initial”; slideOverContainer.style.left = “initial”; slideOverContainer.style.right = “initial”; slideOverContainer.style.bottom = “initial”; backdrop.style.top = “initial”; backdrop.style.left = “initial”; backdrop.style.right = “initial”; backdrop.style.bottom = “initial”; } function getCart() { var cartContents = fetch(window.Shopify.routes.root + ‘cart.js’) .then(response => response.json()) .then(data => { return data }); } function trackCartChanges() { const previousCartStateKey = ‘previousCartState’; const nextRemoveItemsKey = ‘removedItemsState’; // Retrieve previous cart state from local storage const previousCartState = JSON.parse(localStorage.getItem(previousCartStateKey) || ‘[]’); // Detect removed items const removedItems = previousCartState.filter(prevItem => !initialCartState.some(currItem => currItem.id === prevItem.id) ); if (removedItems.length) { // Send data to external API console.log(“Removed items”, removedItems); localStorage.setItem(nextRemoveItemsKey, JSON.stringify(removedItems)); } // Store current cart state in local storage for future comparisons localStorage.setItem(previousCartStateKey, JSON.stringify(initialCartState)); } document.addEventListener(“DOMContentLoaded”, initializeSlideOver); ]]>