PageSourceSearch

https://swingcatalyst.com/_next/static/chunks/4361-a6990a42ed7573e0.js

js swingcatalyst.com collected 2026-10-02 05:31:18 UTC 18,213 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4361],{7295:(e,t,r)=>{r.d(t,{Hc:()=>a,Yo:()=>l});var n=r(59926),i=r(38452);let o=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!t)return null;let n=e.find(e=>e.content.properties.variantSKU===t);return r?n:null==n?void 0:n.content},a=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;return c(await n.G5.get("/item/".concat(e,"?expand=properties[variants,recommendedItems[properties[productItemInfo[properties[variants[properties[$all]]]]]],showVatCustomerRestriction,features,techSpecs,productCollection,resources,mainProduct[properties[productReference[properties[$all,variants]]]],subProducts[properties[productReference[properties[$all,variants]]]]]"),t?{Preview:!0}:{},r,t?void 0:["products","product-".concat(e)]))},l=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"properties[$all]";return await n.G5.get("/?filter=productType:".concat(e,"&expand=").concat(t),void 0,3600,["products","product-list"])},c=e=>{var t,r,n,a,l,c,u,s,d,p,_,m,A,I,v,E,N,C,U,R,f,P,T;if(!e)return null;let h=(null==(r=e.properties.variants)||null==(t=r.items)?void 0:t.length)>0,S={...e,properties:{...e.properties,isAllowedPurchase:!h&&!!((null!=(U=e.properties.stock)?U:0)>0||null!=(R=e.properties.allowOutOfStock)&&R&&(null!=(f=e.properties.outOfStockMaxLimit)?f:0)>0),recommendedProducts:{recommendedTitle:e.properties.recommendedTitle,recommendedItems:null==(a=e.properties.recommendedItems)||null==(n=a.items)?void 0:n.filter(e=>{var t,r;return null==(r=e.content)||null==(t=r.properties)?void 0:t.productItemInfo}).map(e=>{var t,r,n,a,l,c,u,s,d,p,_,m,A,I,v,E,N,C,U,R;let f=e.content.properties.productItemInfo,P=o(null==(r=f.properties)||null==(t=r.variants)?void 0:t.items,e.content.properties.productItemVariantInternalName,!0);return{id:f.id,variantId:null==P||null==(n=P.content)?void 0:n.id,productName:e.content.properties.productItemName,imageUrl:null!=(C=null==(a=f.properties)?void 0:a.cartImageUrl)?C:i.default,originalPrice:null!=(U=null==P||null==(c=P.content)||null==(l=c.properties)?void 0:l.originalPrice)?U:null==(u=f.properties)?void 0:u.originalPrice,price:null!=(R=null==P||null==(_=P.content)||null==(p=_.properties)||null==(d=p.price)||null==(s=d.formatted)?void 0:s.withoutTax)?R:null==(I=f.properties)||null==(A=I.price)||null==(m=A.formatted)?void 0:m.withoutTax,properties:f.properties,showInCart:!0,isChecked:!0,description:null==(v=f.properties)?void 0:v.longDescription,location:null==P||null==(N=P.attributes)||null==(E=N.location)?void 0:E.toLocaleUpperCase()}})}}};if(!e.properties.mainProduct)return S;let{mainProduct:y,subProducts:w}=e.properties,M=null!=(P=null==w||null==(l=w.items)?void 0:l.filter(e=>{var t,r;return null==(r=e.content)||null==(t=r.properties)?void 0:t.productReference}).map(e=>{var t,r,n,i,a,l,c,u,s,d;let p=e.content.properties.productReference,_=o(null==(r=p.properties)||null==(t=r.variants)?void 0:t.items,e.content.properties.productVariantReference),m=null==(a=p.properties)||null==(i=a.variants)||null==(n=i.attributes)?void 0:n.some(e=>"Subscription"===e.name);return{productReference:p.id,productVariantReference:null==_?void 0:_.id,content:p,productName:e.content.properties.productName,productPrice:null!=(d=null==_||null==(l=_.properties.price)?void 0:l.formatted.withoutTax)?d:null==(u=p.properties)||null==(c=u.price)?void 0:c.formatted.withoutTax,isSubscription:m,subscriptionFrequency:m?null==_||null==(s=_.properties.description)?void 0:s.split(" ")[0]:void 0}}))?P:[],L=null==(d=y.items)||null==(s=d[0])||null==(u=s.content)||null==(c=u.properties)?void 0:c.productReference;if(!L)return S.properties.mainProduct=void 0,S.properties.subProducts=M,S;let g=o(null==(_=L.properties)||null==(p=_.variants)?void 0:p.items,y.items[0].content.properties.productVariantReference),b=null==(I=L.properties)||null==(A=I.variants)||null==(m
1=A.attributes)?void 0:m.some(e=>"Subscription"===e.name);return S.properties.mainProduct={productReference:L.id,productVariantReference:null==g?void 0:g.id,content:L,productName:y.items[0].content.properties.productName,productPrice:null!=(T=null==g||null==(v=g.properties.price)?void 0:v.formatted.withoutTax)?T:null==(N=L.properties)||null==(E=N.price)?void 0:E.formatted.withoutTax,isSubscription:b,subscriptionFrequency:b?null==g||null==(C=g.properties.description)?void 0:C.split(" ")[0]:void 0},S.properties.subProducts=M,S}},18622:(e,t,r)=>{r.d(t,{CD:()=>N,K9:()=>T,RA:()=>f,Zf:()=>R,jx:()=>C});var n,i,o,a=r(95125),l=r(83924);let c={"Api-Key":l.A.UMBRACO_CONTENT_API_KEY,"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=60",Store:"initialForce"},u={"Api-Key":l.A.UMBRACO_COMMERCE_API_KEY,"Content-type":"application/json; charset=UTF-8","Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0",Store:"initialForce"},s={"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=60"},d={"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=60"},p="".concat(l.A.API_MANAGEMENT_URL).concat(null!=(n=l.A.API_MANAGEMENT_URL_CMS_SUFFIX)?n:"/cms/delivery/content"),_="".concat(l.A.API_MANAGEMENT_URL,"/licenses"),m="".concat(l.A.API_MANAGEMENT_URL).concat(null!=(i=l.A.API_MANAGEMENT_URL_COMMERCE_SUFFIX)?i:"/cms/commerce"),A="".concat(l.A.NEXT_PUBLIC_ONLINE_API_URL,"/api/v1"),I="".concat(l.A.SUBSCRIPTION_API_URL,"/licenses/subscriptions"),v="".concat(l.A.SUBSCRIPTION_API_URL,"/licenses/payments"),E="".concat(l.A.LICENSING_API_URL,"/api"),N=a.A.create({baseURL:A,headers:{"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=60"},timeout:3e4}),C=a.A.create({baseURL:_,headers:d,timeout:3e4}),U=a.A.create({baseURL:I,headers:s,timeout:3e4}),R=a.A.create({baseURL:v,headers:s,timeout:3e4}),f=a.A.create({baseURL:E,headers:d,timeout:3e4}),P=a.A.create({baseURL:p,headers:c,timeout:3e4}),T=a.A.create({baseURL:m,headers:u,timeout:3e4}),h="".concat(l.A.API_MANAGEMENT_URL).concat(null!=(o=l.A.API_MANAGEMENT_URL_CMS_BASE_SUFFIX)?o:"/cms"),S=a.A.create({baseURL:h,timeout:3e4,headers:{"Content-type":"application/json; charset=UTF-8",...l.A.APIM_SUBSCRIPTION_KEY?{"Ocp-Apim-Subscription-Key":l.A.APIM_SUBSCRIPTION_KEY}:{}}}),y=e=>{e.interceptors.request.use(e=>e,e=>Promise.reject(e)),e.interceptors.response.use(e=>e,e=>(e.response?(console.error("Server Error Request:",e.request),console.error("Server Error Response:",e.response)):e.request?console.error("Network Error:",e):console.error("Error:",e.message),Promise.reject(e)))};y(P),y(T),y(N),y(U),y(f),y(R),y(S),y(C)},38452:(e,t,r)=>{r.r(t),r.d(t,{default:()=>n});let n={src:"/_next/static/media/product-image.8af93ad6.svg",height:89,width:235,blurWidth:0,blurHeight:0}},42218:(e,t,r)=>{r.d(t,{Bj:()=>a,Kn:()=>s,Lc:()=>p,fS:()=>o,iY:()=>u,jB:()=>d,qY:()=>l});var n=r(18622),i=r(7295);let o=async e=>(await n.K9.post("/orders",{currency:e})).data,a=async(e,t,r,i,o,a)=>{var l,u,s,d,p;let _={productReference:null!=(l=null==o?void 0:o.mainProduct.productReference)?l:t,productVariantReference:null!=(u=null==o?void 0:o.mainProduct.productVariantReference)?u:i,quantity:null!=(s=null==o?void 0:o.mainProduct.productQuantity)?s:r,properties:a};o&&(_.bundleId=o.bundleId);let m=await n.K9.post("/order/".concat(e),_);if(null==o?void 0:o.subProducts)for(let t of o.subProducts)m=await n.K9.post("/order/".concat(e,"/bundle/").concat(_.bundleId),{productReference:t.productReference,productVariantReference:t.productVariantReference,quantity:null!=(d=t.productQuantity)?d:1,...t.isSubscription?{properties:{isRecurring:"True",stripeRecurringInterval:null!=(p=t.subscriptionFrequency)?p:"year",stripeRecurringIntervalCount:"1"}}:{}});return await c(m.data)},l=async(e,t)=>{let r=await n.K9.delete("/order/".concat(e,"/item/").concat(t));return await c(r.data)},c=async e=>{let t=[...new Set(e.orderLines.map(e=>e.bundleId).filter(Boolean))],r=await Promise.all(t.map(e=>(0,i.Hc)(e,!1,0))),n=new Map(t.map((e,t)=>[e,r[t]]));for(let t=0;t<e.orderLines.length;t++)if(e.orderLines[t].bundleId){var o,a,l,c,u,s,d,p,_,m,A;let r=n.get(e.orderLines[t].bundleId),i=null==(o=e.orderLines[t].properties)?void 0:o.bundlePrice,I=i?parseFloat(i):null==r||null==(a=r.properties.price)?void 0:a.withoutTax;e.orderLines[t].bundleInfo={bundleId:e.orderLines[t].bundleId,bundleName:null!=(c=null==r?void 0:r.properties.productTitle)?c:"",bundlePath:null!=(s=null!=(u=null==r?void 0:r.properties.uRLName)?u:null==r||null==(l=r.route)?void 0:l.path)?s:"",bundleImageUrl:null==r?void 0:r.properties.cartImageUrl,bundlePrice:I,mainProduct:{productReference:null!=(d=null==r?void 0:r.properties.mainProduct.productReference)?d:"",productVariantReference:null==r?void 0:r.properties.mainProduct.productVariantReference,productName:null!=(p=null==r?void 0:r.properties.mainProduct.productName)?p:"",productQuantity:null!=(_=null==r?void 0:r.properties.mainProduct.quantity)?_:1,productPrice:null!=(m=null==r?void 0:r.properties.mainProduct.productPrice)?m:"0"},subProducts:(null!=(A=null==r?void 0:r.properties.subProducts)?A:[]).map(e=>{var t,r,n,i;return{productReference:null!=(t=e.productReference)?t:"",productVariantReference:e.productVariantReference,productName:null!=(r=e.productName)?r:"",productQuantity:null!=(n=e.productQuantity)?n:1,productPrice:null!=(i=e.productPrice)?i:"0"}})}}return e},u=async(e,t)=>{let r=await n.K9.patch("/order/".concat(e),{...t});return await c(r.data)},s=async(e,t,r)=>{let i=await n.K9.patch("/order/".concat(e,"/items"),t.map(e=>({id:e.id,quantity:e.quantity,properties:r})));return await c(i.data)},d=async e=>{try{let t=await n.K9.get("/order/".concat(e,"?").concat("expand=$All"));if(!t.data)return null;return await c(t.data)}catch(e){if(e.response&&404===e.response.status)return null;throw e}},p=async(e,t)=>{let r={currency:e,language:"en-US"};return t&&(t.email||t.firstName||t.lastName)&&(r.customer={},t.email&&(r.customer.email=t.email),t.firstName&&(r.customer.firstName=t.firstName),t.lastName&&(r.customer.lastName=t.lastName)),(await n.K9.post("/orders",r)).data}},59109:(e,t,r)=>{r.d(t,{Ai:()=>p,B5:()=>l,JP:()=>u,_V:()=>_,a5:()=>s,iF:()=>a,uQ:()=>A});var n=r(42218),i=r(72378);let o="cartId",a=async()=>{let e=i.A.get(o);if(e&&"undefined"!==e)return await (0,n.jB)(e)},l=async e=>{let{id:t,quantity:r,variantId:i,productBundle:{bundleId:o}={bundleId:void 0},properties:a}=e,{licenseIdentifier:l}=a||{},u=await m();try{var s;let d=null==(s=u.orderLines)?void 0:s.find(e=>{let{productReference:r,bundleId:n}=e,i=l&&r==t;return o&&n===o||i});if(d){let t=d.quantity+r,i=c(d,{...e.properties});return await (0,n.Kn)(u.id,[{id:d.id,quantity:t}],i)}return await (0,n.Bj)(u.id,t,r,i,e.productBundle,a)}catch(e){throw Error("Error adding item",{cause:e})}},c=(e,t)=>{if(!t.licenseIdentifier)return;let{properties:r,properties:{licenseIdentifier:n={licenseIdentifier:void 0}}}=e;return{...r,...t,licenseIdentifier:n?(n+"|"+(t.licenseIdentifier||"")).replace(/\|+$/,""):n}},u=async(e,t)=>{try{return await (0,n.iY)(e,t)}catch(e){return Error("Error adding item",{cause:e})}},s=async e=>{let t=await m();try{return await (0,n.iY)(t.id,e)}catch(e){return Error("Error adding item",{cause:e})}};async function d(){return(0,n.fS)("USD")}let p=async e=>{let t=await m();try{return await (0,n.qY)(t.id,e)}catch(e){return Error("Error removing item",{cause:e})}},_=async(e,t,r)=>{let i=await m();try{return await (0,n.Kn)(i.id,[{id:e,quantity:t}],r)}catch(e){return Error("Error updating item",{cause:e})}},m=async()=>{let e=await a();
1return e||(e=await d(),await A(e)),e},A=async e=>{let t=i.A.get(o);return e&&e.id!==t&&void 0!==e.id?i.A.set(o,e.id,{expires:2}):!e&&t&&i.A.remove(o),e}},59926:(e,t,r)=>{r.d(t,{G5:()=>h});var n,i,o,a,l=r(64593),c=r.n(l),u=r(83924);let s=new Map,d=c()(5),p={"Api-Key":u.A.UMBRACO_CONTENT_API_KEY,"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=6000",Store:"initialForce"},_={"Api-Key":u.A.UMBRACO_COMMERCE_API_KEY,"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=6000",Store:"initialForce"},m={"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=6000"},A={"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=6000"},I=null!=(i=null==(n=u.A.API_MANAGEMENT_URL)?void 0:n.replace(/\/+$/,""))?i:"",v="".concat(I).concat(null!=(o=u.A.API_MANAGEMENT_URL_CMS_SUFFIX)?o:"/cms/delivery/content"),E="".concat(I).concat(null!=(a=u.A.API_MANAGEMENT_URL_COMMERCE_SUFFIX)?a:"/cms/commerce"),N="".concat(u.A.NEXT_PUBLIC_ONLINE_API_URL,"/api/v1"),C="".concat(u.A.SUBSCRIPTION_API_URL,"/licenses/subscriptions"),U="".concat(u.A.SUBSCRIPTION_API_URL,"/licenses/payments"),R="".concat(u.A.LICENSING_API_URL,"/api");async function f(e){if(204===e.status)return{};let t=e.headers.get("content-type")||"";if(t.includes("application/json"))return await e.json();if(t.includes("text/")||t.includes("application/text"))return await e.text();try{return await e.json()}catch(t){return await e.text()}}async function P(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,i="".concat(e).concat(t),o=function(e){let t={};return s.set(t,{url:e,startedAt:performance.now()}),t}(i);try{let e=AbortSignal.timeout(12e4),t=await d(()=>{let t=s.get(o);return t&&(t.dispatchedAt=performance.now()),fetch(i,{...r,signal:AbortSignal.any([e,AbortSignal.timeout(3e4)])})});if(!t.ok){if(404===t.status)return null;try{let e=await f(t);console.error("Server Error Response:",t.status,e)}catch(e){}throw Error("HTTP error! status: ".concat(t.status))}let a=await f(t);if(n&&!n(a))throw console.error("Data validation failed:",a),Error("Invalid data received from API");return a}catch(e){throw console.error("Fetch Error:",e),e}finally{s.delete(o)}}function T(e,t){return{get:async function(r,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,o=arguments.length>3?arguments[3]:void 0,a=n&&n.Preview||0===i;return await P(e,r,{method:"GET",headers:{...t,...n},cache:a?"no-store":void 0,next:a?void 0:{revalidate:i,...o&&o.length>0?{tags:o}:{}}})},getWithValidation:async function(r,n,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60,a=arguments.length>4?arguments[4]:void 0,l=i&&i.Preview||0===o;return await P(e,r,{method:"GET",headers:{...t,...i},cache:l?"no-store":void 0,next:l?void 0:{revalidate:o,...a&&a.length>0?{tags:a}:{}}},n)},post:async(r,n)=>await P(e,r,{method:"POST",headers:t,body:JSON.stringify(n)}),patch:async(r,n)=>await P(e,r,{method:"PATCH",headers:t,body:JSON.stringify(n)}),delete:async r=>await P(e,r,{method:"DELETE",headers:t})}}let h=T(v,p);T(E,_),T(N,{"Content-type":"application/json; charset=UTF-8","Cache-Control":"public, max-age=6000"}),T(C,m),T(U,m),T(R,A),T("".concat(I,"/licenses"),A)},61289:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(96199);let i=()=>{var e,t,r,i,o;let{data:a,status:l}=(0,n.wV)();return{user:null==a?void 0:a.user,email:null==a||null==(e=a.user)?void 0:e.email,firstName:(null==a||null==(r=a.user)||null==(t=r.name)?void 0:t.split(" ")[0])||"",lastName:(null==a||null==(o=a.user)||null==(i=o.name)?void 0:i.split(" ").slice(1).join(" "))||"",isAuthenticated:"authenticated"===l,isLoading:"loading"===l}}},83924:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(87358);let i={UMBRACO_CONTENT_API_KEY:n.env.UMBRACO_CONTENT_API_KEY,UMBRACO_KEEP_CARTS_FOR_DAYS:n.env.UMBRACO_KEEP_CARTS_FOR_DAYS,UMBRACO_RUNTIME_MODE:n.env.UMBRACO_RUNTIME_MODE,UMBRACO_COMMERCE_API_KEY:"OhUI1TBOJRxuX7opNkV045SfujQBPd0whMV4zuTS5X9z8wv774z6Do5IFUkgwG6o",API_MANAGEMENT_URL:"https://api.swingcatalyst.com/",API_MANAGEMENT_URL_CMS_SUFFIX:n.env.NEXT_PUBLIC_API_MANAGEMENT_URL_CMS_SUFFIX,API_MANAGEMENT_URL_COMMERCE_SUFFIX:n.env.NEXT_PUBLIC_API_MANAGEMENT_URL_COMMERCE_SUFFIX,API_MANAGEMENT_URL_CMS_BASE_SUFFIX:n.env.NEXT_PUBLIC_API_MANAGEMENT_URL_CMS_BASE_SUFFIX,NEXT_PUBLIC_ONLINE_API_URL:"https://online.swingcatalyst.com/",SUBSCRIPTION_API_URL:"https://api.swingcatalyst.com/",LICENSING_API_URL:n.env.LICENSING_API_URL,AUTH_SECRET:n.env.AUTH_SECRET,AUTH_AUTH0_ID:n.env.AUTH_AUTH0_ID,AUTH_AUTH0_SECRET:n.env.AUTH_AUTH0_SECRET,AUTH_AUTH0_ISSUER:n.env.AUTH_AUTH0_ISSUER,APPINSIGHTS_INSTRUMENTATIONKEY:n.env.NEXT_PUBLIC_APPLICATIONINSIGHTS_INSTRUMENTATION_KEY,APPLICATIONINSIGHTS_CONNECTION_STRING:n.env.
1NEXT_PUBLIC_APPLICATIONINSIGHTS_CONNECTION_STRING,UMBRACO_STORAGE_CDN_URL:n.env.NEXT_PUBLIC_UMBRACO_STORAGE_CDN_URL,APIM_SUBSCRIPTION_KEY:n.env.NEXT_PUBLIC_APIM_SUBSCRIPTION_KEY}},94361:(e,t,r)=>{r.d(t,{CartProvider:()=>u,_:()=>s});var n=r(95155),i=r(12115),o=r(59109),a=r(42218),l=r(61289);let c=(0,i.createContext)(void 0),u=e=>{let{children:t}=e,[r,u]=(0,i.useState)(),[s,d]=(0,i.useState)(),[p,_]=(0,i.useState)(!1),[m,A]=(0,i.useState)(!1),{email:I,firstName:v,lastName:E,isAuthenticated:N,isLoading:C}=(0,l.A)(),U=(0,i.useCallback)(()=>{A(!0)},[]),R=(0,i.useCallback)(()=>{A(!1)},[]);return(0,i.useEffect)(()=>{C||(async()=>{try{let e=await (0,o.iF)();if(e)u(e);else{let e=I||v||E?{email:I||void 0,firstName:v||void 0,lastName:E||void 0}:void 0,t=await (0,a.Lc)("USD",e);u(t),await (0,o.uQ)(t)}}catch(r){console.error("Error loading cart:",r);let e=I||v||E?{email:I||void 0,firstName:v||void 0,lastName:E||void 0}:void 0,t=await (0,a.Lc)("USD",e);u(t),await (0,o.uQ)(t)}finally{_(!0)}})()},[C,I,v,E]),(0,i.useEffect)(()=>{var e;N&&(I||v||E)&&r&&!(null==(e=r.customerInfo)?void 0:e.email)&&p&&(async()=>{try{let e={};I&&(e.email=I),v&&(e.firstName=v),E&&(e.lastName=E);let t=await (0,a.iY)(r.id,{customer:e});u(t)}catch(e){console.error("Error updating cart with user data:",e)}})()},[N,I,v,E,r,p]),(0,i.useEffect)(()=>{p&&(0,o.uQ)(r).then(e=>{console.log("Cart cookie updated: ".concat((null==e?void 0:e.id)||"empty"))})},[p,r,null==r?void 0:r.id]),(0,n.jsx)(c.Provider,{value:{currentCart:r,previousCart:s,setCurrentCart:e=>{!e&&r||e&&!(null==r?void 0:r.isFinalized)&&e.isFinalized?(d(e||r),u(void 0)):e&&(u(e),d(void 0))},isCartOpen:m,openCart:U,closeCart:R},children:t})},s=()=>{let e=(0,i.useContext)(c);if(!e)throw Error("useCart must be used within a CartProvider");return e}}}]);

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.