PageSourceSearch

https://www.opteoai.com/_next/static/chunks/3267-279da79110adab08.js

js opteoai.com collected 2026-10-02 00:54:04 UTC 6,331 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3267],{33267:(e,t,o)=>{o.d(t,{Tr:()=>n,a7:()=>g,bA:()=>c,he:()=>u,jV:()=>S,js:()=>h,qw:()=>f,uf:()=>s,yB:()=>w});let r=()=>{try{let e=JSON.parse(localStorage.getItem("currentUser"));if(null==e?void 0:e.notifications)return e.notifications;let t=localStorage.getItem("user");if(t)return JSON.parse(t).notifications||{};return{jobAlertsSuggestions:!0,applicationFollowUps:!0,interviewReminder:!0,profileCompletion:!0}}catch(e){return console.error("Error getting user preferences:",e),{jobAlertsSuggestions:!0,applicationFollowUps:!0,interviewReminder:!0,profileCompletion:!0}}},n=()=>{try{let e=localStorage.getItem("notifications"),t=e?JSON.parse(e):[];return l(t)}catch(e){return console.error("Error loading notifications:",e),[]}},i=e=>{try{localStorage.setItem("notifications",JSON.stringify(e))}catch(e){console.error("Error saving notifications:",e)}},l=e=>{let t=r();return e.filter(e=>!0===t[e.type])},a=function(e,t,o){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!0!==r()[o])return console.log("Notification type ".concat(o," is disabled. Not creating notification.")),null;let a=n(),s={id:d(),title:e,message:t,type:o,jobId:l,read:!1,timestamp:new Date().toISOString(),time:(e=>{let t=Math.floor((new Date-e)/1e3);if(t<60)return"Just now";if(t<3600){let e=Math.floor(t/60);return"".concat(e," minute").concat(1!==e?"s":""," ago")}if(!(t<86400))return e.toLocaleDateString();{let e=Math.floor(t/3600);return"".concat(e," hour").concat(1!==e?"s":""," ago")}})(new Date)};return a.unshift(s),i(a.slice(0,50)),s},s=(e,t,o,r)=>{let n=new Date(o),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}).format(n);return a("Interview Reminder","Your interview for ".concat(e," at ").concat(t," is scheduled for ").concat(i,"."),"interviewReminder",r)},c=e=>{i(n().map(t=>t.id===e?{...t,read:!0}:t))},u=()=>{i(n().map(e=>({...e,read:!0})))},g=()=>{let e=JSON.parse(localStorage.getItem("missingProfileSections")||"[]");localStorage.setItem("acknowledgedProfile",JSON.stringify(e));let t=localStorage.getItem("jobSearchResults");if(t){let{timestamp:e}=JSON.parse(t);localStorage.setItem("acknowledgedJobAlertsTS",e)}i([])},f=()=>{let e=JSON.parse(localStorage.getItem("notifications")||"[]"),t=l(e);return t.length!==e.length&&i(t),t};function m(e,t){if(e===t)return!0;if(null==e||null==t||e.length!==t.length)return!1;for(var o=0;o<e.length;++o)if(e[o]!==t[o])return!1;return!0}let d=()=>"notification-".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),S=()=>{try{if(!r().profileCompletion)return null;let e=JSON.parse(localStorage.getItem("missingProfileSections")||"[]"),t=JSON.parse(localStorage.getItem("acknowledgedProfile")||"[]");if(m(e,t))return null;if(e.length>0){let t=JSON.parse(localStorage.getItem("notifications")||"[]"),o=l(t).find(t=>"profileCompletion"===t.type&&m(JSON.parse(t.missingSections||"[]"),e));if(o&&(!o||m(JSON.parse(o.missingSections||"[]"),e)))return o;{let o={id:"profile-completion-".concat(Date.now()),title:"Profile Incomplete",message:"Your profile is missing the following sections: ".concat(e.join(", ")),type:"profileCompletion",missingSections:JSON.stringify(e),read:!1,timestamp:new Date().toISOString(),time:"Just now"};return t.unshift(o),i(t),o}}return null}catch(e){return console.error("Error checking for profile completion:",e),null}},p=null,w=()=>{try{var e,t;if(!r().jobAlertsSuggestions)return console.log("Job alerts suggestions are disabled"),null;let o=localStorage.getItem("processedResumeContent");if(!o)return null;let n=JSON.parse(o),a=(null==n||null==(t=n.content)||null==(e=t.personalInfo)?void 0:e.title)||null;if(!a)return null;let s=localStorage.getItem("jobSearchResults");if(!s)return null;let{jobs:c,timestamp:u}=JSON.parse(s),g=localStorage.getItem("acknowledgedJobAlertsTS");if(g&&u<=g||p===u)return null;if(p=u,!Array.isArray(c))return console.log("Invalid job search results format."),null;let f=a.split(" "),m=0,d=a,S=[];for(let e=0;e<f.length&&(d=f.slice(e).join(" "),!((m=(S=c.filter(e=>e.job_title.toLowerCase().includes(d.toLowerCase()))).length)>=3));e++);if(0===m)return console.log("No matches found for any fallback t
1itle. Waiting for new search."),null;m=(S=S.slice(0,3)).length;let w=JSON.parse(localStorage.getItem("notifications")||"[]"),h=l(w),b=S.map(e=>e.job_id).sort(),I=h.find(e=>{var t;return"jobAlertsSuggestions"===e.type&&JSON.stringify((null==(t=e.matchedJobIds)?void 0:t.sort())||[])===JSON.stringify(b)});if(I)return I;{let e=S.map(e=>e.job_title).join(", "),t={id:"job-alert-".concat(Date.now()),title:"Job Alert",message:"Found ".concat(m," job").concat(1!==m?"s":"",' matching "').concat(d,'": ').concat(e),type:"jobAlertsSuggestions",read:!1,timestamp:new Date().toISOString(),time:"Just now",matchedJobIds:b,searchTimestamp:Date.now()};return w.unshift(t),i(w),console.log("New job alert notification added:",t),window.dispatchEvent(new CustomEvent("notificationsUpdated")),t}}catch(e){return console.error("Error checking for job alerts:",e),null}},h=()=>{try{if(!r().interviewReminder)return console.log("Interview reminders are disabled."),[];let e=new Date;e.setHours(0,0,0,0);let t=localStorage.getItem("jobs");if(!t)return console.log("No jobs found in localStorage"),[];let o=JSON.parse(t);console.log("Checking",o.length,"jobs for interviews today");let n=o.filter(t=>t.hasInterview&&t.interviewDate&&new Date(t.interviewDate).setHours(0,0,0,0)===e.getTime());if(console.log("Found",n.length,"interviews scheduled for today"),0===n.length)return[];let a=JSON.parse(localStorage.getItem("notifications")||"[]"),s=l(a),c=!1;for(let e of n)if(!s.find(t=>"interviewReminder"===t.type&&t.jobId===e.id&&new Date(t.timestamp).toDateString()===new Date().toDateString())){let t=new Date(e.interviewDate).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),o={id:d(),title:"Interview Today",message:"You have an interview for ".concat(e.title," today at ").concat(t,"."),type:"interviewReminder",jobId:e.id,read:!1,timestamp:new Date().toISOString(),time:"Just now"};a.unshift(o),c=!0,console.log("New interview notification added:",o)}if(c)return i(a),n;return[]}catch(e){return console.error("Error checking for interview notifications:",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.