PageSourceSearch

https://socialnarratives.ai/assets/UpdateNotification-BN3dg1Hz.js

js socialnarratives.ai collected 2026-10-05 15:08:47 UTC 3,573 bytes, 1 lines download raw bytes

1import{j as e,A as d,m as l,X as g,bh as v,R as n}from"./ui-vendor-XNsX7NFl.js";import{u as w,a as c}from"./i18n-BCZ_8xSB.js";import{$ as y,u as k,bK as j,B as m}from"./index-Dg7geK91.js";import"./react-router-oAHNt2ka.js";import"./firebase-auth-BWbhO1CC.js";import"./firebase-db-Csu2kn54.js";import"./capacitor-DQeCf45c.js";const N=5e3,R=()=>{if(typeof window>"u")return!1;try{return!!window.matchMedia?.("(display-mode: standalone)")?.matches||window.navigator?.standalone===!0}catch{return!1}};function D(){const{needRefresh:f,offlineReady:p,isApplyingUpdate:s,applyUpdate:x,dismissUpdatePrompt:u,dismissOfflineReady:i}=y(),{user:h}=k()||{},{t:a}=w("common"),r=c.useRef(null),t=!!(p&&(h||R())),o=!!(!t&&f);return c.useEffect(()=>{if(!t)return;const b=setTimeout(()=>i(),N);return()=>clearTimeout(b)},[t,i]),j(r,t||o),t?e.jsx(d,{children:e.jsxs(l.div,{ref:r,initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},className:"fixed bottom-[var(--mobile-floating-offset)] lg:bottom-[calc(1rem+var(--safe-area-bottom))] right-[calc(1rem+var(--safe-area-right))] z-50 bg-sage-50 dark:bg-dim-elevated border border-sage-200 dark:border-dim-border rounded-xl shadow-lg dark:shadow-none p-4 max-w-sm",role:"status","aria-live":"polite",children:[e.jsx("button",{onClick:i,className:"absolute top-1 right-1 p-2 text-sage-700 dark:text-sage-300 hover:text-sage-900 dark:hover:text-sage-100 rounded-full hover:bg-sage-100 dark:hover:bg-dim-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sage-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-dim-elevated","aria-label":a("buttons.close","Close"),children:e.jsx(g,{className:"w-4 h-4","aria-hidden":"true"})}),e.jsxs("div",{className:"flex items-center gap-2 pr-6",children:[e.jsx(v,{className:"w-5 h-5 text-sage-700 dark:text-sage-300 flex-shrink-0","aria-hidden":"true"}),e.jsx("p",{className:"text-sage-900 dark:text-dim-text text-sm font-medium",children:a("pwa.offlineReady","Your saved stories will open even without internet.")})]})]})}):e.jsx(d,{children:o&&e.jsx(l.div,{ref:r,initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},className:"fixed bottom-[var(--mobile-floating-offset)] lg:bottom-[calc(1rem+var(--safe-area-bottom))] right-[calc(1rem+var(--safe-area-right))] z-50 bg-white dark:bg-dim-elevated border border-slate-200 dark:border-dim-border rounded-xl shadow-lg dark:shadow-none p-4 max-w-sm",role:"dialog","aria-labelledby":"update-notification-title","aria-describedby":"update-notification-description",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-slate-100 dark:bg-dim-surface rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(n,{className:"w-5 h-5 text-slate-700 dark:text-dim-text-secondary","aria-hidden":"true"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{id:"update-notification-title",className:"font-bold text-slate-900 dark:text-dim-text mb-1",children:a("pwa.updateAvailable","Update Available")}),e.jsx("p",{id:"update-notification-description",className:"text-sm text-slate-700 dark:text-dim-text-secondary mb-3",children:a("pwa.updateDescription","A new version is available. Refresh to update.")}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(m,{variant:"primary",size:"sm",onClick:x,loading:s,disabled:s,leftIcon:e.jsx(n,{className:"w-4 h-4"}),children:a("pwa.refresh","Refresh")}),e.jsx(m,{variant:"ghost",size:"sm",onClick:u,disabled:s,children:a("pwa.later","Later")})]})]})]})})})}export{D as default};

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.