@bikdotai/bik-component-library 0.0.806-beta.8 → 0.0.806

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  2. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  3. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +1 -1
  4. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
  5. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -1
  6. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
  7. package/dist/cjs/components/feature-announcements/utils/animationHelpers.js.map +1 -1
  8. package/dist/cjs/editor/BikEditor.utils.js +1 -1
  9. package/dist/cjs/editor/BikEditor.utils.js.map +1 -1
  10. package/dist/cjs/editor/extensions/mention/MentionExtension.js +1 -1
  11. package/dist/cjs/editor/extensions/mention/MentionExtension.js.map +1 -1
  12. package/dist/cjs/editor/extensions/plainClipboard/PlainClipboardExtension.js +1 -1
  13. package/dist/cjs/editor/extensions/plainClipboard/PlainClipboardExtension.js.map +1 -1
  14. package/dist/cjs/editor/extensions/slashCommand/SlashCommandExtension.js +1 -1
  15. package/dist/cjs/editor/extensions/slashCommand/SlashCommandExtension.js.map +1 -1
  16. package/dist/cjs/editor/serializers/toWhatsAppText.js +1 -1
  17. package/dist/cjs/editor/serializers/toWhatsAppText.js.map +1 -1
  18. package/dist/cjs/src/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  19. package/dist/cjs/src/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  20. package/dist/cjs/src/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  21. package/dist/cjs/src/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  22. package/dist/cjs/src/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  23. package/dist/cjs/src/components/bik-layout/MockMenus.d.ts +0 -1
  24. package/dist/cjs/src/components/feature-announcements/types/props.types.d.ts +3 -3
  25. package/dist/cjs/src/components/feature-announcements/utils/animationHelpers.d.ts +1 -1
  26. package/dist/cjs/src/editor/BikEditor.utils.d.ts +10 -15
  27. package/dist/cjs/src/editor/serializers/toWhatsAppText.d.ts +2 -2
  28. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  29. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  30. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +1 -1
  31. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
  32. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +1 -1
  33. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
  34. package/dist/esm/components/feature-announcements/utils/animationHelpers.js.map +1 -1
  35. package/dist/esm/editor/BikEditor.utils.js +1 -1
  36. package/dist/esm/editor/BikEditor.utils.js.map +1 -1
  37. package/dist/esm/editor/extensions/mention/MentionExtension.js +1 -1
  38. package/dist/esm/editor/extensions/mention/MentionExtension.js.map +1 -1
  39. package/dist/esm/editor/extensions/plainClipboard/PlainClipboardExtension.js +1 -1
  40. package/dist/esm/editor/extensions/plainClipboard/PlainClipboardExtension.js.map +1 -1
  41. package/dist/esm/editor/extensions/slashCommand/SlashCommandExtension.js +1 -1
  42. package/dist/esm/editor/extensions/slashCommand/SlashCommandExtension.js.map +1 -1
  43. package/dist/esm/editor/serializers/toWhatsAppText.js +1 -1
  44. package/dist/esm/editor/serializers/toWhatsAppText.js.map +1 -1
  45. package/dist/esm/src/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  46. package/dist/esm/src/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  47. package/dist/esm/src/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  48. package/dist/esm/src/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  49. package/dist/esm/src/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  50. package/dist/esm/src/components/bik-layout/MockMenus.d.ts +0 -1
  51. package/dist/esm/src/components/feature-announcements/types/props.types.d.ts +3 -3
  52. package/dist/esm/src/components/feature-announcements/utils/animationHelpers.d.ts +1 -1
  53. package/dist/esm/src/editor/BikEditor.utils.d.ts +10 -15
  54. package/dist/esm/src/editor/serializers/toWhatsAppText.d.ts +2 -2
  55. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__awaiter as t}from"../../_virtual/_tslib.js";import{jsx as e,jsxs as o,Fragment as n}from"react/jsx-runtime";import{useState as r,useEffect as a,useCallback as i}from"react";import s,{ACTIONS as d}from"react-joyride";import"./constants/animations.js";import{SELECTORS as l}from"./constants/selectors.js";import{useFeatureAnnouncements as u}from"./hooks/useFeatureAnnouncements.js";import c from"./MajorUpdatePopup.js";import p from"./MinorUpdatePopup.js";import{VideoModal as f}from"./VideoModal.js";const m=m=>{let{children:b,fetchVisibleFeatures:g,getStoreFeatureProgress:h,fetchFeatureById:y,markFeatureAsViewedForStore:x,isFeatureApplicableToCurrentPage:k,module:S,router:C,storeId:T,onAnnouncementShown:v,onAnnouncementInteracted:w}=m;var I;const{majorUpdateFeatures:B,minorUpdateFeatures:F,isLoading:E,markFeatureAsViewed:N}=u({fetchVisibleFeatures:g,getStoreFeatureProgress:h,fetchFeatureById:y,markFeatureAsViewedForStore:x,isFeatureApplicableToCurrentPage:k,module:S,router:C}),[j,P]=r(null),[U,W]=r(null),[V,M]=r(!1),[O,q]=r([]),[_,A]=r(!1),[L,R]=r([]),[$,z]=r(!1),[H,Z]=r(!1),[D,G]=r([]),[J,K]=r(!1),[Q,X]=r(!1),[Y,tt]=r(!1),[et,ot]=r(""),[nt,rt]=r(!1),[at,it]=r(!1),[st,dt]=r(!1),[lt,ut]=r(0),[ct,pt]=r(0),[ft,mt]=r(new Set);a((()=>{const t="minor-spotlight-cutout-style";let e=document.getElementById(t);return e||(e=document.createElement("style"),e.id=t,document.head.appendChild(e)),e.textContent="\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t",()=>{const e=document.getElementById(t);e&&e.remove()}}),[]),a((()=>{ut((t=>t+1)),pt((t=>t+1)),it(!1),dt(!1),mt(new Set)}),[null==C?void 0:C.pathname]),a((()=>{if(!(B.length>0)||j||E||$||nt)0!==B.length||E||X(!0);else{X(!1),K(!1),M(!1),q([]),W(null),G([]);let t=0;const e=10,o=()=>{t++;document.querySelector('[data-testid="whats-new-button"]')?bt(B[0]):t<e?setTimeout(o,1e3):X(!0)};o()}}),[B,j,E,$,nt]),a((()=>{var t;const e=null===(t=null==C?void 0:C.query)||void 0===t?void 0:t.featureId;if(!e||E||0===F.length)return;const o=F.find((t=>t.id===e));if(!o||!o.featureTag)return;K(!0),Z(!0);let n=0;const r=setInterval((()=>{n++;const t=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`;if(document.querySelector(t)){const t=[o];G(t),Tt(o,t),clearInterval(r)}else n>=25&&(Z(!1),clearInterval(r))}),200);return()=>{clearInterval(r)}}),[F,null===(I=null==C?void 0:C.query)||void 0===I?void 0:I.featureId,E]),a((()=>{var t;if(F.length>0&&!E&&!V&&!H&&!U&&!J&&Q&&!nt){let t=null,e=null,o=null,n=!1;const r=()=>{if(n||H||U||J||!Q)return;const r=F.filter((t=>{if(!t.featureTag||""===t.featureTag.trim())return!1;if(ft.has(t.id))return!1;const e=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`;return null!==document.querySelector(e)}));r.length>0&&(G(r),Tt(r[0],r),t&&(t.disconnect(),t=null),e&&(window.removeEventListener("scroll",e),e=null),o&&(clearTimeout(o),o=null))};return t=new MutationObserver((t=>{let e=!1;for(const o of t){if("childList"===o.type&&o.addedNodes.length>0)for(let t=0;t<o.addedNodes.length;t++){const n=o.addedNodes[t];if(n.nodeType===Node.ELEMENT_NODE){const t=n;if(t.id||t.querySelector("[id]")){e=!0;break}}}if(e)break}V||n||H||U||J||!Q||!e||(o&&clearTimeout(o),o=setTimeout((()=>{n||H||U||J||!Q||r()}),200))})),e=()=>{V||n||H||U||J||!Q||(o&&clearTimeout(o),requestAnimationFrame((()=>{o=setTimeout((()=>{n||H||U||J||!Q||r()}),300)})))},t&&t.observe(document.body,{childList:!0,subtree:!0}),e&&window.addEventListener("scroll",e,{passive:!0}),r(),setTimeout((()=>{n||H||U||J||!Q||r()}),100),setTimeout((()=>{n||H||U||J||!Q||r()}),1e3),setTimeout((()=>{n||H||U||J||!Q||r()}),500),()=>{n=!0,t&&t.disconnect(),e&&window.removeEventListener("scroll",e),o&&clearTimeout(o)}}if(0===F.length||E){(null===(t=null==C?void 0:C.query)||void 0===t?void 0:t.featureId)&&U||(M(!1),q([]),W(null),G([]),K(!1))}}),[F,E,V,H,U,J,Q,N,nt]);const bt=t=>{P(t);const o=B.findIndex((e=>e.id===t.id)),n=B.length,r=[{target:l.WHATS_NEW_BUTTON,content:e(c,{feature:t,currentIndex:o,totalFeatures:n,onSkip:()=>gt(t),onExplore:()=>ht(t),onPrevious:()=>yt(t),onNext:()=>xt(t),setIsClosing:it}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];R(r),A(!0),v&&T&&v({storeId:T,announcementId:t.id,announcementTitle:t.title,imageUrl:t.displayImage||t.image,videoUrl:t.productVideo})},gt=i((t=>{const e=t||j;e&&(z(!0),B.forEach((t=>{N(t.id)})),A(!1),P(null),R([]),X(!0),w&&T&&w({storeId:T,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo,buttonClicked:"Skip",buttonName:"Skip",buttonUrl:void 0}),setTimeout((()=>{z(!1)}),500))}),[j,B,N]),ht=i((t=>{z(!0),N(t.id),t.productVideo&&(ot(t.productVideo),tt(!0),rt(!0)),A(!1),P(null),R([]);B.findIndex((e=>e.id===t.id))===B.length-1&&X(!0),w&&T&&w({storeId:T,announcementId:t.id,announcementTitle:t.title,imageUrl:t.displayImage||t.image,videoUrl:t.productVideo,buttonClicked:"Primary",buttonName:t.buttonText||"Explore",buttonUrl:t.redirectUrl||t.productVideo}),setTimeout((()=>{z(!1)}),500)}),[B,N]),yt=i((t=>{const o=t||j;if(!o)return;const n=B.findIndex((t=>t.id===o.id));if(n>0){const t=B[n-1];P(t);const o=n-1,r=B.length,a=[{target:'[data-testid="whats-new-button"]',content:e(c,{feature:t,currentIndex:o,totalFeatures:r,onSkip:()=>gt(t),onExplore:()=>ht(t),onPrevious:()=>yt(t),onNext:()=>xt(t),setIsClosing:it}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];R(a)}}),[j,B]),xt=i((t=>{const o=t||j;if(!o)return;const n=B.findIndex((t=>t.id===o.id));if(n<B.length-1){const t=B[n+1];P(t);const o=n+1,r=B.length,a=[{target:'[data-testid="whats-new-button"]',content:e(c,{feature:t,currentIndex:o,totalFeatures:r,onSkip:()=>gt(t),onExplore:()=>ht(t),onPrevious:()=>yt(t),onNext:()=>xt(t),setIsClosing:it}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];R(a)}else z(!0),N(o.id),A(!1),P(null),R([]),X(!0),setTimeout((()=>{z(!1)}),500)}),[j,B,N]),kt=()=>{if(B.length>0&&!j){document.querySelector('[data-testid="whats-new-button"]')&&bt(B[0])}};a((()=>(window.showMajorUpdatePopup=kt,()=>{delete window.showMajorUpdatePopup})),[B,j]);const St=i((t=>{const{action:e}=t;e===d.CLOSE&&(j&&(z(!0),B.forEach((t=>{N(t.id)})),X(!0),setTimeout((()=>{z(!1)}),500)),A(!1),P(null),R([]))}),[j,B,N]),Ct=i((t=>{const{action:e}=t;if(e===d.CLOSE){if(U){Z(!0),N(U.id);D.findIndex((t=>t.id===U.id))===D.length-1&&K(!0),setTimeout((()=>{Z(!1)}),500)}M(!1),W(null),q([])}}),[U,D,N]),Tt=(o,n)=>t(void 0,void 0,void 0,(function*(){W(o);const t=n||D,r=t.findIndex((t=>t.id===o.id)),a=t.length,i=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,s=document.querySelector(i);if(s)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(s,120)}catch(t){}const d=[{target:i,content:e(p,{feature:o,currentIndex:r,totalFeatures:a,onSkip:()=>vt(o),onExplore:()=>wt(o),onPrevious:()=>It(o),onNext:()=>Bt(o),setIsClosing:dt}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:o,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];q(d),M(!0)})),vt=i((t=>{const e=t||U;if(e){Z(!0),N(e.id),mt((t=>new Set(t).add(e.id))),M(!1),W(null),q([]);const t=D.find((t=>t.id!==e.id&&!ft.has(t.id)));setTimeout((()=>{Z(!1),t?Tt(t,D):K(!0)}),500)}}),[U,D,N,ft]),wt=i((t=>{Z(!0),N(t.id),mt((e=>new Set(e).add(t.id))),t.productVideo&&(ot(t.productVideo),tt(!0),rt(!0)),M(!1),W(null),q([]);const e=D.find((e=>e.id!==t.id&&!ft.has(e.id)));setTimeout((()=>{Z(!1),e&&!t.productVideo?Tt(e,D):e||K(!0)}),500)}),[D,N,ft]),It=i((o=>t(void 0,void 0,void 0,(function*(){const t=o||U;if(!t)return;const n=D.findIndex((e=>e.id===t.id));if(n>0){const t=D[n-1];W(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,r=document.querySelector(o);if(r)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(r,120)}catch(t){}const a=n-1,i=D.length,s=[{target:o,content:e(p,{feature:t,currentIndex:a,totalFeatures:i,onSkip:()=>vt(t),onExplore:()=>wt(t),onPrevious:()=>It(t),onNext:()=>Bt(t),setIsClosing:dt}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];q(s)}}))),[U,D]),Bt=i((o=>t(void 0,void 0,void 0,(function*(){const t=o||U;if(!t)return;const n=D.findIndex((e=>e.id===t.id));if(n<D.length-1){const t=D[n+1];W(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,r=document.querySelector(o);if(r)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(r,120)}catch(t){}const a=n+1,i=D.length,s=[{target:o,content:e(p,{feature:t,currentIndex:a,totalFeatures:i,onSkip:()=>vt(t),onExplore:()=>wt(t),onPrevious:()=>It(t),onNext:()=>Bt(t),setIsClosing:dt}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];q(s)}else Z(!0),K(!0),N(t.id),M(!1),W(null),q([]),setTimeout((()=>{Z(!1)}),500)}))),[U,D,N]);return o(n,{children:[b,L.length>0&&e(s,{steps:L,run:_,continuous:!1,showProgress:!1,showSkipButton:!1,callback:St,disableOverlayClose:!1,disableCloseOnEsc:!1,disableOverlay:!1,spotlightClicks:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:at?"transparent":"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none",boxShadow:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`major-joyride-${lt}`),O.length>0&&e(s,{steps:O,run:V,continuous:!1,showProgress:!1,showSkipButton:!1,callback:Ct,disableOverlayClose:!1,disableCloseOnEsc:!1,disableOverlay:!1,scrollToFirstStep:!0,scrollOffset:120,disableScrolling:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:st?"transparent":"#ffffff"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",borderRadius:"8px",boxShadow:st?"none":"0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`minor-joyride-${ct}`),e(f,{isOpen:Y,videoUrl:et,onClose:()=>{tt(!1),ot(""),rt(!1);const t=D.find((t=>!ft.has(t.id)));t?setTimeout((()=>{Tt(t,D)}),300):K(!0)}})]})};export{m as default};
1
+ import{__awaiter as t}from"../../_virtual/_tslib.js";import{jsx as e,jsxs as o,Fragment as n}from"react/jsx-runtime";import{useState as i,useEffect as r,useCallback as a}from"react";import d,{ACTIONS as s}from"react-joyride";import"./constants/animations.js";import{SELECTORS as l}from"./constants/selectors.js";import{useFeatureAnnouncements as u}from"./hooks/useFeatureAnnouncements.js";import c from"./MajorUpdatePopup.js";import p from"./MinorUpdatePopup.js";import{VideoModal as f}from"./VideoModal.js";const m=m=>{let{children:b,fetchVisibleFeatures:g,getStoreFeatureProgress:h,fetchFeatureById:y,markFeatureAsViewedForStore:v,isFeatureApplicableToCurrentPage:x,module:k,router:S,storeId:C,onAnnouncementShown:T,onAnnouncementInteracted:w}=m;var B;const{majorUpdateFeatures:I,minorUpdateFeatures:F,isLoading:E,markFeatureAsViewed:N}=u({fetchVisibleFeatures:g,getStoreFeatureProgress:h,fetchFeatureById:y,markFeatureAsViewedForStore:v,isFeatureApplicableToCurrentPage:x,module:k,router:S}),[j,P]=i(null),[U,W]=i(null),[V,O]=i(!1),[M,q]=i([]),[_,A]=i(!1),[L,R]=i([]),[$,z]=i(!1),[H,Z]=i(!1),[D,G]=i([]),[J,K]=i(!1),[Q,X]=i(!1),[Y,tt]=i(!1),[et,ot]=i(""),[nt,it]=i(!1),[rt,at]=i(!1),[dt,st]=i(!1),[lt,ut]=i(0),[ct,pt]=i(0),[ft,mt]=i(new Set);r((()=>{const t="minor-spotlight-cutout-style";let e=document.getElementById(t);return e||(e=document.createElement("style"),e.id=t,document.head.appendChild(e)),e.textContent="\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t",()=>{const e=document.getElementById(t);e&&e.remove()}}),[]),r((()=>{ut((t=>t+1)),pt((t=>t+1)),at(!1),st(!1),mt(new Set)}),[null==S?void 0:S.pathname]),r((()=>{if(!(I.length>0)||j||E||$||nt)0!==I.length||E||X(!0);else{X(!1),K(!1),O(!1),q([]),W(null),G([]);let t=0;const e=10,o=()=>{t++;document.querySelector('[data-testid="whats-new-button"]')?bt(I[0]):t<e?setTimeout(o,1e3):X(!0)};o()}}),[I,j,E,$,nt]),r((()=>{var t;const e=null===(t=null==S?void 0:S.query)||void 0===t?void 0:t.featureId;if(!e||E||0===F.length)return;const o=F.find((t=>t.id===e));if(!o||!o.featureTag)return;K(!0),Z(!0);let n=0;const i=setInterval((()=>{n++;const t=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`;if(document.querySelector(t)){const t=[o];G(t),Ct(o,t),clearInterval(i)}else n>=25&&(Z(!1),clearInterval(i))}),200);return()=>{clearInterval(i)}}),[F,null===(B=null==S?void 0:S.query)||void 0===B?void 0:B.featureId,E]),r((()=>{var t;if(F.length>0&&!E&&!V&&!H&&!U&&!J&&Q&&!nt){let t=null,e=null,o=null,n=!1;const i=()=>{if(n||H||U||J||!Q)return;const i=F.filter((t=>{if(!t.featureTag||""===t.featureTag.trim())return!1;if(ft.has(t.id))return!1;const e=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`;return null!==document.querySelector(e)}));i.length>0&&(G(i),Ct(i[0],i),t&&(t.disconnect(),t=null),e&&(window.removeEventListener("scroll",e),e=null),o&&(clearTimeout(o),o=null))};return t=new MutationObserver((t=>{let e=!1;for(const o of t){if("childList"===o.type&&o.addedNodes.length>0)for(let t=0;t<o.addedNodes.length;t++){const n=o.addedNodes[t];if(n.nodeType===Node.ELEMENT_NODE){const t=n;if(t.id||t.querySelector("[id]")){e=!0;break}}}if(e)break}V||n||H||U||J||!Q||!e||(o&&clearTimeout(o),o=setTimeout((()=>{n||H||U||J||!Q||i()}),200))})),e=()=>{V||n||H||U||J||!Q||(o&&clearTimeout(o),requestAnimationFrame((()=>{o=setTimeout((()=>{n||H||U||J||!Q||i()}),300)})))},t&&t.observe(document.body,{childList:!0,subtree:!0}),e&&window.addEventListener("scroll",e,{passive:!0}),i(),setTimeout((()=>{n||H||U||J||!Q||i()}),100),setTimeout((()=>{n||H||U||J||!Q||i()}),1e3),setTimeout((()=>{n||H||U||J||!Q||i()}),500),()=>{n=!0,t&&t.disconnect(),e&&window.removeEventListener("scroll",e),o&&clearTimeout(o)}}if(0===F.length||E){(null===(t=null==S?void 0:S.query)||void 0===t?void 0:t.featureId)&&U||(O(!1),q([]),W(null),G([]),K(!1))}}),[F,E,V,H,U,J,Q,N,nt]);const bt=t=>{P(t);const o=I.findIndex((e=>e.id===t.id)),n=I.length,i=[{target:l.WHATS_NEW_BUTTON,content:e(c,{feature:t,currentIndex:o,totalFeatures:n,onSkip:()=>gt(t),onExplore:e=>ht(t,e),onPrevious:()=>yt(t),onNext:()=>vt(t),setIsClosing:at}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];R(i),A(!0),T&&C&&T({storeId:C,announcementId:t.id,announcementTitle:t.title,imageUrl:t.displayImage||t.image,videoUrl:t.productVideo})},gt=a((e=>t(void 0,void 0,void 0,(function*(){const t=e||j;t&&(z(!0),yield Promise.all(I.map((t=>N(t.id)))),A(!1),P(null),R([]),X(!0),w&&C&&w({storeId:C,announcementId:t.id,announcementTitle:t.title,imageUrl:t.displayImage||t.image,videoUrl:t.productVideo,buttonClicked:"Skip",buttonName:"Skip",buttonUrl:void 0}),setTimeout((()=>{z(!1)}),500))}))),[j,I,N]),ht=a(((e,o)=>t(void 0,void 0,void 0,(function*(){var t,n;z(!0),yield N(e.id);const i=null!=o?o:null===(t=e.primaryButton)||void 0===t?void 0:t.action;if("Play Video"===i&&e.productVideo&&(ot(e.productVideo),tt(!0),it(!0)),"Open link"===i){const t=(null===(n=e.primaryButton)||void 0===n?void 0:n.redirectionUrl)||e.redirectUrl;t&&!t.startsWith("http")&&(window.location.href=t)}A(!1),P(null),R([]);I.findIndex((t=>t.id===e.id))===I.length-1&&X(!0),w&&C&&w({storeId:C,announcementId:e.id,announcementTitle:e.title,imageUrl:e.displayImage||e.image,videoUrl:e.productVideo,buttonClicked:"Primary",buttonName:e.buttonText||"Explore",buttonUrl:e.redirectUrl||e.productVideo}),setTimeout((()=>{z(!1)}),500)}))),[I,N]),yt=a((t=>{const o=t||j;if(!o)return;const n=I.findIndex((t=>t.id===o.id));if(n>0){const t=I[n-1];P(t);const o=n-1,i=I.length,r=[{target:'[data-testid="whats-new-button"]',content:e(c,{feature:t,currentIndex:o,totalFeatures:i,onSkip:()=>gt(t),onExplore:e=>ht(t,e),onPrevious:()=>yt(t),onNext:()=>vt(t),setIsClosing:at}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];R(r)}}),[j,I]),vt=a((t=>{const o=t||j;if(!o)return;const n=I.findIndex((t=>t.id===o.id));if(n<I.length-1){const t=I[n+1];P(t);const o=n+1,i=I.length,r=[{target:'[data-testid="whats-new-button"]',content:e(c,{feature:t,currentIndex:o,totalFeatures:i,onSkip:()=>gt(t),onExplore:e=>ht(t,e),onPrevious:()=>yt(t),onNext:()=>vt(t),setIsClosing:at}),placement:"bottom-start",placementBeacon:"top-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMajor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"16px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];R(r)}else z(!0),N(o.id),A(!1),P(null),R([]),X(!0),setTimeout((()=>{z(!1)}),500)}),[j,I,N]),xt=()=>{if(I.length>0&&!j){document.querySelector('[data-testid="whats-new-button"]')&&bt(I[0])}};r((()=>(window.showMajorUpdatePopup=xt,()=>{delete window.showMajorUpdatePopup})),[I,j]);const kt=a((t=>{const{action:e}=t;e===s.CLOSE&&(j&&(z(!0),I.forEach((t=>{N(t.id)})),X(!0),setTimeout((()=>{z(!1)}),500)),A(!1),P(null),R([]))}),[j,I,N]),St=a((t=>{const{action:e}=t;if(e===s.CLOSE){if(U){Z(!0),N(U.id);D.findIndex((t=>t.id===U.id))===D.length-1&&K(!0),setTimeout((()=>{Z(!1)}),500)}O(!1),W(null),q([])}}),[U,D,N]),Ct=(o,n)=>t(void 0,void 0,void 0,(function*(){W(o);const t=n||D,i=t.findIndex((t=>t.id===o.id)),r=t.length,a=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,d=document.querySelector(a);if(d)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(d,120)}catch(t){}const s=[{target:a,content:e(p,{feature:o,currentIndex:i,totalFeatures:r,onSkip:()=>Tt(o),onExplore:t=>wt(o,t),onPrevious:()=>Bt(o),onNext:()=>It(o),setIsClosing:st}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:o,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];q(s),O(!0)})),Tt=a((e=>t(void 0,void 0,void 0,(function*(){const t=e||U;if(t){Z(!0),yield N(t.id),mt((e=>new Set(e).add(t.id))),O(!1),W(null),q([]);const e=D.find((e=>e.id!==t.id&&!ft.has(e.id)));setTimeout((()=>{Z(!1),e?Ct(e,D):K(!0)}),500)}}))),[U,D,N,ft]),wt=a(((e,o)=>t(void 0,void 0,void 0,(function*(){var t,n;Z(!0),yield N(e.id),mt((t=>new Set(t).add(e.id)));const i=null!=o?o:null===(t=e.primaryButton)||void 0===t?void 0:t.action;if("Play Video"===i&&e.productVideo&&(ot(e.productVideo),tt(!0),it(!0)),"Open link"===i){const t=(null===(n=e.primaryButton)||void 0===n?void 0:n.redirectionUrl)||e.redirectUrl;t&&!t.startsWith("http")&&(window.location.href=t)}O(!1),W(null),q([]);const r=D.find((t=>t.id!==e.id&&!ft.has(t.id)));setTimeout((()=>{Z(!1),r&&"Play Video"!==i?Ct(r,D):r||K(!0)}),500)}))),[D,N,ft]),Bt=a((o=>t(void 0,void 0,void 0,(function*(){const t=o||U;if(!t)return;const n=D.findIndex((e=>e.id===t.id));if(n>0){const t=D[n-1];W(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,i=document.querySelector(o);if(i)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(i,120)}catch(t){}const r=n-1,a=D.length,d=[{target:o,content:e(p,{feature:t,currentIndex:r,totalFeatures:a,onSkip:()=>Tt(t),onExplore:e=>wt(t,e),onPrevious:()=>Bt(t),onNext:()=>It(t),setIsClosing:st}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];q(d)}}))),[U,D]),It=a((o=>t(void 0,void 0,void 0,(function*(){const t=o||U;if(!t)return;const n=D.findIndex((e=>e.id===t.id));if(n<D.length-1){const t=D[n+1];W(t);const o=t.featureTag.startsWith("#")||t.featureTag.startsWith(".")||t.featureTag.startsWith("[")?t.featureTag:`#${t.featureTag}`,i=document.querySelector(o);if(i)try{const{scrollToElementSmooth:t}=yield import("./utils/elementHelpers.js");yield t(i,120)}catch(t){}const r=n+1,a=D.length,d=[{target:o,content:e(p,{feature:t,currentIndex:r,totalFeatures:a,onSkip:()=>Tt(t),onExplore:e=>wt(t,e),onPrevious:()=>Bt(t),onNext:()=>It(t),setIsClosing:st}),placement:"bottom",placementBeacon:"bottom-end",disableBeacon:!0,hideCloseButton:!0,hideSkipButton:!0,hideFooter:!0,offset:0,data:{feature:t,isMinor:!0},styles:{tooltip:{padding:0,backgroundColor:"transparent",borderRadius:"4px",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}}}];q(d)}else Z(!0),K(!0),N(t.id),O(!1),W(null),q([]),setTimeout((()=>{Z(!1)}),500)}))),[U,D,N]);return o(n,{children:[b,L.length>0&&e(d,{steps:L,run:_,continuous:!1,showProgress:!1,showSkipButton:!1,callback:kt,disableOverlayClose:!1,disableCloseOnEsc:!1,disableOverlay:!1,spotlightClicks:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:rt?"transparent":"#212121"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",border:"none",boxShadow:"none"},tooltip:{borderRadius:"16px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonClose:{display:"none"},buttonSkip:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`major-joyride-${lt}`),M.length>0&&e(d,{steps:M,run:V,continuous:!1,showProgress:!1,showSkipButton:!1,callback:St,disableOverlayClose:!1,disableCloseOnEsc:!1,disableOverlay:!1,scrollToFirstStep:!0,scrollOffset:120,disableScrolling:!1,styles:{options:{primaryColor:"#007bff",zIndex:1e4,width:"auto",arrowColor:dt?"transparent":"#ffffff"},overlay:{backgroundColor:"transparent"},spotlight:{backgroundColor:"transparent",borderRadius:"8px",boxShadow:dt?"none":"0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)"},tooltip:{borderRadius:"4px",fontSize:"14px",padding:0,backgroundColor:"transparent",border:"none",filter:"none",boxShadow:"none"},tooltipContent:{padding:0},buttonNext:{display:"none"},buttonBack:{display:"none"},buttonSkip:{display:"none"},buttonClose:{display:"none"}},locale:{back:"Back",close:"Close",last:"Close",next:"Next",skip:"Skip"}},`minor-joyride-${ct}`),e(f,{isOpen:Y,videoUrl:et,onClose:()=>{tt(!1),ot(""),it(!1);const t=D.find((t=>!ft.has(t.id)));t?setTimeout((()=>{Ct(t,D)}),300):K(!0)}})]})};export{m as default};
2
2
  //# sourceMappingURL=FeatureAnnouncementProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureAnnouncementProvider.js","sources":["../../../../src/components/feature-announcements/FeatureAnnouncementProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport Joyride, { ACTIONS } from 'react-joyride';\nimport { SELECTORS } from './constants';\nimport { useFeatureAnnouncements } from './hooks';\nimport MajorUpdatePopup from './MajorUpdatePopup';\nimport MinorUpdatePopup from './MinorUpdatePopup';\nimport { FeatureAnnouncement, FeatureAnnouncementProviderProps } from './types';\nimport { VideoModal } from './VideoModal';\n\nconst FeatureAnnouncementProvider: React.FC<\n\tFeatureAnnouncementProviderProps\n> = ({\n\tchildren,\n\tfetchVisibleFeatures,\n\tgetStoreFeatureProgress,\n\tfetchFeatureById,\n\tmarkFeatureAsViewedForStore,\n\tisFeatureApplicableToCurrentPage,\n\tmodule,\n\trouter,\n\tstoreId,\n\tonAnnouncementShown,\n\tonAnnouncementInteracted,\n}) => {\n\tconst {\n\t\tmajorUpdateFeatures,\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\tmarkFeatureAsViewed,\n\t} = useFeatureAnnouncements({\n\t\tfetchVisibleFeatures,\n\t\tgetStoreFeatureProgress,\n\t\tfetchFeatureById,\n\t\tmarkFeatureAsViewedForStore,\n\t\tisFeatureApplicableToCurrentPage,\n\t\tmodule,\n\t\trouter,\n\t});\n\n\tconst [currentMajorFeature, setCurrentMajorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [currentMinorFeature, setCurrentMinorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [runJoyride, setRunJoyride] = useState(false);\n\tconst [joyrideSteps, setJoyrideSteps] = useState<any[]>([]);\n\tconst [runMajorJoyride, setRunMajorJoyride] = useState(false);\n\tconst [majorJoyrideSteps, setMajorJoyrideSteps] = useState<any[]>([]);\n\tconst [isProcessingMajorUpdate, setIsProcessingMajorUpdate] = useState(false);\n\tconst [isProcessingMinorUpdate, setIsProcessingMinorUpdate] = useState(false);\n\tconst [availableMinorFeatures, setAvailableMinorFeatures] = useState<\n\t\tFeatureAnnouncement[]\n\t>([]);\n\tconst [minorFeaturesSkipped, setMinorFeaturesSkipped] = useState(false);\n\tconst [showMinorUpdates, setShowMinorUpdates] = useState(false);\n\tconst [isVideoModalOpen, setIsVideoModalOpen] = useState(false);\n\tconst [videoUrl, setVideoUrl] = useState('');\n\tconst [blockPopups, setBlockPopups] = useState(false);\n\tconst [isClosingMajor, setIsClosingMajor] = useState(false);\n\tconst [isClosingMinor, setIsClosingMinor] = useState(false);\n\tconst [majorJoyrideKey, setMajorJoyrideKey] = useState(0);\n\tconst [minorJoyrideKey, setMinorJoyrideKey] = useState(0);\n\tconst [shownMinorFeatureIds, setShownMinorFeatureIds] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\t// Add custom style for spotlight cutout effect\n\tuseEffect(() => {\n\t\tconst styleId = 'minor-spotlight-cutout-style';\n\t\tlet styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n\t\tif (!styleElement) {\n\t\t\tstyleElement = document.createElement('style');\n\t\t\tstyleElement.id = styleId;\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\n\t\tstyleElement.textContent = `\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t`;\n\n\t\treturn () => {\n\t\t\tconst el = document.getElementById(styleId);\n\t\t\tif (el) {\n\t\t\t\tel.remove();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// Force Joyride remount on navigation to prevent stale state\n\tuseEffect(() => {\n\t\tsetMajorJoyrideKey((prev) => prev + 1);\n\t\tsetMinorJoyrideKey((prev) => prev + 1);\n\t\tsetIsClosingMajor(false);\n\t\tsetIsClosingMinor(false);\n\t\t// Reset session tracking on navigation to allow features to show on new pages\n\t\tsetShownMinorFeatureIds(new Set());\n\t}, [router?.pathname]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tmajorUpdateFeatures.length > 0 &&\n\t\t\t!currentMajorFeature &&\n\t\t\t!isLoading &&\n\t\t\t!isProcessingMajorUpdate &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tsetShowMinorUpdates(false);\n\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\tsetRunJoyride(false);\n\t\t\tsetJoyrideSteps([]);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetAvailableMinorFeatures([]);\n\n\t\t\tlet attempts = 0;\n\t\t\tconst MAX_ATTEMPTS = 10;\n\n\t\t\tconst checkWhatsNewButton = () => {\n\t\t\t\tattempts++;\n\t\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t\t);\n\n\t\t\t\tif (whatsNewButton) {\n\t\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t\t} else if (attempts < MAX_ATTEMPTS) {\n\t\t\t\t\tsetTimeout(checkWhatsNewButton, 1000);\n\t\t\t\t} else {\n\t\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcheckWhatsNewButton();\n\t\t} else if (majorUpdateFeatures.length === 0 && !isLoading) {\n\t\t\tsetShowMinorUpdates(true);\n\t\t}\n\t}, [\n\t\tmajorUpdateFeatures,\n\t\tcurrentMajorFeature,\n\t\tisLoading,\n\t\tisProcessingMajorUpdate,\n\t\tblockPopups,\n\t]);\n\n\tuseEffect(() => {\n\t\t// Only run this special logic if a feature is being forced via URL\n\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\n\t\tif (!featureIdFromQuery || isLoading || minorUpdateFeatures.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst forcedFeature = minorUpdateFeatures.find(\n\t\t\t(f) => f.id === featureIdFromQuery,\n\t\t);\n\n\t\tif (!forcedFeature || !forcedFeature.featureTag) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent the standard flow from interfering\n\t\tsetMinorFeaturesSkipped(true);\n\t\t// Mark that we're processing to prevent other effects from interfering\n\t\tsetIsProcessingMinorUpdate(true);\n\n\t\tlet attempts = 0;\n\t\tconst maxAttempts = 25; // 5 seconds\n\t\tconst interval = setInterval(() => {\n\t\t\tattempts++;\n\t\t\tconst targetSelector =\n\t\t\t\tforcedFeature.featureTag.startsWith('#') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('.') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('[')\n\t\t\t\t\t? forcedFeature.featureTag\n\t\t\t\t\t: `#${forcedFeature.featureTag}`;\n\n\t\t\tconst element = document.querySelector(targetSelector);\n\n\t\t\tif (element) {\n\t\t\t\t// In test mode, pass the feature array directly to avoid async state issues\n\t\t\t\tconst testModeFeatures = [forcedFeature];\n\t\t\t\tsetAvailableMinorFeatures(testModeFeatures);\n\t\t\t\tshowMinorUpdateJoyride(forcedFeature, testModeFeatures);\n\t\t\t\t// Don't reset processing flag here - let user interaction handle it\n\t\t\t\t// This prevents auto-closing when multiple popups exist or when scrolling\n\t\t\t\tclearInterval(interval);\n\t\t\t} else if (attempts >= maxAttempts) {\n\t\t\t\t// Fallback for safety, though user expects it to be there.\n\t\t\t\t// We could log an error here.\n\t\t\t\t// Only reset on timeout (element not found)\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\tclearInterval(interval);\n\t\t\t}\n\t\t}, 200);\n\n\t\treturn () => {\n\t\t\tclearInterval(interval);\n\t\t\t// Don't reset processing flag on cleanup - it causes premature popup closure\n\t\t\t// The flag will be managed by user interactions (skip/explore handlers)\n\t\t};\n\t}, [minorUpdateFeatures, router?.query?.['featureId'], isLoading]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tminorUpdateFeatures.length > 0 &&\n\t\t\t!isLoading &&\n\t\t\t!runJoyride &&\n\t\t\t!isProcessingMinorUpdate &&\n\t\t\t!currentMinorFeature &&\n\t\t\t!minorFeaturesSkipped &&\n\t\t\tshowMinorUpdates &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tlet observer: MutationObserver | null = null;\n\t\t\tlet scrollListener: (() => void) | null = null;\n\t\t\tlet checkTimeout: ReturnType<typeof setTimeout> | null = null;\n\t\t\tlet isCleanedUp = false;\n\n\t\t\tconst checkElementsAndStartTour = () => {\n\t\t\t\tif (\n\t\t\t\t\tisCleanedUp ||\n\t\t\t\t\tisProcessingMinorUpdate ||\n\t\t\t\t\tcurrentMinorFeature ||\n\t\t\t\t\tminorFeaturesSkipped ||\n\t\t\t\t\t!showMinorUpdates\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tconst availableFeatures = minorUpdateFeatures.filter((feature) => {\n\t\t\t\t\tif (!feature.featureTag || feature.featureTag.trim() === '') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip features already shown in this session\n\t\t\t\t\tif (shownMinorFeatureIds.has(feature.id)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst targetSelector =\n\t\t\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t\t\t\tconst element = document.querySelector(targetSelector);\n\t\t\t\t\treturn element !== null;\n\t\t\t\t});\n\n\t\t\t\tif (availableFeatures.length > 0) {\n\t\t\t\t\tsetAvailableMinorFeatures(availableFeatures);\n\t\t\t\t\t// Pass features directly to avoid async state issues\n\t\t\t\t\tshowMinorUpdateJoyride(availableFeatures[0], availableFeatures);\n\n\t\t\t\t\tif (observer) {\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\tobserver = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (scrollListener) {\n\t\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t\t\tscrollListener = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t\tcheckTimeout = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tobserver = new MutationObserver((mutations) => {\n\t\t\t\tlet shouldCheck = false;\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < mutation.addedNodes.length; i++) {\n\t\t\t\t\t\t\tconst node = mutation.addedNodes[i];\n\t\t\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tconst element = node as Element;\n\t\t\t\t\t\t\t\tif (element.id || element.querySelector('[id]')) {\n\t\t\t\t\t\t\t\t\tshouldCheck = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (shouldCheck) break;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates &&\n\t\t\t\t\tshouldCheck\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 200);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tscrollListener = () => {\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\t// Use RAF for smoother performance synced with browser paint\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (observer) {\n\t\t\t\tobserver.observe(document.body, {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (scrollListener) {\n\t\t\t\twindow.addEventListener('scroll', scrollListener, { passive: true });\n\t\t\t}\n\n\t\t\tcheckElementsAndStartTour();\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 100);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 1000);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 500);\n\n\t\t\treturn () => {\n\t\t\t\tisCleanedUp = true;\n\t\t\t\tif (observer) {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t\tif (scrollListener) {\n\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t}\n\t\t\t\tif (checkTimeout) {\n\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (minorUpdateFeatures.length === 0 || isLoading) {\n\t\t\t// Don't clear joyride if we're in test mode with an active feature\n\t\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\t\t\tconst isTestModeWithActiveFeature =\n\t\t\t\tfeatureIdFromQuery && currentMinorFeature;\n\n\t\t\tif (!isTestModeWithActiveFeature) {\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetAvailableMinorFeatures([]);\n\t\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\trunJoyride,\n\t\tisProcessingMinorUpdate,\n\t\tcurrentMinorFeature,\n\t\tminorFeaturesSkipped,\n\t\tshowMinorUpdates,\n\t\tmarkFeatureAsViewed,\n\t\tblockPopups,\n\t]);\n\n\tconst showMajorUpdateJoyride = (feature) => {\n\t\tsetCurrentMajorFeature(feature);\n\n\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t(f) => f.id === feature.id,\n\t\t);\n\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\tconst majorSteps = [\n\t\t\t{\n\t\t\t\ttarget: SELECTORS.WHATS_NEW_BUTTON,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(feature)}\n\t\t\t\t\t\tonExplore={() => handleExploreFeature(feature)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMajor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\n\t\tsetMajorJoyrideSteps(majorSteps);\n\t\tsetRunMajorJoyride(true);\n\n\t\t// Fire announcement shown callback\n\t\tif (onAnnouncementShown && storeId) {\n\t\t\tonAnnouncementShown({\n\t\t\t\tstoreId,\n\t\t\t\tannouncementId: feature.id,\n\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleSkipMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t});\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t// Fire announcement interacted callback for Skip\n\t\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\t\tstoreId,\n\t\t\t\t\t\tannouncementId: targetFeature.id,\n\t\t\t\t\t\tannouncementTitle: targetFeature.title,\n\t\t\t\t\t\timageUrl: targetFeature.displayImage || targetFeature.image,\n\t\t\t\t\t\tvideoUrl: targetFeature.productVideo,\n\t\t\t\t\t\tbuttonClicked: 'Skip',\n\t\t\t\t\t\tbuttonName: 'Skip',\n\t\t\t\t\t\tbuttonUrl: undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleExploreFeature = useCallback(\n\t\t(feature) => {\n\t\t\tsetIsProcessingMajorUpdate(true);\n\t\t\tmarkFeatureAsViewed(feature.id);\n\t\t\tif (feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\t\t\tsetRunMajorJoyride(false);\n\t\t\tsetCurrentMajorFeature(null);\n\t\t\tsetMajorJoyrideSteps([]);\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === feature.id,\n\t\t\t);\n\t\t\tconst isLastMajorUpdate = currentIndex === majorUpdateFeatures.length - 1;\n\t\t\tif (isLastMajorUpdate) {\n\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t}\n\n\t\t\t// Fire announcement interacted callback for Primary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Primary',\n\t\t\t\t\tbuttonName: feature.buttonText || 'Explore',\n\t\t\t\t\tbuttonUrl: feature.redirectUrl || feature.productVideo,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t}, 500);\n\t\t},\n\t\t[majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handlePreviousMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = majorUpdateFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMajorFeature(prevFeature);\n\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreFeature(prevFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures],\n\t);\n\n\tconst handleNextMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < majorUpdateFeatures.length - 1) {\n\t\t\t\tconst nextFeature = majorUpdateFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMajorFeature(nextFeature);\n\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreFeature(nextFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst showMajorUpdatePopup = () => {\n\t\tif (majorUpdateFeatures.length > 0 && !currentMajorFeature) {\n\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t);\n\n\t\t\tif (whatsNewButton) {\n\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t}\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\t(window as any).showMajorUpdatePopup = showMajorUpdatePopup;\n\t\treturn () => {\n\t\t\tdelete (window as any).showMajorUpdatePopup;\n\t\t};\n\t}, [majorUpdateFeatures, currentMajorFeature]);\n\tconst handleMajorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMajorFeature) {\n\t\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t\t});\n\n\t\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleMinorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMinorFeature) {\n\t\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\t\tmarkFeatureAsViewed(currentMinorFeature.id);\n\n\t\t\t\t\t// Check if there are more features to show\n\t\t\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t\t\t(f) => f.id === currentMinorFeature.id,\n\t\t\t\t\t);\n\t\t\t\t\tconst isLastFeature =\n\t\t\t\t\t\tcurrentIndex === availableMinorFeatures.length - 1;\n\n\t\t\t\t\tif (isLastFeature) {\n\t\t\t\t\t\t// Only skip remaining features if this was the last one\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\tconst showMinorUpdateJoyride = async (feature, featuresToUse?) => {\n\t\tsetCurrentMinorFeature(feature);\n\n\t\t// Use provided features array or fall back to state (for test mode)\n\t\tconst features = featuresToUse || availableMinorFeatures;\n\t\tconst currentIndex = features.findIndex((f) => f.id === feature.id);\n\t\tconst totalFeatures = features.length;\n\n\t\tconst targetSelector =\n\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t? feature.featureTag\n\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t// Scroll to target element smoothly before showing popup\n\t\tconst targetElement = document.querySelector(targetSelector);\n\t\tif (targetElement) {\n\t\t\ttry {\n\t\t\t\t// Dynamically import to avoid circular dependencies\n\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t);\n\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t} catch (error) {\n\t\t\t\t// Scroll failed silently\n\t\t\t}\n\t\t}\n\n\t\tconst minorSteps = [\n\t\t\t{\n\t\t\t\ttarget: targetSelector,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(feature)}\n\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(feature)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMinor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t\tsetJoyrideSteps(minorSteps);\n\t\tsetRunJoyride(true);\n\t};\n\n\tconst handleSkipMinorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\n\t\t\t\t// Add to session tracker to prevent re-showing\n\t\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(targetFeature.id));\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\t// Find next unshown feature\n\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t(f) => f.id !== targetFeature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t\t);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tcurrentMinorFeature,\n\t\t\tavailableMinorFeatures,\n\t\t\tmarkFeatureAsViewed,\n\t\t\tshownMinorFeatureIds,\n\t\t],\n\t);\n\n\tconst handleExploreMinorFeature = useCallback(\n\t\t(feature) => {\n\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t// Only mark the current feature as viewed\n\t\t\tmarkFeatureAsViewed(feature.id);\n\n\t\t\t// Add to session tracker to prevent re-showing\n\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(feature.id));\n\n\t\t\tif (feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tsetRunJoyride(false);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetJoyrideSteps([]);\n\n\t\t\t// Find next unshown feature (only auto-advance if no video modal)\n\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t(f) => f.id !== feature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t// Only auto-advance if no video modal is opened\n\t\t\t\tif (nextFeature && !feature.productVideo) {\n\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t} else if (!nextFeature) {\n\t\t\t\t\t// No more features to show\n\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t}\n\t\t\t\t// If video modal opened, wait for user to close it before advancing\n\t\t\t}, 500);\n\t\t},\n\t\t[availableMinorFeatures, markFeatureAsViewed, shownMinorFeatureIds],\n\t);\n\n\tconst handlePreviousMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = availableMinorFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMinorFeature(prevFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tprevFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? prevFeature.featureTag\n\t\t\t\t\t\t: `#${prevFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the previous feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(prevFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures],\n\t);\n\n\tconst handleNextMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < availableMinorFeatures.length - 1) {\n\t\t\t\tconst nextFeature = availableMinorFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMinorFeature(nextFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tnextFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? nextFeature.featureTag\n\t\t\t\t\t\t: `#${nextFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the next feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={() => handleExploreMinorFeature(nextFeature)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\t\t\t\tsetMinorFeaturesSkipped(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{children}\n\n\t\t\t{majorJoyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`major-joyride-${majorJoyrideKey}`}\n\t\t\t\t\tsteps={majorJoyrideSteps}\n\t\t\t\t\trun={runMajorJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMajorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tspotlightClicks={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMajor ? 'transparent' : '#212121',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{joyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`minor-joyride-${minorJoyrideKey}`}\n\t\t\t\t\tsteps={joyrideSteps}\n\t\t\t\t\trun={runJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMinorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tscrollToFirstStep={true}\n\t\t\t\t\tscrollOffset={120}\n\t\t\t\t\tdisableScrolling={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMinor ? 'transparent' : '#ffffff',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\tboxShadow: isClosingMinor\n\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t: '0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t<VideoModal\n\t\t\t\tisOpen={isVideoModalOpen}\n\t\t\t\tvideoUrl={videoUrl}\n\t\t\t\tonClose={() => {\n\t\t\t\t\tsetIsVideoModalOpen(false);\n\t\t\t\t\tsetVideoUrl('');\n\t\t\t\t\tsetBlockPopups(false);\n\n\t\t\t\t\t// After video modal closes, check if there are more features to show\n\t\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t\t(f) => !shownMinorFeatureIds.has(f.id),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature after video\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t);\n\n};\n\nexport default FeatureAnnouncementProvider;\n"],"names":["FeatureAnnouncementProvider","_ref","children","fetchVisibleFeatures","getStoreFeatureProgress","fetchFeatureById","markFeatureAsViewedForStore","isFeatureApplicableToCurrentPage","module","router","storeId","onAnnouncementShown","onAnnouncementInteracted","majorUpdateFeatures","minorUpdateFeatures","isLoading","markFeatureAsViewed","useFeatureAnnouncements","currentMajorFeature","setCurrentMajorFeature","useState","currentMinorFeature","setCurrentMinorFeature","runJoyride","setRunJoyride","joyrideSteps","setJoyrideSteps","runMajorJoyride","setRunMajorJoyride","majorJoyrideSteps","setMajorJoyrideSteps","isProcessingMajorUpdate","setIsProcessingMajorUpdate","isProcessingMinorUpdate","setIsProcessingMinorUpdate","availableMinorFeatures","setAvailableMinorFeatures","minorFeaturesSkipped","setMinorFeaturesSkipped","showMinorUpdates","setShowMinorUpdates","isVideoModalOpen","setIsVideoModalOpen","videoUrl","setVideoUrl","blockPopups","setBlockPopups","isClosingMajor","setIsClosingMajor","isClosingMinor","setIsClosingMinor","majorJoyrideKey","setMajorJoyrideKey","minorJoyrideKey","setMinorJoyrideKey","shownMinorFeatureIds","setShownMinorFeatureIds","Set","useEffect","styleId","styleElement","document","getElementById","createElement","id","head","appendChild","textContent","el","remove","prev","pathname","length","attempts","MAX_ATTEMPTS","checkWhatsNewButton","querySelector","showMajorUpdateJoyride","setTimeout","featureIdFromQuery","_a","query","forcedFeature","find","f","featureTag","interval","setInterval","targetSelector","startsWith","testModeFeatures","showMinorUpdateJoyride","clearInterval","observer","scrollListener","checkTimeout","isCleanedUp","checkElementsAndStartTour","availableFeatures","filter","feature","trim","has","disconnect","window","removeEventListener","clearTimeout","MutationObserver","mutations","shouldCheck","mutation","type","addedNodes","i","node","nodeType","Node","ELEMENT_NODE","element","requestAnimationFrame","observe","body","childList","subtree","addEventListener","passive","currentIndex","findIndex","totalFeatures","majorSteps","target","SELECTORS","WHATS_NEW_BUTTON","content","_jsx","MajorUpdatePopup","onSkip","handleSkipMajorUpdate","onExplore","handleExploreFeature","onPrevious","handlePreviousMajorUpdate","onNext","handleNextMajorUpdate","setIsClosing","placement","placementBeacon","disableBeacon","hideCloseButton","hideSkipButton","hideFooter","offset","data","isMajor","styles","tooltip","padding","backgroundColor","borderRadius","border","boxShadow","tooltipContent","buttonNext","display","buttonBack","buttonClose","buttonSkip","announcementId","announcementTitle","title","imageUrl","displayImage","image","productVideo","useCallback","targetFeature","forEach","majorFeature","buttonClicked","buttonName","buttonUrl","undefined","buttonText","redirectUrl","prevFeature","prevIndex","updatedSteps","nextFeature","nextIndex","showMajorUpdatePopup","handleMajorJoyrideCallback","action","ACTIONS","CLOSE","handleMinorJoyrideCallback","featuresToUse","__awaiter","features","targetElement","scrollToElementSmooth","import","error","minorSteps","MinorUpdatePopup","handleSkipMinorUpdate","handleExploreMinorFeature","handlePreviousMinorUpdate","handleNextMinorUpdate","isMinor","add","_jsxs","_Fragment","Joyride","steps","run","continuous","showProgress","showSkipButton","callback","disableOverlayClose","disableCloseOnEsc","disableOverlay","spotlightClicks","options","primaryColor","zIndex","width","arrowColor","overlay","spotlight","fontSize","locale","back","close","last","next","skip","scrollToFirstStep","scrollOffset","disableScrolling","VideoModal","isOpen","onClose"],"mappings":"4fASMA,MAAAA,EAEFC,IAYC,IAZAC,SACJA,EAAQC,qBACRA,EAAoBC,wBACpBA,EAAuBC,iBACvBA,EAAgBC,4BAChBA,EAA2BC,iCAC3BA,EAAgCC,OAChCA,EAAMC,OACNA,EAAMC,QACNA,EAAOC,oBACPA,EAAmBC,yBACnBA,GACAX,QACA,MAAMY,oBACLA,EAAmBC,oBACnBA,EAAmBC,UACnBA,EAASC,oBACTA,GACGC,EAAwB,CAC3Bd,uBACAC,0BACAC,mBACAC,8BACAC,mCACAC,SACAC,YAGMS,EAAqBC,GAC3BC,EAAqC,OAC/BC,EAAqBC,GAC3BF,EAAqC,OAC/BG,EAAYC,GAAiBJ,GAAS,IACtCK,EAAcC,GAAmBN,EAAgB,KACjDO,EAAiBC,GAAsBR,GAAS,IAChDS,EAAmBC,GAAwBV,EAAgB,KAC3DW,EAAyBC,GAA8BZ,GAAS,IAChEa,EAAyBC,GAA8Bd,GAAS,IAChEe,EAAwBC,GAA6BhB,EAE1D,KACKiB,EAAsBC,GAA2BlB,GAAS,IAC1DmB,EAAkBC,GAAuBpB,GAAS,IAClDqB,EAAkBC,IAAuBtB,GAAS,IAClDuB,GAAUC,IAAexB,EAAS,KAClCyB,GAAaC,IAAkB1B,GAAS,IACxC2B,GAAgBC,IAAqB5B,GAAS,IAC9C6B,GAAgBC,IAAqB9B,GAAS,IAC9C+B,GAAiBC,IAAsBhC,EAAS,IAChDiC,GAAiBC,IAAsBlC,EAAS,IAChDmC,GAAsBC,IAA2BpC,EACvD,IAAIqC,KAILC,GAAU,KACT,MAAMC,EAAU,+BAChB,IAAIC,EAAeC,SAASC,eAAeH,GAwB3C,OAtBKC,IACJA,EAAeC,SAASE,cAAc,SACtCH,EAAaI,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gB,WAE9CmL,QAAS,CACRvE,gBAAiB,eAElBwE,UAAW,CACVxE,gBAAiB,cACjBC,aAAc,MACdE,UAAW/G,GACR,OACA,8GAEJ0G,QAAS,CACRG,aAAc,MACdwE,SAAU,OACV1E,QAAS,EACTC,gBAAiB,cACjBE,OAAQ,OACR5D,OAAQ,OACR6D,UAAW,QAEZC,eAAgB,CACfL,QAAS,GAEVM,WAAY,CACXC,QAAS,QAEVC,WAAY,CACXD,QAAS,QAEVG,WAAY,CACXH,QAAS,QAEVE,YAAa,CACZF,QAAS,SAGXoE,OAAQ,CACPC,KAAM,OACNC,MAAO,QACPC,KAAM,QACNC,KAAM,OACNC,KAAM,SA5DF,iBAAiBvL,MAiExBiF,EAAC0G,EACA,CAAAC,OAAQxM,EACRE,SAAUA,GACVuM,QAASA,KACRxM,IAAoB,GACpBE,GAAY,IACZE,IAAe,GAGf,MAAM6I,EAAcxJ,EAAuBgD,MACzCC,IAAO7B,GAAqB+C,IAAIlB,EAAEpB,MAGhC2H,EAEH7G,YAAW,KACVa,GAAuBgG,EAAaxJ,EAAuB,GACzD,KAGHG,GAAwB,EACxB,MAGD"}
1
+ {"version":3,"file":"FeatureAnnouncementProvider.js","sources":["../../../../src/components/feature-announcements/FeatureAnnouncementProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport Joyride, { ACTIONS } from 'react-joyride';\nimport { SELECTORS } from './constants';\nimport { useFeatureAnnouncements } from './hooks';\nimport MajorUpdatePopup from './MajorUpdatePopup';\nimport MinorUpdatePopup from './MinorUpdatePopup';\nimport { FeatureAnnouncement, FeatureAnnouncementProviderProps } from './types';\nimport { VideoModal } from './VideoModal';\n\nconst FeatureAnnouncementProvider: React.FC<\n\tFeatureAnnouncementProviderProps\n> = ({\n\tchildren,\n\tfetchVisibleFeatures,\n\tgetStoreFeatureProgress,\n\tfetchFeatureById,\n\tmarkFeatureAsViewedForStore,\n\tisFeatureApplicableToCurrentPage,\n\tmodule,\n\trouter,\n\tstoreId,\n\tonAnnouncementShown,\n\tonAnnouncementInteracted,\n}) => {\n\tconst {\n\t\tmajorUpdateFeatures,\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\tmarkFeatureAsViewed,\n\t} = useFeatureAnnouncements({\n\t\tfetchVisibleFeatures,\n\t\tgetStoreFeatureProgress,\n\t\tfetchFeatureById,\n\t\tmarkFeatureAsViewedForStore,\n\t\tisFeatureApplicableToCurrentPage,\n\t\tmodule,\n\t\trouter,\n\t});\n\n\tconst [currentMajorFeature, setCurrentMajorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [currentMinorFeature, setCurrentMinorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [runJoyride, setRunJoyride] = useState(false);\n\tconst [joyrideSteps, setJoyrideSteps] = useState<any[]>([]);\n\tconst [runMajorJoyride, setRunMajorJoyride] = useState(false);\n\tconst [majorJoyrideSteps, setMajorJoyrideSteps] = useState<any[]>([]);\n\tconst [isProcessingMajorUpdate, setIsProcessingMajorUpdate] = useState(false);\n\tconst [isProcessingMinorUpdate, setIsProcessingMinorUpdate] = useState(false);\n\tconst [availableMinorFeatures, setAvailableMinorFeatures] = useState<\n\t\tFeatureAnnouncement[]\n\t>([]);\n\tconst [minorFeaturesSkipped, setMinorFeaturesSkipped] = useState(false);\n\tconst [showMinorUpdates, setShowMinorUpdates] = useState(false);\n\tconst [isVideoModalOpen, setIsVideoModalOpen] = useState(false);\n\tconst [videoUrl, setVideoUrl] = useState('');\n\tconst [blockPopups, setBlockPopups] = useState(false);\n\tconst [isClosingMajor, setIsClosingMajor] = useState(false);\n\tconst [isClosingMinor, setIsClosingMinor] = useState(false);\n\tconst [majorJoyrideKey, setMajorJoyrideKey] = useState(0);\n\tconst [minorJoyrideKey, setMinorJoyrideKey] = useState(0);\n\tconst [shownMinorFeatureIds, setShownMinorFeatureIds] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\t// Add custom style for spotlight cutout effect\n\tuseEffect(() => {\n\t\tconst styleId = 'minor-spotlight-cutout-style';\n\t\tlet styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n\t\tif (!styleElement) {\n\t\t\tstyleElement = document.createElement('style');\n\t\t\tstyleElement.id = styleId;\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\n\t\tstyleElement.textContent = `\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t`;\n\n\t\treturn () => {\n\t\t\tconst el = document.getElementById(styleId);\n\t\t\tif (el) {\n\t\t\t\tel.remove();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// Force Joyride remount on navigation to prevent stale state\n\tuseEffect(() => {\n\t\tsetMajorJoyrideKey((prev) => prev + 1);\n\t\tsetMinorJoyrideKey((prev) => prev + 1);\n\t\tsetIsClosingMajor(false);\n\t\tsetIsClosingMinor(false);\n\t\t// Reset session tracking on navigation to allow features to show on new pages\n\t\tsetShownMinorFeatureIds(new Set());\n\t}, [router?.pathname]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tmajorUpdateFeatures.length > 0 &&\n\t\t\t!currentMajorFeature &&\n\t\t\t!isLoading &&\n\t\t\t!isProcessingMajorUpdate &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tsetShowMinorUpdates(false);\n\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\tsetRunJoyride(false);\n\t\t\tsetJoyrideSteps([]);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetAvailableMinorFeatures([]);\n\n\t\t\tlet attempts = 0;\n\t\t\tconst MAX_ATTEMPTS = 10;\n\n\t\t\tconst checkWhatsNewButton = () => {\n\t\t\t\tattempts++;\n\t\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t\t);\n\n\t\t\t\tif (whatsNewButton) {\n\t\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t\t} else if (attempts < MAX_ATTEMPTS) {\n\t\t\t\t\tsetTimeout(checkWhatsNewButton, 1000);\n\t\t\t\t} else {\n\t\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcheckWhatsNewButton();\n\t\t} else if (majorUpdateFeatures.length === 0 && !isLoading) {\n\t\t\tsetShowMinorUpdates(true);\n\t\t}\n\t}, [\n\t\tmajorUpdateFeatures,\n\t\tcurrentMajorFeature,\n\t\tisLoading,\n\t\tisProcessingMajorUpdate,\n\t\tblockPopups,\n\t]);\n\n\tuseEffect(() => {\n\t\t// Only run this special logic if a feature is being forced via URL\n\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\n\t\tif (!featureIdFromQuery || isLoading || minorUpdateFeatures.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst forcedFeature = minorUpdateFeatures.find(\n\t\t\t(f) => f.id === featureIdFromQuery,\n\t\t);\n\n\t\tif (!forcedFeature || !forcedFeature.featureTag) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent the standard flow from interfering\n\t\tsetMinorFeaturesSkipped(true);\n\t\t// Mark that we're processing to prevent other effects from interfering\n\t\tsetIsProcessingMinorUpdate(true);\n\n\t\tlet attempts = 0;\n\t\tconst maxAttempts = 25; // 5 seconds\n\t\tconst interval = setInterval(() => {\n\t\t\tattempts++;\n\t\t\tconst targetSelector =\n\t\t\t\tforcedFeature.featureTag.startsWith('#') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('.') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('[')\n\t\t\t\t\t? forcedFeature.featureTag\n\t\t\t\t\t: `#${forcedFeature.featureTag}`;\n\n\t\t\tconst element = document.querySelector(targetSelector);\n\n\t\t\tif (element) {\n\t\t\t\t// In test mode, pass the feature array directly to avoid async state issues\n\t\t\t\tconst testModeFeatures = [forcedFeature];\n\t\t\t\tsetAvailableMinorFeatures(testModeFeatures);\n\t\t\t\tshowMinorUpdateJoyride(forcedFeature, testModeFeatures);\n\t\t\t\t// Don't reset processing flag here - let user interaction handle it\n\t\t\t\t// This prevents auto-closing when multiple popups exist or when scrolling\n\t\t\t\tclearInterval(interval);\n\t\t\t} else if (attempts >= maxAttempts) {\n\t\t\t\t// Fallback for safety, though user expects it to be there.\n\t\t\t\t// We could log an error here.\n\t\t\t\t// Only reset on timeout (element not found)\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\tclearInterval(interval);\n\t\t\t}\n\t\t}, 200);\n\n\t\treturn () => {\n\t\t\tclearInterval(interval);\n\t\t\t// Don't reset processing flag on cleanup - it causes premature popup closure\n\t\t\t// The flag will be managed by user interactions (skip/explore handlers)\n\t\t};\n\t}, [minorUpdateFeatures, router?.query?.['featureId'], isLoading]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tminorUpdateFeatures.length > 0 &&\n\t\t\t!isLoading &&\n\t\t\t!runJoyride &&\n\t\t\t!isProcessingMinorUpdate &&\n\t\t\t!currentMinorFeature &&\n\t\t\t!minorFeaturesSkipped &&\n\t\t\tshowMinorUpdates &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tlet observer: MutationObserver | null = null;\n\t\t\tlet scrollListener: (() => void) | null = null;\n\t\t\tlet checkTimeout: ReturnType<typeof setTimeout> | null = null;\n\t\t\tlet isCleanedUp = false;\n\n\t\t\tconst checkElementsAndStartTour = () => {\n\t\t\t\tif (\n\t\t\t\t\tisCleanedUp ||\n\t\t\t\t\tisProcessingMinorUpdate ||\n\t\t\t\t\tcurrentMinorFeature ||\n\t\t\t\t\tminorFeaturesSkipped ||\n\t\t\t\t\t!showMinorUpdates\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tconst availableFeatures = minorUpdateFeatures.filter((feature) => {\n\t\t\t\t\tif (!feature.featureTag || feature.featureTag.trim() === '') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip features already shown in this session\n\t\t\t\t\tif (shownMinorFeatureIds.has(feature.id)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst targetSelector =\n\t\t\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t\t\t\tconst element = document.querySelector(targetSelector);\n\t\t\t\t\treturn element !== null;\n\t\t\t\t});\n\n\t\t\t\tif (availableFeatures.length > 0) {\n\t\t\t\t\tsetAvailableMinorFeatures(availableFeatures);\n\t\t\t\t\t// Pass features directly to avoid async state issues\n\t\t\t\t\tshowMinorUpdateJoyride(availableFeatures[0], availableFeatures);\n\n\t\t\t\t\tif (observer) {\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\tobserver = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (scrollListener) {\n\t\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t\t\tscrollListener = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t\tcheckTimeout = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tobserver = new MutationObserver((mutations) => {\n\t\t\t\tlet shouldCheck = false;\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < mutation.addedNodes.length; i++) {\n\t\t\t\t\t\t\tconst node = mutation.addedNodes[i];\n\t\t\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tconst element = node as Element;\n\t\t\t\t\t\t\t\tif (element.id || element.querySelector('[id]')) {\n\t\t\t\t\t\t\t\t\tshouldCheck = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (shouldCheck) break;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates &&\n\t\t\t\t\tshouldCheck\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 200);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tscrollListener = () => {\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\t// Use RAF for smoother performance synced with browser paint\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (observer) {\n\t\t\t\tobserver.observe(document.body, {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (scrollListener) {\n\t\t\t\twindow.addEventListener('scroll', scrollListener, { passive: true });\n\t\t\t}\n\n\t\t\tcheckElementsAndStartTour();\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 100);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 1000);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 500);\n\n\t\t\treturn () => {\n\t\t\t\tisCleanedUp = true;\n\t\t\t\tif (observer) {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t\tif (scrollListener) {\n\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t}\n\t\t\t\tif (checkTimeout) {\n\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (minorUpdateFeatures.length === 0 || isLoading) {\n\t\t\t// Don't clear joyride if we're in test mode with an active feature\n\t\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\t\t\tconst isTestModeWithActiveFeature =\n\t\t\t\tfeatureIdFromQuery && currentMinorFeature;\n\n\t\t\tif (!isTestModeWithActiveFeature) {\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetAvailableMinorFeatures([]);\n\t\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\trunJoyride,\n\t\tisProcessingMinorUpdate,\n\t\tcurrentMinorFeature,\n\t\tminorFeaturesSkipped,\n\t\tshowMinorUpdates,\n\t\tmarkFeatureAsViewed,\n\t\tblockPopups,\n\t]);\n\n\tconst showMajorUpdateJoyride = (feature) => {\n\t\tsetCurrentMajorFeature(feature);\n\n\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t(f) => f.id === feature.id,\n\t\t);\n\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\tconst majorSteps = [\n\t\t\t{\n\t\t\t\ttarget: SELECTORS.WHATS_NEW_BUTTON,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(feature)}\n\t\t\t\t\t\tonExplore={(triggeredAction) => handleExploreFeature(feature, triggeredAction)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMajor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\n\t\tsetMajorJoyrideSteps(majorSteps);\n\t\tsetRunMajorJoyride(true);\n\n\t\t// Fire announcement shown callback\n\t\tif (onAnnouncementShown && storeId) {\n\t\t\tonAnnouncementShown({\n\t\t\t\tstoreId,\n\t\t\t\tannouncementId: feature.id,\n\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleSkipMajorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tmajorUpdateFeatures.map((majorFeature) =>\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t// Fire announcement interacted callback for Skip\n\t\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\t\tstoreId,\n\t\t\t\t\t\tannouncementId: targetFeature.id,\n\t\t\t\t\t\tannouncementTitle: targetFeature.title,\n\t\t\t\t\t\timageUrl: targetFeature.displayImage || targetFeature.image,\n\t\t\t\t\t\tvideoUrl: targetFeature.productVideo,\n\t\t\t\t\t\tbuttonClicked: 'Skip',\n\t\t\t\t\t\tbuttonName: 'Skip',\n\t\t\t\t\t\tbuttonUrl: undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleExploreFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMajorUpdate(true);\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\t\t\tconst action = triggeredAction ?? feature.primaryButton?.action;\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tif (action === 'Open link') {\n\t\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\t\tif (url && !url.startsWith('http')) {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetRunMajorJoyride(false);\n\t\t\tsetCurrentMajorFeature(null);\n\t\t\tsetMajorJoyrideSteps([]);\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === feature.id,\n\t\t\t);\n\t\t\tconst isLastMajorUpdate = currentIndex === majorUpdateFeatures.length - 1;\n\t\t\tif (isLastMajorUpdate) {\n\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t}\n\n\t\t\t// Fire announcement interacted callback for Primary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Primary',\n\t\t\t\t\tbuttonName: feature.buttonText || 'Explore',\n\t\t\t\t\tbuttonUrl: feature.redirectUrl || feature.productVideo,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t}, 500);\n\t\t},\n\t\t[majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handlePreviousMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = majorUpdateFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMajorFeature(prevFeature);\n\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) => handleExploreFeature(prevFeature, triggeredAction)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures],\n\t);\n\n\tconst handleNextMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < majorUpdateFeatures.length - 1) {\n\t\t\t\tconst nextFeature = majorUpdateFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMajorFeature(nextFeature);\n\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) => handleExploreFeature(nextFeature, triggeredAction)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst showMajorUpdatePopup = () => {\n\t\tif (majorUpdateFeatures.length > 0 && !currentMajorFeature) {\n\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t);\n\n\t\t\tif (whatsNewButton) {\n\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t}\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\t(window as any).showMajorUpdatePopup = showMajorUpdatePopup;\n\t\treturn () => {\n\t\t\tdelete (window as any).showMajorUpdatePopup;\n\t\t};\n\t}, [majorUpdateFeatures, currentMajorFeature]);\n\tconst handleMajorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMajorFeature) {\n\t\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t\t});\n\n\t\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleMinorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMinorFeature) {\n\t\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\t\tmarkFeatureAsViewed(currentMinorFeature.id);\n\n\t\t\t\t\t// Check if there are more features to show\n\t\t\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t\t\t(f) => f.id === currentMinorFeature.id,\n\t\t\t\t\t);\n\t\t\t\t\tconst isLastFeature =\n\t\t\t\t\t\tcurrentIndex === availableMinorFeatures.length - 1;\n\n\t\t\t\t\tif (isLastFeature) {\n\t\t\t\t\t\t// Only skip remaining features if this was the last one\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\tconst showMinorUpdateJoyride = async (feature, featuresToUse?) => {\n\t\tsetCurrentMinorFeature(feature);\n\n\t\t// Use provided features array or fall back to state (for test mode)\n\t\tconst features = featuresToUse || availableMinorFeatures;\n\t\tconst currentIndex = features.findIndex((f) => f.id === feature.id);\n\t\tconst totalFeatures = features.length;\n\n\t\tconst targetSelector =\n\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t? feature.featureTag\n\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t// Scroll to target element smoothly before showing popup\n\t\tconst targetElement = document.querySelector(targetSelector);\n\t\tif (targetElement) {\n\t\t\ttry {\n\t\t\t\t// Dynamically import to avoid circular dependencies\n\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t);\n\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t} catch (error) {\n\t\t\t\t// Scroll failed silently\n\t\t\t}\n\t\t}\n\n\t\tconst minorSteps = [\n\t\t\t{\n\t\t\t\ttarget: targetSelector,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(feature)}\n\t\t\t\t\t\tonExplore={(triggeredAction) => handleExploreMinorFeature(feature, triggeredAction)}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMinor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t\tsetJoyrideSteps(minorSteps);\n\t\tsetRunJoyride(true);\n\t};\n\n\tconst handleSkipMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\tawait markFeatureAsViewed(targetFeature.id);\n\n\t\t\t\t// Add to session tracker to prevent re-showing\n\t\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(targetFeature.id));\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\t// Find next unshown feature\n\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t(f) => f.id !== targetFeature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t\t);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tcurrentMinorFeature,\n\t\t\tavailableMinorFeatures,\n\t\t\tmarkFeatureAsViewed,\n\t\t\tshownMinorFeatureIds,\n\t\t],\n\t);\n\n\tconst handleExploreMinorFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t// Only mark the current feature as viewed\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\n\t\t\t// Add to session tracker to prevent re-showing\n\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(feature.id));\n\n\t\t\tconst action = triggeredAction ?? feature.primaryButton?.action;\n\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tif (action === 'Open link') {\n\t\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\t\tif (url && !url.startsWith('http')) {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetRunJoyride(false);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetJoyrideSteps([]);\n\n\t\t\t// Find next unshown feature (only auto-advance if no video modal)\n\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t(f) => f.id !== feature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t// Only auto-advance if no video modal is opened\n\t\t\t\tif (nextFeature && action !== 'Play Video') {\n\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t} else if (!nextFeature) {\n\t\t\t\t\t// No more features to show\n\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t}\n\t\t\t\t// If video modal opened, wait for user to close it before advancing\n\t\t\t}, 500);\n\t\t},\n\t\t[availableMinorFeatures, markFeatureAsViewed, shownMinorFeatureIds],\n\t);\n\n\tconst handlePreviousMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = availableMinorFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMinorFeature(prevFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tprevFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? prevFeature.featureTag\n\t\t\t\t\t\t: `#${prevFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the previous feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) => handleExploreMinorFeature(prevFeature, triggeredAction)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures],\n\t);\n\n\tconst handleNextMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < availableMinorFeatures.length - 1) {\n\t\t\t\tconst nextFeature = availableMinorFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMinorFeature(nextFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tnextFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? nextFeature.featureTag\n\t\t\t\t\t\t: `#${nextFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the next feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) => handleExploreMinorFeature(nextFeature, triggeredAction)}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\t\t\t\tsetMinorFeaturesSkipped(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{children}\n\n\t\t\t{majorJoyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`major-joyride-${majorJoyrideKey}`}\n\t\t\t\t\tsteps={majorJoyrideSteps}\n\t\t\t\t\trun={runMajorJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMajorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tspotlightClicks={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMajor ? 'transparent' : '#212121',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{joyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`minor-joyride-${minorJoyrideKey}`}\n\t\t\t\t\tsteps={joyrideSteps}\n\t\t\t\t\trun={runJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMinorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tscrollToFirstStep={true}\n\t\t\t\t\tscrollOffset={120}\n\t\t\t\t\tdisableScrolling={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMinor ? 'transparent' : '#ffffff',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\tboxShadow: isClosingMinor\n\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t: '0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t<VideoModal\n\t\t\t\tisOpen={isVideoModalOpen}\n\t\t\t\tvideoUrl={videoUrl}\n\t\t\t\tonClose={() => {\n\t\t\t\t\tsetIsVideoModalOpen(false);\n\t\t\t\t\tsetVideoUrl('');\n\t\t\t\t\tsetBlockPopups(false);\n\n\t\t\t\t\t// After video modal closes, check if there are more features to show\n\t\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t\t(f) => !shownMinorFeatureIds.has(f.id),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature after video\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t);\n\n};\n\nexport default FeatureAnnouncementProvider;\n"],"names":["FeatureAnnouncementProvider","_ref","children","fetchVisibleFeatures","getStoreFeatureProgress","fetchFeatureById","markFeatureAsViewedForStore","isFeatureApplicableToCurrentPage","module","router","storeId","onAnnouncementShown","onAnnouncementInteracted","majorUpdateFeatures","minorUpdateFeatures","isLoading","markFeatureAsViewed","useFeatureAnnouncements","currentMajorFeature","setCurrentMajorFeature","useState","currentMinorFeature","setCurrentMinorFeature","runJoyride","setRunJoyride","joyrideSteps","setJoyrideSteps","runMajorJoyride","setRunMajorJoyride","majorJoyrideSteps","setMajorJoyrideSteps","isProcessingMajorUpdate","setIsProcessingMajorUpdate","isProcessingMinorUpdate","setIsProcessingMinorUpdate","availableMinorFeatures","setAvailableMinorFeatures","minorFeaturesSkipped","setMinorFeaturesSkipped","showMinorUpdates","setShowMinorUpdates","isVideoModalOpen","setIsVideoModalOpen","videoUrl","setVideoUrl","blockPopups","setBlockPopups","isClosingMajor","setIsClosingMajor","isClosingMinor","setIsClosingMinor","majorJoyrideKey","setMajorJoyrideKey","minorJoyrideKey","setMinorJoyrideKey","shownMinorFeatureIds","setShownMinorFeatureIds","Set","useEffect","styleId","styleElement","document","getElementById","createElement","id","head","appendChild","textContent","el","remove","prev","pathname","length","attempts","MAX_ATTEMPTS","checkWhatsNewButton","querySelector","showMajorUpdateJoyride","setTimeout","featureIdFromQuery","_a","query","forcedFeature","find","f","featureTag","interval","setInterval","targetSelector","startsWith","testModeFeatures","showMinorUpdateJoyride","clearInterval","observer","scrollListener","checkTimeout","isCleanedUp","checkElementsAndStartTour","availableFeatures","filter","feature","trim","has","disconnect","window","removeEventListener","clearTimeout","MutationObserver","mutations","shouldCheck","mutation","type","addedNodes","i","node","nodeType","Node","ELEMENT_NODE","element","requestAnimationFrame","observe","body","childList","subtree","addEventListener","passive","currentIndex","findIndex","totalFeatures","majorSteps","target","SELECTORS","WHATS_NEW_BUTTON","content","_jsx","MajorUpdatePopup","onSkip","handleSkipMajorUpdate","onExplore","triggeredAction","handleExploreFeature","onPrevious","handlePreviousMajorUpdate","onNext","handleNextMajorUpdate","setIsClosing","placement","placementBeacon","disableBeacon","hideCloseButton","hideSkipButton","hideFooter","offset","data","isMajor","styles","tooltip","padding","backgroundColor","borderRadius","border","boxShadow","tooltipContent","buttonNext","display","buttonBack","buttonClose","buttonSkip","announcementId","announcementTitle","title","imageUrl","displayImage","image","productVideo","useCallback","__awaiter","targetFeature","Promise","all","map","majorFeature","buttonClicked","buttonName","buttonUrl","undefined","action","_b","primaryButton","url","_c","redirectionUrl","redirectUrl","location","href","buttonText","prevFeature","prevIndex","updatedSteps","nextFeature","nextIndex","showMajorUpdatePopup","handleMajorJoyrideCallback","ACTIONS","CLOSE","forEach","handleMinorJoyrideCallback","featuresToUse","features","targetElement","scrollToElementSmooth","import","error","minorSteps","MinorUpdatePopup","handleSkipMinorUpdate","handleExploreMinorFeature","handlePreviousMinorUpdate","handleNextMinorUpdate","isMinor","add","_d","_e","_jsxs","_Fragment","Joyride","steps","run","continuous","showProgress","showSkipButton","callback","disableOverlayClose","disableCloseOnEsc","disableOverlay","spotlightClicks","options","primaryColor","zIndex","width","arrowColor","overlay","spotlight","fontSize","locale","back","close","last","next","skip","scrollToFirstStep","scrollOffset","disableScrolling","VideoModal","isOpen","onClose"],"mappings":"4fASMA,MAAAA,EAEFC,IAYC,IAZAC,SACJA,EAAQC,qBACRA,EAAoBC,wBACpBA,EAAuBC,iBACvBA,EAAgBC,4BAChBA,EAA2BC,iCAC3BA,EAAgCC,OAChCA,EAAMC,OACNA,EAAMC,QACNA,EAAOC,oBACPA,EAAmBC,yBACnBA,GACAX,QACA,MAAMY,oBACLA,EAAmBC,oBACnBA,EAAmBC,UACnBA,EAASC,oBACTA,GACGC,EAAwB,CAC3Bd,uBACAC,0BACAC,mBACAC,8BACAC,mCACAC,SACAC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,iBAAAtM,MA6DvB1B,EAAa+C,OAAS,GACtB8D,EAAC2F,EAEA,CAAAC,MAAOzM,EACP0M,IAAK5M,EACL6M,YAAY,EACZC,cAAc,EACdC,gBAAgB,EAChBC,SAAUzB,GACV0B,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBgB,mBAAmB,EACnBC,aAAc,IACdC,kBAAkB,EAClBjG,OAAQ,CACPiF,QAAS,CACRC,aAAc,UACdC,OAAQ,IACRC,MAAO,OACPC,WAAY/L,GAAiB,cAAgB,WAE9CgM,QAAS,CACRnF,gBAAiB,eAElBoF,UAAW,CACVpF,gBAAiB,cACjBC,aAAc,MACdE,UAAWhH,GACR,OACA,8GAEJ2G,QAAS,CACRG,aAAc,MACdoF,SAAU,OACVtF,QAAS,EACTC,gBAAiB,cACjBE,OAAQ,OACR7D,OAAQ,OACR8D,UAAW,QAEZC,eAAgB,CACfL,QAAS,GAEVM,WAAY,CACXC,QAAS,QAEVC,WAAY,CACXD,QAAS,QAEVG,WAAY,CACXH,QAAS,QAEVE,YAAa,CACZF,QAAS,SAGXgF,OAAQ,CACPC,KAAM,OACNC,MAAO,QACPC,KAAM,QACNC,KAAM,OACNC,KAAM,SA5DF,iBAAiBpM,MAiExBiF,EAACuH,EACA,CAAAC,OAAQrN,EACRE,SAAUA,GACVoN,QAASA,KACRrN,IAAoB,GACpBE,GAAY,IACZE,IAAe,GAGf,MAAMyJ,EAAcpK,EAAuBgD,MACzCC,IAAO7B,GAAqB+C,IAAIlB,EAAEpB,MAGhCuI,EAEHzH,YAAW,KACVa,GAAuB4G,EAAapK,EAAuB,GACzD,KAGHG,GAAwB,EACxB,MAGD"}
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import{useState as o,useRef as r,useEffect as s}from"react";import a from"../../assets/icons/chevronRight2.svg.js";import i from"../../assets/icons/play.svg.js";import{TEXT as l}from"./constants/index.js";import{getMajorPopupStyles as c}from"./styles/majorPopup.styles.js";import"../../constants/Theme.js";import"./constants/animations.js";import{decodeHTMLEntities as u}from"./utils/htmlHelpers.js";import{hideJoyrideArrow as d,calculateCloseTransform as p,executeAfterAnimation as g}from"./utils/animationHelpers.js";import{findWhatsNewButton as y}from"./utils/elementHelpers.js";const b=b=>{let{feature:v,currentIndex:h,totalFeatures:m,onSkip:f,onExplore:j,onPrevious:O,onNext:B,setIsClosing:T,onSecondaryAction:k,ratio:x="16:9",padding:M}=b;var P,E,C,L,w;const[U,W]=o(!1),[_,I]=o(!1),[D,H]=o(""),S=r(null),[V,A]=o(!1),[R,F]=o(!0),N=r(null),[z,G]=o(x),K=r(null);s((()=>{U&&I(!0)}),[U]);const X=t=>{var e,n;t.preventDefault(),t.stopPropagation();const o=null===(e=v.secondaryButton)||void 0===e?void 0:e.action,r=k||f;if("Play Video"===o)j();else if("Open link"===o){const t=null===(n=v.secondaryButton)||void 0===n?void 0:n.redirectionUrl;if(t){t.startsWith("http")?window.open(t,"_blank","noopener,noreferrer"):window.location.href=t}}d(S.current);const s=y();if(s&&S.current){const t=p(S.current,s);H(t)}else H("scale(0)");null==T||T(!0),W(!0),g(r)},$=c(_,D,z,M||v.padding,null===(P=v.primaryButton)||void 0===P?void 0:P.style,null===(E=v.secondaryButton)||void 0===E?void 0:E.style);return t("div",Object.assign({style:$.outerWrapper},{children:e("div",Object.assign({ref:S,style:Object.assign(Object.assign({},$.container),{opacity:_?0:1,transition:"opacity 0.2s ease-in-out, transform 0.3s ease"})},{children:[t("style",{children:"\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t"}),e("div",Object.assign({style:$.contentWrapper},{children:[t("div",Object.assign({style:$.imageContainer},{children:v.productVideo?e(n,{children:[t("video",{ref:N,src:v.productVideo,style:$.image,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,controls:!0,"aria-label":`Product video for ${v.title}`,onLoadedMetadata:t=>{const e=t.currentTarget,n=e.videoWidth,o=e.videoHeight;if(n&&o){const t=n/o;Math.abs(t-16/9)<.1?G("16:9"):Math.abs(t-1)<.1?G("1:1"):Math.abs(t-4/3)<.1?G("4:3"):G(t>1.5?"16:9":t<.9?"4:3":"1:1")}}}),(V||R)&&t("div",Object.assign({style:$.videoOverlay,onClick:t=>{t.stopPropagation(),N.current&&(N.current.paused?(N.current.play(),A(!1),F(!1)):(N.current.pause(),A(!0),F(!0)))},role:"button",tabIndex:0,"aria-label":V?"Play video":"Pause video",onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),N.current&&(N.current.paused?(N.current.play(),A(!1),F(!1)):(N.current.pause(),A(!0),F(!0))))}},{children:t(i,{width:20,height:20})}))]}):v.displayImage?t("img",{ref:K,src:v.displayImage,alt:v.title,style:$.image,onLoad:t=>{const e=t.currentTarget,n=e.naturalWidth,o=e.naturalHeight;if(n&&o){const t=n/o;Math.abs(t-16/9)<.1?G("16:9"):Math.abs(t-1)<.1?G("1:1"):Math.abs(t-4/3)<.1?G("4:3"):G(t>1.5?"16:9":t<.9?"4:3":"1:1")}},onError:t=>{v.image&&(t.target.src=v.image)}}):t("div",Object.assign({style:$.imagePlaceholder},{children:l.FEATURE_PREVIEW_PLACEHOLDER}))})),e("div",Object.assign({style:$.contentContainer},{children:[t("div",Object.assign({style:$.skipButtonContainer},{children:t("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),(t=>{d(S.current);const e=y();if(e&&S.current){const t=p(S.current,e);H(t)}else H("scale(0)");null==T||T(!0),W(!0),g(t)})(f)},style:$.skipButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,$.skipButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,$.skipButton.base),"aria-label":"Skip feature announcement"},{children:"Skip"}))})),t("h3",Object.assign({style:$.title},{children:v.title})),t("div",{"data-popup-content":!0,style:$.content,dangerouslySetInnerHTML:{__html:u(v.content||v.body||"")}}),e("div",Object.assign({style:$.actionsWrapper},{children:[e("div",Object.assign({style:$.buttonsGroup},{children:[t("button",Object.assign({onClick:()=>{var t,e;const n=null===(t=v.primaryButton)||void 0===t?void 0:t.action;if("Play Video"===n)j();else if("Open link"===n){const t=(null===(e=v.primaryButton)||void 0===e?void 0:e.redirectionUrl)||v.redirectUrl;if(t){t.startsWith("http")?window.open(t,"_blank","noopener,noreferrer"):window.location.href=t}}else j();d(S.current);const o=y();if(o&&S.current){const t=p(S.current,o);H(t)}else H("scale(0)");null==T||T(!0),W(!0)},style:$.exploreButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,$.exploreButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,$.exploreButton.base)},{children:(null===(C=v.primaryButton)||void 0===C?void 0:C.text)||v.buttonText||l.DEFAULT_BUTTON_TEXT})),(null===(L=v.secondaryButton)||void 0===L?void 0:L.text)&&((null===(w=v.secondaryButton)||void 0===w?void 0:w.redirectionUrl)?t("a",Object.assign({href:v.secondaryButton.redirectionUrl,target:v.secondaryButton.redirectionUrl.startsWith("http")?"_blank":"_self",rel:v.secondaryButton.redirectionUrl.startsWith("http")?"noopener noreferrer":void 0,onClick:X,style:$.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,$.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,$.secondaryButton.base)},{children:v.secondaryButton.text})):t("button",Object.assign({onClick:X,style:$.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,$.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,$.secondaryButton.base)},{children:v.secondaryButton.text})))]})),m>1&&e("div",Object.assign({style:$.navigationContainer},{children:[t("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),O()},disabled:0===h,style:$.navigationButton(0===h).base,onMouseEnter:t=>{0!==h&&Object.assign(t.currentTarget.style,$.navigationButton(!1).hover)},onMouseLeave:t=>{0!==h&&Object.assign(t.currentTarget.style,$.navigationButton(!1).base)},"aria-label":"Previous feature"},{children:t(a,{style:{transform:"rotate(180deg)"}})})),t("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),B()},disabled:h===m-1,style:$.navigationButton(h===m-1).base,onMouseEnter:t=>{h!==m-1&&Object.assign(t.currentTarget.style,$.navigationButton(!1).hover)},onMouseLeave:t=>{h!==m-1&&Object.assign(t.currentTarget.style,$.navigationButton(h===m-1).base)},"aria-label":"Next feature"},{children:t(a,{})}))]}))]}))]}))]}))]}))}))};export{b as default};
1
+ import{__awaiter as t}from"../../_virtual/_tslib.js";import{jsx as e,jsxs as n,Fragment as o}from"react/jsx-runtime";import{useState as r,useRef as s,useEffect as a}from"react";import i from"../../assets/icons/chevronRight2.svg.js";import l from"../../assets/icons/play.svg.js";import{TEXT as c}from"./constants/index.js";import{getMajorPopupStyles as u}from"./styles/majorPopup.styles.js";import"../../constants/Theme.js";import"./constants/animations.js";import{decodeHTMLEntities as d}from"./utils/htmlHelpers.js";import{hideJoyrideArrow as p,calculateCloseTransform as g,executeAfterAnimation as y}from"./utils/animationHelpers.js";import{findWhatsNewButton as v}from"./utils/elementHelpers.js";const b=b=>{let{feature:h,currentIndex:m,totalFeatures:f,onSkip:j,onExplore:O,onPrevious:B,onNext:T,setIsClosing:k,onSecondaryAction:x,ratio:M="16:9",padding:P}=b;var E,C,L,_,U,W;const[I,w]=r(!1),[D,H]=r(!1),[V,S]=r(""),A=s(null),[R,F]=r(!1),[N,z]=r(!0),G=s(null),[K,X]=r(M),$=s(null);a((()=>{I&&H(!0)}),[I]);const q=e=>{var n,o;e.preventDefault(),e.stopPropagation();const r=null===(n=h.secondaryButton)||void 0===n?void 0:n.action,s=x||j;let a=null;if("Play Video"===r)O("Play Video");else if("Open link"===r){const t=null===(o=h.secondaryButton)||void 0===o?void 0:o.redirectionUrl;if(t){t.startsWith("http")?window.open(t,"_blank","noopener,noreferrer"):a=t}}p(A.current);const i=v();if(i&&A.current){const t=g(A.current,i);S(t)}else S("scale(0)");null==k||k(!0),w(!0),y((()=>t(void 0,void 0,void 0,(function*(){yield s(),a&&(window.location.href=a)}))))},J=u(D,V,K,P||h.padding,null===(E=h.primaryButton)||void 0===E?void 0:E.style,null===(C=h.secondaryButton)||void 0===C?void 0:C.style);return e("div",Object.assign({style:J.outerWrapper},{children:n("div",Object.assign({ref:A,style:Object.assign(Object.assign({},J.container),{opacity:D?0:1,transition:"opacity 0.2s ease-in-out, transform 0.3s ease"})},{children:[e("style",{children:"\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t"}),n("div",Object.assign({style:J.contentWrapper},{children:[e("div",Object.assign({style:J.imageContainer},{children:h.productVideo?n(o,{children:[e("video",{ref:G,src:h.productVideo,style:J.image,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,controls:!0,"aria-label":`Product video for ${h.title}`,onLoadedMetadata:t=>{const e=t.currentTarget,n=e.videoWidth,o=e.videoHeight;if(n&&o){const t=n/o;Math.abs(t-16/9)<.1?X("16:9"):Math.abs(t-1)<.1?X("1:1"):Math.abs(t-4/3)<.1?X("4:3"):X(t>1.5?"16:9":t<.9?"4:3":"1:1")}}}),(R||N)&&e("div",Object.assign({style:J.videoOverlay,onClick:t=>{t.stopPropagation(),G.current&&(G.current.paused?(G.current.play(),F(!1),z(!1)):(G.current.pause(),F(!0),z(!0)))},role:"button",tabIndex:0,"aria-label":R?"Play video":"Pause video",onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),G.current&&(G.current.paused?(G.current.play(),F(!1),z(!1)):(G.current.pause(),F(!0),z(!0))))}},{children:e(l,{width:20,height:20})}))]}):h.displayImage?e("img",{ref:$,src:h.displayImage,alt:h.title,style:J.image,onLoad:t=>{const e=t.currentTarget,n=e.naturalWidth,o=e.naturalHeight;if(n&&o){const t=n/o;Math.abs(t-16/9)<.1?X("16:9"):Math.abs(t-1)<.1?X("1:1"):Math.abs(t-4/3)<.1?X("4:3"):X(t>1.5?"16:9":t<.9?"4:3":"1:1")}},onError:t=>{h.image&&(t.target.src=h.image)}}):e("div",Object.assign({style:J.imagePlaceholder},{children:c.FEATURE_PREVIEW_PLACEHOLDER}))})),n("div",Object.assign({style:J.contentContainer},{children:[e("div",Object.assign({style:J.skipButtonContainer},{children:e("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),(t=>{p(A.current);const e=v();if(e&&A.current){const t=g(A.current,e);S(t)}else S("scale(0)");null==k||k(!0),w(!0),y(t)})(j)},style:J.skipButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,J.skipButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,J.skipButton.base),"aria-label":"Skip feature announcement"},{children:"Skip"}))})),e("h3",Object.assign({style:J.title},{children:h.title})),e("div",{"data-popup-content":!0,style:J.content,dangerouslySetInnerHTML:{__html:d(h.content||h.body||"")}}),n("div",Object.assign({style:J.actionsWrapper},{children:[n("div",Object.assign({style:J.buttonsGroup},{children:[e("button",Object.assign({onClick:()=>{var t,e;const n=null===(t=h.primaryButton)||void 0===t?void 0:t.action;if("Open link"===n){const t=(null===(e=h.primaryButton)||void 0===e?void 0:e.redirectionUrl)||h.redirectUrl;if(t){t.startsWith("http")&&window.open(t,"_blank","noopener,noreferrer")}}O(n),p(A.current);const o=v();if(o&&A.current){const t=g(A.current,o);S(t)}else S("scale(0)");null==k||k(!0),w(!0)},style:J.exploreButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,J.exploreButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,J.exploreButton.base)},{children:(null===(L=h.primaryButton)||void 0===L?void 0:L.text)||h.buttonText||c.DEFAULT_BUTTON_TEXT})),(null===(_=h.secondaryButton)||void 0===_?void 0:_.text)&&((null===(U=h.secondaryButton)||void 0===U?void 0:U.redirectionUrl)&&"Play Video"!==(null===(W=h.secondaryButton)||void 0===W?void 0:W.action)?e("a",Object.assign({href:h.secondaryButton.redirectionUrl,target:h.secondaryButton.redirectionUrl.startsWith("http")?"_blank":"_self",rel:h.secondaryButton.redirectionUrl.startsWith("http")?"noopener noreferrer":void 0,onClick:q,style:J.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,J.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,J.secondaryButton.base)},{children:h.secondaryButton.text})):e("button",Object.assign({onClick:q,style:J.secondaryButton.base,onMouseEnter:t=>Object.assign(t.currentTarget.style,J.secondaryButton.hover),onMouseLeave:t=>Object.assign(t.currentTarget.style,J.secondaryButton.base)},{children:h.secondaryButton.text})))]})),f>1&&n("div",Object.assign({style:J.navigationContainer},{children:[e("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),B()},disabled:0===m,style:J.navigationButton(0===m).base,onMouseEnter:t=>{0!==m&&Object.assign(t.currentTarget.style,J.navigationButton(!1).hover)},onMouseLeave:t=>{0!==m&&Object.assign(t.currentTarget.style,J.navigationButton(!1).base)},"aria-label":"Previous feature"},{children:e(i,{style:{transform:"rotate(180deg)"}})})),e("button",Object.assign({onClick:t=>{t.preventDefault(),t.stopPropagation(),T()},disabled:m===f-1,style:J.navigationButton(m===f-1).base,onMouseEnter:t=>{m!==f-1&&Object.assign(t.currentTarget.style,J.navigationButton(!1).hover)},onMouseLeave:t=>{m!==f-1&&Object.assign(t.currentTarget.style,J.navigationButton(m===f-1).base)},"aria-label":"Next feature"},{children:e(i,{})}))]}))]}))]}))]}))]}))}))};export{b as default};
2
2
  //# sourceMappingURL=MajorUpdatePopup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MajorUpdatePopup.js","sources":["../../../../src/components/feature-announcements/MajorUpdatePopup.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport Arrow from '../../assets/icons/chevronRight2.svg';\nimport PlayIcon from '../../assets/icons/play.svg';\nimport { TEXT } from './constants';\nimport { getMajorPopupStyles } from './styles';\nimport { MajorUpdatePopupProps } from './types';\nimport {\n\tcalculateCloseTransform,\n\tdecodeHTMLEntities,\n\texecuteAfterAnimation,\n\tfindWhatsNewButton,\n\thideJoyrideArrow,\n} from './utils';\n\nconst MajorUpdatePopup: React.FC<MajorUpdatePopupProps> = ({\n\tfeature,\n\tcurrentIndex,\n\ttotalFeatures,\n\tonSkip,\n\tonExplore,\n\tonPrevious,\n\tonNext,\n\tsetIsClosing: setIsClosingParent,\n\tonSecondaryAction,\n\tratio = '16:9',\n\tpadding,\n}) => {\n\tconst [isClosing, setIsClosing] = useState(false);\n\tconst [startAnimation, setStartAnimation] = useState(false);\n\tconst [transform, setTransform] = useState('');\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\tconst [isVideoPaused, setIsVideoPaused] = useState(false);\n\tconst [showPlayIcon, setShowPlayIcon] = useState(true);\n\tconst videoRef = useRef<HTMLVideoElement>(null);\n\tconst [imageAspectRatio, setImageAspectRatio] = useState<\n\t\t'16:9' | '1:1' | '4:3'\n\t>(ratio);\n\n\tconst imageRef = useRef<HTMLImageElement>(null);\n\n\tuseEffect(() => {\n\t\tif (isClosing) {\n\t\t\t// Start the shrink animation immediately\n\t\t\tsetStartAnimation(true);\n\t\t}\n\t}, [isClosing]);\n\n\tconst handleClose = (callback: () => void): void => {\n\t\thideJoyrideArrow(popupRef.current);\n\n\t\tconst targetButton = findWhatsNewButton();\n\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(callback);\n\t};\n\n\tconst handleImageLoad = (e: React.SyntheticEvent<HTMLImageElement>) => {\n\t\tconst img = e.currentTarget;\n\t\tconst width = img.naturalWidth;\n\t\tconst height = img.naturalHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\t// Determine closest predefined ratio\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide images default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall images default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoLoadedMetadata = (\n\t\te: React.SyntheticEvent<HTMLVideoElement>,\n\t) => {\n\t\tconst video = e.currentTarget;\n\t\tconst width = video.videoWidth;\n\t\tconst height = video.videoHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide videos default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall videos default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleExplore = (): void => {\n\t\tconst action = feature.primaryButton?.action;\n\n\t\tif (action === 'Play Video') {\n\t\t\tonExplore();\n\t\t} else if (action === 'Open link') {\n\t\t\t// Navigate to URL\n\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tonExplore();\n\t\t}\n\n\t\t// Run closing animation in background\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t};\n\n\tconst handleSkipClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\thandleClose(onSkip);\n\t};\n\n\tconst handlePreviousClick = (\n\t\te: React.MouseEvent<HTMLButtonElement>,\n\t): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonPrevious();\n\t};\n\n\tconst handleNextClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonNext();\n\t};\n\n\tconst handleSecondaryAction = (e: React.MouseEvent): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tconst action = feature.secondaryButton?.action;\n\t\tconst closeCallback = onSecondaryAction || onSkip;\n\n\t\t// Handle based on action type\n\t\tif (action === 'Play Video') {\n\t\t\tonExplore();\n\t\t} else if (action === 'Open link') {\n\t\t\t// Open URL but don't close popup\n\t\t\tconst url = feature.secondaryButton?.redirectionUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (action === 'Close popup' || action === '') {\n\t\t\t// Just close the popup (empty action also closes)\n\t\t\t// callback is executed after closing animation completes\n\t\t}\n\n\t\t// Always close popup after secondary action\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(closeCallback);\n\t};\n\n\tconst styles = getMajorPopupStyles(\n\t\tstartAnimation,\n\t\ttransform,\n\t\timageAspectRatio,\n\t\tpadding || feature.padding,\n\t\tfeature.primaryButton?.style,\n\t\tfeature.secondaryButton?.style,\n\t);\n\n\tconst handleVideoClick = (e: React.MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (videoRef.current) {\n\t\t\tif (videoRef.current.paused) {\n\t\t\t\tvideoRef.current.play();\n\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\tsetShowPlayIcon(false);\n\t\t\t} else {\n\t\t\t\tvideoRef.current.pause();\n\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\tsetShowPlayIcon(true);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoKeyDown = (e: React.KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tif (videoRef.current) {\n\t\t\t\tif (videoRef.current.paused) {\n\t\t\t\t\tvideoRef.current.play();\n\t\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\t\tsetShowPlayIcon(false);\n\t\t\t\t} else {\n\t\t\t\t\tvideoRef.current.pause();\n\t\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\t\tsetShowPlayIcon(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<div style={styles.outerWrapper}>\n\t\t\t<div\n\t\t\t\tref={popupRef}\n\t\t\t\tstyle={{\n\t\t\t\t\t...styles.container,\n\t\t\t\t\topacity: startAnimation ? 0 : 1,\n\t\t\t\t\ttransition: 'opacity 0.2s ease-in-out, transform 0.3s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<style>{`\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t`}</style>\n\t\t\t\t{/* Content Wrapper - contains image and text side by side */}\n\t\t\t\t<div style={styles.contentWrapper}>\n\t\t\t\t\t{/* Image/Video section */}\n\t\t\t\t\t<div style={styles.imageContainer}>\n\t\t\t\t\t\t{feature.productVideo ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<video\n\t\t\t\t\t\t\t\t\tref={videoRef}\n\t\t\t\t\t\t\t\t\tsrc={feature.productVideo}\n\t\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\t\t\tplaysInline\n\t\t\t\t\t\t\t\t\tcontrols\n\t\t\t\t\t\t\t\t\taria-label={`Product video for ${feature.title}`}\n\t\t\t\t\t\t\t\t\tonLoadedMetadata={handleVideoLoadedMetadata}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{(isVideoPaused || showPlayIcon) && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={styles.videoOverlay}\n\t\t\t\t\t\t\t\t\t\tonClick={handleVideoClick}\n\t\t\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\t\t\taria-label={isVideoPaused ? 'Play video' : 'Pause video'}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={handleVideoKeyDown}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<PlayIcon width={20} height={20} />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : feature.displayImage ? (\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tref={imageRef}\n\t\t\t\t\t\t\t\tsrc={feature.displayImage}\n\t\t\t\t\t\t\t\talt={feature.title}\n\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\tonLoad={handleImageLoad}\n\t\t\t\t\t\t\t\tonError={(e) => {\n\t\t\t\t\t\t\t\t\tif (feature.image) {\n\t\t\t\t\t\t\t\t\t\t(e.target as HTMLImageElement).src = feature.image;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div style={styles.imagePlaceholder}>\n\t\t\t\t\t\t\t\t{TEXT.FEATURE_PREVIEW_PLACEHOLDER}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Content section */}\n\t\t\t\t\t<div style={styles.contentContainer}>\n\t\t\t\t\t\t{/* Skip Button at top-right */}\n\t\t\t\t\t\t<div style={styles.skipButtonContainer}>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tonClick={handleSkipClick}\n\t\t\t\t\t\t\t\tstyle={styles.skipButton.base}\n\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.hover)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.base)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-label=\"Skip feature announcement\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSkip\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{/* Title */}\n\t\t\t\t\t\t<h3 style={styles.title}>{feature.title}</h3>\n\n\t\t\t\t\t\t{/* Content/Description */}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tdata-popup-content\n\t\t\t\t\t\t\tstyle={styles.content}\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t\t__html: decodeHTMLEntities(\n\t\t\t\t\t\t\t\t\tfeature.content || feature.body || '',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{/* Actions - Buttons and Navigation */}\n\t\t\t\t\t\t<div style={styles.actionsWrapper}>\n\t\t\t\t\t\t\t<div style={styles.buttonsGroup}>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tonClick={handleExplore}\n\t\t\t\t\t\t\t\t\tstyle={styles.exploreButton.base}\n\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.hover,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.base,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{feature.primaryButton?.text ||\n\t\t\t\t\t\t\t\t\t\tfeature.buttonText ||\n\t\t\t\t\t\t\t\t\t\tTEXT.DEFAULT_BUTTON_TEXT}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t{/* Secondary Button (Optional) */}\n\t\t\t\t\t\t\t\t{feature.secondaryButton?.text &&\n\t\t\t\t\t\t\t\t\t(feature.secondaryButton?.redirectionUrl ? (\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={feature.secondaryButton.redirectionUrl}\n\t\t\t\t\t\t\t\t\t\t\ttarget={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '_blank'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '_self'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\trel={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'noopener noreferrer'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{/* Navigation arrows */}\n\t\t\t\t\t\t\t{totalFeatures > 1 && (\n\t\t\t\t\t\t\t\t<div style={styles.navigationContainer}>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handlePreviousClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === 0}\n\t\t\t\t\t\t\t\t\t\tstyle={styles.navigationButton(currentIndex === 0).base}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Previous feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow style={{ transform: 'rotate(180deg)' }} />\n\t\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handleNextClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === totalFeatures - 1}\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t).base\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Next feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t{/* Close contentWrapper */}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MajorUpdatePopup;\n"],"names":["MajorUpdatePopup","_ref","feature","currentIndex","totalFeatures","onSkip","onExplore","onPrevious","onNext","setIsClosing","setIsClosingParent","onSecondaryAction","ratio","padding","isClosing","useState","startAnimation","setStartAnimation","transform","setTransform","popupRef","useRef","isVideoPaused","setIsVideoPaused","showPlayIcon","setShowPlayIcon","videoRef","imageAspectRatio","setImageAspectRatio","imageRef","useEffect","handleSecondaryAction","e","preventDefault","stopPropagation","action","_a","secondaryButton","closeCallback","url","_b","redirectionUrl","startsWith","window","open","location","href","hideJoyrideArrow","current","targetButton","findWhatsNewButton","transformValue","calculateCloseTransform","executeAfterAnimation","styles","getMajorPopupStyles","primaryButton","style","_jsx","Object","assign","outerWrapper","children","_jsxs","ref","container","opacity","transition","contentWrapper","imageContainer","productVideo","_Fragment","src","image","autoPlay","muted","loop","playsInline","controls","title","onLoadedMetadata","video","currentTarget","width","videoWidth","height","videoHeight","aspectRatio","Math","abs","videoOverlay","onClick","paused","play","pause","role","tabIndex","onKeyDown","key","PlayIcon","displayImage","alt","onLoad","img","naturalWidth","naturalHeight","onError","target","imagePlaceholder","TEXT","FEATURE_PREVIEW_PLACEHOLDER","contentContainer","skipButtonContainer","callback","handleClose","skipButton","base","onMouseEnter","hover","onMouseLeave","content","dangerouslySetInnerHTML","__html","decodeHTMLEntities","body","actionsWrapper","buttonsGroup","handleExplore","redirectUrl","exploreButton","_c","text","buttonText","DEFAULT_BUTTON_TEXT","_d","_e","rel","undefined","navigationContainer","disabled","navigationButton","Arrow"],"mappings":"soBAcMA,MAAAA,EAAoDC,IAYrD,IAZsDC,QAC1DA,EAAOC,aACPA,EAAYC,cACZA,EAAaC,OACbA,EAAMC,UACNA,EAASC,WACTA,EAAUC,OACVA,EACAC,aAAcC,EAAkBC,kBAChCA,EAAiBC,MACjBA,EAAQ,OAAMC,QACdA,GACAZ,gBACA,MAAOa,EAAWL,GAAgBM,GAAS,IACpCC,EAAgBC,GAAqBF,GAAS,IAC9CG,EAAWC,GAAgBJ,EAAS,IACrCK,EAAWC,EAAuB,OACjCC,EAAeC,GAAoBR,GAAS,IAC5CS,EAAcC,GAAmBV,GAAS,GAC3CW,EAAWL,EAAyB,OACnCM,EAAkBC,GAAuBb,EAE9CH,GAEIiB,EAAWR,EAAyB,MAE1CS,GAAU,KACLhB,GAEHG,GAAkB,EAClB,GACC,CAACH,IAEJ,MAqIMiB,EAAyBC,YAC9BA,EAAEC,iBACFD,EAAEE,kBAEF,MAAMC,EAAgC,QAAvBC,EAAAlC,EAAQmC,uBAAe,IAAAD,OAAA,EAAAA,EAAED,OAClCG,EAAgB3B,GAAqBN,EAG3C,GAAe,eAAX8B,EACH7B,SACM,GAAe,cAAX6B,EAAwB,CAElC,MAAMI,EAA6B,QAAvBC,EAAAtC,EAAQmC,uBAAe,IAAAG,OAAA,EAAAA,EAAEC,eACrC,GAAIF,EAAK,CACWA,EAAIG,WAAW,QAEjCC,OAAOC,KAAKL,EAAK,SAAU,uBAE3BI,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gB,EAC3CqD,MACCH,EAAOsF,iBACNzI,IAAiBC,EAAgB,GAChCgH,KAEHC,aAAerF,IACV7B,IAAiBC,EAAgB,GACpCuD,OAAOC,OACN5B,EAAEkD,cAAczB,MAChBH,EAAOsF,kBAAiB,GAAOtB,MAEhC,EAEFC,aAAevF,IACV7B,IAAiBC,EAAgB,GACpCuD,OAAOC,OACN5B,EAAEkD,cAAczB,MAChBH,EAAOsF,iBACNzI,IAAiBC,EAAgB,GAChCgH,KAEH,EAES,aAAA,gBAEX,CAAAtD,SAAAJ,EAACmF,EAAQ,6BASX"}
1
+ {"version":3,"file":"MajorUpdatePopup.js","sources":["../../../../src/components/feature-announcements/MajorUpdatePopup.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport Arrow from '../../assets/icons/chevronRight2.svg';\nimport PlayIcon from '../../assets/icons/play.svg';\nimport { TEXT } from './constants';\nimport { getMajorPopupStyles } from './styles';\nimport { MajorUpdatePopupProps } from './types';\nimport {\n\tcalculateCloseTransform,\n\tdecodeHTMLEntities,\n\texecuteAfterAnimation,\n\tfindWhatsNewButton,\n\thideJoyrideArrow,\n} from './utils';\n\nconst MajorUpdatePopup: React.FC<MajorUpdatePopupProps> = ({\n\tfeature,\n\tcurrentIndex,\n\ttotalFeatures,\n\tonSkip,\n\tonExplore,\n\tonPrevious,\n\tonNext,\n\tsetIsClosing: setIsClosingParent,\n\tonSecondaryAction,\n\tratio = '16:9',\n\tpadding,\n}) => {\n\tconst [isClosing, setIsClosing] = useState(false);\n\tconst [startAnimation, setStartAnimation] = useState(false);\n\tconst [transform, setTransform] = useState('');\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\tconst [isVideoPaused, setIsVideoPaused] = useState(false);\n\tconst [showPlayIcon, setShowPlayIcon] = useState(true);\n\tconst videoRef = useRef<HTMLVideoElement>(null);\n\tconst [imageAspectRatio, setImageAspectRatio] = useState<\n\t\t'16:9' | '1:1' | '4:3'\n\t>(ratio);\n\n\tconst imageRef = useRef<HTMLImageElement>(null);\n\n\tuseEffect(() => {\n\t\tif (isClosing) {\n\t\t\t// Start the shrink animation immediately\n\t\t\tsetStartAnimation(true);\n\t\t}\n\t}, [isClosing]);\n\n\tconst handleClose = (callback: () => Promise<void> | void): void => {\n\t\thideJoyrideArrow(popupRef.current);\n\n\t\tconst targetButton = findWhatsNewButton();\n\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(callback);\n\t};\n\n\tconst handleImageLoad = (e: React.SyntheticEvent<HTMLImageElement>) => {\n\t\tconst img = e.currentTarget;\n\t\tconst width = img.naturalWidth;\n\t\tconst height = img.naturalHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\t// Determine closest predefined ratio\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide images default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall images default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoLoadedMetadata = (\n\t\te: React.SyntheticEvent<HTMLVideoElement>,\n\t) => {\n\t\tconst video = e.currentTarget;\n\t\tconst width = video.videoWidth;\n\t\tconst height = video.videoHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide videos default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall videos default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleExplore = (): void => {\n\t\tconst action = feature.primaryButton?.action;\n\n\t\tif (action === 'Open link') {\n\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tonExplore(action);\n\n\t\t// Run closing animation in background\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t};\n\n\tconst handleSkipClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\thandleClose(onSkip);\n\t};\n\n\tconst handlePreviousClick = (\n\t\te: React.MouseEvent<HTMLButtonElement>,\n\t): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonPrevious();\n\t};\n\n\tconst handleNextClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonNext();\n\t};\n\n\tconst handleSecondaryAction = (e: React.MouseEvent): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tconst action = feature.secondaryButton?.action;\n\t\tconst closeCallback = onSecondaryAction || onSkip;\n\t\tlet internalUrl: string | null = null;\n\n\t\t// Handle based on action type\n\t\tif (action === 'Play Video') {\n\t\t\tonExplore('Play Video');\n\t\t} else if (action === 'Open link') {\n\t\t\tconst url = feature.secondaryButton?.redirectionUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t} else {\n\t\t\t\t\tinternalUrl = url;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (action === 'Close popup' || action === '') {\n\t\t\t// Just close the popup (empty action also closes)\n\t\t\t// callback is executed after closing animation completes\n\t\t}\n\n\t\t// Always close popup after secondary action\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(async () => {\n\t\t\tawait closeCallback();\n\t\t\tif (internalUrl) {\n\t\t\t\twindow.location.href = internalUrl;\n\t\t\t}\n\t\t});\n\t};\n\n\tconst styles = getMajorPopupStyles(\n\t\tstartAnimation,\n\t\ttransform,\n\t\timageAspectRatio,\n\t\tpadding || feature.padding,\n\t\tfeature.primaryButton?.style,\n\t\tfeature.secondaryButton?.style,\n\t);\n\n\tconst handleVideoClick = (e: React.MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (videoRef.current) {\n\t\t\tif (videoRef.current.paused) {\n\t\t\t\tvideoRef.current.play();\n\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\tsetShowPlayIcon(false);\n\t\t\t} else {\n\t\t\t\tvideoRef.current.pause();\n\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\tsetShowPlayIcon(true);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoKeyDown = (e: React.KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tif (videoRef.current) {\n\t\t\t\tif (videoRef.current.paused) {\n\t\t\t\t\tvideoRef.current.play();\n\t\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\t\tsetShowPlayIcon(false);\n\t\t\t\t} else {\n\t\t\t\t\tvideoRef.current.pause();\n\t\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\t\tsetShowPlayIcon(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<div style={styles.outerWrapper}>\n\t\t\t<div\n\t\t\t\tref={popupRef}\n\t\t\t\tstyle={{\n\t\t\t\t\t...styles.container,\n\t\t\t\t\topacity: startAnimation ? 0 : 1,\n\t\t\t\t\ttransition: 'opacity 0.2s ease-in-out, transform 0.3s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<style>{`\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t`}</style>\n\t\t\t\t{/* Content Wrapper - contains image and text side by side */}\n\t\t\t\t<div style={styles.contentWrapper}>\n\t\t\t\t\t{/* Image/Video section */}\n\t\t\t\t\t<div style={styles.imageContainer}>\n\t\t\t\t\t\t{feature.productVideo ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<video\n\t\t\t\t\t\t\t\t\tref={videoRef}\n\t\t\t\t\t\t\t\t\tsrc={feature.productVideo}\n\t\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\t\t\tplaysInline\n\t\t\t\t\t\t\t\t\tcontrols\n\t\t\t\t\t\t\t\t\taria-label={`Product video for ${feature.title}`}\n\t\t\t\t\t\t\t\t\tonLoadedMetadata={handleVideoLoadedMetadata}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{(isVideoPaused || showPlayIcon) && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={styles.videoOverlay}\n\t\t\t\t\t\t\t\t\t\tonClick={handleVideoClick}\n\t\t\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\t\t\taria-label={isVideoPaused ? 'Play video' : 'Pause video'}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={handleVideoKeyDown}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<PlayIcon width={20} height={20} />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : feature.displayImage ? (\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tref={imageRef}\n\t\t\t\t\t\t\t\tsrc={feature.displayImage}\n\t\t\t\t\t\t\t\talt={feature.title}\n\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\tonLoad={handleImageLoad}\n\t\t\t\t\t\t\t\tonError={(e) => {\n\t\t\t\t\t\t\t\t\tif (feature.image) {\n\t\t\t\t\t\t\t\t\t\t(e.target as HTMLImageElement).src = feature.image;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div style={styles.imagePlaceholder}>\n\t\t\t\t\t\t\t\t{TEXT.FEATURE_PREVIEW_PLACEHOLDER}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Content section */}\n\t\t\t\t\t<div style={styles.contentContainer}>\n\t\t\t\t\t\t{/* Skip Button at top-right */}\n\t\t\t\t\t\t<div style={styles.skipButtonContainer}>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tonClick={handleSkipClick}\n\t\t\t\t\t\t\t\tstyle={styles.skipButton.base}\n\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.hover)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.base)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-label=\"Skip feature announcement\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSkip\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{/* Title */}\n\t\t\t\t\t\t<h3 style={styles.title}>{feature.title}</h3>\n\n\t\t\t\t\t\t{/* Content/Description */}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tdata-popup-content\n\t\t\t\t\t\t\tstyle={styles.content}\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t\t__html: decodeHTMLEntities(\n\t\t\t\t\t\t\t\t\tfeature.content || feature.body || '',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{/* Actions - Buttons and Navigation */}\n\t\t\t\t\t\t<div style={styles.actionsWrapper}>\n\t\t\t\t\t\t\t<div style={styles.buttonsGroup}>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tonClick={handleExplore}\n\t\t\t\t\t\t\t\t\tstyle={styles.exploreButton.base}\n\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.hover,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.base,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{feature.primaryButton?.text ||\n\t\t\t\t\t\t\t\t\t\tfeature.buttonText ||\n\t\t\t\t\t\t\t\t\t\tTEXT.DEFAULT_BUTTON_TEXT}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t{/* Secondary Button (Optional) */}\n\t\t\t\t\t\t\t\t{feature.secondaryButton?.text &&\n\t\t\t\t\t\t\t\t\t(feature.secondaryButton?.redirectionUrl &&\n\t\t\t\t\t\t\t\t\tfeature.secondaryButton?.action !== 'Play Video' ? (\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={feature.secondaryButton.redirectionUrl}\n\t\t\t\t\t\t\t\t\t\t\ttarget={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '_blank'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '_self'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\trel={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'noopener noreferrer'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{/* Navigation arrows */}\n\t\t\t\t\t\t\t{totalFeatures > 1 && (\n\t\t\t\t\t\t\t\t<div style={styles.navigationContainer}>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handlePreviousClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === 0}\n\t\t\t\t\t\t\t\t\t\tstyle={styles.navigationButton(currentIndex === 0).base}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Previous feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow style={{ transform: 'rotate(180deg)' }} />\n\t\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handleNextClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === totalFeatures - 1}\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t).base\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Next feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t{/* Close contentWrapper */}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MajorUpdatePopup;\n"],"names":["MajorUpdatePopup","_ref","feature","currentIndex","totalFeatures","onSkip","onExplore","onPrevious","onNext","setIsClosing","setIsClosingParent","onSecondaryAction","ratio","padding","isClosing","useState","startAnimation","setStartAnimation","transform","setTransform","popupRef","useRef","isVideoPaused","setIsVideoPaused","showPlayIcon","setShowPlayIcon","videoRef","imageAspectRatio","setImageAspectRatio","imageRef","useEffect","handleSecondaryAction","e","preventDefault","stopPropagation","action","_a","secondaryButton","closeCallback","internalUrl","url","_b","redirectionUrl","startsWith","window","open","hideJoyrideArrow","current","targetButton","findWhatsNewButton","transformValue","calculateCloseTransform","executeAfterAnimation","__awaiter","location","href","styles","getMajorPopupStyles","primaryButton","style","_jsx","Object","assign","outerWrapper","children","_jsxs","ref","container","opacity","transition","contentWrapper","imageContainer","productVideo","_Fragment","src","image","autoPlay","muted","loop","playsInline","controls","title","onLoadedMetadata","video","currentTarget","width","videoWidth","height","videoHeight","aspectRatio","Math","abs","videoOverlay","onClick","paused","play","pause","role","tabIndex","onKeyDown","key","PlayIcon","displayImage","alt","onLoad","img","naturalWidth","naturalHeight","onError","target","imagePlaceholder","TEXT","FEATURE_PREVIEW_PLACEHOLDER","contentContainer","skipButtonContainer","callback","handleClose","skipButton","base","onMouseEnter","hover","onMouseLeave","content","dangerouslySetInnerHTML","__html","decodeHTMLEntities","body","actionsWrapper","buttonsGroup","handleExplore","redirectUrl","exploreButton","_c","text","buttonText","DEFAULT_BUTTON_TEXT","_d","_e","_f","rel","undefined","navigationContainer","disabled","navigationButton","Arrow"],"mappings":"2rBAcMA,MAAAA,EAAoDC,IAYrD,IAZsDC,QAC1DA,EAAOC,aACPA,EAAYC,cACZA,EAAaC,OACbA,EAAMC,UACNA,EAASC,WACTA,EAAUC,OACVA,EACAC,aAAcC,EAAkBC,kBAChCA,EAAiBC,MACjBA,EAAQ,OAAMC,QACdA,GACAZ,kBACA,MAAOa,EAAWL,GAAgBM,GAAS,IACpCC,EAAgBC,GAAqBF,GAAS,IAC9CG,EAAWC,GAAgBJ,EAAS,IACrCK,EAAWC,EAAuB,OACjCC,EAAeC,GAAoBR,GAAS,IAC5CS,EAAcC,GAAmBV,GAAS,GAC3CW,EAAWL,EAAyB,OACnCM,EAAkBC,GAAuBb,EAE9CH,GAEIiB,EAAWR,EAAyB,MAE1CS,GAAU,KACLhB,GAEHG,GAAkB,EAClB,GACC,CAACH,IAEJ,MA+HMiB,EAAyBC,YAC9BA,EAAEC,iBACFD,EAAEE,kBAEF,MAAMC,EAAgC,QAAvBC,EAAAlC,EAAQmC,uBAAe,IAAAD,OAAA,EAAAA,EAAED,OAClCG,EAAgB3B,GAAq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