PageSourceSearch

https://urchin-app-wlbzx.ondigitalocean.app/_next/static/chunks/pages/profile-5b344c7fae6d27f47bce.js

js urchin-app-wlbzx.ondigitalocean.app collected 2026-10-03 14:55:29 UTC 21,532 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[277],{44510:function(e,t,r){"use strict";var n=r(64119);t.Z=void 0;var i=n(r(64938)),o=r(85893),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");t.Z=a},53247:function(e,t,r){"use strict";var n=r(64119);t.Z=void 0;var i=n(r(64938)),o=r(85893),a=(0,i.default)((0,o.jsx)("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"Pause");t.Z=a},70655:function(e,t,r){"use strict";var n=r(64119);t.Z=void 0;var i=n(r(64938)),o=r(85893),a=(0,i.default)((0,o.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");t.Z=a},37413:function(e,t,r){"use strict";r.d(t,{I:function(){return P}});var n,i=r(64666),o=r(37645),a=r(35713),s=r(4380),c=r(91894),l=r(67294),u=r(70983),d=r(4942),p=r(30168),f=r(16481),b=r(35185);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Z,y;function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=r(50710),w=r(35944),P=function(e){var t=e.processName,r=e.subscriptionToPause,d=e.subscriptionToRestart,h=e.subscriptionToCancel,g=e.onClose,P=e.onSubscriptionStatusUpdate,S=(0,l.useState)(!1),x=S[0],j=S[1],k=(0,v.D)().addAlert,T=(0,l.useCallback)((function(){var e,i;j(!0),(e={id:r,suppliedProcessName:t},(0,f.gr)({mutation:(0,b.Ps)(n||(n=(0,p.Z)(["\n        mutation pauseSubscription($id: ID!, $suppliedProcessName: String) {\n          pauseSubscription(\n            id: $id\n            suppliedProcessName: $suppliedProcessName\n          ) {\n            newStatus\n          }\n        }\n      "]))),variables:m({},e)},i)).then((function(e){P(r,e.data.pauseSubscription.newStatus),g()})).catch((function(){k("Unable to pause subscription")})).finally((function(){j(!1)}))}),[r,P,t,g,k]),B=(0,l.useCallback)((function(){var e,r;j(!0),(e={id:d,isAsap:!1,suppliedProcessName:t},(0,f.gr)({mutation:(0,b.Ps)(Z||(Z=(0,p.Z)(["\n        mutation restartSubscription(\n          $id: ID!\n          $isAsap: Boolean!\n          $suppliedProcessName: String\n        ) {\n          restartSubscription(\n            id: $id\n            isAsap: $isAsap\n            suppliedProcessName: $suppliedProcessName\n          ) {\n            newStatus\n          }\n        }\n      "]))),variables:e},r)).then((function(e){P(d,e.data.restartSubscription.newStatus),g()})).catch((function(){k("Unable to restart subscription")})).finally((function(){j(!1)}))}),[d,P,t,g,k]),C=(0,l.useCallback)((function(){var e,r;j(!0),(e={id:h,suppliedProcessName:t},(0,f.gr)({mutation:(0,b.Ps)(y||(y=(0,p.Z)(["\n        mutation cancelSubscription($id: ID!, $suppliedProcessName: String) {\n          cancelSubscription(\n            id: $id\n            suppliedProcessName: $suppliedProcessName\n          ) {\n            newStatus\n          }\n        }\n      "]))),variables:O({},e)},r)).then((function(e){P(h,e.data.cancelSubscription.newStatus),g()})).catch((function(){k("Unable to cancel subscription")})).finally((function(){j(!1)}))}),[h,P,t,g,k]),D=(0,l.useCallback)((function(){x||g()}),[x,g]);return(0,w.BX)(l.Fragment,{children:[(0,w.BX)(i.Z,{open:null!==r,onClose:function(){return D()},"aria-labelledby":"pause-subscription-dialog-title","aria-describedby":"pause-subscription-dialog-description",children:[(0,w.tZ)(o.Z,{id:"pause-subscription-dialog-title",children:"Are you sure you want to pause this subscription?"}),(0,w.tZ)(a.Z,{children:(0,w.tZ)(s.Z,{id:"pause-subscription-dialog-description",children:"You will be able to restart the subscription at any time"})}),(0,w.BX)(c.Z,{children:[(0,w.tZ)(u.F,{onClick:function(){return D()},colorVariant:"primary",loading:x,children:"No"}),(0,w.tZ)(u.F,{onClick:T,autoFocus:!0,colorVariant:"primary",loading:x,children:"Yes"})]})]}),(0,w.BX)(i.Z,{open:null!==h,onClose:function(){return D()}
1,"aria-labelledby":"cancel-subscription-dialog-title","aria-describedby":"cancel-subscription-dialog-description",children:[(0,w.tZ)(o.Z,{id:"cancel-subscription-dialog-title",children:"Are you sure you want to cancel this subscription?"}),(0,w.tZ)(a.Z,{children:(0,w.tZ)(s.Z,{id:"cancel-subscription-dialog-description",children:"You won't be able to restart your subscription after this"})}),(0,w.BX)(c.Z,{children:[(0,w.tZ)(u.F,{onClick:function(){return D()},colorVariant:"primary",loading:x,children:"No"}),(0,w.tZ)(u.F,{onClick:C,autoFocus:!0,colorVariant:"primary",loading:x,children:"Yes"})]})]}),(0,w.BX)(i.Z,{open:null!==d,onClose:function(){return D()},"aria-labelledby":"restart-subscription-dialog-title","aria-describedby":"restart-subscription-dialog-description",children:[(0,w.tZ)(o.Z,{id:"restart-subscription-dialog-title",children:"Are you sure you want to restart this subscription?"}),(0,w.tZ)(a.Z,{children:(0,w.tZ)(s.Z,{id:"restart-subscription-dialog-description"})}),(0,w.BX)(c.Z,{children:[(0,w.tZ)(u.F,{onClick:function(){return D()},colorVariant:"primary",loading:x,children:"No"}),(0,w.tZ)(u.F,{onClick:B,autoFocus:!0,colorVariant:"primary",loading:x,children:"Yes"})]})]})]})}},99755:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return xe}});var n=r(4942),i=r(70917),o=r(2734),a=r(46574),s=r(99226),c=r(23972),l=r(45987),u=r(13614),d=r(37858),p=r(75921),f=r(98102),b=r(58439),h=r(14723),m=r(21023),Z=r(54799),y=r(99857),g=r(70983),O=r(54822),v=r(39037),w=r(41664),P=r(44510),S=r(53247),x=r(70655),j=r(67294),k=r(57927),T=r(37413),B=r(35944),C=["subscriptions","onSubscriptionStatusUpdate"];function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N={name:"zkcfgr",styles:"text-align:center;padding:24px;font-family:TWKLausanne"},F={name:"1bqym71",styles:"font-family:TWKLausanne;font-weight:500;text-decoration:inherit;color:inherit;&:hover{text-decoration:underline;}"},X={name:"e6he0r",styles:"min-width:650px"},G={name:"ir6ix9",styles:"font-weight:bold;font-family:TWKLausanne"},W={name:"9bqgcg",styles:"display:grid;grid-template-columns:1fr auto;align-items:center;margin-bottom:16px"},R=function(e){var t=e.subscriptions,r=e.onSubscriptionStatusUpdate,n=(0,l.Z)(e,C),a=function(){var e=(0,o.Z)().palette;return{bottleDropSummary:(0,i.iv)({display:"grid",gridTemplateRows:"min-content auto",padding:"16px 24px",backgroundColor:e.white,overflow:"auto",marginBottom:"24px",borderRadius:"8px"},"",""),header:W,headerText:G,table:X,statusChip:function(t){var r,n;switch(t){case k.xZ.Active:r=e.brand.black,n=e.primaryTag;break;case k.xZ.Paused:r=e.brand.offWhite,n=e.store.border;break;case k.xZ.Cancelled:case k.xZ.Completed:r=e.brand.black,n=e.whites;break;default:r=e.brand.black,n=e.white}return(0,i.iv)({fontFamily:"TWKLausanne",borderRadius:"16px",fontSize:"0.75rem",fontWeight:600,color:r,backgroundColor:n},"","")},subscriptionLink:F,emptyState:N}}(),s=(0,j.useState)(null),D=s[0],R=s[1],A=(0,j.useState)(null),E=A[0],z=A[1],K=(0,j.useState)(null),V=K[0],M=K[1],U=(0,j.useCallback)((function(){null!==D&&R(null),null!==E&&z(null),null!==V&&M(null)}),[D,E,V]);return(0,B.BX)(y.G,L(L({css:a.bottleDropSummary},n),{},{centered:!0,borderTop:!0,borderRight:!0,borderBottom:!0,borderLeft:!0,children:[(0,B.BX)(y.G,{css:a.header,children:[(0,B.tZ)(c.Z,{css:a.headerText,variant:"h6",children:"Bottle Drop Subscriptions"}),(0,B.tZ)(w.default,{href:"/subscription",passHref:!0,children:(0,B.tZ)(g.F,{colorVariant:"primary",size:"small",children:"Add New Subscription"})})]}),null===t&&(0,B.tZ)(c.Z,{children:"Loading..."}),t&&0!==t.length&&(0,B.BX)(u.Z,{"aria-label":"Subscriptions Table",css:a.table,children:[(0,B.tZ)(d.Z,{children:(0,B.BX)(p.Z,{sx:{"&>th":{fontWeight:"bold"}},children:[(0,B.tZ)(f.Z,{children:"Subscription"}),(0,B.tZ)(f.Z,{align:"right",children:"Price"}),(0,B.tZ)(f.Z,{align:"right",children:"Frequency"}),(0,B.tZ)(f.Z,{align:"right",children:"Status"}),(0,B.tZ)(f.Z,{})]})}),(0,B.tZ)(b.Z,{children:t.map((function(e){var t="/profile/subscriptions/".concat(e.id);return(0,B.tZ)(w.default,{href:t,passHref:!0,children:(0,B.BX)(p.Z,{hover:!0,children:[(0,B.tZ)(f.Z,{children:(0,B.tZ)("a",{href:t,css:a.subscriptionLink,children:(0,B.tZ)(c.Z,{fontSize:"inherit",children:e.title})})}),(0,B.tZ)(f.Z,{align:"right",children:(0,v.x)(e.subscriptionPrice*e.quantity)}),(0,B.tZ)(f.Z,{align:"right",children:O.PX.get(e.frequency)}),(0,B.tZ)(f.Z,{align:"right",children:(0,B.tZ)(h.Z,{label:O.U.get(e.status),size:"small",css:a.statusChip(e.status)})}),(0,B.BX)(f.Z,{align:"right",children:[e.status===k.xZ.Active&&(0,B.tZ)(m.Z,{title:"Pause Subscription",children:(0,B.tZ)(Z.Z,{onClick:function(t){t.preventDefault(),R(e.id)},children:(0,B.tZ)(S.Z,{})})}),e.status===k.xZ.Paused&&(0,B.tZ)(m.Z,{title:"Restart Subscription",children:(0,B.tZ)(Z.Z,{onClick:function(t){t.preventDefault(),z(e.id)},children:(0,B.tZ)(x.Z,{})})}),e.status!==k.xZ.Cancelled&&e.status!==k.xZ.Completed&&(0,B.tZ)(m.Z,{title:"Cancel Subscription",children:(0,B.tZ)(Z.Z,{onClick:function(t){t.preventDefault(),M(e.id)},children:(0,B.tZ)(P.Z,{})})})]})]})},e.id)}))})]}),t&&0===t.length&&(0,B.BX)(c.Z,{css:a.emptyState,children:["It appears you don't have any BottleDrop subscriptions yet! You can create one"," ",(0,B.tZ)(w.default,{href:"/bottle-drop",passHref:!0,children:(0,B.tZ)("a",{children:"here"})})]}),(0,B.tZ)(T.I,{processName:"ui.profilePage.bottleDropSummaryList",subscriptionToPause:D,subscriptionToRestart:E,subscriptionToCancel:V,onClose:U,onSubscriptionStatusUpdate:r})]}))},A=r(98396),E=["orders"];function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?z(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V={name:"uuv8yb",styles:"display:flex;flex-direction:column;align-items:center;text-align:center;padding:24px 16px"},M={name:"fkzue",styles:"font-family:TWKLausanne;font-size:1rem;margin-bottom:24px"},U={name:"1lculyk",styles:"font-family:TWKLausanne;cursor:pointer;:hover{text-decoration:underline;}"},$={name:"5bhc30",styles:"margin-bottom:8px"},I=function(e){var t=e.orders,r=(0,l.Z)(e,E),a=function(){var e=(0,o.Z)(),t=e.palette,r=e.breakpoints;return{orderSummary:(0,i.iv)((0,n.Z)({width:"100%",display:"grid",gridTemplateRows:"auto auto",padding:"24px 16px",backgroundColor:t.white,marginBottom:"24px",borderRadius:"8px"},r.up("sm"),{padding:"24px"}),"",""),header:$,content:(0,i.iv)((0,n.Z)({display:"grid",gridTemplateColumns:"auto",gridAutoRows:"50px"},r.up("sm"),{gridTemplateColumns:"auto auto auto auto",gridAutoRows:"50px",border:"1px solid ".concat(t.brand.black),padding:"16px"}),"",""),order:(0,i.iv)({display:"grid",gridTemplateColumns:"30% 40% 30%",alignItems:"center","& .MuiTypography-root":(0,n.Z)({fontSize:"13px",fontFamily:"TWKLausanne"},r.up("sm"),{fontSize:"1rem"})},"",""),orderLink:U,emptyMessage:M,emptyStateContainer:V}}(),s=(0,o.Z)().breakpoints,u=(0,A.Z)(s.down("sm"));return(0,B.tZ)(y.G,K(K({css:a.orderSummary},r),{},{borderTop:!0,borderRight:!0,borderBottom:!0,borderLeft:!0,children:t&&t.length?(0,B.BX)(B.HY,{children:[(0,B.tZ)(y.G,{css:a.header,children:(0,B.BX)(c.Z,{variant:"h6",fontFamily:"TWKLausanne",fontWeight:"bold",children:["Orders (",t?t.length:0,")"]})}),u?(0,B.tZ)(y.G,{css:a.content,children:t&&t.map((function(e){var t;return(0,B.BX)(y.G,{css:a.order,borderBottom:!0,children:[(0,B.tZ)(y.G,{children:(0,B.tZ)(w.default,{href:"/profile/orders/".concat(e.orderNumber),passHref:!0,children:(0,B.BX)(c.Z,{css:a.orderLink,children:["Order #",e.orderNumber]})})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{children:null!==(t=e.status)&&void 0!==t?t:"Received"})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{children:e.orderDate})})]},e.orderNumber)}))}):(0,B.BX)(y.G,{css:a.content,borderTop:!0,borderRight:!0,borderBottom:!0,borderLeft:!0,children:[(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{fontFamily:"TWKLausanne",children:"Order"})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{fontFamily:"TWKLausanne",children:"Status"})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{fontFamily:"TWKLausanne",children:"Date"})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{fontFamily:"TWKLausanne",children:"Total"})}),t&&t.map((function(e){var t;return(0,B.BX)(j.Fragment,{children:[(0,B.tZ)(y.G,{children:(0,B.tZ)(w.default,{href:"/profile/orders/".concat(e.orderNumber),passHref:!0,children:(0,B.BX)(c.Z,{css:a.orderLink,children:["Order #",e.orderNumber]})})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{fontFamily:"TWKLausanne",children:null!==(t=e.status)&&void 0!==t?t:"Received"})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{fontFamily:"TWKLausanne",children:e.orderDate})}),(0,B.tZ)(y.G,{children:(0,B.tZ)(c.Z,{fontFamily:"TWKLausanne",children:(0,v.x)(e.totalAmount)})})]},e.orderNumber)}))]})]}):(0,B.BX)(y.G,{css:a.emptyStateContainer,children:[(0,B.tZ)(c.Z,{variant:"h6",css:a.emptyMessage,children:"You don't currently have any orders. Orders you make will show up here."}),(0,B.tZ)(w.default,{href:"/shop",passHref:!0,children:(0,B.tZ)(g.F,{colorVariant:"primary",size:"regular",children:"Shop Wines"})})]})}))},_=["profile"];function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?q(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Y,Q,J,ee,te,re={name:"1y0b8fd",styles:"font-weight:500;font-family:TWKLausanne"},ne={name:"161h3ov",styles:"display:flex;flex-direction:column;
1min-width:200px"},ie={name:"18a4k4u",styles:"display:flex;flex-direction:column;gap:16px;@media (min-width: 768px){flex-direction:row;gap:24px;}"},oe={name:"h2jgju",styles:"display:grid;grid-template-rows:auto auto"},ae={name:"ir6ix9",styles:"font-weight:bold;font-family:TWKLausanne"},se={name:"1jifhxf",styles:"display:grid;grid-template-columns:1fr auto;align-items:center"},ce=function(e){var t=e.profile,r=(0,l.Z)(e,_),n=function(){var e=(0,o.Z)().palette;return{profileSummary:(0,i.iv)({backgroundColor:e.white,display:"grid",gridTemplateRows:"min-content auto",padding:"16px 24px",marginBottom:"24px",borderRadius:"8px"},"",""),header:se,headerText:ae,content:oe,profileInfo:ie,infoRow:ne,infoLabel:(0,i.iv)({fontSize:"0.875rem",color:e.brand.black,marginBottom:"8px",opacity:.7,fontFamily:"TWKLausanne"},"",""),infoValue:re}}(),a=(0,j.useMemo)((function(){return"October 2023"}),[]);return(0,B.BX)(y.G,H(H({css:n.profileSummary},r),{},{borderTop:!0,borderRight:!0,borderBottom:!0,borderLeft:!0,children:[(0,B.BX)(y.G,{css:n.header,children:[(0,B.tZ)(c.Z,{css:n.headerText,variant:"h6",children:"Profile Summary"}),(0,B.tZ)(w.default,{href:"/profile/edit",passHref:!0,children:(0,B.tZ)(g.F,{colorVariant:"primary",size:"small",children:"Edit"})})]}),null===t&&(0,B.tZ)(c.Z,{children:"Loading..."}),null!==t&&(0,B.tZ)(y.G,{css:n.content,className:"fs-mask",children:(0,B.BX)(s.Z,{css:n.profileInfo,children:[(0,B.BX)(s.Z,{css:n.infoRow,children:[(0,B.tZ)(c.Z,{css:n.infoLabel,children:"Name"}),(0,B.tZ)(c.Z,{css:n.infoValue,children:"".concat(t.firstName," ").concat(t.lastName)})]}),(0,B.BX)(s.Z,{css:n.infoRow,children:[(0,B.tZ)(c.Z,{css:n.infoLabel,children:"Email"}),(0,B.tZ)(c.Z,{css:n.infoValue,children:t.email})]}),(0,B.BX)(s.Z,{css:n.infoRow,children:[(0,B.tZ)(c.Z,{css:n.infoLabel,children:"Member Since"}),(0,B.tZ)(c.Z,{css:n.infoValue,children:a})]})]})})]}))},le=r(30168),ue=r(35185),de=r(78470),pe=(0,ue.Ps)(Y||(Y=(0,le.Z)(["\n  fragment OrderFields on Order {\n    orderNumber\n    orderDate\n    status\n    totalAmount\n  }\n"]))),fe=r(55291),be=(0,ue.Ps)(Q||(Q=(0,le.Z)(["\n  fragment ProfileFields on UsersPermissionsMe {\n    id\n    email\n    firstName\n    lastName\n    localStore {\n      ...StoreFields\n    }\n    defaultAddress {\n      ...AddressFields\n    }\n    orders {\n      ...OrderFields\n    }\n  }\n  ","\n  ","\n  ","\n"])),fe.y,de.C,pe),he=r(16481),me=r(48655),Ze=(0,ue.Ps)(ee||(ee=(0,le.Z)(["\n  fragment ListSubscriptionFields on GetMySubscriptionsPayload {\n    subscriptions {\n      id\n      masterSku\n      title\n      quantity\n      frequency\n      status\n      subscriptionPrice\n    }\n  }\n"]))),ye=r(50710),ge=r(60467),Oe=r(11163);function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pe={title:"Profile | Blackhearts & Sparrows",robotDirectives:"noindex"},Se={name:"vc0zpo",styles:"font-size:2rem;font-weight:600;letter-spacing:-0.02em;position:relative"},xe=function(){var e=function(){var e=(0,o.Z)(),t=e.palette,r=e.breakpoints;return{container:(0,i.iv)((0,n.Z)({maxWidth:"1200px",margin:"0 auto",padding:"24px 16px"},r.up("sm"),{padding:"32px 24px"}),"",""),header:(0,i.iv)((0,n.Z)({display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"32px",paddingBottom:"16px",borderBottom:"1px solid ".concat(t.brand.black)},r.down("md"),{flexDirection:"column",alignItems:"flex-start",gap:"16px"}),"",""),headerTitle:Se}}(),t=(0,ge.a)().isAuthenticated,r=(0,Oe.useRouter)().push,l=(0,j.useState)(null),u=l[0],d=l[1],p=(0,j.use
1State)(null),f=p[0],b=p[1],h=(0,ye.D)().addAlert,m=(0,j.useCallback)((function(e,t){var r=f.findIndex((function(t){return t.id===e}));if(-1===r)throw new Error("pages/profile/index.tsx -> handleSubscriptionUpdate -> Subscription not found in subscriptions array");var n=f.slice();n.splice(r,1,we(we({},f[r]),{},{status:t})),b(n)}),[f,b]);return(0,j.useEffect)((function(){if(null!==t){if(!1===t)return console.log("User is not authenticated, leaving profile page..."),void r("/");var e;(0,he.Vn)({query:(0,ue.Ps)(J||(J=(0,le.Z)(["\n        ","\n        query getProfile {\n          me {\n            ...ProfileFields\n          }\n        }\n      "])),be)},e,"Get Profile Query").then((function(e){d(e.data.me)})).catch((function(){h("Unable to fetch profile information, please refresh the page or try again later")})),function(e){return(0,he.Vn)({query:(0,ue.Ps)(te||(te=(0,le.Z)(["\n        ","\n        query getMySubscriptions {\n          getMySubscriptions {\n            ...ListSubscriptionFields\n          }\n        }\n      "])),Ze)},e,"Get My Subscriptions Query")}().then((function(e){b(e.data.getMySubscriptions.subscriptions)})).catch((function(){h("Unable to fetch profile information, please refresh the page or try again later")}))}}),[h,t,r]),(0,B.tZ)(me.K,{seo:Pe,children:(0,B.BX)(a.Z,{sx:{paddingTop:"80px"},children:[(0,B.tZ)(s.Z,{css:e.header,children:(0,B.tZ)(c.Z,{variant:"h1",css:e.headerTitle,children:"My Account"})}),(0,B.tZ)(ce,{profile:u}),(0,B.tZ)(R,{subscriptions:f,onSubscriptionStatusUpdate:m}),(0,B.tZ)(I,{orders:null===u||void 0===u?void 0:u.orders})]})})}},10303:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile",function(){return r(99755)}])}},function(e){e.O(0,[3662,8565,1023,8900,8655,9774,2888,179],(function(){return t=10303,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.