1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2405],{2405:function(e,o,i){i.r(o);var n=i(2265),t=i(30828),r=i(26650),a=i(82629);o.default=()=>{let e=(0,t.v9)(e=>e.auth.isLoggedIn),o=(0,t.v9)(e=>e.auth.user),i=null==o?void 0:o.id,{subscribe:s}=(0,r.Z)(),l=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&i&&!l.current&&((null==o?void 0:o.roleSlug)===a.N.proctor||(null==o?void 0:o.roleSlug)===a.N.instructor)&&(l.current=!0,s(i)),e||(l.current=!1)},[e,i]),null}},82629:function(e,o,i){i.d(o,{N:function(){return n},a:function(){return t}});let n={facilitator:"facilitator",instructor:"instructor",student:"student",superAdmin:"super_admin",proctor:"proctor"},t=["New York","Los Angeles","Chicago","Houston","Phoenix","Philadelphia","San Antonio","San Diego","Dallas","San Jose","Austin","Jacksonville","Fort Worth","Columbus","San Francisco","Charlotte","Indianapolis","Seattle","Denver","Washington DC","Boston","El Paso","Nashville","Detroit","Portland","Las Vegas","Oklahoma City","Memphis","Louisville","Baltimore","Milwaukee","Albuquerque","Tucson","Fresno","Sacramento","Long Beach","Kansas City","Mesa","Atlanta","Colorado Springs","Raleigh","Omaha","Miami","Tulsa","Oakland","Minneapolis","Tampa","Arlington","New Orleans","Wichita","Cleveland","Bakersfield","Aurora","Anaheim","Honolulu","Santa Ana","St. Louis","Riverside","Corpus Christi","Pittsburgh","Lexington","Anchorage","Stockton","Cincinnati","Saint Paul","Toledo","Newark","Greensboro","Plano","Henderson","Lincoln","Buffalo","Fort Wayne","Jersey City","Chula Vista","Orlando","St. Petersburg","Norfolk","Chandler","Laredo","Madison","Durham","Lubbock","Winston-Salem","Garland","Glendale","Hialeah","Reno","Baton Rouge","Irvine"]},26650:function(e,o,i){var n=i(57437),t=i(76079),r=i(38162),a=i(51386),s=i(10963);let l="fcm_token",c="fcm_udid",u=()=>{let e=localStorage.getItem(c);return e||(e=crypto.randomUUID(),localStorage.setItem(c,e)),e};o.Z=()=>{let[e]=(0,a.H22)(),[o]=(0,a.p7U)(),[i]=(0,a.Qn5)(),[d]=(0,a.g5Q)();return{subscribe:async o=>{try{if(console.log("[FCM] subscribe() called"),!("Notification"in window)){console.warn("[FCM] Notifications not supported in this environment");return}let a=await (0,r.C)();if(!a){console.warn("[FCM] getFirebaseMessaging() returned null â FCM not supported in this browser");return}console.log("[FCM] messaging instance ready");let c=await Notification.requestPermission();if(console.log("[FCM] Notification permission:",c),"denied"===c){(0,s.ZP)("Enable browser notifications to receive alerts. Click the lock icon in your address bar â Notifications â Allow.",{id:"fcm-permission-denied",duration:6e3,icon:"\uD83D\uDD14"});return}if("granted"!==c)return;let d=await navigator.serviceWorker.register("/api/firebase-messaging-sw");console.log("[FCM] Service worker registered:",d);let g=await (0,t.LP)(a,{vapidKey:"BMW7z_ePSPQwsi29laNcz2I0QflsGI591HRUNo5CwDQClqjTv2ldkXJfevYxff_X_a2R7Y3Ya6fv9oo8Pk1xAK4",serviceWorkerRegistration:d});if(console.log("[FCM] token obtained:",g?g.substring(0,20)+"...":"null"),!g)return;let f=u();localStorage.setItem(l,g),await e({fcmToken:g,udid:f}).unwrap(),console.log("[FCM] Token registered with backend successfully"),o&&(await i({fcmToken:g,topic:"test_"+String(o),topicPrefix:"topic"}).unwrap(),console.log("[FCM] Subscribed to topic_".concat(o))),(0,t.ps)(a,e=>{var o;console.log("[FCM] Foreground message:",e);let{title:i,body:t,icon:r}=null!==(o=e.notification)&&void 0!==o?o:{};i&&s.ZP.custom(e=>(0,n.jsxs)("div",{style:{opacity:e.visible?1:0,transform:e.visible?"translateY(0)":"translateY(-8px)",transition:"all 0.3s ease",display:"flex",alignItems:"flex-start",gap:"12px",background:"#ffffff",border:"1px solid #e5e7eb",borderLeft:"4px solid #ef4444",borderRadius:"12px",padding:"14px 16px",boxShadow:"0 10px 40px rgba(0,0,0,0.12)",maxWidth:"360px",width:"100%",cursor:"pointer"},onClick:()=>s.ZP.dismiss(e.id),children:[(0,n.jsx)("img",{src:null!=r?r:"/favicon.png",alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",flexShrink:0}}),(0,n.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,n.jsx)("p",{style:{margin:0,fontWeight:600,fontSize:"14px",color:"#111827",lineHeight:1.4},children:i}),t&&(0,n.jsx)("p",{style:{margin:"4px 0 0",fontSize:"13px",color:"#6b7280",lineHeight:1.5},children:t})]}),(0,n.jsx)("button",{onClick:o=>{o.stopPropagation(),s.ZP.dismiss(e.id)},style:{background:"none",border:"none",cursor:"pointer",color:"#9ca3af",fontSize:"16px",lineHeight:1,padding:"0 2px",flexShrink:0},children:"â"})]}),{duration:6e3,position:"top-right"})})}catch(e){console.error("[FCM] subscribe error:",e)}},unsubscribe:async()=>{try{let e=localStorage.getItem(l),i=localStorage.getItem(c);if(!e)return;await d({fcmToken:e,topicPrefix:"topic"}).unwrap(),console.log("[FCM] Unsubscribed from topic"),i&&await o({fcmToken:e,udid:i}).unwrap(),localStorage.removeItem(l)}catch(e){console.error("[FCM] unsubscribe error:",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.