PageSourceSearch

https://www.meccabingo.com/build/_shared/chunk-STZHKSCT.js

js meccabingo.com collected 2026-09-24 18:19:00 UTC 9,248 bytes, 1 lines download raw bytes

1import{a as G}from"/build/_shared/chunk-6YL442X5.js";import{a as N}from"/build/_shared/chunk-MIWVPMPS.js";import{e as U}from"/build/_shared/chunk-6XX3ATVP.js";import{a as _}from"/build/_shared/chunk-TQS5E2SK.js";import{d as A,v as I,w as L}from"/build/_shared/chunk-RBFCHJWR.js";import{a as J}from"/build/_shared/chunk-JUM7J4TY.js";import{a as M}from"/build/_shared/chunk-RW7BUM27.js";import{e as w}from"/build/_shared/chunk-ADMCF34Z.js";var R=w(J());var r=w(J());var W=(e,s)=>{var a,o,l,m,g,c,h,b,u;try{let t=[],p={};(a=e==null?void 0:e.preferences[0])!=null&&a.emailOptIn&&((o=e==null?void 0:e.preferences[0])!=null&&o.smsOptIn)&&((l=e==null?void 0:e.preferences[0])!=null&&l.phoneOptIn)&&((m=e==null?void 0:e.preferences[0])!=null&&m.postOptIn)?p={contact_preference:"selected_all"}:((g=e==null?void 0:e.preferences[0])!=null&&g.emailOptIn&&(t==null||t.push("email")),(c=e==null?void 0:e.preferences[0])!=null&&c.smsOptIn&&(t==null||t.push("sms")),(h=e==null?void 0:e.preferences[0])!=null&&h.phoneOptIn&&(t==null||t.push("phone")),(b=e==null?void 0:e.preferences[0])!=null&&b.postOptIn&&(t==null||t.push("post")),(t==null?void 0:t.length)==0?p={...p,contact_preference:void 0}:p={contact_preference:t.toString()});let v=[],S=!0;return(u=s==null?void 0:s.marketingcategories)==null||u.forEach(f=>{var O;(O=e==null?void 0:e.preferences)!=null&&O.find(T=>T.categoryId==f.id)?v.push(f==null?void 0:f.name):S=!1}),(v==null?void 0:v.length)==0?p={...p,product_preference:void 0}:p={...p,product_preference:S?"selected_all":v.toString()},p}catch(t){return console.error(t),{contact_preference:void 0,product_preference:void 0}}};var d=w(M()),H=(e,s,a,o=!1)=>e==null?void 0:e.map(l=>{var h,b;let m=s==null?void 0:s.find(u=>u.key==l.name),g=(h=a==null?void 0:a.preferences)==null?void 0:h.find(u=>u.categoryId==l.id),c=(b=l==null?void 0:l.description)==null?void 0:b.split("|");return{id:l.id,label:l.name,subLabel:(0,d.jsxs)("div",{className:"flex flex-col gap-1 font-normal whitespace-normal",children:[(0,d.jsx)("div",{children:c[0]}),(c==null?void 0:c.length)>1?(0,d.jsx)("div",{className:"text-xs",children:c[1]}):(0,d.jsx)("div",{className:"invisible",children:"..."})]}),icon:m==null?void 0:m.icon,checked:o?!0:!!g}}),Y=(e,s)=>{switch(e){case 2:case 3:case 16:return{modalHeader:(0,d.jsx)("div",{children:"You can now select preferences for both how and what messages you receive. Opting in allows you to get all our latest offers and promotions."}),groupOneText:"How would you like to hear from us?",groupTwoItems:s,groupTwoText:"What types of games would you like to hear about?",modalFooterNote:"If you don\u2019t select any games, you\u2019ll only get general marketing updates. This means you could miss out on exclusive offers."};case 1:case 5:case 8:case 10:case 12:case 13:case 14:case 15:case 17:return{modalHeader:(0,d.jsx)("div",{children:"You can now select preferences for both how and what messages you receive. Opting in allows you to hear all our latest offers and promotions."}),groupOneText:"How would you like to hear about our latest offers, deals, and bonuses?",groupTwoItems:s,groupTwoText:"Select which products you\u2019d like to hear about:",modalFooterNote:"If no product is chosen, you\u2019ll only get general marketing updates \u2014 this may mean missing out on exclusive offers and bonuses."};default:return{modalHeader:null,groupOneText:"",groupTwoItems:[],groupTwoText:""}}};function V(){var O,T,B,C;let{showMarketingPrefUpdatePopup:e,skinId:s,productCategories:a,userMarketingPreferences:o,isGarMpDefaultProductsSelected:l}=I("root"),[m,g]=(0,r.useState)(e),[c,h]=(0,r.useState)(!1),u=A().pathname.includes("/pokerapp"),t=L(),p=n=>{var y,k,x,E,D;return((y=n==null?void 0:n.preferences)==null?void 0:y.length)>0?((k=n==null?void 0:n.preferences[0])==null?void 0:k.emailOptIn)||((x=n==null?void 0:n.preferences[0])==null?void 0:x.smsOptIn)||((E=n==null?void 0:n.preferences[0])==null?void 0:E.postOptIn)||((D=n==null?void 0:n.preferences[0])==null?void 0:D.phoneOptIn):!1},v=(0,r.useMemo)(()=>H(a==null?void 0:a.marketingcategories,F(s),o,l&&p(o)),[a,o]),S=()=>{g(!1)};(0,r.useEffect)(()=>{g(e)},[e]);let f=Y(s,v);return(0,r.useEffect)(()=>{var y,k;let n=W(o,a);(y=window.digitalData)!=null&&y.user&&(window.digitalData.user={...(k=window==null?void 0:window.digitalData)==null?void 0:k.user,...n}),c&&(U({event:"login",event_category:"gar",event_action:"pop_up_complete",event_label:"gar_login_pop_up_complete"}),u?t.submit({},{action:"/pokerapp/redirect",method:"POST"}):S())},[c]),(0,r.useEffect)(()=>{t.state=="idle"&&t.data&&h(!0)},[t.state,t.data]),(0,d.jsx)(G,{isOpen:m,modalOpenFn:g,onSaveAll:()=>{var k;let n={},y={};
1(k=a==null?void 0:a.marketingcategories)==null||k.forEach(x=>{n={...n,[x.name]:!0}}),y={Email:!0,SMS:!0,Post:!0,"Phone call":!0},t.submit({contactPreferences:JSON.stringify(y),contactPreferences2:JSON.stringify(n),productCategories:JSON.stringify(a)},{action:"/actions/marketingpreferences/update",method:"POST"})},onSubmit:n=>{t.submit({contactPreferences:JSON.stringify(n.contactPreferences),contactPreferences2:JSON.stringify(n.contactPreferences2),productCategories:JSON.stringify(a)},{action:"/actions/marketingpreferences/update",method:"POST"})},groupOneItems:[{label:"Email",icon:"/images/marketing/email.svg",checked:o&&((O=o==null?void 0:o.preferences[0])==null?void 0:O.emailOptIn)},{label:"SMS",icon:"/images/marketing/sms.svg",checked:o&&((T=o==null?void 0:o.preferences[0])==null?void 0:T.smsOptIn)},{label:"Post",icon:"/images/marketing/post.svg",checked:o&&((B=o==null?void 0:o.preferences[0])==null?void 0:B.postOptIn)},{label:"Phone call",icon:"/images/marketing/phone.svg",checked:o&&((C=o==null?void 0:o.preferences[0])==null?void 0:C.phoneOptIn)}],...f})}var i=w(M()),F=e=>{switch(e){case 2:return[{key:"Casino",icon:"/images/marketing/mp-casino.svg"},{key:"Bingo",icon:"/images/marketing/mp-bingo.svg"},{key:"Slots/Casino",icon:"/images/marketing/mp-betting.svg"},{key:"Slots & Slingo",icon:"/images/marketing/mp-casino.svg"}];case 3:return[{key:"Casino",icon:"/images/marketing/mp-casino.svg"},{key:"Bingo",icon:"/images/marketing/mp-bingo.svg"},{key:"Slots/Casino",icon:"/images/marketing/mp-betting.svg"},{key:"Slots & Slingo",icon:"/images/marketing/mp-casino.svg"}];case 16:return[{key:"Bingo",icon:"/images/marketing/mp-bingo.svg"},{key:"Slots & Slingo",icon:"/images/marketing/mp-betting.svg"}];case 17:return[{key:"Casino",icon:"/images/marketing/mp-casino.svg"},{key:"Sports Betting",icon:"/images/marketing/mp-betting.svg"}];default:return[{key:"Casino",icon:"/images/marketing/mp-casino.svg"}
1,{key:"Betting",icon:"/images/marketing/mp-betting.svg"},{key:"Bingo",icon:"/images/marketing/mp-casino.svg"},{key:"Slots/Casino",icon:"/images/marketing/mp-betting.svg"}]}};function q({groupOneOnFocus:e,groupOneOnChange:s,groupTwoOnFocus:a,groupTwoOnChange:o,selectAllChanged:l,productCategories:m}){let{skinId:g}=I("root"),c=(0,R.useMemo)(()=>H(m==null?void 0:m.marketingcategories,F(g),null),[m]);switch(g){case 2:case 3:case 16:return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"text-checkboxGroupTitleColor font-bold mb-2",children:"Preferences"}),(0,i.jsx)("div",{children:"Say yes to bespoke bonuses. Opt-in and let us know what excites you most."}),(0,i.jsx)(N,{selectAllChanged:l,groupOneItems:[{label:"Email",icon:"/images/marketing/mp-email.svg"},{label:"SMS",icon:"/images/marketing/mp-sms.svg"},{label:"Post",icon:"/images/marketing/post.svg"},{label:"Phone call",icon:"/images/marketing/phone.svg"}],groupOneOnFocus:e,groupOneOnChange:s,groupTwoOnChange:o,groupTwoOnFocus:a,groupOneText:"How would you like to hear from us?",groupTwoItems:c,groupTwoText:"What types of games would you like to hear about?"}),(0,i.jsxs)("div",{className:"text-sm flex items-center gap-x-4 py-4 border-b-2 border-modalHeaderTitleColor",children:[(0,i.jsx)(_,{svgSource:"/images/info-icon.svg"}),(0,i.jsx)("div",{children:"If you don\u2019t select any games, you\u2019ll only get general marketing updates. This means you could miss out on exclusive offers."})]})]});case 1:case 5:case 8:case 10:case 12:case 13:case 14:case 15:case 17:return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"text-checkboxGroupTitleColor font-bold mb-2",children:"Preferences"}),(0,i.jsx)("div",{children:"How would you like to stay in touch? Opt in to unlock bespoke rewards."}),(0,i.jsx)(N,{selectAllChanged:l,groupOneItems:[{label:"Email",icon:"/images/marketing/email.svg"},{label:"SMS",icon:"/images/marketing/sms.svg"},{label:"Post",icon:"/images/marketing/post.svg"},{label:"Phone call",icon:"/images/marketing/phone.svg"}],groupOneOnFocus:e,groupOneOnChange:s,groupTwoOnFocus:a,groupTwoOnChange:o,groupOneText:"How would you like to hear about our latest offers, deals, and bonuses?",groupTwoItems:c,groupTwoText:"Select which products you\u2019d like to hear about:"}),(0,i.jsxs)("div",{className:"text-sm flex items-center gap-x-4 py-4 border-b border-gray-2",children:[(0,i.jsx)(_,{svgSource:"/images/info-icon.svg"}),(0,i.jsx)("div",{children:"If no product is chosen, you\u2019ll only get general marketing updates \u2014 this may mean missing out on exclusive offers and bonuses."})]})]})}return null}export{W as a,F as b,q as c,H as d,V as e};

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.