@cleartrip/ct-platform-supercoins-chip 2.3.20 → 2.3.22
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAe9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAe9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAkB7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqWjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),r=require("@cleartrip/ct-design-typography"),o=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(i);function l(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var c={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};l('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var u="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",_="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",p="island_rendered_frquency",d="islandAnimationPlayed",m="island_expiration_frquency",x=5,f=2,g=2e3,h=500,v=1500,y={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function b(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<y.requiredSupercoins)return!1;if(!("true"===t.getQueryParam("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(p);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=y.frequency){var o=(n=localStorage.getItem(m))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(p),localStorage.removeItem(m),!0)}return!sessionStorage.getItem(d)}function w(){var e=localStorage.getItem(p);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(p,n.toString()),n>=y.frequency){var i=Math.floor(Date.now()/1e3)+86400*y.frequencyGapInDays;localStorage.setItem(m,i.toString())}}var S={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};l(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var B={2:58,3:66,4:74,5:82,6:90,7:120};function k(i){var o=i.supercoinBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:u,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsx(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:o}))}))]}))}function C(i){var o=i.walletBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:_,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsxs(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:["₹",o]}))}))]}))}function T(i){var r,o=i.supercoinBalance,t=i.walletBalance,a=i.handleClick,s=i.chipWidthRef,l=0===t&&o>0||0===o&&0===t,c=l?S["spring-up-wallet-sc"]:S["spring-up-wallet"],u=Math.max(t.toString().length,o.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=B[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(r=null==s?void 0:s.current)&&void 0!==r?r:0,u);var _=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),p=0===(null==s?void 0:s.current)?"":S["width-animation"];return n.jsx("div",e.__assign({onClick:a},{children:n.jsx("div",e.__assign({className:"".concat(S.pillContainer," ").concat(p),style:{height:"32px",width:_}},{children:n.jsxs("div",e.__assign({className:c},{children:[n.jsx(k,{supercoinBalance:o}),n.jsx(C,{walletBalance:t}),l?n.jsx(k,{supercoinBalance:o}):null]}))}))}))}var j=s.default.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))}));exports.SupercoinsChip=function(a){var s=a.supercoinsLoading,l=a.supercoinBurnBalance,_=a.ravenPayload,p=void 0===_?{}:_,m=a.onSupercoinsClick,S=a.supercoinsExpiryCount,B=a.renderFloatingIsland,k=void 0===B||B,C=a.walletEnabled,I=void 0!==C&&C,E=a.walletBalance,W=a.supercoinsFetchError,q=i.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),A=i.useState(!1),N=A[0],F=A[1],P=i.useState(0),Y=P[0],U=P[1],G=i.useState(!1),M=G[0],H=G[1],K=i.useState(!1),L=K[0],J=K[1],D=i.useState(!1),O=D[0],V=D[1],z=i.useMemo((function(){return"number"==typeof l&&l>=0&&!s}),[l,s]),Q=i.useState(!1),R=Q[0],Z=Q[1],X=i.useState(null),$=X[0],ee=X[1],ne=i.useState(!1),ie=ne[0],re=ne[1],oe=i.useRef(0),te=i.useRef(!1),ae="entry"===$?c.supercoinsBalanceBackgroundColorShift:"exit"===$?c.supercoinsBalanceBackgroundColorShift_exit:"",se="entry"===$?c.supercoinsBalanceTextColorShift:"exit"===$?c.supercoinsBalanceTextColorShift_exit:"";function le(){var n;m&&"function"==typeof m&&m();var i=p.action_event_name;p.impression_event_name;var r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:q},r))}if(i.useEffect((function(){U(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(d)||(re(!0),ee(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),i.useEffect((function(){if(!s){var e,n=b({renderFloatingIsland:k,supercoins:l}),i="number"==typeof S&&S>=x&&!n;return F(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!ie?(ee("entry"),e=setTimeout((function(){Z(!0)}),1500),V(!0)):i?(V(!0),setTimeout((function(){I&&J(!0)}),1e4)):(I&&J(!0),V(!0)),function(){clearTimeout(e)}}}),[l,S,s]),i.useEffect((function(){if(k&&R){var e=setTimeout((function(){sessionStorage.getItem(d)||(Z(!1),ee("exit"),J(!0))}),y.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),i.useEffect((function(){var n;if("number"==typeof l&&l>=0&&!s&&null!==S){p.action_event_name;var i=p.impression_event_name,r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_impression",e.__assign({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:q,supercoinsExpiryCount:S||"N/A"},r))}}),[s,S]),i.useEffect((function(){if(N&&!(Y>=f)){var e=setTimeout((function(){H(!0);var e=setTimeout((function(){H(!1);var e=Y+1;U(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),v);return function(){return clearTimeout(e)}}),0===Y?h:g);return function(){return clearTimeout(e)}}}),[N,Y]),W)return n.jsx(n.Fragment,{});if(s||!R&&!L&&!O)return n.jsx("div",e.__assign({className:c.supercoinsBalance},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx(o.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(o.Shimmer,{width:44,height:18,type:"rounded"})]}))}));if(!z)return null;var ce=N?"HM4":"B2",ue=N?c.supercoinsExpiryPill:c.supercoinsBalance,_e=N?c.supercoinBurnExpiryColor:"";return L?n.jsx(T,{walletBalance:E,supercoinBalance:Number(l),handleClick:le,chipWidthRef:oe}):n.jsxs("div",e.__assign({style:{position:"relative"}},{children:[n.jsx("div",e.__assign({ref:function(e){var n;te.current||(te.current=!0,oe.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(ue," ").concat(ae),onClick:le},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:u,alt:"supercoin_icon",width:18,height:18}),n.jsxs("div",e.__assign({className:c.supercoinChipWrapper},{children:[n.jsx(r.Typography,e.__assign({variant:ce,className:[se,c.supercoinBurnTextAlign,_e].join(" ")},{children:M?S:l})),N&&n.jsx(r.Typography,e.__assign({variant:"HM4",className:"".concat(c.supercoinExpiryText," ").concat(M?c.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),R&&!ie&&n.jsx("div",e.__assign({className:c.superCoinsFloatingIslandContainer},{children:n.jsx(i.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(j,{superCoins:l,onAnimationStart:function(){return function(n){var i,r=n.supercoins,o=n.ravenPayload,a=void 0===o?{}:o,s=n.utmSource,l=void 0===s?"":s;a.action_event_name;var c=a.impression_event_name,u=e.__rest(a,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(i=c)&&void 0!==i?i:"u_impression",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:l},u)),sessionStorage.setItem("islandAnimationPlayed","true"),w()}({supercoins:l,ravenPayload:p,utmSource:q})},onAnimationEnd:function(){setTimeout((function(){I&&J(!0)}),500),ee("exit")}})}))}))]}))};
|
|
1
|
+
"use strict";var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),r=require("@cleartrip/ct-design-typography"),o=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(i);function l(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var u={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};l('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var c="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",_="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",p="island_rendered_frquency",d="islandAnimationPlayed",m="island_expiration_frquency",x=5,f=2,g=2e3,h=500,v=1500,y={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function b(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<y.requiredSupercoins)return!1;if(!("true"===t.getQueryParam("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(p);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=y.frequency){var o=(n=localStorage.getItem(m))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(p),localStorage.removeItem(m),!0)}return!sessionStorage.getItem(d)}function w(){var e=localStorage.getItem(p);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(p,n.toString()),n>=y.frequency){var i=Math.floor(Date.now()/1e3)+86400*y.frequencyGapInDays;localStorage.setItem(m,i.toString())}}var S={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};l(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var B={2:58,3:66,4:74,5:82,6:90,7:120};function k(i){var o=i.supercoinBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:c,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsx(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:o}))}))]}))}function C(i){var o=i.walletBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:_,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsxs(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:["₹",o]}))}))]}))}function T(i){var r,o=i.supercoinBalance,t=i.walletBalance,a=i.handleClick,s=i.chipWidthRef,l=0===t&&o>0||0===o&&0===t,u=l?S["spring-up-wallet-sc"]:S["spring-up-wallet"],c=Math.max(t.toString().length,o.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=B[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(r=null==s?void 0:s.current)&&void 0!==r?r:0,c);var _=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),p=0===(null==s?void 0:s.current)?"":S["width-animation"];return n.jsx("div",e.__assign({onClick:a},{children:n.jsx("div",e.__assign({className:"".concat(S.pillContainer," ").concat(p),style:{height:"32px",width:_}},{children:n.jsxs("div",e.__assign({className:u},{children:[n.jsx(k,{supercoinBalance:o}),n.jsx(C,{walletBalance:t}),l?n.jsx(k,{supercoinBalance:o}):null]}))}))}))}var j=s.default.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))}));exports.SupercoinsChip=function(a){var s=a.supercoinsLoading,l=a.supercoinBurnBalance,_=a.ravenPayload,p=void 0===_?{}:_,m=a.onSupercoinsClick,S=a.supercoinsExpiryCount,B=a.renderFloatingIsland,k=void 0===B||B,C=a.walletEnabled,E=void 0!==C&&C,I=a.walletBalance,N=a.supercoinsFetchError,W=i.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),q=i.useState(!1),A=q[0],F=q[1],P=i.useState(0),Y=P[0],U=P[1],G=i.useState(!1),M=G[0],H=G[1],K=i.useState(!1),L=K[0],J=K[1],D=i.useState(!1),O=D[0],V=D[1],z=i.useMemo((function(){return"number"==typeof l&&l>=0&&!s}),[l,s]),Q=i.useState(!1),R=Q[0],Z=Q[1],X=i.useState(null),$=X[0],ee=X[1],ne=i.useState(!1),ie=ne[0],re=ne[1],oe=i.useRef(0),te=i.useRef(!1),ae="entry"===$?u.supercoinsBalanceBackgroundColorShift:"exit"===$?u.supercoinsBalanceBackgroundColorShift_exit:"",se="entry"===$?u.supercoinsBalanceTextColorShift:"exit"===$?u.supercoinsBalanceTextColorShift_exit:"";function le(){var n;m&&"function"==typeof m&&m();var i=p.action_event_name;p.impression_event_name;var r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:W},r))}if(i.useEffect((function(){U(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(d)||(re(!0),ee(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),i.useEffect((function(){if(!s){var e,n=b({renderFloatingIsland:k,supercoins:l}),i="number"==typeof S&&S>=x&&!n;return F(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!ie?(ee("entry"),e=setTimeout((function(){Z(!0)}),1500),V(!0)):i?(V(!0),setTimeout((function(){E&&J(!0)}),1e4)):(E&&J(!0),V(!0)),function(){clearTimeout(e)}}}),[l,S,s]),i.useEffect((function(){if(k&&R){var e=setTimeout((function(){sessionStorage.getItem(d)||(Z(!1),ee("exit"),J(!0))}),y.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),i.useEffect((function(){var n;if("number"==typeof l&&l>=0&&!s&&null!==S){p.action_event_name;var i=p.impression_event_name,r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_impression",e.__assign({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:W,supercoinsExpiryCount:S||"N/A"},r))}}),[s,S]),i.useEffect((function(){if(A&&!(Y>=f)){var e=setTimeout((function(){H(!0);var e=setTimeout((function(){H(!1);var e=Y+1;U(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),v);return function(){return clearTimeout(e)}}),0===Y?h:g);return function(){return clearTimeout(e)}}}),[A,Y]),N)return n.jsx(n.Fragment,{});var ue=function(){return n.jsx("div",e.__assign({className:"px-2 br-16 ba-solid bc-line-500 bg-neutral-100 o-hidden",style:{paddingTop:"6px",paddingBottom:"6px",display:"inline-block"}},{children:n.jsxs("div",e.__assign({className:"flex flex-middle flex-gap-1"},{children:[n.jsx(o.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(o.Shimmer,{width:44,height:18,type:"rounded"})]}))}))};if(t.isServer())return n.jsx(ue,{});if(s||!R&&!L&&!O)return n.jsx(ue,{});if(!z)return null;var ce=A?"HM4":"B2",_e=A?u.supercoinsExpiryPill:u.supercoinsBalance,pe=A?u.supercoinBurnExpiryColor:"";return L?n.jsx(T,{walletBalance:I,supercoinBalance:Number(l),handleClick:le,chipWidthRef:oe}):n.jsxs("div",e.__assign({style:{position:"relative"}},{children:[n.jsx("div",e.__assign({ref:function(e){var n;te.current||(te.current=!0,oe.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(_e," ").concat(ae),onClick:le},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:c,alt:"supercoin_icon",width:18,height:18}),n.jsxs("div",e.__assign({className:u.supercoinChipWrapper},{children:[n.jsx(r.Typography,e.__assign({variant:ce,className:[se,u.supercoinBurnTextAlign,pe].join(" ")},{children:M?S:l})),A&&n.jsx(r.Typography,e.__assign({variant:"HM4",className:"".concat(u.supercoinExpiryText," ").concat(M?u.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),R&&!ie&&n.jsx("div",e.__assign({className:u.superCoinsFloatingIslandContainer},{children:n.jsx(i.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(j,{superCoins:l,onAnimationStart:function(){return function(n){var i,r=n.supercoins,o=n.ravenPayload,a=void 0===o?{}:o,s=n.utmSource,l=void 0===s?"":s;a.action_event_name;var u=a.impression_event_name,c=e.__rest(a,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(i=u)&&void 0!==i?i:"u_impression",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:l},c)),sessionStorage.setItem("islandAnimationPlayed","true"),w()}({supercoins:l,ravenPayload:p,utmSource:W})},onAnimationEnd:function(){setTimeout((function(){E&&J(!0)}),500),ee("exit")}})}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=ct-platform-supercoins-chip.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","supercoinsBalance","jsxs","display","alignItems","gap","Shimmer","typographyVariant","chipClassName","supercoinsExpiryPill","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onA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G,OAAIkC,EAAc/D,EAAOmI,yBAA2B,KAGnF,CAAAjI,SAAA,8BAM5BuE,IAA0BM,IACvB5E,EAAAA,IAAA,MAAAM,EAAAA,SAAA,CAAKV,UAAWC,EAAOoI,mCACnB,CAAAlI,SAAAC,EAAAA,IAACkI,EAAAA,SAAQ5H,EAAAA,SAAA,CAAC6H,SAAUnI,EAAAA,oBAChB,CAAAD,SAAAC,EAAAA,IAACiC,EAA4B,CACzBmG,WAAY1F,EACZ2F,iBAAkB,WACd,OHpU1B,SAAiCjK,SACnCG,EAAUH,EAAAG,WACVuE,EAAiB1E,EAAAuE,aAAjBA,OAAe,IAAAG,EAAA,CAAE,EAAAA,EACjBC,EAAc3E,EAAA8E,UAAdA,OAAS,IAAAH,EAAG,GAAEA,EAKVJ,EADqB4C,sBAAEC,EACvB7C,EAD4C6C,sBAAKC,EACjDC,EAAAA,OAAA/C,EADE,CAAA,oBAAA,0BAENgD,kBAAqD,QAApC/D,EAAA4D,SAAoC,IAAA5D,EAAAA,EAAA,2BACjDgE,YAAa,8BACbC,UAAW,mBACXC,kBAAmBvH,EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG8SgCkJ,CAAuB,CACnB/J,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjBqF,eA9RxB,WACI7B,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAgSL","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","paddingTop","paddingBottom","display","Shimmer","isServer","typographyVariant","chipClassName","supercoinsExpiryPill","supercoinsBalance","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","jsxs","alignItems","gap","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"uRAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EA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ACiI,SAAUvI,EAAAA,oBAChB,CAAAD,SAAAC,EAAAA,IAACiC,EAA4B,CACzBuG,WAAY9F,EACZ+F,iBAAkB,WACd,OHjV1B,SAAiCrK,SACnCG,EAAUH,EAAAG,WACVuE,EAAiB1E,EAAAuE,aAAjBA,OAAe,IAAAG,EAAA,CAAE,EAAAA,EACjBC,EAAc3E,EAAA8E,UAAdA,OAAS,IAAAH,EAAG,GAAEA,EAKVJ,EADqB4C,sBAAEC,EACvB7C,EAD4C6C,sBAAKC,EACjDC,EAAAA,OAAA/C,EADE,CAAA,oBAAA,0BAENgD,kBAAqD,QAApC/D,EAAA4D,SAAoC,IAAA5D,EAAAA,EAAA,2BACjDgE,YAAa,8BACbC,UAAW,mBACXC,kBAAmBvH,EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG2TgCsJ,CAAuB,CACnBnK,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjByF,eAvSxB,WACIjC,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAySL","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e,__assign as n}from"tslib";import{jsx as i,jsxs as r,Fragment as o}from"react/jsx-runtime";import t,{useMemo as a,useState as l,useRef as s,useEffect as c,Suspense as u}from"react";import{Typography as p}from"@cleartrip/ct-design-typography";import{Shimmer as d}from"@cleartrip/ct-platform-shimmer";import{getQueryParam as _,ravenSDKTrigger as m}from"@cleartrip/ct-platform-utils";function f(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var x={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};f('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var h="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",g="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",v="island_rendered_frquency",y="islandAnimationPlayed",b="island_expiration_frquency",w=5,B=2,k=2e3,C=500,S=1500,T={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function I(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<T.requiredSupercoins)return!1;if(!("true"===_("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(v);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=T.frequency){var o=(n=localStorage.getItem(b))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(v),localStorage.removeItem(b),!0)}return!sessionStorage.getItem(y)}function E(){var e=localStorage.getItem(v);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(v,n.toString()),n>=T.frequency){var i=Math.floor(Date.now()/1e3)+86400*T.frequencyGapInDays;localStorage.setItem(b,i.toString())}}var W={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};f(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var A={2:58,3:66,4:74,5:82,6:90,7:120};function N(e){var o=e.supercoinBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:h,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:i(p,n({variant:"B2",className:W.textWrapper},{children:o}))}))]}))}function q(e){var o=e.walletBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:g,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:r(p,n({variant:"B2",className:W.textWrapper},{children:["₹",o]}))}))]}))}function F(e){var o,t=e.supercoinBalance,a=e.walletBalance,l=e.handleClick,s=e.chipWidthRef,c=0===a&&t>0||0===t&&0===a,u=c?W["spring-up-wallet-sc"]:W["spring-up-wallet"],p=Math.max(a.toString().length,t.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=A[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(o=null==s?void 0:s.current)&&void 0!==o?o:0,p);var d=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),_=0===(null==s?void 0:s.current)?"":W["width-animation"];return i("div",n({onClick:l},{children:i("div",n({className:"".concat(W.pillContainer," ").concat(_),style:{height:"32px",width:d}},{children:r("div",n({className:u},{children:[i(N,{supercoinBalance:t}),i(q,{walletBalance:a}),c?i(N,{supercoinBalance:t}):null]}))}))}))}var P=t.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),Y=function(t){var f=t.supercoinsLoading,g=t.supercoinBurnBalance,v=t.ravenPayload,b=void 0===v?{}:v,W=t.onSupercoinsClick,A=t.supercoinsExpiryCount,N=t.renderFloatingIsland,q=void 0===N||N,Y=t.walletEnabled,U=void 0!==Y&&Y,G=t.walletBalance,H=t.supercoinsFetchError,L=a((function(){var e;return null!==(e=_("utm_source"))&&void 0!==e?e:"organic"}),[]),j=l(!1),M=j[0],J=j[1],K=l(0),O=K[0],V=K[1],z=l(!1),D=z[0],Z=z[1],Q=l(!1),R=Q[0],X=Q[1],$=l(!1),ee=$[0],ne=$[1],ie=a((function(){return"number"==typeof g&&g>=0&&!f}),[g,f]),re=l(!1),oe=re[0],te=re[1],ae=l(null),le=ae[0],se=ae[1],ce=l(!1),ue=ce[0],pe=ce[1],de=s(0),_e=s(!1),me="entry"===le?x.supercoinsBalanceBackgroundColorShift:"exit"===le?x.supercoinsBalanceBackgroundColorShift_exit:"",fe="entry"===le?x.supercoinsBalanceTextColorShift:"exit"===le?x.supercoinsBalanceTextColorShift_exit:"";function xe(){var i;W&&"function"==typeof W&&W();var r=b.action_event_name;b.impression_event_name;var o=e(b,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_ui_action",n({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:g,u_utm_source:L},o))}if(c((function(){V(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(y)||(pe(!0),se(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),c((function(){if(!f){var e,n=I({renderFloatingIsland:q,supercoins:g}),i="number"==typeof A&&A>=w&&!n;return J(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!ue?(se("entry"),e=setTimeout((function(){te(!0)}),1500),ne(!0)):i?(ne(!0),setTimeout((function(){U&&X(!0)}),1e4)):(U&&X(!0),ne(!0)),function(){clearTimeout(e)}}}),[g,A,f]),c((function(){if(q&&oe){var e=setTimeout((function(){sessionStorage.getItem(y)||(te(!1),se("exit"),X(!0))}),T.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),c((function(){var i;if("number"==typeof g&&g>=0&&!f&&null!==A){b.action_event_name;var r=b.impression_event_name,o=e(b,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_impression",n({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:g,u_utm_source:L,supercoinsExpiryCount:A||"N/A"},o))}}),[f,A]),c((function(){if(M&&!(O>=B)){var e=setTimeout((function(){Z(!0);var e=setTimeout((function(){Z(!1);var e=O+1;V(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),S);return function(){return clearTimeout(e)}}),0===O?C:k);return function(){return clearTimeout(e)}}}),[M,O]),H)return i(o,{});if(f||!oe&&!R&&!ee)return i("div",n({className:x.supercoinsBalance},{children:r("div",n({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[i(d,{width:18,height:18,type:"rounded"}),i(d,{width:44,height:18,type:"rounded"})]}))}));if(!ie)return null;var he=M?"HM4":"B2",ge=M?x.supercoinsExpiryPill:x.supercoinsBalance,ve=M?x.supercoinBurnExpiryColor:"";return R?i(F,{walletBalance:G,supercoinBalance:Number(g),handleClick:xe,chipWidthRef:de}):r("div",n({style:{position:"relative"}},{children:[i("div",n({ref:function(e){var n;_e.current||(_e.current=!0,de.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(ge," ").concat(me),onClick:xe},{children:r("div",n({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[i("img",{src:h,alt:"supercoin_icon",width:18,height:18}),r("div",n({className:x.supercoinChipWrapper},{children:[i(p,n({variant:he,className:[fe,x.supercoinBurnTextAlign,ve].join(" ")},{children:D?A:g})),M&&i(p,n({variant:"HM4",className:"".concat(x.supercoinExpiryText," ").concat(D?x.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),oe&&!ue&&i("div",n({className:x.superCoinsFloatingIslandContainer},{children:i(u,n({fallback:i(o,{})},{children:i(P,{superCoins:g,onAnimationStart:function(){return function(i){var r,o=i.supercoins,t=i.ravenPayload,a=void 0===t?{}:t,l=i.utmSource,s=void 0===l?"":l;a.action_event_name;var c=a.impression_event_name,u=e(a,["action_event_name","impression_event_name"]);m(null!==(r=c)&&void 0!==r?r:"u_impression",n({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:s},u)),sessionStorage.setItem("islandAnimationPlayed","true"),E()}({supercoins:g,ravenPayload:b,utmSource:L})},onAnimationEnd:function(){setTimeout((function(){U&&X(!0)}),500),se("exit")}})}))}))]}))};export{Y as SupercoinsChip};
|
|
1
|
+
import{__rest as e,__assign as n}from"tslib";import{jsx as i,jsxs as r,Fragment as o}from"react/jsx-runtime";import t,{useMemo as a,useState as l,useRef as s,useEffect as c,Suspense as u}from"react";import{Typography as d}from"@cleartrip/ct-design-typography";import{Shimmer as p}from"@cleartrip/ct-platform-shimmer";import{getQueryParam as _,ravenSDKTrigger as m,isServer as f}from"@cleartrip/ct-platform-utils";function x(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var h={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};x('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var g="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",v="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",y="island_rendered_frquency",b="islandAnimationPlayed",w="island_expiration_frquency",B=5,k=2,C=2e3,S=500,T=1500,I={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function E(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<I.requiredSupercoins)return!1;if(!("true"===_("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(y);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=I.frequency){var o=(n=localStorage.getItem(w))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(y),localStorage.removeItem(w),!0)}return!sessionStorage.getItem(b)}function N(){var e=localStorage.getItem(y);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(y,n.toString()),n>=I.frequency){var i=Math.floor(Date.now()/1e3)+86400*I.frequencyGapInDays;localStorage.setItem(w,i.toString())}}var W={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};x(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var A={2:58,3:66,4:74,5:82,6:90,7:120};function q(e){var o=e.supercoinBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:g,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:i(d,n({variant:"B2",className:W.textWrapper},{children:o}))}))]}))}function F(e){var o=e.walletBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:v,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:r(d,n({variant:"B2",className:W.textWrapper},{children:["₹",o]}))}))]}))}function P(e){var o,t=e.supercoinBalance,a=e.walletBalance,l=e.handleClick,s=e.chipWidthRef,c=0===a&&t>0||0===t&&0===a,u=c?W["spring-up-wallet-sc"]:W["spring-up-wallet"],d=Math.max(a.toString().length,t.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=A[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(o=null==s?void 0:s.current)&&void 0!==o?o:0,d);var p=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),_=0===(null==s?void 0:s.current)?"":W["width-animation"];return i("div",n({onClick:l},{children:i("div",n({className:"".concat(W.pillContainer," ").concat(_),style:{height:"32px",width:p}},{children:r("div",n({className:u},{children:[i(q,{supercoinBalance:t}),i(F,{walletBalance:a}),c?i(q,{supercoinBalance:t}):null]}))}))}))}var Y=t.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),U=function(t){var x=t.supercoinsLoading,v=t.supercoinBurnBalance,y=t.ravenPayload,w=void 0===y?{}:y,W=t.onSupercoinsClick,A=t.supercoinsExpiryCount,q=t.renderFloatingIsland,F=void 0===q||q,U=t.walletEnabled,G=void 0!==U&&U,H=t.walletBalance,L=t.supercoinsFetchError,j=a((function(){var e;return null!==(e=_("utm_source"))&&void 0!==e?e:"organic"}),[]),M=l(!1),J=M[0],K=M[1],O=l(0),V=O[0],z=O[1],D=l(!1),Z=D[0],Q=D[1],R=l(!1),X=R[0],$=R[1],ee=l(!1),ne=ee[0],ie=ee[1],re=a((function(){return"number"==typeof v&&v>=0&&!x}),[v,x]),oe=l(!1),te=oe[0],ae=oe[1],le=l(null),se=le[0],ce=le[1],ue=l(!1),de=ue[0],pe=ue[1],_e=s(0),me=s(!1),fe="entry"===se?h.supercoinsBalanceBackgroundColorShift:"exit"===se?h.supercoinsBalanceBackgroundColorShift_exit:"",xe="entry"===se?h.supercoinsBalanceTextColorShift:"exit"===se?h.supercoinsBalanceTextColorShift_exit:"";function he(){var i;W&&"function"==typeof W&&W();var r=w.action_event_name;w.impression_event_name;var o=e(w,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_ui_action",n({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:v,u_utm_source:j},o))}if(c((function(){z(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(b)||(pe(!0),ce(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),c((function(){if(!x){var e,n=E({renderFloatingIsland:F,supercoins:v}),i="number"==typeof A&&A>=B&&!n;return K(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!de?(ce("entry"),e=setTimeout((function(){ae(!0)}),1500),ie(!0)):i?(ie(!0),setTimeout((function(){G&&$(!0)}),1e4)):(G&&$(!0),ie(!0)),function(){clearTimeout(e)}}}),[v,A,x]),c((function(){if(F&&te){var e=setTimeout((function(){sessionStorage.getItem(b)||(ae(!1),ce("exit"),$(!0))}),I.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),c((function(){var i;if("number"==typeof v&&v>=0&&!x&&null!==A){w.action_event_name;var r=w.impression_event_name,o=e(w,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_impression",n({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:v,u_utm_source:j,supercoinsExpiryCount:A||"N/A"},o))}}),[x,A]),c((function(){if(J&&!(V>=k)){var e=setTimeout((function(){Q(!0);var e=setTimeout((function(){Q(!1);var e=V+1;z(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),T);return function(){return clearTimeout(e)}}),0===V?S:C);return function(){return clearTimeout(e)}}}),[J,V]),L)return i(o,{});var ge=function(){return i("div",n({className:"px-2 br-16 ba-solid bc-line-500 bg-neutral-100 o-hidden",style:{paddingTop:"6px",paddingBottom:"6px",display:"inline-block"}},{children:r("div",n({className:"flex flex-middle flex-gap-1"},{children:[i(p,{width:18,height:18,type:"rounded"}),i(p,{width:44,height:18,type:"rounded"})]}))}))};if(f())return i(ge,{});if(x||!te&&!X&&!ne)return i(ge,{});if(!re)return null;var ve=J?"HM4":"B2",ye=J?h.supercoinsExpiryPill:h.supercoinsBalance,be=J?h.supercoinBurnExpiryColor:"";return X?i(P,{walletBalance:H,supercoinBalance:Number(v),handleClick:he,chipWidthRef:_e}):r("div",n({style:{position:"relative"}},{children:[i("div",n({ref:function(e){var n;me.current||(me.current=!0,_e.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(ye," ").concat(fe),onClick:he},{children:r("div",n({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[i("img",{src:g,alt:"supercoin_icon",width:18,height:18}),r("div",n({className:h.supercoinChipWrapper},{children:[i(d,n({variant:ve,className:[xe,h.supercoinBurnTextAlign,be].join(" ")},{children:Z?A:v})),J&&i(d,n({variant:"HM4",className:"".concat(h.supercoinExpiryText," ").concat(Z?h.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),te&&!de&&i("div",n({className:h.superCoinsFloatingIslandContainer},{children:i(u,n({fallback:i(o,{})},{children:i(Y,{superCoins:v,onAnimationStart:function(){return function(i){var r,o=i.supercoins,t=i.ravenPayload,a=void 0===t?{}:t,l=i.utmSource,s=void 0===l?"":l;a.action_event_name;var c=a.impression_event_name,u=e(a,["action_event_name","impression_event_name"]);m(null!==(r=c)&&void 0!==r?r:"u_impression",n({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:s},u)),sessionStorage.setItem("islandAnimationPlayed","true"),N()}({supercoins:v,ravenPayload:w,utmSource:j})},onAnimationEnd:function(){setTimeout((function(){G&&$(!0)}),500),ce("exit")}})}))}))]}))};export{U as SupercoinsChip};
|
|
2
2
|
//# sourceMappingURL=ct-platform-supercoins-chip.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","supercoinsBalance","display","alignItems","gap","Shimmer","typographyVariant","chipClassName","supercoinsExpiryPill","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"+YAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,8hICzBO,IAAMe,EACT,sHAESC,EACT,4GAESC,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAISC,EACkB,EADlBA,EAEK,EAFLA,EAGyB,IAHzBA,EAIkB,IAJlBA,EAKkB,KAGlBC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,EACpBC,eAAgB,IAChBC,mBAAmB,GCPC,SAAAC,EAA2BC,OALz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,gBAENjE,EACKf,EACAH,KAGTY,GACGtD,EAACO,EAAUF,EAAA,CACPG,QAAQ,MACRZ,UAAW,GAAA6B,OAAG5B,EAAOiI,oBAAmB,KAAArG,OAAImC,EAAc/D,EAAOkI,yBAA2B,KAGnF,CAAAhI,SAAA,8BAM5BuE,KAA0BM,IACvB5E,EAAA,MAAAK,EAAA,CAAKT,UAAWC,EAAOmI,mCACnB,CAAAjI,SAAAC,EAACiI,EAAQ5H,EAAA,CAAC6H,SAAUlI,SAChB,CAAAD,SAAAC,EAACgC,EAA4B,CACzBmG,WAAYzF,EACZ0F,iBAAkB,WACd,OHpU1B,SAAiChK,SACnCG,EAAUH,EAAAG,WACVuE,EAAiB1E,EAAAuE,aAAjBA,OAAe,IAAAG,EAAA,CAAE,EAAAA,EACjBC,EAAc3E,EAAA8E,UAAdA,OAAS,IAAAH,EAAG,GAAEA,EAKVJ,EADqB4C,sBAAEC,EACvB7C,EAD4C6C,sBAAKC,EACjDC,EAAA/C,EADE,CAAA,oBAAA,0BAENgD,EAAqD,QAApChE,EAAA6D,SAAoC,IAAA7D,EAAAA,EAAA,kBACjDiE,YAAa,8BACbC,UAAW,mBACXC,kBAAmBvH,EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG8SgCiJ,CAAuB,CACnB9J,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjBoF,eA9RxB,WACI5B,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAgSL","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","paddingTop","paddingBottom","display","Shimmer","isServer","typographyVariant","chipClassName","supercoinsExpiryPill","supercoinsBalance","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","alignItems","gap","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"6ZAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,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A,kBACjDiE,YAAa,8BACbC,UAAW,mBACXC,kBAAmBvH,EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG2TgCqJ,CAAuB,CACnBlK,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjBwF,eAvSxB,WACIhC,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAySL","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-platform-supercoins-chip",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.22",
|
|
4
4
|
"description": "SuperCoins Chip Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/ct-platform-supercoins-chip.cjs.js",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@cleartrip/ct-design-typography": "2.6.0",
|
|
14
|
-
"@cleartrip/ct-platform-
|
|
15
|
-
"@cleartrip/ct-platform-
|
|
16
|
-
"@cleartrip/ct-platform-
|
|
14
|
+
"@cleartrip/ct-platform-shimmer": "4.3.22",
|
|
15
|
+
"@cleartrip/ct-platform-utils": "4.3.22",
|
|
16
|
+
"@cleartrip/ct-platform-supercoins-floating-island": "2.3.22"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|