(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7198],{56502:function(e,t,n){Promise.resolve().then(n.bind(n,8172))},99376:function(e,t,n){"use strict";var i=n(35475);n.o(i,"usePathname")&&n.d(t,{usePathname:function(){return i.usePathname}}),n.o(i,"useRouter")&&n.d(t,{useRouter:function(){return i.useRouter}}),n.o(i,"useSearchParams")&&n.d(t,{useSearchParams:function(){return i.useSearchParams}})},8172:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var i=n(2265),a=n(99376),u=n(87393),s=n(5490),o=n(72898),r=n(14879),c=n(34390),l=n(66474),d=n(12563),f=n(21330),_=n(48152),p=n(98951);function h(e){var t,n;let{children:h}=e,v=(0,a.useRouter)(),g=(0,d.j)(),{isWidgetBlocked:m,setWidgetBlocked:Z}=(0,u._E)(),{has_decision:b,receipt_id:P,age_consent:E,setDecision:I}=(0,u.T4)(),{toggleWidget:A}=(0,u.p7)(),C=(0,a.useSearchParams)().get("page")||null,S=!!P||b,{settings:k,is_assistant:N}=(0,u.K0)(),T=null===(n=k.data_privacy)||void 0===n?void 0:null===(t=n.notice)||void 0===t?void 0:t.type,{restrictions:w,customNoticeType:O,isNative:R}=(0,u._E)();return(0,i.useEffect)(()=>{var e,t,n,i;let a;if(C&&r.Z[C]?a=r.Z[C]:k.single_page_mode?a=r.Z[k.single_page_mode]:R&&(a=r.Z.home),a){N||A(!0,s.d9.WIDGET),v.push(a);return}let d=u.T4.getState(),h=u.K0.getState(),b=h.embedded_tags.find(e=>e.is_wiretapping_required);R||h.is_chat||h.is_assistant||!b||(null===(e=d.operator_consent[b.id])||void 0===e?void 0:e.accepted)||(0,f.H0)({id:h.id,opt:{chat_service_id:b.id}});let P=!1,H,y=null===(t=k.sanctions)||void 0===t?void 0:t.block_access,D=null===(n=k.sanctions)||void 0===n?void 0:n.block_vpn,G=k.age_gating;if(y)P=!0,H=r.Z.blockAccessGeo;else if(D&&-1!==w.indexOf("VPN"))H=r.Z.blockAccessVpn,P=!0;else if(G){let e=!(null==E?void 0:E.age);G.age_limit&&(null==E?void 0:E.age)<G.age_limit&&(e=!0),(null==E?void 0:E.expire_at)&&Date.now()>E.expire_at&&(e=!0),G.conditional&&(0,c.pd)(G.conditional)&&(e=!1),e&&(H=r.Z.blockAccessAgeGating,P=!0)}if(m!==P&&Z(P),H){A(!0,s.d9.BLOCKER),v.push(H);return}if(T||C){if(O&&"HIDDEN"!==T&&!S){(null==k?void 0:null===(i=k.data_privacy)||void 0===i?void 0:i.enforce_decision)||(I(!0),(0,o.Qs)()),_.Z.send(p.Z.LAUNCH_CUSTOM_NOTICE);return}if((0,l.Ph)(T)){S?"/"===g&&setTimeout(()=>{let{isLauncherHidden:e,hideEmptyFrame:t,setFrameStyles:n}=u.p7.getState();e?t():n(s.I6.LAUNCHER)},10):v.push(r.Z.notice);return}if(T===s.I6.TCF){S||v.push(r.Z.tcfInitial);return}if(T!==s.I6.HIPAA||S||v.push(r.Z.hipaaInitial),T===s.I6.CLASSIC&&!S){v.push(r.Z.home);return}}},[T,S,v,C,w,E,k]),h}},12563:function(e,t,n){"use strict";n.d(t,{G:function(){return o},j:function(){return s}});var i=n(99376),a=n(30154);let u="/";u=(0,a.bv)(window.location.pathname);let s=()=>{let e=(0,i.usePathname)();return e&&u&&e.startsWith(u)&&""===(e=e.substring(u.length))?"/":e},o=e=>"string"==typeof e&&e?("/"===e.charAt(0)&&(e=e.substr(1)),"".concat(u).concat(e)):""}},function(e){e.O(0,[9213,33,4390,2971,6067,1744],function(){return e(e.s=56502)}),_N_E=e.O()}]);