'+esc(fmtDay(dayKey()))+'
'+esc(title)+'
' :''+esc(sub)+'
':''))+(opt.home?'':'')+'Welcome. Do you live at Park Terrace?
Nothing is kept until you choose. Your privacy and your choices
'+ ''); Array.prototype.forEach.call(d.querySelectorAll('[data-r]'),function(b){ b.onclick=function(){ var r=b.getAttribute('data-r'); if(r==='none'){ try{ sessionStorage.setItem('pt-noask','1') }catch(e){} close(); return; } set(r); if(r==='resident'){ PTOPT.set('s',true); check(); } else done(r) } }) } // The second question, asked only of people who say they live here. Off unless they say yes. function remember(then,why){ if(PTOPT.has('s')){ then(); return; } var d=sheet('May this device be remembered?
'+(why||'The residents’ pages need to know this device is yours.')+' If you say yes, a small signed note is kept on this device with the signs that it belongs here: visits, being at Park Terrace, the on-site code, a neighbor’s vouch. No name is in it, and you can erase it at any time. If you say no, nothing is kept and the open pages still work.
'+ ''); document.getElementById('remYes').onclick=function(){ PTOPT.set('s',true); then() }; document.getElementById('remNo').onclick=close } function done(r){ sheet(''+(r==='family'?'Welcome. Thank you for looking in on someone here.':'Welcome. Have a look around.')+'
Activities, the menu, who to call, news and games are open to everyone.'+(r==='family'?' If the person you know here would like you let known when a call would be welcome, they can add you from their own phone; you will get a link.':'')+'
'+(r==='family'?'Open your page':'')+''); document.getElementById('roleOk').onclick=close } function check(){ sheet('One moment…
'); fetch('/whereami',{cache:'no-store'}).then(function(r){return r.json()}).then(function(j){ if(j.full){ sheet('Welcome, neighbor.
This device is confirmed. Check-In, listings and menu sharing are open.
'); document.getElementById('roleOk').onclick=close; return; } if(j.resident){ sheet('Welcome, neighbor.
You can join the Check-In for yourself now. A neighbor’s vouch opens the list of neighbors.
Join the Neighbor Check-In'); document.getElementById('roleOk').onclick=close; return; } // not confirmed yet: finish it here, without going anywhere var st=j.standing||{}; if(st.code){ // the code is in; one small sign is left, and it is one tap sheet('Code accepted ✓
One small step is left: showing that you are at Park Terrace. You can confirm you are at Park Terrace. Only yes or no is sent, never a map.
'+ 'A neighbor can confirm me instead'); document.getElementById('roleOk').onclick=close; document.getElementById('roleGeo').onclick=function(){ var m=document.getElementById('roleMsg'); m.textContent='Asking this phone, just once…'; PTNEAR(function(v){ if(v===null){ m.textContent='This phone did not share a yes or no. That is fine: a neighbor can confirm you instead, or it will finish by itself next time you are on the community Wi-Fi.'; return; } if(!v){ m.textContent='This phone is not at Park Terrace right now. It will finish by itself next time you are home.'; return; } fetch('/whereami?geo=1',{cache:'no-store'}).then(function(){ check() }).catch(function(){ m.textContent='No connection just now.' }) }) }; return; } sheet('Welcome, neighbor.
The open pages are ready. To open the residents’ parts, type the on-site code posted at the front desk, or have a neighbor vouch for you.
'+ ''+ 'A neighbor can confirm me'); document.getElementById('roleOk').onclick=close; var go=function(){ var c=document.getElementById('roleCode').value.trim(); if(!c){ document.getElementById('roleCode').focus(); return; } document.getElementById('roleMsg').textContent='Checking…'; fetch('/onsite-code',{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({code:c})}).then(function(r){return r.json()}).then(function(k){ if(k.ok) check(); else document.getElementById('roleMsg').textContent=k.error||'That code did not match.' }).catch(function(){ document.getElementById('roleMsg').textContent='No connection just now. Tap again in a moment.' }) }; document.getElementById('roleGo').onclick=go; document.getElementById('roleCode').addEventListener('keydown',function(e){ if(e.key==='Enter') go() }); }).catch(function(){ sheet('That did not go through.
There is no connection just now.
'); document.getElementById('roleTry').onclick=check; document.getElementById('roleOk').onclick=close; }) } window.PTROLE={get:get,ask:ask,remember:remember,close:close}; if(document.readyState==='loading') document.addEventListener('DOMContentLoaded',function(){ask(false)}); else ask(false); })(); // ---- Keep (added 2026-11-20): a new or replacement phone does not start over. // Once a day this device backs up its own small settings (pet, game progress, text size, Check-In link) under a private // "keep phrase". Typing that phrase on another device brings them back. The server stores a hash of the phrase, not the phrase. (function(){ var KEYS=['pt-me','pt_pet','pt_sdk','pt_mj','pt_scr','pt_recall','pt_mem','pt_game','pt_size','pt_contrast','pt-rf','pt_reps']; var W=('apple river garden lemon table window piano candle meadow harbor pepper button violet marble ribbon basket anchor bridge cactus canyon cedar cherry clover copper cotton daisy desert eagle ember falcon feather fiddle forest fountain galaxy ginger glacier granite harvest hazel honey island ivory jasmine juniper kettle lantern laurel lilac linen maple mango mesa mirror morning mustard nectar nickel oasis olive orchard otter paddle pebble pecan pepper2 pillow planet plum pocket poppy prairie pumpkin quartz quilt rabbit raven ridge robin rocket saddle saffron sage sandal satin shadow silver sparrow spruce stream sunset saguaro tangerine thimble thunder timber toast tulip turtle umbrella valley velvet walnut wagon willow winter wren yarn zephyr acorn almond amber arrow aspen badger bamboo barley beacon berry biscuit blossom breeze brook butter cabin camel canoe carrot castle chestnut cinnamon cobble comet coral cricket crystal cypress dolphin').split(' ').filter(function(w){return !/\d/.test(w)}); function ls(k,v){ try{ if(v===undefined) return localStorage.getItem(k); if(v===null) localStorage.removeItem(k); else localStorage.setItem(k,v) }catch(e){} return null } function norm(p){ return String(p||'').toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-+|-+$/g,'') } function phrase(make){ var p=ls('pt-keep'); if(p||!make) return p; var a=new Uint32Array(7); (window.crypto||window.msCrypto).getRandomValues(a); p=[W[a[0]%W.length],W[a[1]%W.length],W[a[2]%W.length],W[a[3]%W.length],W[a[4]%W.length],W[a[5]%W.length],String(10+a[6]%90)].join('-'); ls('pt-keep',p); return p } function collect(){ var d={},n=0; KEYS.forEach(function(k){ var v=ls(k); if(typeof v==='string'&&v){ d[k]=v; n++ } }); return d } function worth(d){ return !!(d['pt-me']||d.pt_pet||d.pt_sdk||d.pt_mj||d.pt_scr||d.pt_recall||d.pt_mem) } // The phrase never leaves this device. From it the device makes (1) a filing number and (2) a key; the backup is locked with // the key (AES-GCM) before it is sent, so the site stores something it cannot read. var te=new TextEncoder(), td=new TextDecoder(), C=window.crypto&&window.crypto.subtle; function hex(buf){ return Array.prototype.map.call(new Uint8Array(buf),function(x){return ('0'+x.toString(16)).slice(-2)}).join('') } function b64(buf){ var s='',u=new Uint8Array(buf); for(var i=0;iYou are welcome to keep it in mind. Thank you.
'; setTimeout(boot,1200); }); return; } if(a==='back'){ var gk=b.getAttribute('data-k'); post({op:'gift',to:b.getAttribute('data-from'),g:b.getAttribute('data-g'),m:-1}).then(function(r){ return post({op:'giftdone',k:gk}).then(function(){ mark('f'); el.innerHTML=''+(r&&r.ok===false&&r.note?HUB.esc(r.note):'Sent. That is a nice thing to do.')+'
'; setTimeout(boot,1500); }); }); return; } if(a==='mute'){ post({op:'mute',from:b.getAttribute('data-from')}).then(function(){ el.innerHTML='All right. You will not see anything from them. They are not told.
'; setTimeout(boot,1500); }); return; } if(a==='here') post({op:'here'}).then(function(){ el.innerHTML='Thanks. Glad you stopped by.
'; mark('h'); }); else if(a==='away') post({op:'away', on:true}).then(function(){ el.innerHTML='All right. We will hold the hellos until you are back.
'; }); else if(a==='yes'||a==='noheard'||a==='nottoday'){ post({op:'reply', id:b.getAttribute('data-id'), ans:a}).then(function(){ el.innerHTML=''+(a==='yes'?'Thanks. That is enough for today.':'Thanks for letting us know.')+'
'; }); } }; if(j.selfReminder && j.needAskStamp && !shownAsked){ shownAsked=true; post({op:'asked'}); } } function invites(j, host){ if(!host) return; var bits='', P=window.PTPUB, today=HUB.dayKey(), hour=j.hour; if(hour>=9 && hour<13) bits+='Lunch is at noon, want to join? The dining room is on today’s menu.
'; if(P&&P.days&&P.days[today]){ var now=HUB.nowMins(); (P.days[today].a||[]).some(function(r){ if(r[0]==='All day') return false; var s=HUB.mins(r[0]); if(s>now && s<=now+180){ bits+=''+HUB.esc(r[2])+' is at '+HUB.esc(r[0])+', want to join?
'; return true; } return false; }); } if(j.on && !j.away) bits+=''; host.innerHTML=bits; var hello=document.getElementById('lifeHello'); if(hello) hello.onclick=function(){ post({op:'here'}).then(function(){ mark('h'); hello.textContent='Hi sent — thanks.'; hello.disabled=true; }); }; } function drawToday(j){ var box=document.getElementById('lifeBox'); if(!box) return; if(!j||j.error||!j.canUse){ box.innerHTML='If you live here, you can turn on a gentle hello for a few friends you choose. Nothing is sent until you say yes. Your rhythm stays in a private note on this device; only yes or no is sent, never a map.
'; return; } if(!j.on){ box.innerHTML='Would you like a gentle hello if a day goes by quietly? You pick the friends. You hear first. You can stop anytime.
'+ ''+ 'A day is allowed to pass before anyone is asked. Quiet hours are 8 in the evening to 9 in the morning. Only yes or no is sent from this device.
'; } else { box.innerHTML='A gentle hello is on. Your friends are the same circle of 3 as on the Neighbors page. One hello from you, or two quiet signs together, is enough for today.
'+ 'Hellos are paused while you are away.
':'')+ (j.circle<3?'Add three friends on the Neighbors page so they can say hi if a day goes by quietly. Nothing goes out until then.
':'')+ ''; } function bind(id, fn){ var e=document.getElementById(id); if(e) e.onclick=fn; } bind('lifeOn', function(){ post({op:'opt', on:true}).then(boot); }); bind('lifeOff', function(){ post({op:'opt', on:false}).then(boot); }); bind('lifeHere', function(){ post({op:'here'}).then(function(){ mark('h'); boot(); }); }); bind('lifeAway', function(){ post({op:'away', on:true}).then(boot); }); bind('lifeBack', function(){ post({op:'away', on:false}).then(boot); }); invites(j, document.getElementById('lifeInvite')); } var GIFT={wave:{e:'\uD83D\uDC4B',n:'A wave',said:'sent you a wave'},coffee:{e:'\u2615',n:'A coffee',said:'sent you a coffee'},flower:{e:'\uD83C\uDF38',n:'A flower',said:'sent you a flower'}, sun:{e:'\u2600\uFE0F',n:'Sunshine',said:'sent you some sunshine'},note:{e:'\uD83C\uDFB5',n:'A hymn note',said:'sent you a hymn note'},cookie:{e:'\uD83C\uDF6A',n:'A cookie',said:'sent you a cookie'}, lunch:{e:'\uD83C\uDF7D\uFE0F',n:'See you at lunch',said:'says: see you at lunch'}}; var MSG=['Thinking of you','Hope your day is lovely','See you soon','Just saying hi']; var pick={to:'',g:'',m:-1}; function drawGifts(j){ var box=document.getElementById('lifeGifts'); if(!box) return; if(!j||j.error||!j.canUse){ box.innerHTML=''; return; } var ppl=j.people||[]; if(!ppl.length){ box.innerHTML='Once you have friends in your circle, you can send them a coffee, a flower or a wave here. No typing needed.
'; return; } var h='Pick a friend, then a small gift. They will see it as a warm note. Nobody is told if you send, or if they open it.
'; h+='