1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8769],{50211:function(e,t,n){"use strict";var i,o=n(67294);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}t.Z=function(e){return o.createElement("svg",a({viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=o.createElement("path",{d:"M.531 6.804 6.804.53m0 0H2.099m4.705 0v4.705",stroke:"#8F89A3",strokeLinecap:"round",strokeLinejoin:"round"})))}},44128:function(e,t,n){"use strict";var i,o,a=n(67294);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r.apply(null,arguments)}t.Z=function(e){return a.createElement("svg",r({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=a.createElement("path",{d:"M10.143 1H4.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C1 2.52 1 3.08 1 4.2v9.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C2.52 17 3.08 17 4.2 17h9.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C1
17 15.48 17 14.92 17 13.8V7.857",stroke:"#8F89A3",strokeLinecap:"round",strokeLinejoin:"round"})),o||(o=a.createElement("path",{d:"m10.143 5.19 1.429 1.524 4.285-4.57",stroke:"#8F89A3",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})))}},21644:function(e,t,n){"use strict";var i,o,a=n(67294);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r.apply(null,arguments)}t.Z=function(e){return a.createElement("svg",r({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=a.createElement("path",{d:"M1.319.663c.132-.067.306-.113.608-.137C2.236.5 2.632.5 3.2.5h5.143a4.094 4.094 0 0 1 .294.006v.006c.005.059.006.14.006.288v1.074c0 1.283 0 2.042.19 2.676a4.5 4.5 0 0 0 3.016 3.015c.633.19 1.393.19 2.675.19h.105c.381 0 .462.006.515.022a.5.5 0 0 1 .335.335c.016.052.021.133.021.515V12.8c0 .568 0 .964-.026 1.273-.024.303-.07.476-.138.608a1.5 1.5 0 0 1-.655.655c-.132.068-.305.114-.608.138-.309.026-.705.026-1.273.026H3.2c-.568 0-.964 0-1.273-.026-.302-.024-.476-.07-.608-.138a1.5 1.5 0 0 1-.656-.655c-.067-.132-.113-.305-.137-.608C.5 13.764.5 13.368.5 12.8V3.2c0-.568 0-.964.026-1.273.024-.302.07-.476.137-.608A1.5 1.5 0 0 1 1.32.663Z",stroke:"#8F89A3",strokeLinecap:"round"})),o||(o=a.createElement("circle",{cx:13.714,cy:2.684,r:2.286,fill:"#8F89A3"})))}},5682:function(e,t,n){"use strict";var i,o=n(67294);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(null,arguments)}t.Z=function(e){return o.createElement("svg",a({viewBox:"0 0 9 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.146 4.457a.5.5 0 0 0 .708 0l2.75-2.75v8.06a.5.5 0 1 0 1 0v-8.06l2.75 2.75a.5.5 0 0 0 .707-.707L4.457.146a.5.5 0 0 0-.707 0L.146 3.75a.5.5 0 0 0 0 .707Z",fill:"#DCD8E4"})))}},31182:function(e,t,n){"use strict";var i,o,a=n(67294);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r.apply(null,arguments)}t.Z=function(e){return a.createElement("svg",r({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=a.createElement("path",{d:"M9 11V8a3 3 0 0 1 3-3v0a3 3 0 0 1 3 3v3",stroke:"#8F89A3",strokeLinecap:"round",strokeLinejoin:"round"})),o||(o=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 10.615a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1H7Zm5.44 3.22a.5.5 0 0 0-1 0v1.72a.5.5 0 1 0 1 0v-1.72Z",fill:"#8F89A3"})))}},28734:function(e){e.exports=function(){"use strict";return function(e,t){var n=t.prototype,i=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return i.bind(this)(e);var o=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return o.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return o.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return o.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return i.bind(this)(a)}}}()},72038:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications",function(){return n(4112)}])},4165:function(e,t,n){"use strict";var i=n(67573),o=n(85893),a=n(94184),r=n.n(a),s=n(89513),l=n(5682),c=n(34838),u=n.n(c);t.Z=function(e){var t=e.onClick,n=e.dataTestId,a=e.count,c=e.itemText,d=e.arrowDown,f=e.classes;return(0,o.jsxs)("button",{className:r()(u().newItemsButton,null===f||void 0===f?void 0:f.newItemsButton),onClick:t,"data-testid":n,children:[(0,o.jsx)(s.Z,{count:a}),"New ".concat(c).concat(a>1?"s":""),(0,o.jsx)("div",{className:r()(u().upIconContainer,(0,i.Z)({},u().downArrow,d)),children:(0,o.jsx)(l.Z,{className:u().upIcon})})]})}},94958:function(e,t,n){"use strict";n.d(t,{Z:function(){return i.Z}});var i=n(4165)},72343:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var i=n(67573),o=n(85893),a=n(94184),r=n.n(a),s=n(31182),l=n(70358),c=n.n(l),u=function(e){var t=e.value,n=e.values,a=e.onChange,l=e.disabled,u=void 0!==l&&l,d=e.lockIconOnDisable,f=void 0===d||d,v=e.widthPerOption,m=void 0===v?160:v,p=e.testIdKey,_=e.classes;return(0,o.jsxs)("div",{className:r()(c().permissionSelector,(0,i.Z)({},c().disabled,u),null===_||void 0===_?void 0:_.permissionSelector),style:{width:n.length*m},children:[(0,o.jsx)("div",{className:c().selectedSlider,style:{width:m,left:t*m}}),n.map((function(e,n){var l,d=function(e){return{key:"string"===typeof e?e:Object.keys(e)[0],displayValue:"string"===typeof e?e:Object.values(e)[0]}}(e),v=d.key,h=d.displayValue;return(0,o.jsxs)("div",{"data-testid":"options-select-".concat(n,"-").concat(p),className:r()(c().option,(l={},(0,i.Z)(l,c().selected,t===n),(0,i.Z)(l,c().disabled,u&&t!==n),l),null===_||void 0===_?void 0:_.option),style:{width:m},onClick:function(){null===a||void 0===a||a(n)},children:[h,u&&f&&t===n&&(0,o.jsx)(s.Z,{className:c().lockIcon})]},v)}))]})}},39317:function(e,t,n){"use strict";var i=n(67573),o=n(14251),a=n(52875),r=n(44747),s=n(85893),l=n(94184),c=n.n(l),u=n(67294),d=n(39142),f=n(1314),v=n(65691),m=n(30403),p=n.n(m),_=function(e){var t=e.width,n=e.he
1ight,o=e.listProps,a=e.dataProps,r=e.listRef,l=e.classes,d=e.onScroll,v=e.useIsScrolling,m=e.outerRef,_=e.removeScrollbarGutter,h=a.data,N=a.rowHeight,R=a.rowKey,E=a.children,w=(0,u.useCallback)((function(e){var t=e.index,n=e.data,i=e.style,o=e.isScrolling;return(0,s.jsx)("div",{className:c()("virtual-row",null===l||void 0===l?void 0:l.virtualRow),style:i,tabIndex:0,children:(0,s.jsx)(E,{data:n,index:t,isScrolling:o})})}),[E,l]);return(0,s.jsx)(f.S_,{outerRef:m,ref:function(e){var t;null===r||void 0===r||r(e),null===o||void 0===o||null===(t=o.ref)||void 0===t||t.call(o,e)},className:c()(p().fixedSizeList,null===l||void 0===l?void 0:l.list,(0,i.Z)({},p().listScrollbarGutter,!_)),itemData:h,height:n,width:t,itemCount:h.length,itemSize:N,itemKey:function(e,t){return t[e][R]},onItemsRendered:null===o||void 0===o?void 0:o.onItemsRendered,onScroll:d,useIsScrolling:v,children:w})};t.Z=function(e){var t=e.data,n=e.headerComponent,l=e.emptyComponent,u=(e.rowKey,e.rowHeight,e.loadMore),f=e.onLastPage,m=void 0!==f&&f,h=(e.children,e.listRef),N=e.classes,R=e.listOnScroll,E=e.shouldNotLoadMore,w=e.useIsScrolling,x=e.outerRef,S=e.onListResize,C=e.removeScrollbarGutter,g=(0,r.Z)(e,["data","headerComponent","emptyComponent","rowKey","rowHeight","loadMore","onLastPage","children","listRef","classes","listOnScroll","shouldNotLoadMore","useIsScrolling","outerRef","onListResize","removeScrollbarGutter"]),I=E||function(e){return m||e<t.length-1};return(0,s.jsxs)("div",{className:p().list,children:[n&&(0,s.jsx)("div",{className:c()("virtualized-list-header",p().listHeader,(0,i.Z)({},p().headerScrollbarGutter,!C)),children:(0,s.jsx)(n,{})}),0===t.length&&l?(0,s.jsx)(l,{}):(0,s.jsx)("div",(0,a.Z)((0,o.Z)({className:p().scrollableList},g),{children:(0,s.jsx)(d.ZP,{onResize:S,children:function(n){var i=n.width,o=n.height;return u?(0,s.jsx)(v.Z,{itemCount:t.length,isItemLoaded:I,loadMoreItems:u,children:function(t){return(0,s.jsx)(_,{listRef:h,listProps:t,dataProps:e,width:i,height:o,classes:N,onScroll:R,useIsScrolling:w,outerRef:x,removeScrollbarGutter:C})}}):(0,s.jsx)(_,{dataProps:e,width:i,height:o,listRef:h,classes:N,onScroll:R,useIsScrolling:w,outerRef:x,removeScrollbarGutter:C})}})}))]})}},96178:function(e,t,n){"use strict";n.d(t,{Z:function(){return i.Z}});var i=n(39317)},35878:function(e,t,n){"use strict";var i=n(9971),o=n(67294),a=n(94522),r=n(21870),s=n(38799),l=n(4164);t.Z=function(e){var t,n,c=e.nameLogoType,u=e.merchantId,d=e.appId,f=e.nameAndLogo,v=void 0===f?{}:f,m=(0,a.TL)(),p=(0,l.h0)(),_=(0,a.CG)((function(e){var t;return u?null!==(n=null===(t=e.merchant.merchantData)||void 0===t?void 0:t[u])&&void 0!==n?n:{}:{name:"",logo:""}})),h=(0,a.CG)((function(e){var t,n,o;return p===i.F.DEVELOPER?d?null!==(t=e.app.apps[d])&&void 0!==t?t:{}:{name:"",configuration:{logoUrl:""}}:d?null!==(o=null===(n=e.app.merchantConnectedApps)||void 0===n?void 0:n[d])&&void 0!==o?o:{}:{name:"",configuration:{logoUrl:""}}})),N=v.name,R=v.logo,E=(0,o.useMemo)((function(){return N||(c===i.F.DEVELOPER?h.name:_.name)}),[h.name,null===_||void 0===_?void 0:_.name,c,N]),w=(0,o.useMemo)((function(){var e;return R||(c===i.F.DEVELOPER?null===(e=h.configuration)||void 0===e?void 0:e.logoUrl:_.logo)}),[null===(t=h.configuration)||void 0===t?void 0:t.logoUrl,_.logo,c,R]);return(0,o.useEffect)((function(){c===i.F.MERCHANT&&!E&&u&&d&&m((0,r.Lz)({merchantId:u,appId:d}))}),[d,m,u,E,c]),(0,o.useEffect)((function(){c===i.F.DEVELOPER&&d&&!E&&m((0,s.Mq)({appId:d,includeConfig:!0}))}),[d,m,E,c]),{name:E,logoUrl:w}}},4112:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return st}});var i,o=n(34727),a=n(14251),r=n(44747),s=n(34051),l=n.n(s),c=n(85893),u=n(67294),d=n(73935),f=n(94522),v=n(57428),m=n(99479),p=n(5682),_=n(44992),h=n(60334),N=n(67573),R=n(94184),E=n.n(R),w=n(27484),x=n.n(w),S=n(28734),C=n.n(S),g=n(29387),I=n.n(g),O=n(11163),T=n(34651),b=n(50211),k=n(20054),j=n(5523),A=n(37466),D=n.n(A),M=function(e){var t,n=e.notificationType,i=e.userNotification,o=e.readStatus,a=(0,O.useRouter)(),r=function(e,t){switch(e){case k.k$.BEAM_ORDER_SUBMISSION_FAILED:var n,i=(null===t||void 0===t?void 0:t.shopifyOrderName)||(null===t||void 0===t?void 0:t.shopifyOrderId);return{title:"Order submission failed",context:i?"Order ".concat(i):"",reason:null!==(n=null===t||void 0===t?void 0:t.errorReason)&&void 0!==n?n:""};case k.k$.BEAM_SKU_MAPPING_BROKEN:var o;return{title:"SKU mapping broken",context:(null===t||void 0===t?void 0:t.violetSkuId)?"SKU ".concat(t.violetSkuId):"",reason:null!==(o=null===t||void 0===t?void 0:t.reason)&&void 0!==o?o:""};default:return null}}(n,i.notification.data);if(!r)return(0,c.jsx)(c.Fragment,{});var s=null!==(t=i.notification.data)&&void 0!==t?t:{}
1,l=n===k.k$.BEAM_SKU_MAPPING_BROKEN&&Boolean(s.violetSkuId||s.destinationVariantId),u=function(){if(n!==k.k$.BEAM_ORDER_SUBMISSION_FAILED)return null;if("string"!==typeof s.shopDomain||!s.shopifyOrderId)return null;var e=s.shopDomain.split(".")[0];return e?"https://admin.shopify.com/store/".concat(e,"/orders/").concat(s.shopifyOrderId):null}();return(0,c.jsxs)("div",{className:D().beamErrorRow,children:[(0,c.jsxs)("div",{className:E()(D().title,(0,N.Z)({},D().readText,o)),children:[(0,c.jsx)("span",{children:r.title}),u&&(0,c.jsx)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:D().shopifyLink,"aria-label":"View order in Shopify",children:(0,c.jsx)(b.Z,{className:D().externalIcon})})]}),(0,c.jsxs)("div",{className:D().errorPill,children:[(0,c.jsxs)("div",{className:D().errorLabel,children:[r.context&&(0,c.jsx)("span",{className:D().context,children:r.context}),r.reason&&(0,c.jsx)("span",{className:D().reason,children:r.reason})]}),l&&(0,c.jsx)("button",{type:"button",className:D().viewMappingButton,onClick:function(){var e={};s.violetSkuId&&(e.violetSkuId=String(s.violetSkuId)),s.destinationVariantId&&(e.destinationVariantId=s.destinationVariantId),T.ZP.capture(j.yX,{data:{violetSkuId:s.violetSkuId,destinationVariantId:s.destinationVariantId,notificationId:i.notification.id}}),a.push({pathname:"/mappings",query:e})},children:"View mapping"})]})]})},Z=n(9971),P=n(79756);function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},B.apply(null,arguments)}var y,L=function(e){return u.createElement("svg",B({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm-.46 4.112a.65.65 0 0 1 .92 0l2.571 2.571a.65.65 0 1 1-.92.92L8.65 6.14v5.288a.65.65 0 1 1-1.3 0V6.14L5.888 7.602a.65.65 0 0 1-.919-.919L7.54 4.112Z",fill:"#5BDB87"})))};function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},F.apply(null,arguments)}var $,H=function(e){return u.createElement("svg",F({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),y||(y=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm2.998 7.293a.65.65 0 0 0-.964-.872l-2.78 3.072-1.061-1.155a.65.65 0 0 0-.957.88l1.543 1.68a.65.65 0 0 0 .96-.004l3.259-3.6Z",fill:"#5BDB87"})))},V=n(76722);function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},U.apply(null,arguments)}var G,z,K=function(e){return u.createElement("svg",U({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),$||($=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm-.46 11.888a.65.65 0 0 0 .919 0l2.57-2.571a.65.65 0 1 0-.918-.92L8.649 9.86V4.571a.65.65 0 1 0-1.3 0V9.86L5.887 8.397a.65.65 0 1 0-.92.92l2.572 2.571Z",fill:"#E84E6A"})))};function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Y.apply(null,arguments)}var W,q=function(e){return u.createElement("svg",Y({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),G||(G=u.createElement("g",{clipPath:"url(#icon-store-disconnected-exclamation_svg__a)"},u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8.65-3.721a.65.65 0 0 0-1.3 0v3.72a.65.65 0 1 0 1.3 0V4.28ZM8 10.327a1.022 1.022 0 1 0 0 2.044 1.022 1.022 0 0 0 0-2.044Z",fill:"#E84E6A"}))),z||(z=u.createElement("defs",null,u.createElement("clipPath",{id:"icon-store-disconnected-exclamation_svg__a"},u.createElement("path",{fill:"#fff",d:"M0 0h16v16H0z"})))))};function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},X.apply(null,arguments)}var J,Q=function(e){return u.createElement("svg",X({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),W||(W=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm4.483 0a3.517 3.517 0 0 1 4.221-3.446.65.65 0 1 0 .259-1.274 4.817 4.817 0 1 0 3.758 3.758.65.65 0 1 0-1.275.258A3.517 3.517 0 1 1 4.483 8Zm7.31-2.874a.65.65 0 0 0-.92-.919L7.818 7.264V6.75a.65.65 0 0 0-1.3 0v2.083c0 .36.29.65.65.65H9.25a.65.65 0 0 0 0-1.3h-.514l3.057-3.057Z",fill:"#5BDB87"})))};function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ee.apply(null,arguments)}var te,ne=function(e){return u.createElement("svg",ee({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),J||(J=u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm4.483 0A3.517 3.517 0 0 1 8 4.483a.65.65 0 0 0 0-1.3A4.817 4.817 0 1 0 12.817 8a.65.65 0 1 0-1.3 0 3.517 3.517 0 0 1-7.034 0Zm4.95-4.167c0 .36.291.65.65.65h.514l-2.64 2.64a.65.65 0 0 0 .92.92l2.64-2.64v.514a.65.65 0 1 0 1.3 0V3.833a.65.65 0 0 0-.65-.65h-2.084a.65.65 0 0 0-.65.65Z",fill:"#E84E6A"})))}
1,ie=n(12869),oe=n.n(ie),ae=[k.k$.STORE_CONNECTED,k.k$.STORE_DISCONNECTED,k.k$.MERCHANT_ENABLED,k.k$.MERCHANT_DISABLED],re=function(e){var t=e.notificationType,n=e.readStatus,i=void 0!==n&&n,o=e.newRate,a=void 0===o?0:o,r=e.oldRate,s=void 0===r?0:r,l=e.merchantName,u=e.logoUrl;s=Math.round(100*s)/100;var d,f=(a=Math.round(100*a)/100)-s>=0;return(0,c.jsxs)("div",{className:oe().pillContainer,children:[(0,c.jsxs)("div",{className:E()(oe().leftPill,(0,N.Z)({},oe().nameWithNoLogo,!u)),children:[u&&(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("img",{className:oe().merchantLogo,src:(0,P.L)(u||"",16,16),alt:l,width:16,height:16})}),(0,c.jsx)("span",{className:oe().merchantName,children:l})]}),(0,c.jsxs)("div",{className:E()(oe().mainPill,(d={},(0,N.Z)(d,oe().storeConnectionPill,ae.includes(t)),(0,N.Z)(d,oe().commissionPill,t===k.k$.COMMISSION_RATE_UPDATED),d)),children:[t===k.k$.STORE_CONNECTED&&(0,c.jsx)(Q,{className:oe().mainPillIcon}),t===k.k$.STORE_DISCONNECTED&&(0,c.jsx)(ne,{className:oe().mainPillIcon}),t===k.k$.MERCHANT_ENABLED&&(0,c.jsx)(H,{className:oe().mainPillIcon}),t===k.k$.MERCHANT_DISABLED&&(0,c.jsx)(q,{className:oe().mainPillIcon}),t===k.k$.COMMISSION_RATE_UPDATED&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:E()(oe().rates,oe().commissionChanged,(0,N.Z)({},oe().read,i)),children:["".concat(s,"%"),(0,c.jsx)("div",{className:oe().arrowContainer,children:(0,c.jsx)(V.Z,{className:oe().arrow})}),"".concat(a,"%")]}),f?(0,c.jsx)(L,{className:E()(oe().mainPillIcon,oe().commissionChangeIcon,(0,N.Z)({},oe().read,i))}):(0,c.jsx)(K,{className:E()(oe().mainPillIcon,oe().commissionChangeIcon,(0,N.Z)({},oe().read,i))})]})]})]})},se=n(35878),le=n(44074),ce=n.n(le),ue={COMMISSION_RATE_UPDATED:"Commission Rate Updated",STORE_CONNECTED:"Store Connected",STORE_DISCONNECTED:"Store Disconnected",MERCHANT_ENABLED:"Store Enabled",MERCHANT_DISABLED:"Store Disabled"},de=function(e){var t=e.notificationType,n=e.userNotification,i=e.readStatus,o=n.notification,a=o.data,r=void 0===a?{}:a,s=r.appId,l=r.merchantId,u=r.merchantName,d=r.logo,f=r.oldRate,v=void 0===f?0:f,m=r.newRate,p=void 0===m?0:m,_=o.appId,h=(0,se.Z)({appId:s||_,merchantId:l,nameLogoType:s?Z.F.DEVELOPER:Z.F.MERCHANT,nameAndLogo:{name:u,logo:d}}),R=h.name,w=h.logoUrl;return(0,c.jsxs)("div",{className:ce().merchantContentRow,children:[(0,c.jsx)("div",{className:E()(ce().notificationText,(0,N.Z)({},ce().readText,i)),children:ue[t]}),(0,c.jsx)(re,{notificationType:t,readStatus:i,newRate:p,oldRate:v,merchantName:null!==R&&void 0!==R?R:"",logoUrl:null!==w&&void 0!==w?w:""})]})},fe=n(97194),ve=n(48985),me=n(65717),pe=n(41509),_e=n(52583),he=n(40401),Ne=n(10565),Re=n(61028),Ee=n(61426),we=n.n(Ee),xe=function(e){var t=e.reportType,n=e.userNotification,i=e.success,a=e.readStatus,r=e.message,s=(0,f.TL)();return(0,c.jsxs)("div",{className:we().reportCompletedRow,children:[(0,c.jsx)("div",{className:E()(we().title,(0,N.Z)({},we().readText,a)),children:i?(0,c.jsxs)(c.Fragment,{children:["New Report:"," ",x()(n.notification.dateCreated).format("YYYY-MM-DD-HH:mm")]}):(0,c.jsxs)(c.Fragment,{children:["Export Failed:"," ",x()(n.notification.dateCreated).format("YYYY-MM-DD-HH:mm")]})}),(0,c.jsxs)("div",{className:we().downloadReadyPill,children:[(0,c.jsxs)("div",{className:we().exportReadyLabel,children:[function(){switch(t){case Ne.C2.DISTRIBUTION:return(0,c.jsx)(fe.Z,{className:we().atmIcon});case Ne.C2.PAYOUT:return(0,c.jsx)(ve.Z,{className:we().payoutIcon});case Ne.C2.MERCHANT_APP_COMMISSION_RATE_CHANGES:return(0,c.jsx)(me.Z,{className:we().commissionIcon});case Ne.C2.CONNECTED_MERCHANTS:return(0,c.jsx)(pe.Z,{className:we().merchantIcon});default:return null}}(),(0,c.jsx)(c.Fragment,{children:r})]}),(0,c.jsx)("button",{className:we().downloadButton,onClick:(0,o.Z)(l().mark((function e(){var o,a,r,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=14;break}return e.prev=1,e.next=5,s((0,he.W4)(n.notification.data.reportRun.id)).unwrap();case 5:a=e.sent,window.open(null===(o=a.result)||void 0===o?void 0:o.url,"_blank"),T.ZP.capture(j.a0,{data:{reportRunId:n.notification.data.reportRun.id,reportType:t,notificationId:n.notification.id}}),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(1);case 12:e.next=20;break;case 14:return r={reportType:t,parameters:n.notification.data.reportRun.parameters},e.next=17,s((0,he.nb)(r)).unwrap();case 17:c=e.sent,s((0,Re.Ed)(c)),T.ZP.capture(j.GU,{data:r});case 20:case"end":return e.stop()}}),e,null,[[1,10]])}))),children:i?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(_e.Z,{className:we().downloadIcon}),"Download"]}):(0,c.jsx)(c.Fragment,{children:"Retry"})})]})]})},Se=function(e){var t,n=e.notificationType,i=e.readStatus,o=e.notification;switch(n){case k.k$.BEAM_ORDER_SUBMISSION_FAILED:case k.k$.BEAM_SKU_MAPPING_BROKEN:return(0,c.jsx)(M,{notificationType:n,userNotification:o,readStatus:i});
1case k.k$.COMMISSION_RATE_UPDATED:case k.k$.STORE_CONNECTED:case k.k$.STORE_DISCONNECTED:case k.k$.MERCHANT_ENABLED:case k.k$.MERCHANT_DISABLED:return(0,c.jsx)(de,{notificationType:n,userNotification:o,readStatus:i});case k.k$.REPORT_COMPLETED:if(t=o.notification.data.reportRun.reportType){return(0,c.jsx)(xe,{reportType:t,userNotification:o,success:!0,readStatus:i,message:function(e){switch(e){case Ne.C2.PAYOUT:return"Payout report is ready.";case Ne.C2.DISTRIBUTION:return"Distribution report is ready.";case Ne.C2.MERCHANT_APP_COMMISSION_RATE_CHANGES:return"Commission rate changes report is ready.";case Ne.C2.CONNECTED_MERCHANTS:return"Connected merchants report is ready."}}(t)})}case k.k$.REPORT_FAILED:if(t=o.notification.data.reportRun.reportType){return(0,c.jsx)(xe,{reportType:t,userNotification:o,success:!1,readStatus:i,message:function(e){switch(e){case Ne.C2.PAYOUT:return"Payout report has failed.";case Ne.C2.DISTRIBUTION:return"Distribution report has failed.";case Ne.C2.MERCHANT_APP_COMMISSION_RATE_CHANGES:return"Commission rate changes report has failed.";case Ne.C2.CONNECTED_MERCHANTS:return"Connected merchants report has failed."}}(t)})}default:return(0,c.jsx)(c.Fragment,{})}},Ce=n(44128),ge=n(21644);function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ie.apply(null,arguments)}var Oe,Te=function(e){return u.createElement("svg",Ie({viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te||(te=u.createElement("path",{d:"M12.765 17.441A.5.5 0 0 0 13.5 17V5.778c0-.821 0-1.468-.043-1.99-.043-.53-.133-.974-.339-1.377A3.5 3.5 0 0 0 11.59.881c-.403-.205-.847-.295-1.378-.338C9.691.5 9.043.5 8.222.5H5.778c-.821 0-1.468 0-1.99.043-.53.043-.974.133-1.377.338a3.5 3.5 0 0 0-1.53 1.53c-.205.403-.295.847-.338 1.378C.5 4.309.5 4.957.5 5.778V17a.5.5 0 0 0 .735.441l5.247-2.798c.303-.162.365-.19.42-.2a.499.499 0 0 1 .195 0c.056.01.118.038.42.2l5.248 2.798Z",stroke:"#DCD8E4",strokeLinecap:"round",strokeLinejoin:"round"})))};function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},be.apply(null,arguments)}var ke=function(e){return u.createElement("svg",be({viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Oe||(Oe=u.createElement("path",{d:"M11.5 4.8v10.367L6.988 12.76l-.047-.025c-.228-.122-.429-.23-.649-.273a1.503 1.503 0 0 0-.584 0c-.22.044-.42.151-.649.273l-.047.025L.5 15.167V4.8c0-.848 0-1.455.04-1.93.038-.469.11-.766.232-1.005A2.5 2.5 0 0 1 1.865.772C2.104.651 2.401.578 2.87.54 3.345.5 3.952.5 4.8.5h2.4c.848 0 1.455 0 1.93.04.469.038.766.11 1.005.232a2.5 2.5 0 0 1 1.092 1.093c.122.239.195.536.234 1.005.039.475.039 1.082.039 1.93Z",fill:"#DCD8E4",stroke:"#DCD8E4",strokeLinecap:"round",strokeLinejoin:"round"})))},je=n(23083),Ae=n.n(je);x().extend(C()),x().extend(I());var De,Me=function(e){var t=e.children,n=e.title,i=e.hide,o=(0,u.useState)(!1),a=o[0],r=o[1];return(0,c.jsxs)("div",{className:Ae().tooltipContainer,onMouseEnter:function(){r(!0)},onMouseLeave:function(){r(!1)},children:[t,a&&!i&&(0,c.jsx)("span",{className:Ae().tooltip,children:n})]})},Ze=function(e){var t=e.notification,n=e.handleRead,i=e.handleSave,o=e.removingRow,a=e.disableReadSaveButtons,r=e.index,s=t.notificationId,l=t.notification,u=l.dateCreated,d=l.notificationType,f=(l.data,t.userNotificationStatus),v=void 0===f?{}:f,m=v.readStatus,p=void 0!==m&&m,_=v.savedStatus,h=void 0!==_&&_;return(0,c.jsxs)("div",{className:Ae().container,children:[(0,c.jsx)("div",{className:Ae().leftBox}),(0,c.jsx)("div",{className:E()(Ae().row,(0,N.Z)({},Ae().removeRowAnimation,o)),children:(0,c.jsxs)("div",{className:Ae().content,children:[(0,c.jsx)("div",{className:Ae().leftColumnContainer,children:(0,c.jsx)("div",{className:E()(Ae().column,Ae().leftColumn,(0,N.Z)({},Ae().unreadBorder,!p)),children:(0,c.jsx)(Se,{notification:t,readStatus:p,notificationType:d})})}),(0,c.jsxs)("div",{className:Ae().column,children:[(0,c.jsxs)("div",{className:Ae().readSaveContainer,children:[(0,c.jsx)(Me,{title:"Mark this notification as ".concat(p?"unread":"read"),hide:a,children:(0,c.jsx)("button",{"data-testid":"read-status-button-".concat(r),className:Ae().readSaveButton,onClick:function(){return null===n||void 0===n?void 0:n(s,p)},disabled:a,children:p?(0,c.jsx)(ge.Z,{className:Ae().readSaveIcon}):(0,c.jsx)(Ce.Z,{className:Ae().readSaveIcon})})}),(0,c.jsx)(Me,{title:"Mark as ".concat(h?"unsaved":"saved"),hide:a,children:(0,c.jsx)("button",{"data-testid":"saved-status-button-".concat(r),className:Ae().readSaveButton,onClick:function(){return null===i||void 0===i?void 0:i(s,h)},disabled:a,children:h?(0,c.jsx)(ke,{className:E()(Ae().readSaveIcon,Ae().bookmarkIconFilled)}):(0,c.jsx)(Te,{className:E()(Ae().readSaveIcon)})})})]}),(0,c.jsx)("div",{className:Ae().date,children:x()(u).format("MMM D, YYYY h:mmA z")})]})]})}),(0,c.jsx)("div",{className:Ae().rightBox})]})},Pe=n(24251),Be=n(57161),ye=n(96178),Le=n(49934),Fe=n(75369),$e=n(77474),He=n(91845),Ve=n(69600),Ue=n.n(Ve),Ge=(De={},(0,N.Z)(De,k.k$.STORE_CONNECTED,"Store Connected"),(0,N.Z)(De,k.k$.STORE_DISCONNECTED,"Store Disconnected"),(0,N.Z)(De,k.k$.MERCHANT_ENABLED,"Store Enabled"),(0,N.Z)(De,k.k$.MERCHANT_DISABLED,"Store Disabled"),(0,N.Z)(De,k.k$.COMM
1ISSION_RATE_UPDATED,"Commission Rate"),(0,N.Z)(De,k.k$.REPORT_COMPLETED,"Report Completed"),(0,N.Z)(De,k.k$.REPORT_FAILED,"Report Failed"),(0,N.Z)(De,k.k$.BEAM_ORDER_SUBMISSION_FAILED,"Order Submission Failed"),(0,N.Z)(De,k.k$.BEAM_SKU_MAPPING_BROKEN,"SKU Mapping Broken"),De),ze=function(e){var t=e.portalDestinationId,n=e.onChange,i=e.disabled;return(0,c.jsx)(Fe.Z,{disabled:i,portalDestinationId:t,onChange:function(e){var t=Object.keys(e).length?{notificationType:Object.values(e)[0]}:{};null===n||void 0===n||n(t)},clearAllButton:!1,options:[{name:k.k$.STORE_CONNECTED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"store-connected-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.STORE_CONNECTED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.STORE_CONNECTED]}),removeFilter:t})}},{name:k.k$.STORE_DISCONNECTED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"store-disconnected-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.STORE_DISCONNECTED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.STORE_DISCONNECTED]}),removeFilter:t})}},{name:k.k$.MERCHANT_ENABLED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"merchant-enabled-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.MERCHANT_ENABLED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.MERCHANT_ENABLED]}),removeFilter:t})}},{name:k.k$.MERCHANT_DISABLED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"merchant-enabled-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.MERCHANT_DISABLED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.MERCHANT_DISABLED]}),removeFilter:t})}},{name:k.k$.COMMISSION_RATE_UPDATED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"commission-rate-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.COMMISSION_RATE_UPDATED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.COMMISSION_RATE_UPDATED]}),removeFilter:t})}},{name:k.k$.REPORT_COMPLETED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"report-completed-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.REPORT_COMPLETED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.REPORT_COMPLETED]}),removeFilter:t})}},{name:k.k$.REPORT_FAILED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"report-failed-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.REPORT_FAILED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.REPORT_FAILED]}),removeFilter:t})}},{name:k.k$.BEAM_ORDER_SUBMISSION_FAILED,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"beam-order-submission-failed-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.BEAM_ORDER_SUBMISSION_FAILED]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.BEAM_ORDER_SUBMISSION_FAILED]}),removeFilter:t})}},{name:k.k$.BEAM_SKU_MAPPING_BROKEN,dropdownOption:(0,c.jsx)(He.Z,{"data-testid":"beam-sku-mapping-broken-filter",classes:{filterOption:Ue().filterOption},label:Ge[k.k$.BEAM_SKU_MAPPING_BROKEN]}),appliedFilterComponent:function(e){var t=e.removeFilter,n=e.values;return(0,c.jsx)($e.Z,{values:n,valuesTab:(0,c.jsx)("div",{className:Ue().valuesTab,children:Ge[k.k$.BEAM_SKU_MAPPING_BROKEN]}),removeFilter:t})}}]})},Ke=n(72343),Ye=n(78662),We=n(38390),qe=n(94958),Xe=n(70129),Je=n.n(Xe),Qe="appliedNotificationFilter",et=function(e){var t=e.listAtTop,n=e.onFilterChange,i=e.onToggleChange,o=e.handleMarkAllRead,a=e.disabled,r=e.animationInProgress,s=e.resetList,l=e.scrollOffsetOnOverflow,d=e.scrollToTop,v=e.disableSlider,m=e.userType,p=e.selectedId,h=(0,f.TL)(),R=(0,Le.Z)().stage,w=(0,f.CG)((function(e){return e.notifications.counts.unread})),x=(0,f.CG)((function(e){return e.notifications.counts.saved})),S=(0,f.CG)((function(e){return e.notifications.toggleIndex})),C=(0,f.CG)((function(e){return e.notifications.queue})),g=(0,u.useState)({}),I=g[0],O=g[1],T=(0,u.useState)(0),b=T[0],j=T[1];(0,u.useEffect)((function(){return function(){h((0,_.ns)(k.bm.UNREAD))}}),[h]),(0,u.useEffect)((function(){t&&j(0)}),[t]),(0,u.useEffect)((function(){if(p&&m&&R){var e=m===Z.F.DEVELOPER?"".concat(We.pu).concat(p):"".concat(We.vm).concat(p),t=(0,Ye.Li)(e,R);null===t||void 0===t||t.bind("notification-event",(function(e){h((0,_.FN)({notification:e,notificationId:e.id}))}))}}),[p,R,h,m]),(0,u.useEffect)((function(){if(C.length&&!r&&S!==k.bm.SAVED){var e=C.length;h((0,_.wG)()),s(),l(e)&&j((function(t){return t+e}))}}),[r,s,l,h,C,S]);var A=w>99?"99+":w,D=x>99?"99+":x,M=k.A4.map((function(e){return(0,N.Z)({},e,(0,c.jsxs)("div",{className:Je().option,children:[e.toLowerCase(),(0,c.jsxs)("span",{className:Je().optionCount,children:[e===k.bm[k.bm.UNREAD]&&" ".concat(A),e===k.bm[k.bm.SAVED]&&" ".concat(D)]})]}))}));return(0,c.jsxs)("div",{className:Je().headerContainer,children:[(0,c.jsxs)("div",{className:E()(Je().header,(0,N.Z)({},Je().shadowBorder,!t)),children:[(0,c.jsx)(Ke.Z,{value:S,testIdKey:"notifictions-toggle",values:M,widthPerOption:104,disabled:v,lockIconOnDisable:!1,onChange:function(e){h((0,_.ns)(e)),null===i||void 0===i||i(e)},classes:{permissionSelector:Je().permissionSelector}}),(0,c.jsxs)("div",{className:Je().rightColumn,children:[(0,c.jsxs)("div",{className:E()(Je().filterContainer),children:[(0,c.jsx)("div",{className:E()(Je().filterButtonContainer,(0,N.Z)({},Je().hideFilter,Object.keys(I).length||m===Z.F.MERCHANT)),children:(0,c.jsx)(ze,{disabled:a,portalDestinationId:Qe,onChange:function(e){O(e),null===n||void 0===n||n(e)}})}),(0,c.jsx)("div",{id:Qe,className:Je().appliedFilterContainer})]}),(0,c.jsx)("div",{children:(0,c.jsx)("button",{"data-testid":"mark-all-as-read-button",disabled:a,className:Je().markAllReadButton,onClick:o,children:"Mark All As Read"})})]})]}),b>0&&S!==k.bm.SAVED&&(0,c.jsx)(qe.Z,{onClick:function(){d(),j(0)},dataTestId:"new-notifications-button",itemText:"Notification",count:b,classes:{newItemsButton:Je().newItemsButton}})]})},tt=n(77257),nt=n(66341),it=n(18317),ot=n.n(it),at=function(e){switch(e){case k.bm.UNREAD:return"No Unread Notifications";
1case k.bm.SAVED:return"No Saved Notifications";default:return"No Notifications"}},rt=function(){var e=(0,Le.Z)().stage,t=(0,f.TL)(),n=(0,nt.Z)(),i=n.userType,s=n.selectedId,h=n.selectedIdObject,N=(0,f.CG)((function(e){return e.notifications.toggleIndex})),R=(0,f.CG)((function(e){return e.notifications.content})),E=(0,f.CG)((function(e){return e.operations.reportRunInProgress})),w=(0,u.useState)(!1),x=w[0],S=w[1],C=(0,u.useState)(!1),g=C[0],I=C[1],O=(0,u.useState)(!1),T=O[0],b=O[1],j=(0,u.useState)(),A=j[0],D=j[1],M=(0,u.useState)({readStatus:!1}),Z=M[0],P=M[1],B=(0,u.useState)(!0),y=B[0],L=B[1],F=(0,u.useState)(!1),$=F[0],H=F[1],V=(0,u.useState)({markReadSaveRequests:0,disableSlider:!1}),U=V[0],G=V[1],z=(0,u.useState)(null),K=z[0],Y=z[1],W=(0,u.useRef)(null),q=(0,u.useRef)(null),X=(0,u.useRef)(null),J=(0,u.useRef)(1),Q=(0,u.useCallback)(function(){var e=(0,o.Z)(l().mark((function e(n,i){var o,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s){e.next=10;break}return S(!0),o=(0,a.Z)({},n,h),e.next=6,t((0,v.it)({data:o,query:{page:i,size:50}})).unwrap();case 6:return r=e.sent,D(r.content.length),e.next=10,t((0,v.Rl)(h));case 10:e.next=14;break;case 12:e.prev=12,e.t0=e.catch(0);case 14:return e.prev=14,S(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[0,12,14,17]])})));return function(t,n){return e.apply(this,arguments)}}(),[t,s,h]),ee=(0,u.useCallback)((function(){var e;t((0,_.L1)()),D(void 0),I(!1),b(!1),L(!0),J.current=1,null===(e=W.current)||void 0===e||e.resetAfterIndex(0),X.current&&clearTimeout(X.current),q.current&&clearTimeout(q.current)}),[t]);(0,u.useEffect)((function(){ee(),Q(Z,J.current)}),[s,e,t,Q,Z,ee]),(0,u.useEffect)((function(){H(!T&&(!R.length||R.every((function(e){return e.removeRowAnimation}))))}),[R,T]),(0,u.useEffect)((function(){return function(){X.current&&clearTimeout(X.current),q.current&&clearTimeout(q.current)}}),[t,s,i]);var te=function(){var e=(0,o.Z)(l().mark((function e(){var n;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s){e.next=3;break}return e.abrupt("return");case 3:return(n=N===k.bm.UNREAD)&&b(!0),G((function(e){return{disableSlider:!0,markReadSaveRequests:e.markReadSaveRequests+1}})),e.next=8,t((0,v.op)(h)).unwrap();case 8:G((function(e){var t=e.markReadSaveRequests>0?e.markReadSaveRequests-1:0;return{disableSlider:t>0,markReadSaveRequests:t}})),n&&(I(!0),q.current&&clearTimeout(q.current),q.current=setTimeout((function(){ee()}),305)),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),b(!1),G((function(e){var t=e.markReadSaveRequests>0?e.markReadSaveRequests-1:0;return{disableSlider:t>0,markReadSaveRequests:t}}));case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=(0,o.Z)(l().mark((function e(n){var i,o,r,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.notificationId,o=n.statusValue,r=n.statusType,e.prev=1,!s){e.next=15;break}if((c=N===k.bm.SAVED&&"savedStatus"===r&&!1===o||N===k.bm.UNREAD&&"readStatus"===r&&!0===o)&&b(!0),G((function(e){return{disableSlider:!0,markReadSaveRequests:e.markReadSaveRequests+1}})),r!==k.RK.readStatus){e.next=11;break}return e.next=9,t((0,v.vd)((0,a.Z)({notificationId:i,readStatus:o},h))).unwrap();case 9:e.next=13;break;case 11:return e.next=13,t((0,v.Zn)((0,a.Z)({notificationId:i,savedStatus:o},h))).unwrap();case 13:G((function(e){var t=e.markReadSaveRequests>0?e.markReadSaveRequests-1:0;return{disableSlider:t>0,markReadSaveRequests:t}})),c&&(setTimeout((function(){var e;return null===(e=W.current)||void 0===e?void 0:e.resetAfterIndex(0)})),X.current&&clearTimeout(X.current),X.current=setTimeout((function(){return b(!1)}),506));case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(1),b(!1),G((function(e){var t=e.markReadSaveRequests>0?e.markReadSaveRequests-1:0;return{disableSlider:t>0,markReadSaveRequests:t}}));case 21:case"end":return e.stop()}}),e,null,[[1,17]])})));return function(t){return e.apply(this,arguments)}}();return(0,c.jsxs)("div",{className:ot().notificationsContainer,children:[!$&&(0,c.jsxs)("button",{className:ot().backToTopButton,onClick:function(){W.current&&W.current.scrollTo(0)},children:["Back To Top"," ",(0,c.jsx)("div",{className:ot().upIconContainer,children:(0,c.jsx)(p.Z,{className:ot().upIcon})})]}),(0,c.jsx)("div",{className:ot().headerContainer,children:(0,c.jsx)(et,{userType:i,selectedId:s,disabled:T,listAtTop:y,onToggleChange:function(e){P((function(t){t.savedStatus,t.readStatus;var n=(0,r.Z)(t,["savedStatus","readStatus"]);return Object.assign(n,e===k.bm.UNREAD&&{readStatus:!1},e===k.bm.SAVED&&{savedStatus:!0})}))}
1,onFilterChange:function(e){P((function(t){t.notificationType;var n=(0,r.Z)(t,["notificationType"]);return(0,a.Z)({},n,e)}))},handleMarkAllRead:te,animationInProgress:T,resetList:function(){var e;return null===(e=W.current)||void 0===e?void 0:e.resetAfterIndex(0)},scrollOffsetOnOverflow:function(e){var t,n,i=W.current,o=(null!==(n=null===(t=i)||void 0===t?void 0:t.props)&&void 0!==n?n:{}).height,a=void 0===o?0:o;if(!i||0===a||!K)return!1;var r=K.scrollHeight>a;if(r){var s,l,c,u=null!==(c=null===(s=i)||void 0===s||null===(l=s.state)||void 0===l?void 0:l.scrollOffset)&&void 0!==c?c:0;i.scrollTo(u+90*e)}return r},scrollToTop:function(){var e;return null===(e=W.current)||void 0===e?void 0:e.scrollToItem(0)},disableSlider:U.disableSlider})}),(0,c.jsxs)("div",{className:ot().contentContainer,children:[x&&(0,c.jsx)("div",{"data-testid":"notifications-spinner",className:ot().spinnerContainer,children:(0,c.jsx)(Be.Z,{diameter:62,strokeWidth:4})}),!x&&$?(0,c.jsx)(Pe.Z,{icon:m.Z,title:at(N),className:ot().emptyState}):(0,c.jsx)(ye.Z,{"data-testid":"notifications-list",listRef:function(e){return W.current=e},data:R,rowHeight:function(e){return R[e].removeRowAnimation?0:90},classes:{virtualRow:ot().heightTransition},onLastPage:0===Number(A),rowKey:"notificationId",loadMore:(0,o.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return J.current++,e.next=3,Q(Z,J.current);case 3:case"end":return e.stop()}}),e)}))),listOnScroll:function(e){var t=e.scrollOffset;t>0&&y&&L(!1),0!==t||y||L(!0)},shouldNotLoadMore:function(e){return T||0===Number(A)||e<R.length-1},outerRef:Y,children:function(e){var t=e.data,n=e.index,i=t[n];return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Ze,{index:n,notification:i,removingRow:R[n].removeRowAnimation||g,disableReadSaveButtons:T,handleRead:function(e,t){ne({notificationId:e,statusValue:!t,statusType:k.RK.readStatus})},handleSave:function(e,t){ne({notificationId:e,statusValue:!t,statusType:k.RK.savedStatus})}})})}})]}),E&&(0,d.createPortal)((0,c.jsx)(tt.Z,{startPage:tt.a.EXPORTING,onClose:function(){return t((0,Re.Ed)(void 0))}}),document.body)]})};rt.getLayout=(0,h.a)();var st=rt},79756:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var i=function(e,t,n){return!0===e.startsWith("https://cdn.shopify.com")?"".concat(e,"?width=").concat(t,"&height=").concat(n):e}},34838:function(e){e.exports={newItemsButton:"NewItemsButton_newItemsButton__COg9b",upIconContainer:"NewItemsButton_upIconContainer__2J0d8",downArrow:"NewItemsButton_downArrow__3Hw7s",upIcon:"NewItemsButton_upIcon__wPs5z"}},70358:function(e){e.exports={permissionSelector:"OptionsSlider_permissionSelector__b0H7y",disabled:"OptionsSlider_disabled__QC3mZ",option:"OptionsSlider_option__a75_r",selected:"OptionsSlider_selected__fSRAI",lockIcon:"OptionsSlider_lockIcon__gSir_",selectedSlider:"OptionsSlider_selectedSlider__BvUgt"}},30403:function(e){e.exports={list:"VirtualizedList_list__krBAI",listHeader:"VirtualizedList_listHeader__7vsny",headerScrollbarGutter:"VirtualizedList_headerScrollbarGutter__IVpk_",scrollableList:"VirtualizedList_scrollableList__a_m_Z",fixedSizeList:"VirtualizedList_fixedSizeList__uI76A",listScrollbarGutter:"VirtualizedList_listScrollbarGutter__8wCpV"}},69600:function(e){e.exports={filterOption:"NotificationFilter_filterOption__dq1od",filterMenuIcon:"NotificationFilter_filterMenuIcon__B4uMw",valuesTab:"NotificationFilter_valuesTab__W6AKT"}},37466:function(e){e.exports={beamErrorRow:"BeamErrorRow_beamErrorRow__dzJpw",title:"BeamErrorRow_title__lZHhw",readText:"BeamErrorRow_readText___rtQ9",shopifyLink:"BeamErrorRow_shopifyLink__N_Tp2",externalIcon:"BeamErrorRow_externalIcon__d_JVG",errorPill:"BeamErrorRow_errorPill__mq5kQ",errorLabel:"BeamErrorRow_errorLabel__ktl26",context:"BeamErrorRow_context__Q1Xy6",reason:"BeamErrorRow_reason__bqwbp",viewMappingButton:"BeamErrorRow_viewMappingButton__X9Ywb"}},44074:function(e){e.exports={merchantContentRow:"MerchantContentRow_merchantContentRow__9RC7Z",notificationText:"MerchantContentRow_notificationText__4u9s9",readText:"MerchantContentRow_readText__Fvezy"}},61426:function(e){e.exports={reportCompletedRow:"ReportCompletedRow_reportCompletedRow__Ga_n_",title:"ReportCompletedRow_title__0vxJK",readText:"ReportCompletedRow_readText__cWzZX",downloadReadyPill:"ReportCompletedRow_downloadReadyPill__JlYCp",exportReadyLabel:"ReportCompletedRow_exportReadyLabel__5v6UU",atmIcon:"ReportCompletedRow_atmIcon__oeVxP",payoutIcon:"ReportCompletedRow_payoutIcon__1HSVp",commissionIcon:"ReportCompletedRow_commissionIcon__rIFVN",merchantIcon:"ReportCompletedRow_merchantIcon__j834K",downloadButton:"ReportCompletedRow_downloadButton__91Rpb",downloadIcon:"ReportCompletedRow_downloadIcon__elrWt"}},12869:function(e){e.exports={pillContainer:"NotificationPill_pillContainer__xur_s",leftPill:"NotificationPill_leftPill__L7G2L",nameWithNoLogo:"NotificationPill_nameWithNoLogo__DRZuu",merchantLogo:"NotificationPill_merchantLogo__70cdR",merchantName:"NotificationPill_merchantName__BtG38",mainPill:"NotificationPill_mainPill__bVWJX",commissionPill:"NotificationPill_commissionPill__X4o4F",rates:"NotificationPill_rates__9NaBu",arrowContainer:"NotificationPill_arrowContainer__TZPIh",arrow:"NotificationPill_arrow__NT_FZ",commissionChanged:"NotificationPill_commissionChanged__Cxwno",read:"NotificationPill_read__30NtN",storeConnectionPill:"NotificationPill_storeConnectionPill__yOGry",mainPillIcon:"NotificationPill_mainPillIcon__AAcbM",commissionChangeIcon:"NotificationPill_commissionChangeIcon__sV7SD"}},23083:function(e){e.exports={container:"NotificationRow_container__xQ3L0",leftBox:"NotificationRow_leftBox___l1Mc",rightBox:"NotificationRow_rightBox__qrrfW",row:"NotificationRow_row__Ih4NG",removeRowAnimation:"NotificationRow_removeRowAnimation__Ygto9",slideOut:"NotificationRow_slideOut___8Rlc",content:"NotificationRow_content__UwdbL",leftColumnContainer:"NotificationRow_leftColumnContainer__SnYBO",column:"NotificationRow_column__393VL",leftColumn:"NotificationRow_leftColumn__JDnGW",unreadBorder:"NotificationRow_unreadBorder__Qpd0L",date:"NotificationRow_date__3IZJj",readSaveContainer:"NotificationRow_readSaveContainer__FXIWd",readSaveButton:"NotificationRow_readSaveButton__OaMoc",readSaveIcon:"NotificationRow_readSaveIcon__67jP_",bookmarkIconFilled:"NotificationRow_bookmarkIconFilled__TaMyN",tooltipContainer:"NotificationRow_tooltipContainer__faGAO",tooltip:"NotificationRow_tooltip__Va0Pw"}}
1,70129:function(e){e.exports={headerContainer:"NotificationsHeader_headerContainer__h8Zfu",header:"NotificationsHeader_header__wLXwB",shadowBorder:"NotificationsHeader_shadowBorder___af8Y",option:"NotificationsHeader_option__Y9WbT",optionCount:"NotificationsHeader_optionCount__YgY2V",rightColumn:"NotificationsHeader_rightColumn__p4u_T",filterContainer:"NotificationsHeader_filterContainer__FFCAo",hideFilter:"NotificationsHeader_hideFilter__wrWZx",markAllReadButton:"NotificationsHeader_markAllReadButton__MTmku",newItemsButton:"NotificationsHeader_newItemsButton___mmMX",permissionSelector:"NotificationsHeader_permissionSelector__P2ujn"}},18317:function(e){e.exports={notificationsContainer:"notifications_notificationsContainer__Cl7FJ",backToTopButton:"notifications_backToTopButton__FuIu6",upIcon:"notifications_upIcon__ZflDG",upIconContainer:"notifications_upIconContainer__0sJp1",headerContainer:"notifications_headerContainer__v4cN_",contentContainer:"notifications_contentContainer__FnZ6d",spinnerContainer:"notifications_spinnerContainer__tubkm",emptyState:"notifications_emptyState__75WX1",fadeIn:"notifications_fadeIn__pVoiw",heightTransition:"notifications_heightTransition__SF20z",shake:"notifications_shake__OVWqJ",spin:"notifications_spin__z0K9h"}}},function(e){e.O(0,[281,3714,6585,6750,842,1664,1330,1151,2667,5225,908,8137,5123,9774,2888,179],(function(){return t=72038,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.