PageSourceSearch

https://playbashbrands.com/cdn/shopifycloud/checkout-web/assets/c1/b887ec56.Cj9CT5mu.js

js playbashbrands.com collected 2026-10-10 02:37:38 UTC 15,619 bytes, 1 lines download raw bytes

1import{y as e,dP as t,dQ as o,dR as r,dS as i,dT as a,e as n,bu as s,p as c,dU as u,aQ as d,dV as l,c6 as m,dW as h,dX as p,dY as f}from"./4b4bc88f.DkycdxSK.js";import{g as y,T as v,q as k}from"./2c1ab0fe.qpvfywqb.js";import{eN as b,w as C,k as g,eO as S,eP as A,eQ as I,eR as E}from"./164ad2e3.DcJn775M.js";import{u as T}from"./fe885b80.BxcRVx2R.js";import"./app.DH8n-1bp.js";import"./d0bb51ec.CWfbNPnY.js";import"./f67abd2c.CNaB0QaR.js";import"./e12db40c.DhbHW8sF.js";import"./9dba8418.4R19B40l.js";import"./60a453ce.DBFo6PRx.js";var D=(e=>(e.StartedOrder="Started Order",e.StartedOrderRemote="Started Order Remote",e.StartedOrderOncePerCheckout="Started Order Once Per Checkout",e.StartedOrderOncePerCheckoutRemote="Started Order Once Per Checkout Remote",e.CompletedOrder="Completed Order",e.AddedPayment="Added Payment",e.AddedPaymentRemote="Added Payment Remote",e.CheckoutContactPageStarted="Checkout Contact Step Started",e.CheckoutContactInfoSubmitted="Checkout Contact Info Submitted",e.CheckoutContactInfoSubmittedRemote="Checkout Contact Info Submitted Remote",e.CheckoutAddressInfoSubmitted="Checkout Address Info Submitted",e.CheckoutAddressInfoSubmittedRemote="Checkout Address Info Submitted Remote",e.CheckoutShippingPageStarted="Checkout Shipping Step Started",e.CheckoutShippingInfoSubmitted="Checkout Shipping Info Submitted",e.CheckoutShippingInfoSubmittedRemote="Checkout Shipping Info Submitted Remote",e.CheckoutPaymentPageStarted="Checkout Payment Step Started",e.CheckoutOnePageView="Checkout One Page View",e))(D||{});const P="checkout",R=[t,o,r,i,a];class _ extends Error{constructor(){super(...arguments),this.name="TrekkieError"}}class w{constructor({shop:t,checkoutToken:o="",locale:i,analyticsConfig:a,sourceUrl:n,themeId:s,themeCityHash:c,userEvents:u,s2s:d,monorailRegion:l,getCookie:m},h){if(this.libraryLoaded=!1,this.trekkieLoadedCallback=h,this.analyticsWindow=window,this.tricorder=this.analyticsWindow.ShopifyAnalytics?.lib||this.analyticsWindow.trekkie||[],this.tricorder?.integrations)return this.libraryLoaded=!0,void this.trekkieLoadedCallback(this.analyticsWindow?.ShopifyAnalytics?.lib?.trekkie);const p=parseInt(e(t.id),10),f=R.filter(e=>t.hasFlagEnabled(e)),y=f.includes(r);this.tricorder.ready(()=>{this.libraryLoaded||(this.libraryLoaded=!0,this.shopifyAnalytics={...this.shopifyAnalytics,lib:this.tricorder},this.trekkieLoadedCallback(this.tricorder?.trekkie))}),this.tricorder.load=e=>{if(this.tricorder.config=e,!y){const{assetPath:e,sriHash:o}=t.trekkieLoadConfiguration,r=e&&o,i=document.getElementsByTagName("script")[0],a=document.createElement("script");a.type="text/javascript",a.onerror=function(){const e=document.createElement("script");e.type="text/javascript",e.onerror=function(){const e={schemaId:"trekkie_checkout_load_errors/1.1",payload:{appName:P,shopId:p,themeId:s,contextUrl:window.location.href,sourceUrl:n}};u.monorailEvent(e)},e.async=!0,e.src=n,r&&(e.setAttribute("integrity",o),e.setAttribute("crossorigin","anonymous")),i?.parentNode?.insertBefore(e,i)},a.async=!0,a.src=n,r&&(a.setAttribute("integrity",o),a.setAttribute("crossorigin","anonymous")),i?.parentNode?.insertBefore(a,i)}};const v={appName:P,development:!1,defaultAttributes:{shopId:p,isMerchantRequest:!!m("_ab")||null,themeId:s,themeCityHash:c,contentLanguage:i,currency:t.currencyCode,checkoutToken:o},isServerSideCookieWritingEnabled:!0,enabledBetaFlags:f};l&&(v.monorailRegion=l),this.tricorder.load({Trekkie:v,...a,"Session Attribution":{},S2S:d})}get tricorder(){return this.analyticsWindow?.trekkie}set tricorder(e){if(!this.analyticsWindow)throw new _("AnalyticsWindow is not set.");this.analyticsWindow.trekkie=e}get shopifyAnalytics(){return this.analyticsWindow.ShopifyAnalytics}set shopifyAnalytics(e){if(!this.analyticsWindow)throw new _("AnalyticsWindow is not set.");this.analyticsWindow.ShopifyAnalytics=e}page(e="",t={},o){this.tricorder?.page(e,t,o)}track(e,t,o,r,i){this.tricorder?.track(e,t,o,r,i)}}function M({remoteTotalDetails:e,remoteMerchandiseLinesByShopId:t,emitRemoteEventForShop:o}
1){if(e)for(const[r,i]of e.perShopRemoteTotals.entries())o(t?{remoteTotals:i,remoteMerchandiseLines:t?.get(r)??[]}:{remoteTotals:i})}function N(e){switch(e){case"/":case"/information":return{title:"Checkout - Contact Information",page:"/checkout/contact_information"};case"/shipping":return{title:"Checkout - Shipping",page:"/checkout/shipping"};case"/payment":return{title:"Checkout - Payment",page:"/checkout/payment"};case"/review":return{title:"Checkout - Review",page:"/checkout/review"};case"/processing":return{title:"Checkout - Processing",page:"/checkout/processing"};case"/thank-you":return{title:"Checkout - Receipt",page:"/checkout/thank_you"};case"/stock-problems":return{title:"Checkout - Stock problems",page:"/checkout/stock_problems"};case"/error":return{title:"Checkout - Error",page:"/checkout/error"};case"/no-address-location":return{title:"Checkout - No Address Location",page:"/checkout/no_address_location"};case"/shoppay_login":return{title:"ShopPay - Login",page:"/shop.app/pay/login"};case"/shoppay":return{title:"ShopPay - Payment",page:"/shop.app/pay/payment"};default:return{title:null,page:null}}}function O(e){const t=e?.map(e=>{const t=e.lineAllocations.reduce((e,t)=>(t.allocations.filter(e=>"code"===e.discountDetails.discount.type).forEach(t=>{t.amount.amount>e.amount&&(e.amount=t.amount.amount,e.code=t.discountDetails.title)}),e),{code:void 0,amount:0});return{variantId:m(e.variantId),productId:m(e.productId),productGid:e.productId,category:e.productType,coupon:t.code,currency:e.itemPrice?.currencyCode,name:e.title,price:e.itemPrice?.amount,quantity:e.quantity,brand:e.vendor,variant:e.subtitle,sku:e.sku}});return t}function L(){const{client:e,observability:t,userEvents:o,environment:r,i18n:{locale:i},shop:a,source:P,checkout:{identity:R,negotiator:_}}=n(),L="shopPay"===R.current.value?"trekkie-checkout-one-shop-app":"trekkie-checkout-one",{data:W}=b(),j=W?.session?.activeCheckoutRolloutTreatments?.flatMap(({rolloutId:e,treatmentId:t})=>{const o=s(e),r=s(t);return void 0!==o&&void 0!==r?[{rolloutId:Number(o),treatmentId:Number(r)}]:[]}),F=c(j),x=P.checkoutSessionIdentifier||P.sourceId;let B=void 0===a.theme?.id||null===a.theme?.id?void 0:parseInt(a.theme.id,10);B&&B>Number.MAX_SAFE_INTEGER&&(B=void 0);const z=a.theme?.cityhash,{email:H,phone:U,shippingAddress:V}=_.parts,q=C(),{value:G}=_.current.fields.deliveryNext,Q=e.unstable_getSerialization("apiClientId"),X=e.unstable_getSerialization("apiClientId"),{currentPage:$}=g().value,Y=$&&["onePage"].includes($.id),J=S(),K=A(),Z=y(new WeakSet).current,{value:ee}=u(),te=ee,oe=T(),re=v(()=>({}),[]),ie=d(),ae=k(e=>{e?ie.value?.defaultAttributes!==e?.defaultAttributes&&ie.setValue({defaultAttributes:e?.defaultAttributes}):t.error(new l("Trekkie is not available"))},[t,ie]),ne=v(()=>{const t=null===z?void 0:z,n=_.current.fields.buyerIdentity.peek(),s={facebookCapiEnabled:a.facebookCapiEnabled,source:L,customerId:m(n?.customerProfile?.id),cartApiClientId:Q,apiClientId:X},c=`${r.services.trekkie.url}/${a.trekkieLoadConfiguration?.assetPath||"s/trekkie.storefront.min.js"}`;return J?null:new w({shop:a,checkoutToken:x,locale:i,analyticsConfig:re,sourceUrl:c,themeId:B,themeCityHash:t,userEvents:o,monorailRegion:"shop_domain",s2s:s,getCookie:t=>e.cookies.get(t)??null},ae)},[a,x,i,re,B,z,o,e.cookies,ae,_,Q,X,L,J,r.services.trekkie.url]),se=k(e=>{const{title:t,page:o}=N(e);t&&o&&oe.value&&ne?.page(t,{path:o})},[ne,oe]),ce=k(e=>{const{title:t,page:o}=N(e);if(!t||!o||!oe.value)return;const r={name:t,path:o};ne?.track(D.CheckoutOnePageView,r,void 0,void 0,{shopifyEmitted:!0})},[ne,oe]),ue=v(()=>{let e={amount:void 0,currencyCode:void 0};return q.value&&"filled"===G?.status&&G.lines.forEach(t=>{if("available"===t.status){const o=t.selectedDeliveryMethodHandle;if(o){const r=t.methods.filter(e=>e.handle===o&&void 0!==e.costAfterDiscounts);e=r.reduce((e,t)=>{const o=void 0===e.amount?0:e.amount;return e.amount=o+t.costAfterDiscounts.amount,e.currencyCode=t.costAfterDiscounts.currencyCode,e},e)}}}),e},[G,q.value]),de=k(()=>{const e=_.current.fields.merchandiseLines.value,t=_.current.fields.remoteMerchandiseDetails.value;if(oe.value){const o=_.current.fields.subtotal.value,r=_.current.fields.subtotalAfterMerchandiseDiscounts.value,i={step:1,products:O(h(e?.lines??[],t)),currency:o?.currencyCode,revenue:o?.amount,subtotalAfterMerchandiseDiscounts:r?.amount,...F.current?.length?{rolloutIds:F.current.map(e=>Number(e.rolloutId)),rolloutTreatmentIds:F.current.map(e=>Number(e.treatmentId))}:{}};ne?.track(D.StartedOrder,i,void 0,void 0,{shopifyEmitted:!0})}te&&M({remoteTotalDetails:_.current.fields.remoteTotalDetails.value,remoteMerchandiseLinesByShopId:p(e?.lines??[],t),emitRemoteEventForShop:({remoteTotals:e,remoteMerchandiseLines:t})=>{const o={step:1,products:t?O(t):[],currency:e?.subtotal?.currencyCode,revenue:e?.runningTotal?.amount,subtotalAfterMerchandiseDiscounts:e?.subtotal?.amount};ne?.track(D.StartedOrderRemote,o,void 0,void 0,{shopifyEmitted:!0})}})},[ne,_,te,oe,F]),le=k(()=>{const e=_.current.fields.subtotal.value,t=_.current.fields.subtotalAfterMerchandiseDiscounts.value,o=_.current.fields.remoteTotalDetails.value,r=_.current.fields.merchandiseLines.value,i=_.current.fields.remoteMerchandiseDetails.value,a=h(r?.lines??[],i),n=p(r?.lines??[],i);if(oe.value){const o={step:1,products:O(a),currency:e?.currencyCode,revenue:e?.amount,subtotalAfterMerchandiseDiscounts:t?.amount,...F.current?.length?{rolloutIds:F.current.map(e=>Number(e.rolloutId)),rolloutTreatmentIds:F.current.map(e=>Number(e.treatmentId))}:{}};ne?.track(D.StartedOrderOncePerCheckout,o,void 0,void 0,{shopifyEmitted:!0})}te&&M({remoteTotalDetails:o,remoteMerchandiseLinesByShopId:n,emitRemoteEventForShop:({remoteTotals:e,remoteMerchandiseLines:t})=>{const o={step:1,products:t?O(t):[],currency:e?.subtotal?.currencyCode,revenue:e?.runningTotal?.amount,subtotalAfterMerchandiseDiscounts:e?.subtotal?.amount};ne?.track(D.StartedOrderOncePerCheckoutRemote,o,void 0,void 0,{shopifyEmitted:!0})}})},[ne,_,te,oe,F]),me=k(()=>{const e=q.value;if(!e)return;if(K.shouldPrevent())return;if(!oe.value)return;const t=_.current.fields.merchandiseLines.value,o=t?.lines&&O(t?.lines),r=e.purchaseOrder,i=m(e.orderIdentity.id),a=i?.toString(),n=r.billingAddress,s=_.current.fields.buyerIdentity.value,c=s?.customerProfile;let u=c?.firstName,d=c?.lastName;
1d||(u=n?.firstName,d=n?.lastName);const l=_.current.fields.total.value,h=_.current.fields.subtotal.value,p=_.current.fields.subtotalAfterMerchandiseDiscounts.value,f=I(_),y=_.current.fields.contactInfo.value,v=_.current.fields.discountLines.value,k=v?.lines.filter(e=>"code"===e.discount.type).map(e=>e.discount.title)||[],b=e.analytics?.checkoutCompletedEventId||void 0,C=e.analytics?.emitConversionEvent||!1;ne?.track(D.CompletedOrder,{customerEventData:{customer:{firstName:u,lastName:d,emailAddress:c?.email??y?.email,phoneNumber:c?.phone??y?.phone},address:{city:n?.city,province:n?.zoneCode,country:n?.countryCode,zip:n?.postalCode}},orderId:i,orderName:a,products:o,total:l?.amount??0,currency:l?.currencyCode,revenue:h?.amount??0,subtotalAfterMerchandiseDiscounts:p?.amount??0,coupon:k[0],tax:f?.amount??0,shipping:ue.amount??0},b,C,{shopifyEmitted:!0}),K.markAsEmitted()},[q,_,ne,ue.amount,K,oe]),he=k(()=>{const e=_.current.fields.runningTotal.value,t=_.current.fields.subtotalAfterMerchandiseDiscounts.value,o=_.current.fields.remoteTotalDetails.value;if(oe.value){const o={currency:e?.currencyCode,total:e?.amount,subtotalAfterMerchandiseDiscounts:t?.amount};ne?.track(D.AddedPayment,o,void 0,void 0,{shopifyEmitted:!0})}te&&M({remoteTotalDetails:o,emitRemoteEventForShop:({remoteTotals:e})=>{const t={currency:e?.runningTotal?.currencyCode,total:e?.runningTotal?.amount,subtotalAfterMerchandiseDiscounts:e?.subtotal?.amount};ne?.track(D.AddedPaymentRemote,t,void 0,void 0,{shopifyEmitted:!0})}})},[ne,_,te,oe]),pe=k(()=>{if(oe.value){const{title:e,page:t}=N("/information"),o={name:e,path:t};ne?.track(D.CheckoutContactPageStarted,o,void 0,void 0,{shopifyEmitted:!0})}},[ne,oe]),fe=k(()=>{const e=H.value,t=U.value,o=_.current.fields.subtotalAfterMerchandiseDiscounts.value,r=_.current.fields.remoteTotalDetails.value;if(oe.value){const r={email:e,phone:t,subtotalAfterMerchandiseDiscounts:o?.amount};ne?.track(D.CheckoutContactInfoSubmitted,r,void 0,void 0,{shopifyEmitted:!0})}te&&M({remoteTotalDetails:r,emitRemoteEventForShop:({remoteTotals:o})=>{const r={email:e,phone:t,subtotalAfterMerchandiseDiscounts:o?.subtotal?.amount};ne?.track(D.CheckoutContactInfoSubmittedRemote,r,void 0,void 0,{shopifyEmitted:!0})}})},[ne,H,U,_,te,oe]),ye=k(()=>{const e=V.value,t=_.current.fields.subtotalAfterMerchandiseDiscounts.value,o=_.current.fields.remoteTotalDetails.value;if(oe.value){const o={city:e?.city,country:e?.countryCode,phone:e?.phone,province:e?.zoneCode,postalCode:e?.postalCode,firstName:e?.firstName,lastName:e?.lastName,address1:e?.address1,address2:e?.address2,subtotalAfterMerchandiseDiscounts:t?.amount};ne?.track(D.CheckoutAddressInfoSubmitted,o,void 0,void 0,{shopifyEmitted:!0})}te&&M({remoteTotalDetails:o,emitRemoteEventForShop:({remoteTotals:t})=>{const o={city:e?.city,country:e?.countryCode,phone:e?.phone,province:e?.zoneCode,postalCode:e?.postalCode,firstName:e?.firstName,lastName:e?.lastName,address1:e?.address1,address2:e?.address2,subtotalAfterMerchandiseDiscounts:t?.subtotal?.amount};ne?.track(D.CheckoutAddressInfoSubmittedRemote,o,void 0,void 0,{shopifyEmitted:!0})}})},[ne,V,_,te,oe]),ve=k(()=>
1{if(!oe.value)return;const{title:e,page:t}=N("/shipping"),o={name:e,path:t};ne?.track(D.CheckoutShippingPageStarted,o,void 0,void 0,{shopifyEmitted:!0})},[ne,oe]),ke=k(()=>{const e=_.current.fields.runningTotal.value,t=_.current.fields.subtotalAfterMerchandiseDiscounts.value,o=_.current.fields.remoteTotalDetails.value;if(oe.value){const o={total:e?.amount,currency:e?.currencyCode,subtotalAfterMerchandiseDiscounts:t?.amount};ne?.track(D.CheckoutShippingInfoSubmitted,o,void 0,void 0,{shopifyEmitted:!0})}te&&M({remoteTotalDetails:o,emitRemoteEventForShop:({remoteTotals:e})=>{const t={total:e?.runningTotal?.amount,currency:e?.runningTotal?.currencyCode,subtotalAfterMerchandiseDiscounts:e?.subtotal?.amount};ne?.track(D.CheckoutShippingInfoSubmittedRemote,t,void 0,void 0,{shopifyEmitted:!0})}})},[ne,_,te,oe]),be=k(()=>{if(!oe.value)return;const{title:e,page:t}=N("/payment"),o={name:e,path:t};ne?.track(D.CheckoutPaymentPageStarted,o,void 0,void 0,{shopifyEmitted:!0})},[ne,oe]);E(k(e=>{ie.value.defaultAttributes&&"page_view"===e.type&&se(e.url)},[ie,se])),E(k(e=>{ie.value.defaultAttributes&&"initiate_checkout"===e.type&&de()},[ie,de])),E(k(e=>{ie.value.defaultAttributes&&"initiate_checkout_once_per_checkout"===e.type&&le()},[ie,le])),E(k(e=>{ie.value.defaultAttributes&&"complete_checkout"===e.type&&me()},[ie,me])),E(k(e=>{ie.value.defaultAttributes&&"add_payment_info"===e.type&&he()},[ie,he]));const Ce=y(!1),ge=y(void 0),Se=f(fe,500),Ae=f(ye,500);return E(k(e=>{ie.value.defaultAttributes&&!Z.has(e)&&(Z.add(e),"one_page_checkout_page_view"===e.type&&(ce(e.url),"/"===e.url&&void 0===ge.current&&(pe(),Ce.current=!0)),"section_interaction"===e.type&&Y&&("contact"===e.section?(Ce.current&&void 0===ge.current||pe(),Ce.current=!1):"payment"===e.section&&(ke(),be()),ge.current=e.section),"section_complete"===e.type&&("contact"===e.section?Se():"deliveryAddress"===e.section&&Ae()),"shipping_methods_filled"===e.type&&Y&&ve(),"page_submit"!==e.type||"shipping"!==e.page||Y||ke())},[ie.value.defaultAttributes,Y,pe,Z,ce,ke,be,Se,Ae,ve])),null}export{L as default};

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.