/* OK ITHAKI V249526R10F4 — WALL LISTEN / DISCUSSION / ISOLATED THREADS */
(function(){
'use strict';
if(window.__ITHAKI_V249526R10F4_WALL_THREADS__)return;
window.__ITHAKI_V249526R10F4_WALL_THREADS__={version:'V249526R10F4',listenOrDiscussion:true,verticalSingleColumn:true,isolatedReplyThreads:true,noCrossPostReplies:true,at:Date.now()};
window.WALL_LISTEN_DISCUSSION_R10F4=true;
window.WALL_VERTICAL_SINGLE_COLUMN_R10F4=true;
window.WALL_ISOLATED_REPLY_THREADS_R10F4=true;
const $=id=>document.getElementById(id),esc=s=>String(s==null?'':s).replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
const state={root:null,mode:'listen',filter:'all',posts:[],socket:null,seq:0,loading:false};
document.documentElement.setAttribute('data-ithaki-v249526r10f4','wall-listen-discussion');
const I=()=>window.ITH=window.ITH||{},S=()=>window.state||I().state||{};
function room(){return String(S().room||localStorage.getItem('ith_room')||'ithaki-phone-test')}
function device(){return String(S().device||localStorage.getItem('ith_device')||'')}
function api(path){let b=String(S().api||'').replace(/\/+$/,'');if(!b||/appassets\.androidplatform\.net/i.test(b))b='https://ok-ithaki.gr';return /^https?:/i.test(path)?path:b+path}
function toast(msg,ms=4300){try{if(typeof I().toast==='function')return I().toast(String(msg),ms)}catch(e){}const t=$('toast');if(t){t.textContent=String(msg);t.classList.add('show');clearTimeout(toast._t);toast._t=setTimeout(()=>t.classList.remove('show'),ms)}}
async function getJson(path){const r=await fetch(api(path),{cache:'no-store',credentials:'include'});if(!r.ok)throw new Error('HTTP '+r.status);return r.json()}
async function postJson(path,data){const r=await fetch(api(path),{method:'POST',headers:{'Content-Type':'application/json'},credentials:'include',body:JSON.stringify(data)});if(!r.ok){let d={};try{d=await r.json()}catch(e){}throw new Error(d.detail||d.message||('HTTP '+r.status))}return r.json()}
function uid(prefix){try{return prefix+crypto.randomUUID()}catch(e){return prefix+Date.now().toString(36)+'_'+Math.random().toString(36).slice(2)}}
function when(ts){try{return new Date((Number(ts)||Date.now()/1000)*1000).toLocaleString('el-GR',{day:'2-digit',month:'short',hour:'2-digit',minute:'2-digit'})}catch(e){return'τώρα'}}
function category(text){const t=String(text||'').toLowerCase();if(/[?？]|πώς|γιατί|τι να/.test(t))return'question';if(/στήρι|βοήθ|δύσκολ|μόνος|μόνη/.test(t))return'support';if(/ιδέα|πρόταση|μπορούμε/.test(t))return'idea';return'thought'}
function normReply(r){return{id:String(r.reply_id||r.id||''),postId:String(r.post_id||''),text:String(r.text||r.body||''),created:Number(r.created_at||0)}}
function dedupeReplies(a){const m=new Map();(a||[]).forEach(r=>{r=normReply(r);if(r.id&&r.text)m.set(r.id,r)});return[...m.values()].sort((x,y)=>x.created-y.created)}
function normalize(data){const m=new Map();for(const raw of (data?.posts||[])){const id=String(raw.post_id||raw.id||'');if(!id)continue;const mode=String(raw.mode||'listen')==='discussion'?'discussion':'listen';const p={id,text:String(raw.text||''),created:Number(raw.created_at||0),mode,replyCount:mode==='discussion'?Number(raw.reply_count||0):0,replies:mode==='discussion'?dedupeReplies(raw.recent_replies||[]):[],category:category(raw.text)};const old=m.get(id);if(!old||p.created>=old.created)m.set(id,p)}return[...m.values()].sort((a,b)=>b.created-a.created)}
function modeLabel(mode){return mode==='discussion'?'💬 Συζήτηση':'👂 Μόνο να με ακούσουν'}
function replyHtml(r){return '<article class="ith533Reply" data-reply-id="'+esc(r.id)+'"><header><b>Ανώνυμη απάντηση</b><small>'+esc(when(r.created))+'</small></header><p>'+esc(r.text)+'</p></article>'}
function threadHtml(p){if(p.mode!=='discussion')return '<div class="ith533ListenOnly"><b>👂 Μόνο να με ακούσουν</b><span>Αυτό το μήνυμα δεν δέχεται απαντήσεις. Οι άλλοι το διαβάζουν και σε ακούν.</span></div>';const hidden=Math.max(0,p.replyCount-p.replies.length);return '<section class="ith533Thread" data-thread-post="'+esc(p.id)+'"><header><div><b>Απαντήσεις σε αυτό το μήνυμα</b><small><span data-reply-count="'+esc(p.id)+'">'+p.replyCount+'</span> συνολικά</small></div>'+(hidden?'<button type="button" data-load-thread="'+esc(p.id)+'">Προβολή όλων ('+p.replyCount+')</button>':'')+'</header><div class="ith533ReplyList" data-reply-list="'+esc(p.id)+'">'+(p.replies.length?p.replies.map(replyHtml).join(''):'<div class="ith533NoReplies">Δεν υπάρχει ακόμη απάντηση. Η πρώτη απάντηση θα μείνει μόνο σε αυτό το μήνυμα.</div>')+'</div><div class="ith533ReplyComposer"><textarea maxlength="500" data-reply-text="'+esc(p.id)+'" placeholder="Απάντηση μόνο σε αυτό το μήνυμα…"></textarea><button type="button" data-send-reply="'+esc(p.id)+'">Απάντηση</button></div></section>'}
const REACTIONS=[['🤍','στήριξη'],['✨','ελπίδα'],['🤝','μαζί'],['🌿','ηρεμία']];
function cardHtml(p){return '<article class="ith533WallCard" data-wall="'+esc(p.id)+'" data-mode="'+p.mode+'"><header><span class="ith533Avatar">◌</span><div><b>Ανώνυμη φωνή</b><small>'+esc(when(p.created))+'</small></div><span class="ith533Mode '+p.mode+'">'+modeLabel(p.mode)+'</span><button type="button" data-r10f4-report="'+esc(p.id)+'" aria-label="Αναφορά">⚑</button></header><p class="ith533PostText">'+esc(p.text)+'</p><footer class="ith533Reactions">'+REACTIONS.map(r=>'<button type="button" data-r10f4-react="'+esc(r[0])+'" data-r10f4-post="'+esc(p.id)+'" title="'+esc(r[1])+'"><span>'+r[0]+'</span><i>0</i></button>').join('')+'</footer>'+threadHtml(p)+'</article>'}
function filtered(){return state.posts.filter(p=>(state.filter==='all'||p.mode===state.filter))}
function render(){const list=$('ith533WallList');if(!list)return;const posts=filtered();list.innerHTML=posts.length?posts.map(cardHtml).join(''):'<section class="ith533Empty"><span>◌</span><b>Δεν υπάρχουν ακόμη μηνύματα σε αυτή την επιλογή.</b><small>Κάθε μήνυμα θα εμφανιστεί ξεχωριστά, ένα κάτω από το άλλο.</small></section>';hydrateReactions()}
async function hydrateReactions(){const ids=state.posts.map(x=>x.id).slice(0,120);if(!ids.length)return;try{const d=await getJson('/api/v411/wall/reactions?room_id='+encodeURIComponent(room())+'&post_ids='+encodeURIComponent(ids.join(','))+'&device_id='+encodeURIComponent(device()));if($('ith533WallLive'))$('ith533WallLive').textContent=String(d.live_now||0);for(const it of (d.items||[])){const c=document.querySelector('.ith533WallCard[data-wall="'+CSS.escape(String(it.post_id))+'"]');if(!c)continue;c.querySelectorAll('[data-r10f4-react]').forEach(b=>{const e=b.dataset.r10f4React;b.querySelector('i').textContent=String((it.counts||{})[e]||0);b.classList.toggle('active',Array.isArray(it.mine)&&it.mine.includes(e))})}}catch(e){}}
async function react(btn){if(btn.disabled)return;btn.disabled=true;try{const d=await postJson('/api/v411/wall/reaction',{room_id:room(),post_id:btn.dataset.r10f4Post,device_id:device(),emoji:btn.dataset.r10f4React});const c=btn.closest('.ith533WallCard');c?.querySelectorAll('[data-r10f4-react]').forEach(x=>{const e=x.dataset.r10f4React;x.querySelector('i').textContent=String((d.counts||{})[e]||0);x.classList.toggle('active',Array.isArray(d.mine)&&d.mine.includes(e))})}catch(e){toast('Η αντίδραση δεν καταχωρήθηκε.')}finally{setTimeout(()=>btn.disabled=false,250)}}
async function load(){const seq=++state.seq;state.loading=true;try{const d=await getJson('/api/wall/list_v249533?room_id='+encodeURIComponent(room())+'&limit=100');if(seq!==state.seq)return;state.posts=normalize(d);if($('ith533WallLive'))$('ith533WallLive').textContent=String(d.live_now||0);render()}finally{if(seq===state.seq)state.loading=false}}
function setMode(mode){state.mode=mode==='discussion'?'discussion':'listen';try{localStorage.setItem('ith533_wall_mode',state.mode)}catch(e){}document.querySelectorAll('[data-compose-mode]').forEach(b=>{const on=b.dataset.composeMode===state.mode;b.classList.toggle('active',on);b.setAttribute('aria-pressed',on?'true':'false')});const hint=$('ith533ModeHint');if(hint)hint.textContent=state.mode==='discussion'?'Κάθε απάντηση θα συνδέεται μόνο με αυτό το μήνυμα.':'Οι άλλοι θα το διαβάσουν χωρίς δυνατότητα απάντησης.'}
async function sendPost(){const ta=$('ith533WallText'),btn=$('ith533WallSend');if(!ta||!btn)return;const text=ta.value.trim();if(!text)return toast('Γράψε πρώτα το μήνυμά σου.');btn.disabled=true;const clientKey=uid('wallpost_');try{await postJson('/api/wall/post_v249533',{room_id:room(),owner_token:device(),text,mode:state.mode,client_key:clientKey});ta.value='';if($('ith533WallCount'))$('ith533WallCount').textContent='0/500';await load();toast(state.mode==='discussion'?'Δημοσιεύτηκε ως συζήτηση.':'Δημοσιεύτηκε για να σε ακούσουν.')}catch(e){toast('Δεν στάλθηκε: '+String(e.message||e))}finally{btn.disabled=false}}
async function loadThread(postId){const btn=document.querySelector('[data-load-thread="'+CSS.escape(postId)+'"]');if(btn)btn.disabled=true;try{const d=await getJson('/api/wall/replies_v249533?room_id='+encodeURIComponent(room())+'&post_id='+encodeURIComponent(postId)+'&limit=240');const p=state.posts.find(x=>x.id===postId);if(p){p.replies=dedupeReplies(d.replies||[]);p.replyCount=Number(d.reply_count||p.replies.length);render()}}catch(e){toast('Δεν φορτώθηκαν οι απαντήσεις.')}finally{if(btn)btn.disabled=false}}
async function sendReply(postId){const ta=document.querySelector('[data-reply-text="'+CSS.escape(postId)+'"]'),btn=document.querySelector('[data-send-reply="'+CSS.escape(postId)+'"]');if(!ta||!btn)return;const text=ta.value.trim();if(!text)return toast('Γράψε πρώτα την απάντηση.');btn.disabled=true;const clientKey=uid('wallreply_'+postId+'_');try{await postJson('/api/wall/reply_v249533',{room_id:room(),post_id:postId,owner_token:device(),text,client_key:clientKey});ta.value='';await loadThread(postId)}catch(e){toast(String(e.message||e).includes('replies_disabled')?'Αυτό το μήνυμα είναι «Μόνο να με ακούσουν».':'Η απάντηση δεν στάλθηκε: '+String(e.message||e))}finally{btn.disabled=false}}
async function report(postId){try{await postJson('/api/wall/report_v249345',{room_id:room(),owner_token:device(),post_id:postId,reason:'user_report'});toast('Η αναφορά καταχωρήθηκε.')}catch(e){toast('Η αναφορά δεν καταχωρήθηκε.')}}
function click(e){const mode=e.target.closest('[data-compose-mode]');if(mode){e.preventDefault();return setMode(mode.dataset.composeMode)}const filter=e.target.closest('[data-wall-mode-filter]');if(filter){e.preventDefault();state.filter=filter.dataset.wallModeFilter;document.querySelectorAll('[data-wall-mode-filter]').forEach(x=>x.classList.toggle('active',x===filter));return render()}const send=e.target.closest('#ith533WallSend');if(send){e.preventDefault();return sendPost()}const reply=e.target.closest('[data-send-reply]');if(reply){e.preventDefault();return sendReply(reply.dataset.sendReply)}const loadBtn=e.target.closest('[data-load-thread]');if(loadBtn){e.preventDefault();return loadThread(loadBtn.dataset.loadThread)}const reactBtn=e.target.closest('[data-r10f4-react]');if(reactBtn){e.preventDefault();e.stopPropagation();return react(reactBtn)}const rep=e.target.closest('[data-r10f4-report]');if(rep){e.preventDefault();return report(rep.dataset.r10f4Report)}}
function upgrade(root){if(!root||root.dataset.wallOwnerR10f4==='1')return;root.dataset.wallOwnerR10f4='1';root.classList.add('ith533WallRoot');state.root=root;try{state.mode=localStorage.getItem('ith533_wall_mode')==='discussion'?'discussion':'listen'}catch(e){state.mode='listen'}root.innerHTML='<div class="ith533Aurora"></div><header class="ith533Head"><button type="button" data-wall-close aria-label="Επιστροφή">‹</button><div><small>OK ITHAKI · ΑΝΩΝΥΜΟΣ ΤΟΙΧΟΣ</small><h1>Σε ακούν ή συζητούν μαζί σου</h1><p>Κάθε μήνυμα είναι ξεχωριστό και κάθε συζήτηση έχει το δικό της νήμα.</p></div><span class="ith533Live"><i></i><b id="ith533WallLive">0</b> τώρα</span><button type="button" data-wall-close aria-label="Κλείσιμο">×</button></header><nav class="ith533Filters" aria-label="Φίλτρα Τοίχου"><button class="active" type="button" data-wall-mode-filter="all">Όλα</button><button type="button" data-wall-mode-filter="listen">👂 Μόνο ακούν</button><button type="button" data-wall-mode-filter="discussion">💬 Συζητήσεις</button></nav><main id="ith533WallList" class="ith533WallList"><section class="ith533Empty">Φόρτωση…</section></main><footer class="ith533Composer"><div class="ith533ModePicker"><button type="button" data-compose-mode="listen"><b>👂 Μόνο να με ακούσουν</b><small>Χωρίς απαντήσεις</small></button><button type="button" data-compose-mode="discussion"><b>💬 Συζήτηση</b><small>Δικό του νήμα απαντήσεων</small></button></div><div id="ith533ModeHint" class="ith533ModeHint"></div><div class="ith533ComposeRow"><textarea id="ith533WallText" maxlength="500" placeholder="Γράψε ανώνυμα το μήνυμά σου…"></textarea><button id="ith533WallSend" type="button">➤</button></div><div class="ith533ComposeMeta"><span>Ανώνυμα · κάθε μήνυμα χωριστά</span><b id="ith533WallCount">0/500</b></div></footer>';root.addEventListener('click',click);const ta=$('ith533WallText');if(ta)ta.addEventListener('input',()=>{$('ith533WallCount').textContent=ta.value.length+'/500'});setMode(state.mode);load().catch(e=>{const list=$('ith533WallList');if(list)list.innerHTML='<section class="ith533Empty"><b>Ο Τοίχος δεν φορτώθηκε.</b><small>'+esc(e.message||e)+'</small></section>'});connect()}
function connect(){try{if(state.socket)state.socket.close();const base=api('').replace(/^http:/,'ws:').replace(/^https:/,'wss:');state.socket=new WebSocket(base+'/ws/live_v249345');state.socket.onmessage=e=>{try{const m=JSON.parse(e.data);if(m.room_id&&m.room_id!==room())return;if(m.type==='wall_post_v249533'||m.type==='wall_reply_v249533')setTimeout(load,80)}catch(_){}};state.socket.onclose=()=>{if(document.getElementById('ith526AnonymousWall'))setTimeout(connect,2400)}}catch(e){}}
function css(){if($('ith533WallStyle'))return;const s=document.createElement('style');s.id='ith533WallStyle';s.textContent=`
html[data-ithaki-v249526r10f4] #ith526AnonymousWall:not(.ith533WallRoot){visibility:hidden!important}#ith526AnonymousWall.ith533WallRoot{visibility:visible!important;grid-template-rows:auto auto 1fr auto!important;background:#050912!important}.ith533WallRoot *{box-sizing:border-box}.ith533Aurora{position:absolute;inset:-25%;pointer-events:none;background:radial-gradient(circle at 15% 10%,#6f5cff30,transparent 27%),radial-gradient(circle at 86% 22%,#20d6a028,transparent 30%),radial-gradient(circle at 50% 92%,#ffb84c24,transparent 28%);filter:blur(38px)}.ith533Head{position:relative;z-index:3;display:flex;align-items:center;gap:10px;padding:max(13px,env(safe-area-inset-top)) 12px 11px;background:#07101be8;border-bottom:1px solid #ffffff17;backdrop-filter:blur(22px)}.ith533Head>div{flex:1;min-width:0}.ith533Head h1{margin:1px 0;font-size:clamp(20px,4.5vw,31px)}.ith533Head p,.ith533Head small{margin:0;opacity:.68}.ith533Head>button{width:42px;height:42px;border:1px solid #ffffff20;border-radius:14px;background:#ffffff0b;color:#fff;font-size:24px}.ith533Live{display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #34e3a354;border-radius:99px;background:#34e3a318;font-size:12px}.ith533Live i{width:8px;height:8px;border-radius:50%;background:#37eaa9}.ith533Filters{position:relative;z-index:3;display:flex;gap:8px;overflow:auto;padding:10px 12px;background:#07101bcf;border-bottom:1px solid #ffffff0d}.ith533Filters button{white-space:nowrap;border:1px solid #ffffff1d;border-radius:999px;background:#ffffff0a;color:#dce8f3;padding:9px 13px}.ith533Filters button.active{background:linear-gradient(135deg,#765fff44,#29d69d35);border-color:#8c7eff83}.ith533WallList{position:relative;z-index:2;overflow:auto;padding:14px 12px 230px;display:flex!important;flex-direction:column!important;gap:16px!important;align-items:stretch!important}.ith533WallCard{width:min(100%,920px);margin:0 auto;padding:16px;border:1px solid #ffffff1c;border-radius:23px;background:linear-gradient(145deg,#ffffff10,#ffffff06);box-shadow:0 14px 34px #0005}.ith533WallCard>header{display:flex;align-items:center;gap:9px}.ith533WallCard>header>div{display:flex;flex:1;flex-direction:column;min-width:0}.ith533WallCard>header small{opacity:.55}.ith533WallCard>header>button{border:0;background:transparent;color:#a6b3bf;font-size:19px}.ith533Avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-size:23px;background:linear-gradient(145deg,#806cff55,#20cda43c);border:1px solid #ffffff30}.ith533Mode{font-size:11px;font-weight:800;padding:6px 9px;border-radius:999px;border:1px solid #ffffff22;white-space:nowrap}.ith533Mode.listen{background:#62b5ff1e;border-color:#62b5ff55}.ith533Mode.discussion{background:#6de3a923;border-color:#6de3a965}.ith533PostText{font-size:16px;line-height:1.6;white-space:pre-wrap;margin:15px 0}.ith533Reactions{display:flex;gap:7px;flex-wrap:wrap}.ith533Reactions button{display:flex;align-items:center;gap:5px;border:1px solid #ffffff17;background:#ffffff08;color:#fff;border-radius:99px;padding:7px 9px}.ith533Reactions button.active{background:#7e6cff32;border-color:#9c91ff75}.ith533Reactions i{font-style:normal;font-size:11px;opacity:.75}.ith533ListenOnly{margin-top:14px;padding:13px 14px;border-radius:16px;border:1px solid #5da7e642;background:#5da7e612;display:flex;flex-direction:column;gap:4px}.ith533ListenOnly span{font-size:13px;opacity:.72}.ith533Thread{margin-top:15px;padding:13px;border-radius:18px;border:1px solid #5ee0a04b;background:#071812a8}.ith533Thread>header{display:flex;align-items:center;gap:10px;margin-bottom:10px}.ith533Thread>header>div{display:flex;flex:1;flex-direction:column}.ith533Thread>header small{opacity:.64}.ith533Thread>header button{border:1px solid #ffffff1f;background:#ffffff0c;color:#fff;border-radius:12px;padding:8px 10px}.ith533ReplyList{display:flex;flex-direction:column;gap:8px}.ith533Reply{padding:11px 12px;border-radius:14px;background:#ffffff0b;border-left:3px solid #62e3a5}.ith533Reply header{display:flex;gap:8px;align-items:center}.ith533Reply header b{flex:1;font-size:13px}.ith533Reply header small{opacity:.55;font-size:11px}.ith533Reply p{margin:7px 0 0;line-height:1.5;white-space:pre-wrap}.ith533NoReplies{padding:12px;border-radius:13px;border:1px dashed #ffffff22;opacity:.7;font-size:13px}.ith533ReplyComposer{display:flex;gap:8px;margin-top:10px}.ith533ReplyComposer textarea{flex:1;min-height:48px;max-height:100px;resize:vertical;border:1px solid #ffffff20;border-radius:14px;background:#ffffff0b;color:#fff;padding:11px;font:inherit}.ith533ReplyComposer button{border:0;border-radius:14px;background:linear-gradient(145deg,#5ce2a0,#7a70ed);color:#05130e;font-weight:900;padding:0 14px}.ith533Composer{position:absolute;z-index:6;left:0;right:0;bottom:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#07101bf3;border-top:1px solid #ffffff16;backdrop-filter:blur(23px)}.ith533ModePicker{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ith533ModePicker button{display:flex;flex-direction:column;gap:3px;text-align:left;border:1px solid #ffffff20;border-radius:15px;background:#ffffff0a;color:#fff;padding:10px 12px}.ith533ModePicker button small{opacity:.6}.ith533ModePicker button.active{background:linear-gradient(135deg,#6758e941,#28d99d30);border-color:#8c80ff8c;box-shadow:0 0 0 1px #ffffff0c inset}.ith533ModeHint{font-size:11px;opacity:.68;padding:6px 2px}.ith533ComposeRow{display:flex;gap:8px}.ith533ComposeRow textarea{flex:1;min-height:50px;max-height:100px;resize:none;border:1px solid #ffffff20;border-radius:16px;background:#ffffff0b;color:#fff;padding:12px;font:inherit}.ith533ComposeRow button{width:54px;border:0;border-radius:16px;background:linear-gradient(145deg,#70e8b4,#8a79ff);color:#071017;font-size:23px;font-weight:900}.ith533ComposeMeta{display:flex;justify-content:space-between;margin-top:5px;font-size:11px;opacity:.6}.ith533Empty{width:min(100%,920px);min-height:220px;margin:0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px;border:1px dashed #ffffff22;border-radius:22px;background:#ffffff05}.ith533Empty>span{font-size:48px}@media(max-width:680px){.ith533Head p{display:none}.ith533Live{display:none}.ith533Mode{max-width:125px;overflow:hidden;text-overflow:ellipsis}.ith533WallList{padding-inline:8px}.ith533WallCard{padding:13px}.ith533ReplyComposer{flex-direction:column}.ith533ReplyComposer button{min-height:43px}.ith533Composer{padding-inline:8px}}
`;document.head.appendChild(s)}
function scan(){css();const root=$('ith526AnonymousWall');if(root)upgrade(root);else if(state.socket){try{state.socket.close()}catch(e){}state.socket=null;state.root=null}}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',()=>{css();scan()},{once:true});else{css();scan()}
new MutationObserver(()=>{clearTimeout(scan._t);scan._t=setTimeout(scan,0)}).observe(document.documentElement,{childList:true,subtree:true});
window.addEventListener('pageshow',scan);window.addEventListener('ithaki:page-changed',scan);
})();
