PageSourceSearch

https://www.bankco.co.in/static/js/8733.c1e00b86.chunk.js

js bankco.co.in collected 2026-10-08 00:02:29 UTC 50,522 bytes, 2 lines download raw bytes

1/*! For license information please see 8733.c1e00b86.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkbanco=self.webpackChunkbanco||[]).push([[8733],{5192:(e,d,n)=>{n.d(d,{A:()=>le});var l=n(89379),i=n(63248),o=n(38326),a=n(7104),r=n(9463),t=n(92382),u=n(15711),s=n(65043),c=n(73216),v=n(83876),m=n(94229),b=n(78432),f=n(63803),p=n(23857),h=n(47320),_=n(60142),y=n(12734),g=n(46038),B=n(35184),x=n(78658),j=n(18977),C=n(62314),A=n(27392),S=n(41379),k=n(58318),w=n(88947),N=n(36297),I=n(42646),P=n(87977),R=n(70764),T=n(94805);const M=(0,n(77784).A)("move-up-right",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);var D=n(28006),E=n(76833),L=n(72313),O=n(40614),F=n(78860),V=n(70579);const U=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[null===e||void 0===e?void 0:e.card_number,null===e||void 0===e?void 0:e.card_no,null===e||void 0===e?void 0:e.card_pin,null===e||void 0===e?void 0:e.activation_code,null===e||void 0===e?void 0:e.activation_url,null===e||void 0===e?void 0:e.url,null===e||void 0===e?void 0:e.validity,null===e||void 0===e?void 0:e.expiry].some(Boolean)},z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const d=Array.isArray(null===e||void 0===e?void 0:e.gift_card_details)?e.gift_card_details:Array.isArray(null===e||void 0===e?void 0:e.giftCardDetails)?e.giftCardDetails:Array.isArray(null===e||void 0===e?void 0:e.purchased_gift_card)?e.purchased_gift_card:[];return d.length>0?d.filter(U):U(e)?[e]:[]},W=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const d=null===e||void 0===e?void 0:e.tnc;if(Array.isArray(d))return d.map(e=>"string"===typeof e?e:"string"===typeof(null===e||void 0===e?void 0:e.html)?e.html:"").map(e=>e.trim()).filter(Boolean).join("");if(d&&"object"===typeof d){const e=(null===d||void 0===d?void 0:d.html)||(null===d||void 0===d?void 0:d.content);if("string"===typeof e&&e.trim())return e}return"string"===typeof d&&d.trim()?d:""};function H(e){var d,n,i,o,a;let{offer:r={},isSummary:t=!1,isMobile:u=!1,integratorTheme:c={},onKnowMore:v=()=>{},onUnlockAction:m=()=>{},copiedOfferId:b=""}=e;const[f,p]=(0,s.useState)(!1),[_,y]=(0,s.useState)(""),[g,B]=(0,s.use
2State)(null),x=(0,s.useRef)(null),j=(null===r||void 0===r?void 0:r.display_offer_type)||"merchant_funded_offers",C=(null===r||void 0===r?void 0:r.offer_type)||j,A="gift_card"===C,S=Boolean(null===r||void 0===r||null===(d=r.brand)||void 0===d?void 0:d.logo),k=F.w[C]||F.w[j]||F.w.merchant_funded_offers,N=(0,s.useMemo)(()=>A?z(r):[],[A,r]),I=t&&A&&N.length>0,U=(0,s.useMemo)(()=>P.A.sanitize(W(r)),[r]),H=Boolean(U),G=(0,s.useMemo)(()=>(0,h.nV)((0,h.eQ)(c),14),[c]),K=(0,s.useMemo)(()=>(0,h.Zt)((0,h.eQ)(c),86),[c]),J=(0,s.useMemo)(()=>(0,h.Zt)((0,h.eQ)(c),72),[c]),Q=(null===r||void 0===r?void 0:r.preview_url)||"",Z=Boolean(Q),q=(0,s.useMemo)(()=>({"--theme-text-color":(0,h.hk)(c),"--theme-default-text-color":(0,h.eQ)(c),"--brandBundleActionColor":G,"--brandBundleSummaryAccent":G,"--brandBundleSummarySurface":K,"--brandBundleSummaryBorder":J}),[c,G,K,J]);(0,s.useEffect)(()=>{p(!1),y("")},[null===r||void 0===r?void 0:r.id]),(0,s.useEffect)(()=>{if(!t||f)return;const e=x.current;if(!e)return;let d=null;const n=()=>{const d=Math.round(e.getBoundingClientRect().height);d&&B(e=>e===d?e:d)};if(n(),d=window.requestAnimationFrame(n),"undefined"===typeof ResizeObserver)return()=>{window.cancelAnimationFrame(d)};const l=new ResizeObserver(()=>{n()});return l.observe(e),()=>{window.cancelAnimationFrame(d),l.disconnect()}},[t,f,null===r||void 0===r?void 0:r.id,u,I,null===r||void 0===r?void 0:r.unlock_value,Z]);const X=(0,s.useCallback)(e=>{var d;if(e.preventDefault(),e.stopPropagation(),!H)return;const n=Math.round((null===(d=x.current)||void 0===d?void 0:d.getBoundingClientRect().height)||0);n&&B(n),p(!0)},[H]),Y=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),p(!1)},[]),$=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),v(r)},[r,v]),ee=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Q&&window.open(Q,"_blank","noopener,noreferrer")},[Q]),de=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),m(r)},[r,m]),ne=(0,s.useCallback)((e,d,n)=>{e.stopPropagation(),d&&navigator.clipboard.writeText(d).then(()=>{y(n),window.setTimeout(()=>{y(e=>e===n?"":e)},1800)})},[]),le=(0,V.jsxs)("div",{className:"brandBundleCardActionArea",children:[(0,V.jsx)("button",{type:"button",className:"offerRedeemBtn",onClick:$,children:A?"View Card":"View Offer"}),(0,V.jsxs)("div",{className:"brandBundleInlineActionRow",children:[(0,V.jsxs)("button",{type:"button",className:"brandBundleInlineAction brandBundleInlineActionStart ".concat(Z?"":"isDisabled"),onClick:ee,disabled:!Z,children:[(0,V.jsx)("span",{children:"Website"}),(0,V.jsx)(R.A,{size:10})]}),H&&(0,V.jsxs)("button",{type:"button",className:"brandBundleInlineAction brandBundleInlineActionEnd",onClick:X,children:[(0,V.jsx)("span",{children:"T&Cs"}),(0,V.jsx)(T.A,{size:10})]})]})]}),ie=(0,V.jsx)("button",{type:"button",className:"brandBundleSummaryViewAction",onClick:$,"aria-label":A?"View card":"View offer",title:A?"View Card":"View Offer",children:(0,V.jsx)(M,{size:18,strokeWidth:2.4})}),oe=(0,V.jsxs)("div",{className:"brandBundleInlineActionRow brandBundleSummaryInlineActionRow",children:[(0,V.jsxs)("button",{type:"button",className:"brandBundleInlineAction brandBundleInlineActionStart ".concat(Z?"":"isDisabled"),onClick:ee,disabled:!Z,children:[(0,V.jsx)("span",{children:"Website"}),(0,V.jsx)(R.A,{size:10})]}),H&&(0,V.jsxs)("button",{type:"button",className:"brandBundleInlineAction brandBundleInlineActionEnd",onClick:X,children:[(0,V.jsx)("span",{children:"T&Cs"}),(0,V.jsx)(T.A,{size:10})]})]}),ae=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(k,{designType:"rewardListing",item:r,image:(null===r||void 0===r||null===(n=r.brand)||void 0===n?void 0:n.bg_image)||(null===r||void 0===r||null===(i=r.brand)||void 0===i?void 0:i.logo),mobileViewCardDesign:!0,showPointsBadge:!0}),S&&(0,V.jsx)("div",{className:"logo",style:{"--card-logo-bg":(0,h.eQ)((null===r||void 0===r?void 0:r.brand)||r)},children:(0,V.jsx)(w.A,{src:r.brand.logo,alt:r.brand.name,className:"logoImage"})}),(0,V.jsxs)("div",{className:"brandBundleCardBody ".concat(S?"hasFloatingLogo":"withoutFloatingLogo"," ").concat(A?"isGiftCardVisual":""),children:[(0,V.jsxs)("div",{className:"brandBundleCardMetaRow",children:[(0,V.jsx)("div",{className:"brandBundleCardMetaSpacer ".concat(S?"hasFloatingLogo":"")}
2),(null===r||void 0===r||null===(o=r.region)||void 0===o?void 0:o.name)&&(0,V.jsxs)("div",{className:"countryBadge",children:[(0,V.jsx)(D.A,{size:u?8:10,color:"#fff"}),(0,V.jsx)("span",{className:"countryText",children:r.region.name})]})]}),(null===r||void 0===r?void 0:r.saving_amount)&&(0,V.jsx)("div",{className:"savingAmount",children:(0,h.ni)(r)}),(0,V.jsx)("div",{className:"brandTitle",children:null===r||void 0===r||null===(a=r.brand)||void 0===a?void 0:a.name}),I?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"brandBundleGiftCardSummarySection",children:N.map((e,d)=>{const n=[{key:"card_number",value:(null===e||void 0===e?void 0:e.card_number)||(null===e||void 0===e?void 0:e.card_no)||(null===r||void 0===r?void 0:r.card_number)||(null===r||void 0===r?void 0:r.card_no),action:"copy"}].filter(e=>e.value);return 0===n.length?null:(0,V.jsx)("div",{className:"brandBundleUnlockSection",children:n.map(e=>{const n="".concat(null===r||void 0===r?void 0:r.id,"-").concat(d,"-").concat(e.key),l=_===n;return(0,V.jsx)("div",{className:"brandBundleSummaryFieldBlock",children:(0,V.jsxs)("div",{className:"brandBundleSummaryActionRow",children:[(0,V.jsxs)("button",{type:"button",className:"brandBundleSummaryFieldStrip",onClick:d=>ne(d,e.value,n),"aria-label":"Copy ".concat(e.label||"card number"),children:[(0,V.jsx)("span",{className:"brandBundleSummaryFieldValue",children:e.value}),(0,V.jsx)("span",{className:"brandBundleSummaryFieldIcon","aria-hidden":"true",children:l?(0,V.jsx)(E.A,{size:16}):(0,V.jsx)(L.A,{size:16})})]}),ie]})},e.key)})},"".concat((null===r||void 0===r?void 0:r.id)||"gift-card","-").concat(d))})}),oe]}):t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"brandBundleUnlockSection",children:(0,V.jsxs)("div",{className:"brandBundleSummaryActionRow",children:[(0,V.jsxs)("button",{type:"button",className:"brandBundleSummaryFieldStrip ".concat("link"===(null===r||void 0===r?void 0:r.unlock_type)?"isLink":""),onClick:de,"aria-label":"link"===(null===r||void 0===r?void 0:r.unlock_type)?"Open link":"Copy coupon code",children:[(0,V.jsx)("span",{className:"brandBundleSummaryFieldValue",children:null===r||void 0===r?void 0:r.unlock_value}),(0,V.jsx)("span",{className:"brandBundleSummaryFieldIcon","aria-hidden":"true",children:"link"===(null===r||void 0===r?void 0:r.unlock_type)?(0,V.jsx)(R.A,{size:16}):b===r.id?(0,V.jsx)(E.A,{size:16}):(0,V.jsx)(L.A,{size:16})})]}),ie]})}),oe]}):le]})]});return t?g||f?(0,V.jsx)("article",{className:"rewardListingCardDesign brandBundleRewardCard ".concat(j," ").concat(A?"brandBundleGiftCardVisual":""," brandBundleRewardCardSummary ").concat(I?"brandBundleRewardCardGiftCardSummary":""," ").concat(f?"isFlipped brandBundleRewardCardSummaryTerms":""),ref:x,style:(0,l.A)((0,l.A)({},q),g?{"--brandBundleSummaryCardHeight":"".concat(g,"px")}:null),children:(0,V.jsxs)("div",{className:"brandBundleRewardCardFlipInner",children:[(0,V.jsx)("div",{className:"brandBundleRewardCardFace brandBundleRewardCardFront",children:ae}),(0,V.jsxs)("div",{className:"brandBundleRewardCardFace brandBundleRewardCardBack brandBundleRewardCardSummaryBackPanel",onClick:e=>{e.stopPropagation()},children:[(0,V.jsxs)("div",{className:"brandBundleRewardCardBackHeader",children:[(0,V.jsx)("h3",{className:"brandBundleRewardCardBackTitle",children:"T&Cs"}),(0,V.jsx)("button",{type:"button",className:"brandBundleRewardCardBackClose",onClick:Y,"aria-label":"Close T&Cs",children:(0,V.jsx)(O.A,{size:u?10:14})})]}),(0,V.jsx)("div",{className:"brandBundleRewardCardBackContent",dangerouslySetInnerHTML:{__html:U}})]})]})}):(0,V.jsx)("article",{className:"rewardListingCardDesign brandBundleRewardCard ".concat(j," ").concat(A?"brandBundleGiftCardVisual":""," brandBundleRewardCardSummary ").concat(I?"brandBundleRewardCardGiftCardSummary":""),ref:x,style:q,children:ae}):(0,V.jsx)("article",{className:"rewardListingCardDesign brandBundleRewardCard ".concat(j," ").concat(A?"brandBundleGiftCardVisual":""," clickable ").concat(f?"isFlipped":""),onClick:f?void 0:()=>v(r),style:q,children:(0,V.jsxs)("div",{className:"brandBundleRewardCardFlipInner",children:[(0,V.jsx)("div",{className:"brandBundleRewardCardFace brandBundleRewardCardFront",children:ae}),(0,V.jsxs)("div",{className:"brandBundleRewardCardFace brandBundleRewardCardBack",onClick:e=>{e.stopPropagation()},children:[(0,V.jsxs)("div",{className:"brandBundleRewardCardBackHeader",children:[(0,V.jsx)("h3",{className:"brandBundleRewardCardBackTitle",children:"T&Cs"}),(0,V.jsx)("button",{type:"button",className:"brandBundleRewardCardBackClose",onClick:Y,"aria-label":"Close T&Cs",children:(0,V.jsx)(O.A,{size:u?10:14})})]}),(0,V.jsx)("div",{className:"brandBundleRewardCardBackContent",dangerouslySetInnerHTML:{__html:U}})]})]})})}var G=n(12960),K=n(28390);n(95985),n(48061);const J=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null===e||void 0===e?void 0:e.assigned_coupon_code)||(null===e||void 0===e?void 0:e.assigned_affiliate_cashback)||(null===e||void 0===e?void 0:e.gift_card_order)||null},Q=function(){var e,d,n,l,i;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a=J(o);return(null===o||void 0===o?void 0:o.offer_reference_id)||(null===a||void 0===a||null===(e=a.offer)||void 0===e?void 0:e.id)||(null===a||void 0===a||null===(d=a.gift_card)||void 0===d?void 0:d.id)||(null===a||void 0===a||null===(n=a.gift_card_order)||void 0===n||null===(l=n.offer)||void 0===l?void 0:l.id)||(null===a||void 0===a?void 0:a.offer_id)||(null===a||void 0===a||null===(i=a.gift_card_order)||void 0===i?void 0:i.offer_id)},Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const d=(null===e||void 0===e?void 0:e.bundle)||(null===e||void 0===e?void 0:e.bundle_data)||(null===e||void 0===e?void 0:e.bundle_detail)||e,n=Array.isArray(null===e||void 0===e?void 0:e.items)?e.items:[];if(!d||0===n.length)return d;const i=new Map(n.map(e=>[String(Q(e)),e]).filter(e=>{let[d]=e;return d&&"undefined"!==d}));return(0,l.A)((0,l.A)({},d),{},{order_id:(null===e||void 0===e?void 0:e.id)||(null===d||void 0===d?void 0:d.order_id),payable_amount:null===e||void 0===e?void 0:e.payable_amount,paid_amount:null===e||void 0===e?void 0:e.payable_amount,status:null===e||void 0===e?void 0:e.status,created_at:null===e||void 0===e?void 0:e.created_at,points_used:null===e||void 0===e?void 0:e.points_used,items:Array.isArray(null===d||void 0===d?void 0:d.items)?d.items.map(function(){var e,d;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=(null===n||void 0===n?void 0:n.offer_reference_id)||(null===n||void 0===n||null===(e=n.offer_data)||void 0===e||null===(d=e.offer)||void 0===d?void 0:d.id)||(null===n||void 0===n?void 0:n.id),a=i.get(String(o));if(!a)return n;const r=J(a),t=(null===r||void 0===r?void 0:r.offer)||{},u=function(){var e,d,n,l;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=J(i);if(!o)return{};const a=(null===o||void 0===o?void 0:o.coupon_code)||(null===o||void 0===o?void 0:o.code)||(null===o||void 0===o?void 0:o.voucher_code),r=(null===o||void 0===o?void 0:o.utm_link)||(null===o||void 0===o?void 0:o.tracking_url)||(null===o||void 0===o?void 0:o.activation_url)||(null===o||void 0===o?void 0:o.url),t=(null===o||void 0===o?void 0:o.purchased_gift_card)||(null===o||void 0===o?void 0:o.gift_card_details)||(null===o||void 0===o?void 0:o.gift_cards)||(null===o||void 0===o?void 0:o.gift_card_detail),u=(null===i||void 0===i||null===(e=i.gift_card_order)||void 0===e?void 0:e.id)||(null===o||void 0===o||null===(d=o.gift_card_order)||void 0===d?void 0:d.id)||(null===o||void 0===o?void 0:o.order_id)||("GIFT_CARD"===(null===i||void 0===i?void 0:i.offer_type)?null===o||void 0===o?void 0:o.id:void 0);return{assigned_order_item_id:null===i||void 0===i?void 0:i.id,assigned_offer_id:null===o||void 0===o?void 0:o.id,gift_card_order_id:u,gift_card_order:(null===i||void 0===i?void 0:i.gift_card_order)||(null===o||void 0===o?void 0:o.gift_card_order),unlock_type:a?"coupon":r?"link":void 0,unlock_value:a||r||"",preview_url:r||(null===o||void 0===o||null===(n=o.offer)||void 0===n||null===(l=n.brand)||void 0===l?void 0:l.url),activation_url:(null===o||void 0===o?void 0:o.activation_url)||r,activation_code:(null===o||void 0===o?void 0:o.activation_code)||a,card_number:(null===o||void 0===o?void 0:o.card_number)||(null===o||void 0===o?void 0:o.card_no),card_pin:null===o||void 0===o?void 0:o.card_pin,gift_card_details:t}}(a),s=(null===n||void 0===n?void 0:n.offer_data)||{},c=(null===s||void 0===s?void 0:s.offer)||{};return(0,l.A)((0,l.A)({},n),{},{assigned_order_item:a,offer_data:(0,l.A)((0,l.A)({},s),{},{offer:(0,l.A)((0,l.A)((0,l.A)({},c),t),{},{brand:(0,l.A)((0,l.A)({},(null===c||void 0===c?void 0:c.brand)||{}),(null===t||void 0===t?void 0:t.brand)||{})},u),amount_to_claim:null===s||void 0===s?void 0:s.amount_to_claim,tnc:null===s||void 0===s?void 0:s.tnc})})}):null===d||void 0===d?void 0:d.items})},q=function(){var e,d,n,l,i,o;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null===a||void 0===a?void 0:a.orderId)||(null===a||void 0===a?void 0:a.order_id)||(null===a||void 0===a?void 0:a.bundle_order_id)||(null===a||void 0===a?void 0:a.purchased_order_id)||(null===a||void 0===a?void 0:a.latest_order_id)||(null===a||void 0===a||null===(e=a.order)||void 0===e?void 0:e.id)||(null===a||void 0===a||null===(d=a.purchase)||void 0===d?void 0:d.id)||(null===a||void 0===a||null===(n=a.orders)||void 0===n||null===(l=n[0])||void 0===l?void 0:l.id)||(null===a||void 0===a||null===(i=a.purchases)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id)},X=function(){var e,d,n,l,i,o,a,r;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Boolean(null!==(e=null!==(d=null===t||void 0===t?void 0:t.is_purchased)&&void 0!==d?d:null===t||void 0===t?void 0:t.isPurchased)&&void 0!==e?e:null===t||void 0===t?void 0:t.purchased))return!0;const u=String((null===t||void 0===t?void 0:t.status)||(null===t||void 0===t?void 0:t.purchase_status)||(null===t||void 0===t||null===(n=t.order)||void 0===n?void 0:n.status)||(null===t||void 0===t||null===(l=t.purchase)||void 0===l?void 0:l.status)||(null===t||void 0===t||null===(i=t.orders)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.status)||(null===t||void 0===t||null===(a=t.purchases)||void 0===a||null===(r=a[0])||void 0===r?void 0:r.status)||"").toLowerCase();return u?["success","completed","complete","purchased"].some(e=>u.includes(e)):Boolean(q(t))},Y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.A)((0,l.A)({},e),{},{id:null===e||void 0===e?void 0:e.id,title:null===e||void 0===e?void 0:e.title,item_category:"Brand Bundle"})},$=function(){var e;let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.A)((0,l.A)({},d),{},{id:(null===d||void 0===d?void 0:d.id)||(null===d||void 0===d?void 0:d.offer_reference_id)||(null===d||void 0===d?void 0:d.assigned_offer_id),title:(null===d||void 0===d?void 0:d.title)||(null===d||void 0===d||null===(e=d.brand)||void 0===e?void 0:e.name)||(0,h.ni)(d),item_category:(null===d||void 0===d?void 0:d.offer_type)||(null===d||void 0===d?void 0:d.display_offer_type)||"Brand Bundle Offer"})},ee=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"link"===(null===e||void 0===e?void 0:e.unlock_type)?"":(null===e||void 0===e?void 0:e.unlock_value)||(null===e||void 0===e?void 0:e.activation_code)||""},de=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"link"===(null===e||void 0===e?void 0:e.unlock_type)?(null===e||void 0===e?void 0:e.unlock_value)||(null===e||void 0===e?void 0:e.preview_url)||(null===e||void 0===e?void 0:e.activation_url)||"":(null===e||void 0===e?void 0:e.preview_url)||(null===e||void 0===e?void 0:e.activation_url)||""},ne=function(){const e=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().toLowerCase();return"discount"===e||"merchant_funded_offers"===e?"merchant_funded_offers":"subscription"===e?"subscription":e};function le(e){var d,n,P,R,T,M,D,E,L;let{isSummary:O=!1}=e;const F=(0,m.A)(),U=(0,c.zy)();(0,s.useLayoutEffect)(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[U.pathname]);const z=(0,c.Zp)(),{bundleId:W=""}=(0,c.g)(),J=(0,i.jE)(),{subVarientIdGlobal:Q,selectedCardData:le,userData:ie}
2=(0,v.A)(),oe=(0,s.useRef)(null),[ae,re]=(0,s.useState)(""),[te,ue]=(0,s.useState)(!1),[se,ce]=(0,s.useState)(0),[ve,me]=(0,s.useState)({}),[be,fe]=(0,s.useState)(!1),[pe,he]=(0,s.useState)(null),[_e,ye]=(0,s.useState)(!1),ge=(0,s.useRef)(""),Be=(0,s.useRef)(""),xe=(0,s.useRef)(""),je=(0,s.useRef)(""),Ce=(0,s.useRef)(!1),Ae=(0,s.useRef)(null),Se=(0,s.useRef)(null),ke=(0,s.useRef)(!1),we=(0,s.useRef)(!1),[Ne,Ie]=(0,s.useState)({show:!1,message:"",type:""}),Pe=J.getQueryData(["integrator-theme",!0])||{},Re=J.getQueryData(["header-website-config"])||{},Te=(null===Re||void 0===Re||null===(d=Re.WebsiteConfig)||void 0===d?void 0:d.currency_symbol)||"\u20b9",Me=(null===le||void 0===le||null===(n=le.sub_variant)||void 0===n?void 0:n.id)||Q,De=(0,s.useMemo)(()=>new URLSearchParams(U.search),[U.search]),Ee=De.has("success")||De.has("failure");(0,s.useEffect)(()=>{if(we.current)return;const e=De.get("failure");if(!e)return;we.current=!0;const d=(0,_.rj)(e);Ie({show:!0,message:d||"Payment failed",type:"error"})},[De]);const Le=(0,s.useCallback)(()=>{Ae.current&&(window.clearInterval(Ae.current),Ae.current=null)},[]),Oe=(0,s.useCallback)((e,d)=>{if(Le(),!(0,B.A8)())return void(0,x.p9)("pollForBundleOrderStatus: not an SDK context, skipping",{isEmbedded:(0,B.X6)(),isMobSdk:(0,h.wP)()});if(!e)return void(0,x.p9)("pollForBundleOrderStatus: no orderId, skipping");Se.current=d||null;let n=0;(0,x.p9)("pollForBundleOrderStatus: started",{orderId:e,hasPaymentWindow:Boolean(d)}),Ae.current=window.setInterval(async()=>{if(n+=1,n>x.k_)return(0,x.p9)("pollForBundleOrderStatus: timed out",{attempts:n}),void Le();try{var d;const l=await(0,f.TR)("card_id=".concat(Me,"&page=1&limit=10&_ts=").concat(Date.now())),i=(null===l||void 0===l||null===(d=l.data)||void 0===d?void 0:d.result)||[];(0,x.p9)("pollForBundleOrderStatus: poll result",{attempts:n,orderCount:i.length,orders:i.map(e=>({id:null===e||void 0===e?void 0:e.id,status:null===e||void 0===e?void 0:e.status}))});const o=i.find(d=>String(null===d||void 0===d?void 0:d.id)===String(e));if(!o)return;const a=String((null===o||void 0===o?void 0:o.status)||"").toUpperCase(),r=["COMPLETED","SUCCESS","PAID"].includes(a),t=["FAILED","CANCELLED","REJECTED"].includes(a);if(!r&&!t)return;Le();const u=(0,K.zA)(e);(0,x.iR)({orderId:String(e),status:r?"success":"failed",orderPath:u,orderUrl:"".concat(window.location.origin).concat(u),source:"bankco"}),(0,B.dl)(Se.current),Se.current=null,z(u)}catch(i){var l;(0,x.p9)("pollForBundleOrderStatus: poll error",{attempts:n,error:(null===i||void 0===i||null===(l=i.response)||void 0===l?void 0:l.status)||String(i)})}},x.ZZ)},[Me,z,Le]);(0,s.useEffect)(()=>Le,[Le]);const{data:Fe}=(0,p.h9)({enabled:!0,cardId:Me}),Ve=(null===Fe||void 0===Fe?void 0:Fe.BundleDetailPage)||{},Ue=Boolean(null===Ve||void 0===Ve?void 0:Ve.show_listing),ze=localStorage.getItem(y.Wj.ACTIVE_BUNDLE_ID),We=localStorage.getItem(y.Wj.PURCHASE_DATA),He=(0,s.useMemo)(()=>(0,K.jZ)(We),[We]),Ge=(0,s.useMemo)(()=>{if(O||!W)return!1;if((0,x.JW)())return!0;if(null!==He&&void 0!==He&&He.orderId&&String(He.orderId)===String(W))return!0;const e=(0,K.jZ)(localStorage.getItem(y.Wj.PURCHASE_HISTORY));return Array.isArray(e)&&e.some(e=>String(null===e||void 0===e?void 0:e.orderId)===String(W))},[O,W,null===He||void 0===He?void 0:He.orderId]);(0,s.useEffect)(()=>{Ge&&z((0,K.zA)(W),{replace:!0,state:{fromUserProfile:!0,id:W,orderId:W}})},[Ge,z,W]);const Ke=(0,s.useMemo)(()=>{var e;return W||(null===U||void 0===U||null===(e=U.state)||void 0===e?void 0:e.bundleId)||ze||(null===He||void 0===He?void 0:He.bundleId)||""},[ze,null===U||void 0===U||null===(P=U.state)||void 0===P?void 0:P.bundleId,W,null===He||void 0===He?void 0:He.bundleId]),Je=O&&null!==U&&void 0!==U&&null!==(R=U.state)&&void 0!==R&&R.fromUserProfile?(null===U||void 0===U||null===(T=U.state)||void 0===T?void 0:T.orderId)||(null===U||void 0===U||null===(M=U.state)||void 0===M?void 0:M.id)||W:"",Qe=O&&Ee?W:"",Ze=Je||Qe||(O?W:""),{data:qe}=(0,p.kc)({orderId:Ze,cardId:Me,enabled:Boolean(Ze)}),{data:Xe}=(0,p.CM)({bundleId:Ke,cardId:Me,enabled:!O&&!Ge&&Boolean(Ke)&&Boolean(Me)}),{data:Ye=[]}=(0,p.tP)({cardId:Me,enabled:Ue&&Boolean(Me)}),$e=(0,s.useMemo)(()=>{var e,d;return O?qe?Z(qe):null===He||void 0===He||null===(e=He.bundleData)||void 0===e||null===(d=e.offers)||void 0===d||!d.length||W&&!(0,K.$0)(null===He||void 0===He?void 0:He.bundleId,W)?null:He.bundleData:Xe||null},[Xe,qe,O,W,He]),ed=(0,s.useMemo)(()=>$e?(0,y.sh)($e):{},[$e]),dd=(0,s.useMemo)(()=>{const e=Array.isArray(null===ed||void 0===ed?void 0:ed.offers)?ed.offers:[];return e.length>0&&e.every(e=>["merchant_funded_offers","subscription"].includes(ne((null===e||void 0===e?void 0:e.offer_type)||(null===e||void 0===e?void 0:e.display_offer_type)||(null===e||void 0===e?void 0:e.bundle_offer_type))))},[null===ed||void 0===ed?void 0:ed.offers]),nd=(0,s.useMemo)(()=>Ue&&Array.isArray(Ye)?Ye.map(e=>(0,y.sh)(e)).filter(e=>null===e||void 0===e?void 0:e.id):[],[Ye,Ue]);(0,s.useEffect)(()=>{null!==ed&&void 0!==ed&&ed.id&&(localStorage.setItem(y.Wj.ACTIVE_BUNDLE_ID,String(ed.id)),localStorage.setItem(y.Wj.ACTIVE_BUNDLE_DATA,JSON.stringify(ed)))},[ed]),(0,s.useEffect)(()=>
2{O||null!==ed&&void 0!==ed&&ed.id&&!W&&z((0,K.LK)(ed.id),{replace:!0,state:U.state})},[null===ed||void 0===ed?void 0:ed.id,O,U.state,z,W]),(0,s.useEffect)(()=>{O&&(Ze||(null===He||void 0===He||!He.bundleId||W&&!(0,K.$0)(He.bundleId,W)?z((0,K.LK)(W||(null===ed||void 0===ed?void 0:ed.id)),{replace:!0}):W||z((0,K.zA)(He.orderId||He.bundleId),{replace:!0,state:U.state})))},[null===ed||void 0===ed?void 0:ed.id,O,U.state,z,W,null===He||void 0===He?void 0:He.bundleId,null===He||void 0===He?void 0:He.orderId,Ze]);const ld=(0,s.useMemo)(()=>{if(!O)return null;if(Ze){var e,d,n,l,i,o,a,r,t,u;const s=qe||(null===U||void 0===U||null===(e=U.state)||void 0===e?void 0:e.orderData)||{},c=null!==s&&void 0!==s&&s.created_at?new Date(s.created_at):null,v=c&&!Number.isNaN(c.getTime())?(0,y.He)(c):"--";return{bundleId:(null===ed||void 0===ed?void 0:ed.id)||(null===s||void 0===s?void 0:s.bundle_id)||(null===s||void 0===s||null===(d=s.bundle)||void 0===d?void 0:d.id)||(null===U||void 0===U||null===(n=U.state)||void 0===n?void 0:n.bundleId)||Ze,bundleData:ed,orderId:(null===s||void 0===s?void 0:s.id)||Ze,status:(null===s||void 0===s?void 0:s.status)||(null===U||void 0===U||null===(l=U.state)||void 0===l?void 0:l.status)||"--",paymentMethod:null===s||void 0===s||null===(i=s.transaction)||void 0===i?void 0:i.payment_mode,estimatedValue:Number(null===ed||void 0===ed?void 0:ed.originalPrice)>0?ed.originalPrice:null!==(o=null===s||void 0===s?void 0:s.listing_amount)&&void 0!==o?o:null===s||void 0===s?void 0:s.amount,totalPaid:null!==(a=null!==(r=null===s||void 0===s?void 0:s.payable_amount)&&void 0!==r?r:null===s||void 0===s?void 0:s.paid_amount)&&void 0!==a?a:null===ed||void 0===ed?void 0:ed.memberPrice,pointsRedeemed:null!==(t=null!==(u=null===s||void 0===s?void 0:s.points_used)&&void 0!==u?u:null===s||void 0===s?void 0:s.pointsRedeemed)&&void 0!==t?t:null===s||void 0===s?void 0:s.points_redeemed,pointsValue:null===s||void 0===s?void 0:s.points_value,validity:(null===s||void 0===s?void 0:s.expiry)||(null===ed||void 0===ed?void 0:ed.validity),purchasedAt:null===s||void 0===s?void 0:s.created_at,purchasedAtLabel:v,offers:Array.isArray(null===ed||void 0===ed?void 0:ed.offers)?ed.offers:[]}}return null!==He&&void 0!==He&&He.bundleId?W&&!(0,K.$0)(He.bundleId,W)?null:He:null},[ed,qe,O,null===U||void 0===U?void 0:U.state,W,He,Ze]),id=(0,h.eQ)(Pe),od=Number(null===ed||void 0===ed?void 0:ed.memberPrice)||0,ad=Number(null===ed||void 0===ed?void 0:ed.pointLimit)||0,rd=Math.max(Number(null===ve||void 0===ve||null===(D=ve.tier_stats)||void 0===D?void 0:D.points)||0,0),td=Number(null===le||void 0===le||null===(E=le.sub_variant)||void 0===E?void 0:E.ccr)||0,ud=ad>0?Math.floor(Math.min(rd,ad)):0,sd=se*td,cd=Math.max(od-sd,0),vd=!O&&ad>0&&ud>0,md=(null===ed||void 0===ed?void 0:ed.id)||(Ze?"":Ke),{data:bd,isLoading:fd}=(0,p.RD)({bundleId:md,cardId:Me,enabled:Boolean(md),isSummary:Boolean(O)});(0,s.useEffect)(()=>{if(O||null===ed||void 0===ed||!ed.id)return;const e="bundle-detail:".concat(ed.id);ge.current!==e&&(ge.current=e,(0,g.kS)({eventName:"reward detail discount offer",customEventName:"reward detail discount offer",item:Y(ed),clickId:ed.id,cardId:ed.id,pageType:"brand_bundle_detail"}))},[ed,O]),(0,s.useEffect)(()=>{if(!O||null===ed||void 0===ed||!ed.id||null===ld||void 0===ld||!ld.orderId)return;const e="bundle-summary:".concat(ed.id,":").concat(ld.orderId);Be.current!==e&&(Be.current=e,(0,g.kS)({eventName:"reward detail discount offer",customEventName:"reward detail discount offer",item:Y(ed),clickId:ed.id,cardId:ed.id,pageType:"brand_bundle_summary"}))},[ed,O,null===ld||void 0===ld?void 0:ld.orderId]),(0,s.useEffect)(()=>{if(!Qe)return;if(!(0,x.JW)())return;if(ke.current)return;const e=De.has("failure")||"false"===De.get("success"),d=!e&&"true"===De.get("success");if(!e&&!d)return;ke.current=!0,Le();const n="".concat(U.pathname,"?success=").concat(d);(0,x.iR)({orderId:String(Qe),status:d?"success":"failed",orderPath:n,orderUrl:"".concat(window.location.origin).concat(n),source:"bankco"})},[U.pathname,Qe,De,Le]),(0,s.useEffect)(()=>{if(!O||!(0,x.JW)())return;if(ke.current)return;const e=String((null===ld||void 0===ld?void 0:ld.status)||"").toUpperCase(),d=["COMPLETED","SUCCESS","PAID"].includes(e),n=["FAILED","CANCELLED","REJECTED"].includes(e);if(!d&&!n)return;const l=(null===ld||void 0===ld?void 0:ld.orderId)||Ze||W;if(!l)return;ke.current=!0,Le();const i="".concat((0,K.zA)(l),"?success=").concat(d);(0,x.iR)({orderId:String(l),status:d?"success":"failed",orderPath:i,orderUrl:"".concat(window.location.origin).concat(i),source:"bankco"})},[O,null===ld||void 0===ld?void 0:ld.orderId,null===ld||void 0===ld?void 0:ld.status,W,Le,Ze]),(0,s.useEffect)(()=>
2{if(!O||null===ed||void 0===ed||!ed.id||null===ld||void 0===ld||!ld.orderId)return;if(!("true"===De.get("first_time")))return;const e=(Array.isArray(null===ed||void 0===ed?void 0:ed.offers)?ed.offers:[]).filter(e=>(null===e||void 0===e?void 0:e.unlock_value)||(null===e||void 0===e?void 0:e.activation_code));if(0===e.length)return;const d="bundle-summary-coupon:".concat(ed.id,":").concat(ld.orderId,":").concat(e.map(e=>"".concat((null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.offer_reference_id),":").concat((null===e||void 0===e?void 0:e.unlock_value)||(null===e||void 0===e?void 0:e.activation_code))).join("|"));if(xe.current===d)return;xe.current=d,e.forEach(e=>{(0,g.BV)({eventName:"generate_coupon",customEventName:"generate_coupon",item:$(e),couponCode:ee(e),destinationUrl:de(e),pageType:"brand_bundle_summary"})});const n=new URLSearchParams(U.search);n.delete("first_time");const l="".concat(U.pathname).concat(n.toString()?"?".concat(n.toString()):"").concat(U.hash||"");(0,x.iR)({orderId:null===ld||void 0===ld?void 0:ld.orderId,status:"success",orderPath:l,source:"bankco"}),z({pathname:U.pathname,search:n.toString()?"?".concat(n.toString()):""},{replace:!0,state:U.state})},[ed,O,U.hash,U.pathname,U.search,U.state,z,null===ld||void 0===ld?void 0:ld.orderId,De]),(0,s.useEffect)(()=>{if(O||!Me||ad<=0)return void me({});(async()=>{try{const e="card_id=".concat(Me,"&page_name=home"),d=await(0,f.h9)(e);200===(null===d||void 0===d?void 0:d.status)&&me(null===d||void 0===d?void 0:d.data)}catch(e){me({})}})()},[ad,Me,O]),(0,s.useEffect)(()=>{ce(e=>ud<=0?0:Math.min(e,ud))},[ud]);const pd=null!==bd&&void 0!==bd&&bd.head?Array.isArray(bd.head)?bd.head:[bd.head]:[],hd=null!==bd&&void 0!==bd&&bd.foot?Array.isArray(bd.foot)?bd.foot:[bd.foot]:[],_d=!1!==(null===Ve||void 0===Ve?void 0:Ve.top_banner),yd=!1!==(null===Ve||void 0===Ve?void 0:Ve.bottom_banner),gd="Rewards",Bd="/".concat(G.Bu),xd=(0,s.useCallback)(e=>{const d=Number(e);return Number.isFinite(d)?"".concat(Te).concat((0,_.ej)(d,0)):"--"},[Te]),jd=O?[{label:gd,to:Bd,className:"cursor-pointer"},{label:"Brand Bundles",to:(0,K.LK)(null===ed||void 0===ed?void 0:ed.id),className:"cursor-pointer"},{label:"Summary",className:"font-medium underline underline-offset-2",style:{color:id}}]:[{label:gd,to:Bd,className:"cursor-pointer"},{label:"Brand Bundles",className:"font-medium underline underline-offset-2",style:{color:id}}],Cd=(0,s.useCallback)(async e=>{var d,n;const l="gift_card"===String((null===e||void 0===e?void 0:e.offer_type)||(null===e||void 0===e?void 0:e.display_offer_type)||"").toLowerCase(),i=(null===e||void 0===e?void 0:e.gift_card_order_id)||(null===e||void 0===e||null===(d=e.gift_card_order)||void 0===d?void 0:d.id),o=(0,K.X2)(e),a=l&&i?"/order/giftcard/".concat(i):o||(null===e||void 0===e?void 0:e.preview_url)||"";await(0,g.xR)({eventName:"listing discount offer",customEventName:"listing discount offer",itemListName:"Brand Bundle",item:$(e),destinationUrl:a,clickId:(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.offer_reference_id),clickText:(null===e||void 0===e?void 0:e.title)||(null===e||void 0===e||null===(n=e.brand)||void 0===n?void 0:n.name)||(0,h.ni)(e),pageType:O?"brand_bundle_summary":"brand_bundle_detail"}),l&&i?z("/order/giftcard/".concat(i),{state:{cardData:e,SubVarientID:Me,from:"bundleSummary"}}):o?z(o,{state:{cardData:e,SubVarientID:Me,from:"rewardsListing"}}):null!==e&&void 0!==e&&e.preview_url&&window.open(e.preview_url,"_blank","noopener,noreferrer")},[Me,O,z]),Ad=(0,s.useCallback)(e=>{var d;null!==e&&void 0!==e&&e.unlock_value&&((0,g.Uz)({eventName:"reward detail click to redeem",customEventName:"reward detail click to redeem",item:$(e),ctaName:"link"===e.unlock_type?"Go to Offer":"Copy Coupon Code",destinationUrl:"link"===e.unlock_type?e.unlock_value:e.preview_url||"",clickId:(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.offer_reference_id),clickText:(null===e||void 0===e?void 0:e.title)||(null===e||void 0===e||null===(d=e.brand)||void 0===d?void 0:d.name)||(0,h.ni)(e),couponCode:"link"===e.unlock_type?"":e.unlock_value,pageType:"brand_bundle_summary"}),"link"!==e.unlock_type?navigator.clipboard.writeText(e.unlock_value).then(()=>{re(e.id),window.setTimeout(()=>{re("")},1800)}):window.open(e.unlock_value,"_blank","noopener,noreferrer"))},[]),Sd=(0,s.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.A)((0,l.A)({},e),{},{bundle_id:Number(null===ed||void 0===ed?void 0:ed.id),card_id:Number(Me),price_calculated:(0,h.Mt)(cd),point_usage:{card_id:Number(Me),points:Number(se)||0}})},[null===ed||void 0===ed?void 0:ed.id,se,Me,cd]),kd=(0,s.useCallback)(e=>{var d,n,i,o,a,r,t;const u=[null===le||void 0===le||null===(d=le.sub_variant)||void 0===d||null===(n=d.bank)||void 0===n?void 0:n.display_name,null===le||void 0===le||null===(i=le.sub_variant)||void 0===i?void 0:i.name,null===le||void 0===le||null===(o=le.sub_variant)||void 0===o||null===(a=o.payment_network)||void 0===a?void 0:a.name,null===le||void 0===le||null===(r=le.sub_variant)||void 0===r||null===(t=r.variant)||void 0===t?void 0:t.name].filter(e=>e&&"*"!==e).join(" ").trim(),s=(0,l.A)((0,l.A)({},ed),{},{memberPrice:cd,pointsRedeemed:se,pointsValue:sd});return(0,l.A)((0,l.A)((0,l.A)({},(0,y.pn)(s,u)),e?{orderId:e}:{}),{},{pointsRedeemed:se,pointsValue:sd})},[ed,se,sd,cd,le]),wd=(0,s.useCallback)(e=>{const d=(0,K.jZ)(localStorage.getItem(y.Wj.PURCHASE_HISTORY)),n=Array.isArray(d)?d:[],l=[e,...n.filter(d=>(null===d||void 0===d?void 0:d.orderId)!==e.orderId)];localStorage.setItem(y.Wj.PURCHASE_DATA,JSON.stringify(e)),localStorage.setItem(y.Wj.PURCHASE_HISTORY,JSON.stringify(l))},[]),Nd=(0,s.useCallback)(async function(e){let d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ce.current){var n;(0,B.dl)(null===(n=d.preparedPaymentWindow)||void 0===n?void 0:n.paymentWindow)}else{Ce.current=!0,ye(!0);try{const n=await(0,b.I)(e);if([200,201].includes(null===n||void 0===n?void 0:n.status)){var i,o,a,r;const e=(null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.order_id)||(null===n||void 0===n||null===(o=n.data)||void 0===o?void 0:o.id),u=kd(e);var t;if(wd(u),null!==n&&void 0!==n&&null!==(a=n.data)&&void 0!==a&&a.url)return(0,B.Tq)(n.data.url,(0,l.A)({orderId:e},d.preparedPaymentWindow||{})),void Oe(e,null===(t=d.preparedPaymentWindow)||void 0===t?void 0:t.paymentWindow);(0,B.dl)(null===(r=d.preparedPaymentWindow)||void 0===r?void 0:r.paymentWindow),z((0,K.zA)(null===ed||void 0===ed?void 0:ed.id),{state:{bundleId:ed.id,bundleData:ed}}),fe(!1)}else{var u;(0,B.dl)(null===(u=d.preparedPaymentWindow)||void 0===u?void 0:u.paymentWindow)}}catch(c){var s;(0,B.dl)(null===(s=d.preparedPaymentWindow)||void 0===s?void 0:s.paymentWindow),console.error("Bundle purchase failed",c)}finally{Ce.current=!1,ye(!1)}}},[Oe,kd,ed,z,wd]),Id=(0,s.useCallback)(e=>{const d="".concat((null===ed||void 0===ed?void 0:ed.id)||"",":").concat(Me||"");null!==ed&&void 0!==ed&&ed.id&&je.current!==d&&(je.current=d,(0,g.Uz)({eventName:"reward detail click to redeem",customEventName:"reward detail click to redeem",item:Y(ed),ctaName:"Proceed to Checkout",clickEvent:e,clickId:null===ed||void 0===ed?void 0:ed.id,clickText:(null===ed||void 0===ed?void 0:ed.title)||"Proceed to Checkout",cardId:Me,value:cd,pageType:"brand_bundle_detail"}))},[ed,Me,cd]),Pd=(0,s.useCallback)(e=>{Id(e);const d=Sd();he(d),ue(!1),fe(!0),window.setTimeout(()=>{var e;null===(e=oe.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},0)},[Sd,Id]),Rd=(0,s.useCallback)(async function(){var e;let d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=[null===d||void 0===d?void 0:d.name,null===d||void 0===d?void 0:d.email,null===d||void 0===d?void 0:d.mobile_number].some(Boolean),i=Sd(l?{name:null===d||void 0===d?void 0:d.name,email:null===d||void 0===d?void 0:d.email,country_code:null!==d&&void 0!==d&&null!==(e=d.country_code)&&void 0!==e&&e.startsWith("+")?d.country_code:"+".concat((null===d||void 0===d?void 0:d.country_code)||""),mobile_number:null===d||void 0===d?void 0:d.mobile_number}:{});await Nd(i,n)},[Sd,Nd]),Td=(0,s.useCallback)(()=>
2{if(!ld)return;const e=["Brand Bundle Receipt","Order ID: ".concat(ld.orderId),"Bundle: ".concat(ed.title),"Payment Date: ".concat(ld.purchasedAtLabel),"Payment Method: ".concat(ld.paymentMethod),"Final Price: ".concat(xd(ld.totalPaid)),"","Unlocked Offers:",...ld.offers.map(e=>{var d;return"- ".concat(null===(d=e.brand)||void 0===d?void 0:d.name,": ").concat(e.unlock_value)})].join("\n"),d=new Blob([e],{type:"text/plain;charset=utf-8"}),n=URL.createObjectURL(d),l=document.createElement("a");l.href=n,l.download="".concat(ld.orderId,".txt"),l.click(),URL.revokeObjectURL(n)},[ed.title,xd,ld]),Md={meta_title:O?"".concat(null===ed||void 0===ed?void 0:ed.title," Summary | Bankco"):(null===Ve||void 0===Ve?void 0:Ve.meta_title)||"".concat(null===ed||void 0===ed?void 0:ed.title," | Brand Bundle"),meta_description:(null===Ve||void 0===Ve?void 0:Ve.meta_description)||(null===ed||void 0===ed?void 0:ed.description),meta_keywords:null===Ve||void 0===Ve?void 0:Ve.meta_keywords},Dd=O?null===ld||void 0===ld?void 0:ld.estimatedValue:null===ed||void 0===ed?void 0:ed.originalPrice,Ed=O?null===ld||void 0===ld?void 0:ld.totalPaid:cd,Ld=Number(Dd)>Number(Ed),Od=O?"Transaction Details":"Bundle Summary",Fd=O?[]:((null===ed||void 0===ed?void 0:ed.offers)||[]).map(e=>{var d;return{id:null===e||void 0===e?void 0:e.id,label:[null===e||void 0===e||null===(d=e.brand)||void 0===d?void 0:d.name,(0,h.ni)(e)].filter(Boolean).join(" - "),value:xd(null===e||void 0===e?void 0:e.amount_to_claim)}}),Vd=O?[{label:"Order ID",value:null===ld||void 0===ld?void 0:ld.orderId},{label:"Payment Date",value:null===ld||void 0===ld?void 0:ld.purchasedAtLabel},{label:"Payment Method",value:null===ld||void 0===ld?void 0:ld.paymentMethod},{label:"Total Cost",value:xd(Dd)},...null!==ld&&void 0!==ld&&ld.pointsRedeemed?[{label:"Points Redeemed",value:"".concat((0,_.ej)(ld.pointsRedeemed,0)," points")}]:[]]:[];(0,s.useEffect)(()=>{ue(!1)},[null===ed||void 0===ed?void 0:ed.id,O]),(0,s.useEffect)(()=>{if(F)return document.body.classList.add("brandBundleMobileSheetActive"),document.body.classList.add(O?"brandBundleMobileSummarySheetActive":"brandBundleMobileDescriptionSheetActive"),()=>{document.body.classList.remove("brandBundleMobileSheetActive"),document.body.classList.remove("brandBundleMobileSummarySheetActive"),document.body.classList.remove("brandBundleMobileDescriptionSheetActive")}},[F,O]),(0,s.useEffect)(()=>{if(F&&be)return document.body.classList.add("brandBundlePaymentOverlayActive"),()=>{document.body.classList.remove("brandBundlePaymentOverlayActive")}},[F,be]);const Ud=(0,s.useCallback)(()=>{fe(!1),he(null)},[]),zd=()=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"brandBundleSidebarHeader",children:(0,V.jsx)("div",{className:"brandBundleSidebarHeading",children:(0,V.jsx)("h2",{className:"brandBundleSidebarTitle",children:Od})})}),!O&&Fd.length>0&&(0,V.jsxs)("div",{className:"brandBundleSidebarOfferSummary",children:[Fd.map(e=>(0,V.jsxs)("div",{className:"brandBundleSidebarOfferRow",children:[(0,V.jsx)("span",{className:"brandBundleSidebarOfferLabel",children:e.label}),(0,V.jsx)("span",{className:"brandBundleSidebarOfferValue",children:e.value})]},e.id)),(0,V.jsxs)("div",{className:"brandBundleSidebarOfferTotal",children:[(0,V.jsx)("span",{className:"brandBundleSidebarOfferTotalLabel",children:"Total Cost"}),(0,V.jsx)("span",{className:"brandBundleSidebarOfferTotalValue",children:xd(Dd)})]})]}),O?(0,V.jsx)("div",{className:"brandBundleSidebarDetails",children:Vd.map(e=>(0,V.jsxs)("div",{className:"brandBundleSidebarRow",children:[(0,V.jsx)("span",{className:"brandBundleSidebarLabel",children:e.label}),(0,V.jsx)("span",{className:"brandBundleSidebarValue ".concat("Total Cost"===e.label?"isTotalCost":""," ").concat(e.isStatus?"isStatus ".concat(String(e.value||"").toLowerCase(),"Text"):""),children:e.value})]},e.label))}):"",vd&&(0,V.jsxs)("div",{className:"brandBundlePointRedemption",children:[(0,V.jsxs)("div",{className:"brandBundlePointHeader",children:[(0,V.jsx)("span",{className:"brandBundlePointTitle",children:"Point to Redeem"}),(0,V.jsxs)("span",{className:"brandBundlePointValue",children:[(0,_.ej)(se,0)," pt"]})]}),(0,V.jsx)(N.A,{minPrice:0,maxPrice:ud,value:se,onChange:e=>ce(Number(e)||0),singlePoint:!0,showValues:!0,symbol:""}),(0,V.jsxs)("div",{className:"brandBundlePointLimitText",children:["Maximum ",(0,_.ej)(ud,0)," points available for redemption"]}),se>0&&(0,V.jsxs)("div",{className:"brandBundlePointUsedDetails",children:[(0,V.jsxs)("div",{className:"brandBundlePointUsedRow",children:[(0,V.jsx)("span",{children:"Loyalty Points Used"}),(0,V.jsxs)("span",{children:[(0,_.ej)(se,0)," points"]})]}),(0,V.jsxs)("div",{className:"brandBundlePointUsedRow",children:[(0,V.jsx)("span",{children:"Points Value"}),(0,V.jsx)("span",{children:xd(sd)})]})]})]}),O?(0,V.jsxs)("div",{className:"brandBundleSidebarTotalPanel",children:[(0,V.jsx)("span",{className:"brandBundleSidebarTotalLabel",children:"Final Price"}),(0,V.jsx)("span",{className:"brandBundleSidebarTotalValue",children:xd(Ed)})]}):(0,V.jsxs)("div",{className:"brandBundleSidebarMemberPrice",children:[(0,V.jsx)("span",{className:"brandBundleSidebarMemberPriceLabel",children:"Final Price"}),(0,V.jsxs)("span",{className:"brandBundleSidebarPriceValues",children:[Ld&&(0,V.jsx)("span",{className:"brandBundleSidebarListedPrice",children:xd(Dd)}),(0,V.jsx)("span",{className:"brandBundleSidebarMemberPriceValue",children:xd(Ed)})]})]})]}),Wd=()=>(0,V.jsx)("div",{ref:oe,className:"brandBundlePaymentDetailFormPanel ".concat(F?"isMobileOverlay":""),children:(0,V.jsx)(I.A,{userData:ie,setPaymentdata:he,paymentData:pe||Sd(),handleOrderSummary:Rd,setLoa
2ding:ye,loading:_e,type:"bundle",integratorTheme:Pe,recipientRequired:!dd,trackSubmitCta:!1,onBack:Ud,onCtaClick:e=>(0,g.Uz)({eventName:"reward detail click to redeem",customEventName:"reward detail click to redeem",item:Y(ed),ctaName:e,clickId:null===ed||void 0===ed?void 0:ed.id,clickText:null===ed||void 0===ed?void 0:ed.title,cardId:null===ed||void 0===ed?void 0:ed.id,value:cd,pageType:"brand_bundle_detail"})})}),Hd=O?"Order Summary":"Bundle Summary",Gd=O?"Brand Bundles":gd,Kd=O?(0,K.LK)(null===ed||void 0===ed?void 0:ed.id):Bd,Jd=be?"":"Proceed to Checkout",Qd=O?(0,V.jsx)(a.A,{size:18}):(0,V.jsx)(o.A,{size:20,strokeWidth:2}),Zd=O?Td:Pd,qd=(0,s.useCallback)(e=>{const d=q(e);var n;d?z((0,K.zA)(d),{state:{fromUserProfile:!0,id:d,orderId:d,bundleId:null===e||void 0===e?void 0:e.id,bundleData:null!==e&&void 0!==e&&null!==(n=e.offers)&&void 0!==n&&n.length?e:void 0,status:null===e||void 0===e?void 0:e.status}}):z((0,K.LK)(null===e||void 0===e?void 0:e.id))},[z]);return O&&!ld?null:O||null!==ed&&void 0!==ed&&ed.id?(0,V.jsxs)("div",{className:"brandBundlePageWrapper",style:{"--brandBundleAccent":(0,h.oR)(Pe),"--brandBundleAccentText":(0,h.hk)(Pe),"--brandBundleHeroImage":"url('".concat(null===ed||void 0===ed?void 0:ed.heroImage,"')"),"--brandBundleDefaultTextColor":id},children:[(0,V.jsx)(j.A,{data:Md,pageType:"website"}),(0,V.jsx)(A.A,{message:Ne.message,show:Ne.show,setShowAlert:Ie,type:Ne.type}),_d&&pd.length>0&&(0,V.jsx)("div",{className:"BannerCarousel brandBundleBanner",children:(0,V.jsx)(k.A,{isLoading:fd,bannerData:pd,showBackgroundColor:!0})}),F&&(0,V.jsxs)("div",{className:"brandBundleMobileBreadcrumb",children:[(0,V.jsxs)("button",{type:"button",className:"brandBundleMobileBackButton",onClick:()=>z(Kd),children:[(0,V.jsx)(r.A,{size:18}),(0,V.jsx)("span",{children:Gd})]}),(0,V.jsx)("span",{className:"brandBundleMobileBreadcrumbDivider",children:"/"}),(0,V.jsx)("span",{className:"brandBundleMobileBreadcrumbCurrent",children:O?"Order Summary":"Brand Bundles"})]}),(0,V.jsxs)("div",{className:"brandBundleContainer",children:[!F&&(null===Ve||void 0===Ve?void 0:Ve.breadcrumb)&&(0,V.jsx)(S.Ay,{items:jd,className:"brandBundleBreadcrumb"}),Ue&&nd.length>0&&(0,V.jsx)("div",{className:"brandBundleSwitcher","aria-label":"Bundle selector",children:nd.map((e,d)=>{const n=String(e.id)===String(ed.id),l=X(e)||n&&O&&Boolean(null===ld||void 0===ld?void 0:ld.orderId);return(0,V.jsx)("button",{type:"button",className:"".concat(n?"isActive":""," ").concat(l?"isPurchased":""),onClick:()=>qd(e),children:(0,V.jsxs)("span",{className:"brandBundleSwitcherContent",children:[(0,V.jsxs)("span",{className:"brandBundleSwitcherTitle",children:["Collection ",d+1," : ",null===e||void 0===e?void 0:e.title]}),l&&(0,V.jsx)("span",{className:"brandBundleSwitcherTag",children:"Purchased"})]})},e.id)})}),(0,V.jsxs)("section",{className:"brandBundleMainGrid",children:[(0,V.jsx)("div",{className:"brandBundleOffersColumn",children:(0,V.jsxs)("article",{className:"brandBundleBundleCard",children:[(0,V.jsxs)("div",{className:"brandBundleBundleHero",children:[(0,V.jsx)(w.A,{src:null===ed||void 0===ed?void 0:ed.heroImage,alt:null===ed||void 0===ed?void 0:ed.title}),((null===ed||void 0===ed?void 0:ed.tag_line)||(null===ed||void 0===ed?void 0:ed.title)||(null===ed||void 0===ed?void 0:ed.description))&&(0,V.jsxs)("div",{className:"brandBundleBundleHeroOverlay",children:[(null===ed||void 0===ed?void 0:ed.tag_line)&&(0,V.jsx)("span",{children:null===ed||void 0===ed?void 0:ed.badge}),(null===ed||void 0===ed?void 0:ed.title)&&(0,V.jsx)("h1",{children:null===ed||void 0===ed?void 0:ed.title}),(null===ed||void 0===ed?void 0:ed.description)&&(0,V.jsx)("p",{children:null===ed||void 0===ed?void 0:ed.description})]})]}),(0,V.jsx)("div",{className:"brandBundleBundleContent",children:(0,V.jsx)("div",{className:"brandBundleOfferGrid",children:null===ed||void 0===ed||null===(L=ed.offers)||void 0===L?void 0:L.map(e=>(0,V.jsx)(H,{offer:e,isSummary:O,isMobile:F,integratorTheme:Pe,onKnowMore:Cd,onUnlockAction:Ad,copiedOfferId:ae},e.id))})})]})}),!F&&(0,V.jsx)("aside",{className:"brandBundleSidebar ".concat(O?"isSummary":"isCheckout"," ").concat(be?"hasPaymentForm":""),children:be?Wd():(0,V.jsxs)(V.Fragment,{children:[zd(),!O&&(0,V.jsx)("div",{className:"brandBundleSidebarButtonGroup ".concat(O?"isSummary":""),children:O?(0,V.jsx)(V.Fragment,{}):(0,V.jsx)(C.A,{variant:"primary",type:"button",icon:(0,V.jsx)(o.A,{size:22,strokeWidth:2.6}),iconPosition:"right",className:"brandBundleSidebarButton",onClick:Pd,disabled:_e,loading:_e,theme:Pe,children:"Proceed to Checkout"})})]})})]})]}),yd&&hd.length>0&&(0,V.jsx)("div",{className:"BannerCarousel brandBundleBanner",children:(0,V.jsx)(k.A,{isLoading:fd,bannerData:hd,showBackgroun
2dColor:!0})}),F&&be&&(0,V.jsxs)("div",{className:"brandBundlePaymentOverlay",role:"dialog","aria-modal":"true",children:[(0,V.jsx)("button",{type:"button",className:"brandBundlePaymentBackdrop","aria-label":"Close recipient detail",onClick:Ud}),Wd()]}),F&&!be&&(0,V.jsxs)("div",{className:"brandBundleMobileBottomSheet ".concat(te?"isOpen":""),children:[(0,V.jsxs)("button",{type:"button",className:"brandBundleMobileSummaryToggle",onClick:()=>ue(e=>!e),"aria-expanded":te,children:[(0,V.jsx)("span",{children:Hd}),te?(0,V.jsx)(t.A,{size:20}):(0,V.jsx)(u.A,{size:20})]}),(0,V.jsx)("div",{className:"brandBundleMobileSummaryContent","aria-hidden":!te,children:zd()}),!te&&(0,V.jsxs)("div",{className:"brandBundleMobileCompactTotal",children:[(0,V.jsx)("span",{className:"brandBundleMobileCompactTotalLabel",children:"Final Price"}),(0,V.jsxs)("span",{className:"brandBundleMobileCompactTotalValues",children:[!O&&Ld&&(0,V.jsx)("span",{className:"brandBundleMobileCompactListedPrice",children:xd(Dd)}),(0,V.jsx)("span",{className:"brandBundleMobileCompactTotalValue",children:xd(Ed)})]})]}),!O&&(0,V.jsx)(C.A,{variant:"primary",type:"button",icon:Qd,iconPosition:"right",className:"brandBundleMobilePrimaryButton",onClick:Zd,disabled:_e,loading:_e,theme:Pe,children:Jd})]})]}):null}},7104:(e,d,n)=>{n.d(d,{A:()=>l});const l=(0,n(77784).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},9463:(e,d,n)=>{n.d(d,{A:()=>l});const l=(0,n(77784).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},28006:(e,d,n)=>{n.d(d,{A:()=>l});const l=(0,n(77784).A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},38326:(e,d,n)=>{n.d(d,{A:()=>l});const l=(0,n(77784).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},72313:(e,d,n)=>{n.d(d,{A:()=>l});const l=(0,n(77784).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},78860:(e,d,n)=>{n.d(d,{w:()=>t});var l=n(89379),i=n(84496),o=n(74973),a=n(90012),r=n(70579);const t={[i.C.GIFT_CARD]:e=>(0,r.jsx)(o.A,(0,l.A)({cardType:"giftCard",designType:"normal"},e)),[i.C.DISCOUNT]:e=>(0,r.jsx)(a.A,(0,l.A)({cardType:"affiliateCashback",designType:"normal"},e)),[i.C.CASHBACK]:e=>(0,r.jsx)(o.A,(0,l.A)({cardType:"discountOffer",designType:"normal"},e)),[i.C.ACCESS_MEMBERSHIP]:e=>(0,r.jsx)(a.A,(0,l.A)({cardType:"accessMembership",designType:"normal"},e)),[i.C.EXPERIENCE]:e=>(0,r.jsx)(a.A,(0,l.A)({cardType:"experiences",designType:"normal"},e)),[i.C.SUBSCRIPTION]:e=>(0,r.jsx)(a.A,(0,l.A)({cardType:"subscription",designType:"normal"},e))}},94805:(e,d,n)=>{n.d(d,{A:()=>l});const l=(0,n(77784).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},95985:()=>{}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.