1(function(){ 2 /* v3.5.0 precompiled compatibility bundle: strict mode intentionally omitted for Vue function-mode render output. */ 3 const VERSION='3.8.60-candidate.58'; 4 const RELEASE_RECOVERY_KEY='gzc_release_recovery'; 5 async function recoverStaleRelease(targetVersion){ 6 const target=String(targetVersion||'').trim();if(!target||target===VERSION)return false; 7 try{ 8 const raw=sessionStorage.getItem(RELEASE_RECOVERY_KEY);const prev=raw?JSON.parse(raw):null; 9 if(prev&&prev.target===target&&Date.now()-Number(prev.at||0)<120000){console.warn('GZC release recovery already attempted',VERSION,target);return false;} 10 sessionStorage.setItem(RELEASE_RECOVERY_KEY,JSON.stringify({from:VERSION,target,at:Date.now()})); 11 }catch(_){} 12 try{if('serviceWorker' in navigator){const regs=await navigator.serviceWorker.getRegistrations();await Promise.all(regs.map(r=>r.unregister().catch(()=>false)));}}catch(_){} 13 try{if(window.caches){const keys=await caches.keys();await Promise.all(keys.filter(k=>k.startsWith('gzc-prod-')||k.startsWith('gzc-vue-')).map(k=>caches.delete(k)));}}catch(_){} 14 try{ 15 const u=new URL(window.location.href);u.searchParams.set('__smt_release',target);u.searchParams.set('__refresh',String(Date.now()));window.location.replace(u.toString());return true; 16 }catch(_){window.location.reload();return true;} 17 } 18 async function assertRuntimeRelease(){ 19 try{ 20 const r=await fetch('/api/health?ui='+encodeURIComponent(VERSION)+'&_='+Date.now(),{cache:'no-store',headers:{Accept:'application/json'}}); 21 if(!r||!r.ok)return false;const h=await r.json();const serverVersion=String(h&&h.version||''); 22 if(serverVersion&&serverVersion!==VERSION)return recoverStaleRelease(serverVersion); 23 try{sessionStorage.removeItem(RELEASE_RECOVERY_KEY);}catch(_){} 24 }catch(_){} 25 return false; 26 } 27 const PRIMARY_PUBLIC_ORIGIN='https://smt.smtd.ai'; 28 const LEGACY_PUBLIC_ORIGIN='https://gzc.smtd.ai'; 29 const PLATFORM_HOSTS=new Set(['smt.smtd.ai','gzc.smtd.ai']); 30 if(!window.Vue || !window.VueRouter || !window.Pinia){ 31 const el=document.getElementById('app'); 32 if(el) el.innerHTML='<main class="app"><div class="card cdnError"><h3>تعذر ÙØªØ اÙÙ ÙØµØ©</h3><p>ØØ¯Ø«Øª Ù Ø´ÙÙØ© Ø£Ø«ÙØ§Ø¡ تØÙ ÙÙ Ø§ÙØµÙØØ©. ØØ¯ÙØ« Ø§ÙØµÙØØ© أ٠أعد اÙÙ ØØ§ÙÙØ©.</p><a class="btn secondary" href="/">Ø§ÙØ¹Ùدة ÙÙØ±Ø¦ÙØ³ÙØ©</a></div></main>'; 33 return; 34 } 35 36 const {createApp,computed,nextTick,onMounted,onUnmounted,reactive,ref,watch}=Vue; 37 const {createRouter,createWebHistory,useRoute,useRouter}=VueRouter; 38 let __gzcStore=null; 39 40 function toLatinDigits(v){return String(v||'').replace(/[Ù -Ù©]/g,d=>'٠١٢٣٤٥٦٧٨٩'.indexOf(d)).replace(/[Û°-Û¹]/g,d=>'Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹'.indexOf(d)).replace(/[ï¼-ï¼]/g,d=>String.fromCharCode(d.charCodeAt(0)-65248));} 41 function norm(v){let d=toLatinDigits(v).replace(/\D/g,''); if(d.startsWith('00'))d=d.replace(/^00+/,''); if(d.startsWith('086'))d='86'+d.slice(3); return d;} 42 function withCountryCode(v,prefix){const d=norm(v);if(!d)return prefix;if(d.startsWith(prefix))return d;return prefix+d.replace(/^0+/,'');} 43 function safeMemberNext(v,fallback='/account'){ 44 const path=String(v||'').trim(); 45 if(!path.startsWith('/')||path.startsWith('//')||path.includes('\\')||path.startsWith('/admin')||path.startsWith('/official'))return fallback; 46 const allowed=['/account','/wallet','/procurement','/orders','/help','/feedback','/emergency','/complete','/announcements','/circulars/','/events','/china-guide','/trade-shipping','/my-china','/new-to-china','/ask','/notification-settings','/official-circulars','/exhibitions','/services','/toolkit','/cities','/city/']; 47 return allowed.some(base=>path===base||path.startsWith(base+'/')||(base.endsWith('/')&&path.startsWith(base)))?path:fallback; 48 } 49 function arabicNameWords(v){return String(v||'').replace(/[Ù\dÙ -Ù©Û°-Û¹]/g,' ').trim().split(/\s+/).filter(w=>/[\u0600-\u06FF]/.test(w));} 50 function isArabicTripleName(v){return arabicNameWords(v).length>=3 && !/[A-Za-z]/.test(String(v||''));} 51 function profileNeedsCompletion(m){if(!m)return false;const s=String(m.status||'');if(s==='pre_registered'||s==='profile_pending')return !(m.profile_locked||m.profile_completed_at);if(['pending','approved','suspended','archived'].includes(s))return false;return !(m.profile_locked||m.profile_completed_at);} 52 function canApproveMember(m){return !!(m&&String(m.status||'')==='pending'&&m.profile_locked&&m.profile_completed_at);} 53 function canShowMemberCard(m){return !!(m&&!m.archived_at&&String(m.status||'')==='approved'&&String(m.gzc_id||'').trim());} 54 function roleName(r){return ({super_admin:'Ù Ø¯ÙØ± اÙÙØ¸Ø§Ù ',it_admin:'Ù Ø¯ÙØ± تÙÙÙØ© اÙ٠عÙÙ٠ات',system_admin:'Ù Ø¯ÙØ± تشغÙ٠اÙÙØ¸Ø§Ù ',community_admin:'Ù Ø¯ÙØ± ٠جت٠ع ٠دÙÙØ©',membership:'ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©',events:'إدارة اÙÙØ¹Ø§ÙÙØ§Øª',arrival:'٠تابعة اÙÙØµÙÙ',help:'٠تابعة اÙ٠ساعدة',emergency:'٠تابعة Ø§ÙØ·Ùارئ'}[String(r||'')])||'٠شرÙ';} 55 function adminStatusName(s){return ({active:'ÙØ´Ø·',suspended:'٠عÙÙÙ',disabled:'٠عطÙÙ',archived:'٠ؤرشÙ'}[String(s||'')])||String(s||'-');} 56 function adminCommitteeKeys(a){return new Set(safeArray(a&&a.committees).map(x=>String((x&&x.key)||x||'')));} 57 function adminIsSenior(a){return !!(a&&['super_admin','it_admin','system_admin'].includes(String(a.role||'')));} 58 function adminCan(a,cap){ 59 if(!a)return false;
60 if(adminIsSenior(a))return true; 61 const role=String(a.role||''), committees=adminCommitteeKeys(a); 62 if(cap==='overview'||cap==='tasks'||cap==='search'||cap==='account')return true; 63 if(role==='community_admin')return ['members','communities','arrivals','help','emergency','content','events','feedback'].includes(cap); 64 if(cap==='members')return role==='membership'||committees.has('membership'); 65 if(cap==='arrivals')return role==='arrival'||committees.has('arrival'); 66 if(cap==='help')return role==='help'||committees.has('help'); 67 if(cap==='emergency')return role==='emergency'||committees.has('emergency'); 68 if(cap==='events')return role==='events'||committees.has('events'); 69 if(cap==='content')return role==='events'||role==='guide'||committees.has('events')||committees.has('guide'); 70 if(cap==='feedback')return role==='help'||role==='membership'||role==='guide'||committees.has('help')||committees.has('membership')||committees.has('guide'); 71 return false; 72 } 73 const ADMIN_PATH_CAPABILITIES=[ 74 ['/admin/member/','members'],['/admin/members','members'],['/admin/register','members'],['/admin/city-hubs','communities'],['/admin/communities','communities'],['/admin/community','communities'], 75 ['/admin/arrivals','arrivals'],['/admin/help','help'],['/admin/emergency','emergency'],['/admin/events','events'],['/admin/event/','events'], 76 ['/admin/media','content'],['/admin/announcements','content'],['/admin/content-intake','content'],['/admin/china-guide','content'],['/admin/sudan-digital','content'],['/admin/trade-shipping','content'],['/admin/feedback','feedback'], 77 ['/admin/orders','procurement'],['/admin/procurement','procurement'],['/admin/wallet','wallet'],['/admin/participation-points','rewards'],['/admin/official-accounts','communications'],['/admin/whatsapp-settings','system'],['/admin/whatsapp','communications'], 78 ['/admin/engineering-advisor','system'],['/admin/ai-operations','system'],['/admin/ai-research','content'],['/admin/ai-efficiency','content'],['/admin/city-coverage','content'],['/admin/taxonomy','content'],['/admin/supervisors','governance'],['/admin/committees','governance'],['/admin/workflows','governance'],['/admin/audit','governance'], 79 ['/admin/system','system'],['/admin/seo','system'],['/admin/backup-settings','system'],['/admin/health','system'],['/admin/releases','system'],['/admin/pwa','system'],['/admin/platform','system'],['/admin/brand-assets','system'],['/admin/options','system'],['/admin/demo','system'], 80 ['/admin/visitors','overview'],['/admin/search','search'],['/admin/task/','tasks'],['/admin/notifications','tasks'],['/admin/account','account'],['/admin','overview'] 81 ]; 82 function adminCanPath(a,path){const p=String(path||'');const hit=ADMIN_PATH_CAPABILITIES.find(x=>p===x[0]||p.startsWith(x[0]));return hit?adminCan(a,hit[1]):true;} 83 function statusName(s){return ({approved:'٠عت٠د',pending:'٠راجعة',profile_pending:'٠راجعة',pre_registered:'تذÙÙØ± Ø§ÙØªØ³Ø¬ÙÙ',suspended:'٠عÙÙ'}[String(s||'')])||String(s||'-');} 84 function memberType(m){return (m&&m.is_admin_member)||String((m&&m.category)||'').includes('إدارة')?'٠شر٠/ إدارة':'عضÙ';} 85 function caseTypeName(t){return ({arrival:'ÙØµÙÙ',help:'٠ساعدة',housing:'سÙÙ',translation:'ترج٠ة',hospital:'٠ستشÙÙ',documents:'Ø¥ÙØ§Ù Ø© ÙÙØ«Ø§Ø¦Ù',study:'دراسة',procedures:'إجراءات',health:'ØµØØ©',other:'أخرÙ'}[String(t||'')])||String(t||'-');} 86 function caseStatusName(s){return ({open:'Ù ÙØªÙØØ©',new:'Ø¬Ø¯ÙØ¯Ø©',pending:'٠راجعة',in_progress:'ÙÙØ¯ اÙ٠تابعة',closed:'٠غÙÙØ©',resolved:'ØªÙ Ø§ÙØÙ'}[String(s||'')])||String(s||'-');} 87 function eventCategoryName(c){return ({party:'ØÙÙ',national_day:'ÙÙÙ ÙØ·ÙÙ',trip:'رØÙØ©',community_meeting:'اجت٠اع اÙ٠جت٠ع',condolence:'عزاء',iftar:'Ø¥ÙØ·Ø§Ø±',other:'أخرÙ'}[String(c||'')])||String(c||'-');} 88 function eventStatusName(s){return ({draft:'Ù Ø³ÙØ¯Ø©',published:'Ù ÙØ´Ùرة',completed:'Ù ÙØªÙ ÙØ©',archived:'Ù Ø¤Ø±Ø´ÙØ©',cancelled:'Ù ÙØºØ§Ø©'}[String(s||'')])||String(s||'-');} 89 function displayDateAr(v){const raw=String(v||'').trim();if(!raw)return '-';const iso=raw.slice(0,10);const d=new Date(iso+'T00:00:00Z');if(Number.isNaN(d.getTime()))return iso||raw;try{return new Intl.DateTimeFormat('ar-EG',{day:'numeric',month:'short',year:'numeric',timeZone:'UTC'}).format(d);}catch(e){return iso||raw;}}
90 function fmtMB(v){const n=Number(v||0); return 'MB '+(Math.round(n*10)/10).toLocaleString('en-US');} 91 function shortDate(v){return String(v||'').slice(0,16).replace('T',' ');} 92 // Shared by ChinaGuidePage and ChinaGuideDetailPage. 93 function guideServiceLabel(v){return ({markets:'سÙÙ',exhibitions:'٠عرض / ٠ؤت٠ر',restaurants:'٠طع٠',hotels:'ÙÙØ¯Ù / Ø¥ÙØ§Ù Ø©',health:'ØµØØ©',transport:'Ù ÙØ§ØµÙات',finance:'بÙÙÙ ÙØ¯Ùع',housing:'سÙÙ ÙØ¥Ùا٠ة',services:'خد٠ات',education:'تعÙÙÙ ',emergency:'Ø·ÙØ§Ø±Ø¦',general:'٠عÙÙÙ Ø©'}[String(v||'')])||String(v||'٠عÙÙÙ Ø©');} 94 function safeImageErrorText(value,status='failed',meta={}){ 95 const code=String(meta&&meta.failure_code||''); 96 const messages={ 97 no_candidate:'ÙÙ ÙØ¬Ø¯ ØµÙØ±Ø© Ù ÙØ§Ø³Ø¨Ø© Ù٠اÙ٠صدر Ø£Ù ÙØªØ§Ø¦Ø¬ Ø§ÙØ¨ØØ«. أض٠رابط ٠صدر Ø¨ØµÙØ±Ø© ÙØ§Ø¶ØØ© ث٠أعد اÙÙ ØØ§ÙÙØ©.', 98 source_blocked:'اÙÙ ÙÙØ¹ اÙ٠صدر Ù ÙØ¹ ÙØ±Ø§Ø¡Ø© Ø§ÙØµÙرة. Ø¬Ø±ÙØ¨ ٠صدرا٠آخر Ø£Ù Ø§Ø±ÙØ¹Ùا ÙØ¯ÙÙØ§Ù.', 99 source_missing:'رابط Ø§ÙØµÙرة Ù٠اÙ٠صدر ÙÙ ÙØ¹Ø¯ ØµØ§ÙØØ§Ù. Ø¬Ø±ÙØ¨ ٠صدرا٠آخر.', 100 source_timeout:'تأخر اÙ٠صدر ÙÙ Ø§ÙØ±Ø¯. ستعاد اÙÙ ØØ§ÙÙØ© تÙÙØ§Ø¦ÙØ§Ù Ø¹ÙØ¯ تÙÙØ±Ùا.', 101 search_timeout:'تأخر Ø¨ØØ« Ø§ÙØµÙر ÙÙ Ø§ÙØ±Ø¯. ستعاد اÙÙ ØØ§ÙÙØ© تÙÙØ§Ø¦ÙØ§Ù Ø¹ÙØ¯ تÙÙØ±Ùا.', 102 source_unavailable:'تعذر Ø§ÙØ§ØªØµØ§Ù باÙ٠صدر Ù Ø¤ÙØªØ§Ù.', 103 image_too_small:'Ø§ÙØµÙر اÙÙ ØªØ§ØØ© ØµØºÙØ±Ø© Ø£Ù Ø£Ø¨Ø¹Ø§Ø¯ÙØ§ ØºÙØ± Ù ÙØ§Ø³Ø¨Ø©.', 104 unsupported_format:'ØµÙØºØ© Ø§ÙØµÙرة ØºÙØ± ٠دعÙÙ Ø© عÙÙ Ø§ÙØ®Ø§Ø¯Ù . Ø¬Ø±ÙØ¨ JPG Ø£Ù PNG Ø£Ù WebP.', 105 processing_error:'تعذر تجÙÙØ² Ø§ÙØµÙرة. أعد اÙÙ ØØ§ÙÙØ© Ø£Ù Ø§Ø±ÙØ¹ ØµÙØ±Ø© ÙØ¯ÙÙØ§Ù.' 106 }; 107 if(messages[code])return messages[code]; 108 return String(status||'')==='not_found'?'ÙÙ ÙØ¬Ø¯ ØµÙØ±Ø© Ù ÙØ§Ø³Ø¨Ø© ÙÙ ÙØ«ÙÙØ© ٠٠اÙ٠صدر. ÙÙ ÙÙ٠إعادة اÙÙ ØØ§ÙÙØ©.':'تعذر تجÙÙØ² Ø§ÙØµÙرة اÙÙ ÙØªØ±ØØ©. ÙÙ ÙØªÙ تغÙÙØ± Ø§ÙØ¹Ùصر.'; 109 } 110 function healthLabel(s){return ({ok:'سÙÙÙ ',warn:'ØªØØ°Ùر',warning:'ØªØØ°Ùر',bad:'خطر'}[String(s||'')])||String(s||'-');} 111 function queueStatusName(s){return ({queued:'ÙÙ Ø§ÙØ§Ùتظار',processing:'ÙÙØ¯ Ø§ÙØ¥Ø±Ø³Ø§Ù',sent:'Ù Ø±Ø³ÙØ©',failed:'إعادة ٠جدÙÙØ©',dead:'ØªØØªØ§Ø¬ ٠راجعة',cancelled:'Ù ÙØºØ§Ø©'}[String(s||'')])||String(s||'-');} 112 function queueFailureName(s){return ({transient_transport:'Ø¹Ø·Ù Ø§ØªØµØ§Ù Ù Ø¤ÙØª',transient_rate_limit:'تÙÙÙØ¯ Ù Ø¤ÙØª ٠٠اÙÙ Ø²ÙØ¯',transient_provider:'Ø¹Ø·Ù Ù Ø¤ÙØª ÙØ¯Ù اÙÙ Ø²ÙØ¯',transient_unknown:'ÙØ´Ù Ù Ø¤ÙØª ØºÙØ± ٠صÙÙ',permanent_auth:'Ø¨ÙØ§Ùات اعت٠اد اÙÙ Ø²ÙØ¯ ٠رÙÙØ¶Ø©',permanent_endpoint:'٠سار اÙÙ Ø²ÙØ¯ ØºÙØ± صØÙØ',permanent_request:'اÙÙØ§Ùب أ٠اÙÙ Ø¹Ø§Ù ÙØ§Øª ٠رÙÙØ¶Ø©',permanent_provider:'Ø±ÙØ¶ ÙÙØ§Ø¦Ù ٠٠اÙÙ Ø²ÙØ¯',permanent_configuration:'إعداد تشغÙÙÙ ÙØ§Ùص',permanent_validation:'Ø¨ÙØ§Ùات اÙÙØ¬ÙØ© ØºÙØ± صØÙØØ©',attempts_exhausted:'استÙÙØ¯Øª اÙÙ ØØ§ÙÙØ§Øª',delivery_unknown:'ØØ§ÙØ© Ø§ÙØªØ³ÙÙÙ ØºÙØ± ٠عرÙÙØ©',configuration:'إعداد ÙØ§Ùص',validation:'Ø¨ÙØ§Ùات ØºÙØ± صØÙØØ©',cancelled_by_admin:'Ø£ÙØºØªÙا Ø§ÙØ¥Ø¯Ø§Ø±Ø©'}[String(s||'')])||String(s||'-');} 113 function safeArray(v){return Array.isArray(v)?v:[];} 114 function safeRecord(v){return v&&typeof v==='object'&&!Array.isArray(v)?v:null;} 115 let __busyActionDepth=0; 116 async function runBusyAction(store,label,task){ 117 __busyActionDepth+=1; 118 if(store&&store.state)store.state.busy=true; 119 try{return await task();} 120 catch(err){ 121 recordClientRuntimeError('action',err,label||'busy-action'); 122 return {ok:false,message:'ØØ¯Ø« خطأ ØºÙØ± ٠تÙÙØ¹. أعد اÙÙ ØØ§ÙÙØ©.'}; 123 }finally{ 124 __busyActionDepth=Math.max(0,__busyActionDepth-1); 125 if(store&&store.state)store.state.busy=__busyActionDepth>0; 126 } 127 } 128 function compactContentExcerpt(value,max=180){const text=String(value||'').replace(/<[^>]*>/g,' ').replace(/\s+/g,' ').trim();if(!text)return '';const limit=Math.max(80,Number(max)||180);return text.length>limit?text.slice(0,limit).trimEnd()+'â¦':text;} 129 130 // BEGIN exhibition-countdown (pure helpers: China time, no DOM / network / storage) 131 const ExhibitionCountdown=(()=>{ 132 const CHINA_OFFSET_MS=8*3600000,DAY_MS=86400000; 133 function chinaMs(dateText,endOfDay){ 134 const m=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(dateText||'')); 135 if(!m)return null; 136 const t=Date.UTC(+m[1],+m[2]-1,+m[3],endOfDay?23:0,endOfDay?59:0,endOfDay?59:0)-CHINA_OFFSET_MS; 137 return Number.isFinite(t)?t:null; 138 } 139 function parts(ms){ 140 const total=Math.max(0,Math.floor(ms/1000)); 141 return {days:Math.floor(total/86400),hours:Math.floor(total%86400/3600),minutes:Math.floor(total%3600/60),seconds:total%60}; 142 } 143 function stateOf(item,now){ 144 const start=chinaMs(item&&item.exhibition_start_date,false); 145 if(start===null)return {phase:'unknown',target:null,parts:null}; 146 const end=chinaMs((item&&item.exhibition_end_date)||item.exhibition_start_date,true); 147 if(now<start)return {phase:'upcoming',target:start,parts:parts(start-now),near:start-now<=7*DAY_MS}; 148 if(end!==null&&now<=end)return {phase:'ongoing',target:end,parts:parts(end-now),near:true}; 149 return {phase:'ended',target:null,parts:null}; 150 } 151 const RANK={ongoing:0,upcoming:1,unknown:2,ended:3}; 152 function sortItems(items,now){ 153 return (Array.isArray(items)?items:[]).map(item=>({item,state:stateOf(item,now)})).sort((a,b)=>{ 154 if(RANK[a.state.phase]!==RANK[b.state.phase])return RANK[a.state.phase]-RANK[b.state.phase]; 155 if(a.state.phase==='ended')return (chinaMs(b.item.exhibition_start_date)||0)-(chinaMs(a.item.exhibition_start_date)||0); 156 if(a.state.phase==='unknown')return String(a.item.title_ar||'').localeCompare(String(b.item.title_ar||'')); 157 return (a.state.target||0)-(b.state.target||0); 158 }); 159 } 160 const pad=n=>String(n).padStart(2,'0'); 161 function icsEscape(text){return String(text||'').replace(/\\/g,'\\\\').replace(/;/g,'\;').replace(/,/g,'\\,').replace(/\r?\n/g,'\\n');} 162 function icsDay(dateText,addDays){ 163 const m=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(dateText||'')); 164 if(!m)return ''; 165 const d=new Date(Date.UTC(+m[1],+m[2]-1,+m[3]+(addDays||0))); 166 return String(d.getUTCFullYear())+pad(d.getUTCMonth()+1)+pad(d.getUTCDate()); 167 } 168 function icsFor(item,uidHost){ 169 const start=icsDay(item&&item.exhibition_start_date,0); 170 if(!start)return ''; 171 const end=icsDay((item.exhibition_end_date||item.exhibition_start_date),1); 172 const rows=['BEGIN:VCALENDAR','VERSION:2.0','PRODID:-//SMT China//Exhibitions//AR','CALSCALE:GREGORIAN','BEGIN:VEVENT', 173 'UID:exhibition-'+String(item.id)+'@'+String(uidHost||'smt'),'DTSTAMP:'+new Date().toISOString().replace(/[-:]/g,'').replace(/\.\d+Z$/,'Z'), 174 'DTSTART;VALUE=DATE:'+start,'DTEND;VALUE=DATE:'+end,'SUMMARY:'+icsEscape(item.title_ar||item.title_en), 175 'LOCATION:'+icsEscape([item.address_ar,item.city].filter(
175Boolean).join(' - ')),'END:VEVENT','END:VCALENDAR']; 176 return rows.join('\r\n')+'\r\n'; 177 } 178 return {chinaMs,parts,stateOf,sortItems,icsFor,pad}; 179 })(); 180 // END exhibition-countdown 181 function safeExternalHttpUrl(url){try{const u=new URL(String(url||''),window.location.origin);return (u.protocol==='http:'||u.protocol==='https:')?u.href:'';}catch(e){return '';}} 182 // App-only AMap handoff. Never route a place click through a web map or start navigation. 183 function amapAppPlaceLink(place,agent=navigator.userAgent){ 184 const name=String(place&&(place.name_zh||place.title_zh||place.name_ar||place.title_ar||place.name||place.title_en)||'').trim().slice(0,160); 185 if(!name)return ''; 186 const ios=/iPhone|iPad|iPod/i.test(String(agent||'')); 187 const android=/Android/i.test(String(agent||'')); 188 if(!ios&&!android)return ''; 189 const params=new URLSearchParams({sourceApplication:'SMTChina'}); 190 const lat=Number(place&&place.latitude),lon=Number(place&&place.longitude); 191 const trusted=place&&place.coordinate_system==='GCJ-02'&&Number.isFinite(lat)&&Number.isFinite(lon)&&lat>=-90&&lat<=90&&lon>=-180&&lon<=180&&place.latitude!=null&&place.longitude!=null; 192 if(trusted){params.set('poiname',name);params.set('lat',String(lat));params.set('lon',String(lon));params.set('dev','0');return (ios?'iosamap://viewMap?':'androidamap://viewMap?')+params.toString();} 193 params.set(ios?'name':'keywords',name); 194 return (ios?'iosamap://poi?':'androidamap://poi?')+params.toString(); 195 } 196 function openAmapAppPlace(place,onMessage){ 197 const link=amapAppPlaceLink(place); 198 if(!link){onMessage('Ø§ÙØªØ ÙØ°Ù Ø§ÙØµÙØØ© عÙÙ ÙØ§ØªÙ iOS Ø£Ù AndroidØ ÙØªØ£Ùد ٠٠تÙÙØ± اس٠اÙÙ ÙØ§Ù.');return false;} 199 onMessage('إذا ÙÙ ÙÙØªØ تطبÙÙ AMapØ ØªØÙÙ Ù Ù ØªØ«Ø¨ÙØªÙ ÙØ§ÙØªØ Ø§ÙØµÙØØ© ÙÙ Ù ØªØµÙØ ÙØ§ØªÙ٠٠باشرة. ÙÙ ÙÙØªØ Ø®Ø±ÙØ·Ø© Ù٠اÙÙ ØªØµÙØ.'); 200 window.location.href=link; 201 return true; 202 } 203 204 async function copySharedText(text,okMessage){ 205 const value=String(text||'').trim(); if(!value){if(__gzcStore)__gzcStore.state.msg='ÙØ§ ØªÙØ¬Ø¯ Ø¨ÙØ§Ùات ÙÙÙØ³Ø®';return false;} 206 try{if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(value);}else{throw new Error('clipboard unavailable');}if(__gzcStore)__gzcStore.state.msg=okMessage||'ت٠اÙÙØ³Ø®';return true;} 207 catch(e){try{const ta=document.createElement('textarea');ta.value=value;ta.setAttribute('readonly','');ta.style.position='fixed';ta.style.opacity='0';document.body.appendChild(ta);ta.select();const ok=document.execCommand('copy');document.body.removeChild(ta);if(!ok)throw new Error('copy failed');if(__gzcStore)__gzcStore.state.msg=okMessage||'ت٠اÙÙØ³Ø®';return true;}catch(_){if(__gzcStore)__gzcStore.state.msg='تعذر اÙÙØ³Ø® تÙÙØ§Ø¦ÙاÙ';return false;}} 208 } 209 async function shareDetailContent(data){ 210 const payload={title:String((data&&data.title)||''),text:String((data&&data.text)||''),url:String((data&&data.url)||window.location.href)}; 211 if(navigator.share){try{await navigator.share(payload);return true;}catch(e){if(e&&e.name==='AbortError')return false;}} 212 return copySharedText(payload.url,'ØªÙ ÙØ³Ø® رابط اÙ٠عÙÙÙ Ø©'); 213 } 214 function mediaKindName(k){return ({image:'ØµÙØ±Ø©',video:'ÙÙØ¯ÙÙ',audio:'ØµÙØª'}[String(k||'')])||String(k||'-');} 215 function fileMB(bytes){const n=Number(bytes||0); if(!n)return '0 MB'; return (Math.round((n/1024/1024)*10)/10).toLocaleString('en-US')+' MB';} 216 function countryFlag(code){code=String(code||'').toUpperCase(); if(!/^[A-Z]{2}$/.test(code)||code==='UN')return 'ð'; return code.replace(/./g,c=>String.fromCodePoint(127397+c.charCodeAt(0)));} 217 function countryChangeLabel(v){if(v===null||v===undefined||v==='')return 'Ø¬Ø¯ÙØ¯'; const n=Number(v||0); if(!Number.isFinite(n))return '0%'; return (n>0?'â ':'â ')+Math.abs(n).toLocaleString('en-US')+'%';} 218 function countryChangeClass(v){const n=Number(v||0); if(v===null||v===undefined||!Number.isFinite(n)||n===0)return 'flat'; return n>0?'up':'down';} 219 function mediaSrc(m){return (m&&(m.thumb_url||m.file_url))||'';} 220 function isVideo(m){return String((m&&m.kind)||'')==='video';} 221 function isPdf(m){return String((m&&m.kind)||'')==='pdf';} 222 function isVerifiedAnnouncement(a){return ['verified','admin_verified','official_verified'].includes(String((a&&a.verification_status)||''));} 223 function verificationLabel(a){const v=String((a&&a.verification_status)||'');return v==='official_verified'?'ØªÙ Ø§ÙØªØÙÙ Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù':(v==='admin_verified'||v==='verified'?'ØªÙ Ø§ÙØªØÙÙ Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©':'ØºÙØ± Ù ÙØ«Ù');} 224 function mediaPreviewLabel(list){const n=safeArray(list).length;return n?('ØªÙ Ø§Ø®ØªÙØ§Ø± '+n+' ØµÙØ±Ø©'):'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±';} 225 function channelName(c){return c==='embassy'?'تع٠Ù٠ات Ø§ÙØ³Ùارة':(c==='consulate'?'تع٠Ù٠ات اÙÙÙØµÙÙØ©':'Ø¥Ø¹ÙØ§Ùات اÙÙ ÙØµØ©')} 226 function channelLogo(c){return c==='embassy'?'/official-logo-embassy-gold.jpeg':(c==='consulate'?'/official-logo-consulate.png':'')} 227 function officialSourceName(a){return (a&&a.source_name_ar)||channelName(a&&a.channel)} 228 function needsOfficialTour(o){return !!(o&&o.tour_required);} 229 function memberPhoto(m,kind){ 230 m=m||{}; kind=kind||'profile'; 231 if(kind==='thumb') return m.photo_thumb_url||m.photo_profile_url||m.photo_url||''; 232 if(kind==='card') return m.photo_card_url||m.photo_profile_url||m.photo_url||''; 233 return m.photo_profile_url||m.photo_url||''; 234 } 235 236 const CHINA_CITY_DISTRICTS={ 237 Guangzhou:['Yuexiu','Liwan','Haizhu','Tianhe','Baiyun','Huangpu','Huadu','Panyu','Nansha','Conghua','Zengcheng','Other'], 238 Foshan:['Chancheng','Nanhai','Shunde','Gaoming','Sanshui','Other'], 239 Shenzhen:['Futian','Luohu','Yantian','Nanshan','Baoan','Longgang','Longhua','Pingshan','Guangming','Dapeng','Other'], 240 Dongguan:['Dongcheng','Nancheng','Wanjiang','Guancheng','Shijie','Gaobu','Dongkeng','Changping','Huangjiang','Zhangmutou','Qingxi','Tangxia','Fenggang','Changan','Humen','Houjie','Dalang','Liaobu','Dalingshan','Shatian','Machong','Chashan','Zhongtang','Daojiao','Hengli','Qishi','Xiegang','Shipai','Qiaotou','Hongmei','Wangniudun','Other'], 241 Yiwu:['Choucheng','Beiyuan','Jiangdong','Futian','Houzhai','Chengxi','Niansanli','Yiting','Fotang','Suxi','Other'], 242 Jinan:['Lixia','Shizhong','Huaiyin','Tianqiao','Licheng','Changqing','Zhangqiu','Jiyang','Laiwu','Gangcheng','Other'], 243 Shanghai:['Huangpu','Xuhui','Changning','Jingan','Putuo','Hongkou','Yangpu','Minhang','Pudong','Other'], 244 Beijing:['Chaoyang','Haidian','Dongcheng','Xicheng','Fengtai','Tongzhou','Shunyi','Daxing','Other'], 245 Hefei:['Yaohai','Luyang','Shushan','Baohe','Feidong','Feixi','Changfeng','Lujiang','Chaohu','Other'], 246 Hangzhou:['Shangcheng','Gongshu','Xihu','Binjiang','Xiaoshan','Yuhang','Qiantang','Linping','Other'], 247 Ningbo:['Haishu','Jiangbei','Beilun','Zhenhai','Yinzhou','Fenghua','Cixi','Yuyao','Other'], 248 Wenzhou:['Lucheng','Longwan','Ouhai','Ruian','Yueqing','Other'], 249 Other:['Other'] 250 }; 251 const CHINA_CITY_LABELS={Guangzhou:'ÙÙØ§Ùغتش٠/ Guangzhou',Foshan:'ÙÙØ´Ø§Ù / Foshan',Shenzhen:'Ø´ÙØ²Ù
251 / Shenzhen',Dongguan:'دÙÙØºÙÙØ§Ù / Dongguan',Yiwu:'ÙÙÙÙ / Yiwu',Jinan:'جÙÙØ§Ù / Jinan',Shanghai:'Ø´ÙØºÙا٠/ Shanghai',Beijing:'بÙÙÙ / Beijing',Hefei:'Ø®ÙÙ / Hefei',Hangzhou:'ÙØ§Ùغتش٠/ Hangzhou',Ningbo:'ÙÙÙØºØ¨Ù / Ningbo',Wenzhou:'ÙÙØ²Ù / Wenzhou',Other:'أخر٠/ Other'}; 252 const SUDAN_CITIES=['Ø§ÙØ®Ø±Ø·ÙÙ ','أ٠در٠اÙ','Ø¨ØØ±Ù','Ø¨ÙØ±ØªØ³ÙداÙ','ÙØ³Ùا','اÙÙØ¶Ø§Ø±Ù','٠دÙÙ','Ø³ÙØ§Ø±','ÙÙØ³ØªÙ','Ø§ÙØ£Ø¨Ùض','ÙÙØ§Ùا','اÙÙØ§Ø´Ø±','زاÙÙØ¬Ù','Ø§ÙØ¶Ø¹ÙÙ','Ø§ÙØ¬ÙÙÙØ©','دÙÙÙØ§','عطبرة','Ø§ÙØ¯Ù ازÙÙ','ربÙ','أخرÙ']; 253 const PROFESSION_OPTIONS=['Ø·Ø§ÙØ¨','Ù ÙØ¸Ù','رج٠أع٠اÙ','تاجر','ØµØ§ØØ¨ Ø´Ø±ÙØ©','Ø·Ø¨ÙØ¨','Ù ÙÙØ¯Ø³','٠ترج٠','عا٠Ù','ربة Ù ÙØ²Ù','ØºÙØ± Ù ØØ¯Ø¯','أخرÙ']; 254 255 function optionLabel(o){return (o&&(o.name_ar||o.label||o.name_en||o.option_key||o.value))||'';} 256 function optionValue(o){return String((o&&(o.option_key||o.value||o.name_ar))||'');} 257 function publicOptionRows(group){const st=__gzcStore&&__gzcStore.state;return safeArray(st&&st.publicOptions&&st.publicOptions.options&&st.publicOptions.options[group]);} 258 function adminOptionRows(group){const st=__gzcStore&&__gzcStore.state;return safeArray(st&&st.platformOptions&&st.platformOptions.options&&st.platformOptions.options[group]);} 259 function dynamicRows(group,parent){let rows=publicOptionRows(group); if(!rows.length) rows=adminOptionRows(group); if(parent!==undefined&&parent!==null) rows=rows.filter(o=>String(o.parent_key||'')===String(parent||'')); return rows.filter(o=>!o.status||o.status==='active');} 260 function makeOptionList(group,current,parent,fallback){let arr=dynamicRows(group,parent).map(o=>({value:optionValue(o),label:optionLabel(o)})).filter(x=>x.value); if(!arr.length) arr=typeof fallback==='function'?fallback():safeArray(fallback); if(current&¤t!=='all'&&!arr.some(x=>String(x.value)===String(current))) arr.unshift({value:current,label:current}); return arr;} 261 function optionList(group,current,parent){return makeOptionList(group,current,parent,[]);} 262 function cityLabel(value){return window.GzcCityLabels.format(value,(__gzcStore&&__gzcStore.state.locale)||'ar');} 263 function cityList(current){return makeOptionList('china_city',current,null,()=>window.GzcCityLabels.cities.map(c=>({value:c.key,label:c.label_ar}))).map(o=>({...o,label:cityLabel(o.value)||o.label}));} 264 function districtList(city,current){return makeOptionList('china_district',current,city,()=>{const key=CHINA_CITY_DISTRICTS[city]?city:'Other';return (CHINA_CITY_DISTRICTS[key]||['Other']).map(value=>({value,label:value}));});} 265 function sudanCityList(current){return makeOptionList('sudan_city',current,null,()=>SUDAN_CITIES.map(value=>({value,label:value})));} 266 function countryList(current){const st=__gzcStore&&__gzcStore.state;let arr=safeArray(st&&st.countries).filter(c=>c.registration_enabled!==false).map(c=>({value:c.code,label:(c.name_ar||c.name_en||c.code)+' / '+(c.name_en||c.code)}));if(current&&!arr.some(x=>x.value===current))arr.unshift({value:current,label:current});return arr;} 267 function professionList(current){return makeOptionList('profession',current,null,()=>PROFESSION_OPTIONS.map(value=>({value,label:value})));} 268 269 function pwaState(){return Object.assign({version:VERSION,online:navigator.onLine,sw:'unknown',standalone:false,installReady:false,error:''},window.__gzcPwaState||{});} 270 function pwaStatusName(s){return ({registered:'٠سجÙ',installed:'٠ثبت',updated:'ØªØØ¯ÙØ« Ø¬Ø§ÙØ²',updating:'Ø¬Ø§Ø±Ù Ø§ÙØªØØ¯ÙØ«',waiting:'ÙÙØªØ¸Ø± Ø§ÙØªÙعÙÙ',failed:'ÙØ´Ù',unsupported:'ØºÙØ± ٠دعÙÙ ',unknown:'ØºÙØ± ٠عرÙÙ'}[String(s||'')])||String(s||'-');} 271 function iosInstallHint(){return 'عÙÙ iPhone: اضغط زر اÙÙ Ø´Ø§Ø±ÙØ© ÙÙ Safari Ø«Ù Â«Ø¥Ø¶Ø§ÙØ© Ø¥ÙÙ Ø§ÙØ´Ø§Ø´Ø© Ø§ÙØ±Ø¦ÙØ³ÙØ©Â». ÙØ¹ÙÙ Android استخد٠زر Ø§ÙØªØ«Ø¨Ùت Ø£Ù Ø®ÙØ§Ø± Ø§ÙØ¥Ø¶Ø§ÙØ© Ø¥ÙÙ Ø§ÙØ´Ø§Ø´Ø© Ø§ÙØ±Ø¦ÙØ³ÙØ©.';} 272 function useOtpCooldown(seconds=60){ 273 const remaining=ref(0);let timer=null; 274 function stop(){if(timer){clearInterval(timer);timer=null;}} 275 function start(){stop();remaining.value=seconds;timer=setInterval(()=>{remaining.value=Math.max(0,remaining.value-1);if(!remaining.value)stop();},1000);} 276 onUnmounted(stop); 277 return {remaining,start,stop}; 278 } 279 280 function collapseKeyFor(d,i){ 281 const title=(d.querySelector('summary b')||{}).textContent||('section-'+i); 282 return 'gzc_vue_collapse:'+location.pathname+':'+String(title).trim(); 283 } 284 function syncCollapsibleSections(){ 285 try{ 286 document.querySelectorAll('details.collapseSection').forEach((d,i)=>{ 287 if(d.dataset.gzcBound==='1') return;
288 const key=collapseKeyFor(d,i); 289 d.dataset.gzcBound='1'; d.dataset.gzcKey=key; 290 const saved=localStorage.getItem(key); 291 if(saved==='0') d.open=false; 292 if(saved==='1') d.open=true; 293 d.addEventListener('toggle',()=>{try{localStorage.setItem(key,d.open?'1':'0')}catch(e){}},{passive:true}); 294 }); 295 }catch(e){} 296 } 297 298 let __interactionSeq=0; 299 const __activeInteractions=new Map(); 300 function syncGlobalInteraction(){ 301 try{ 302 const st=__gzcStore&&__gzcStore.state;if(!st)return; 303 if(!st.interaction)st.interaction={active:false,count:0,label:'',kind:'',started_at:0}; 304 const rows=Array.from(__activeInteractions.values());const latest=rows.length?rows[rows.length-1]:null; 305 Object.assign(st.interaction,{active:rows.length>0,count:rows.length,label:latest?latest.label:'',kind:latest?latest.kind:'',started_at:latest?latest.started_at:0}); 306 }catch(_){ } 307 } 308 function beginGlobalInteraction(label,kind='request'){ 309 const token=++__interactionSeq; 310 __activeInteractions.set(token,{label:String(label||'جار٠تÙÙÙØ° Ø§ÙØ¥Ø¬Ø±Ø§Ø¡...'),kind:String(kind||'request'),started_at:Date.now()}); 311 syncGlobalInteraction();return token; 312 } 313 function finishGlobalInteraction(token){if(!token)return;__activeInteractions.delete(token);syncGlobalInteraction();} 314 function apiFeedbackLabel(options){const method=String((options&&options.method)||'GET').toUpperCase();return method==='GET'?'جار٠تØÙ ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª...':'جار٠تÙÙÙØ° Ø§ÙØ¥Ø¬Ø±Ø§Ø¡...';} 315 316 async function api(url,opt){ 317 const options=Object.assign({credentials:'include'},opt||{}); 318 const feedback=options.feedback!==false; 319 const feedbackLabel=String(options.feedbackLabel||apiFeedbackLabel(options)); 320 delete options.feedback;delete options.feedbackLabel; 321 options.headers=Object.assign({'Accept':'application/json'},options.headers||{}); 322 if(options.body && !(options.body instanceof FormData) && !options.headers['Content-Type']) options.headers['Content-Type']='application/json'; 323 const interactionToken=feedback?beginGlobalInteraction(feedbackLabel,String(options.method||'GET').toUpperCase()==='GET'?'load':'action'):0; 324 try{ 325 const r=await fetch(url,options); 326 const txt=await r.text(); 327 let j={};
328 try{j=txt?JSON.parse(txt):{};}catch(e){j={ok:false,message:txt||'استجابة ØºÙØ± Ù ÙÙÙÙ Ø©'};} 329 if(!r.ok && !j.status) j.status=r.status; 330 return j; 331 }catch(e){return {ok:false,message:'ÙØ´Ù Ø§ÙØ§ØªØµØ§Ù Ø¨Ø§ÙØ³ÙØ±ÙØ±'};} 332 finally{finishGlobalInteraction(interactionToken);} 333 } 334 335 function frontendDeviceClass(){try{const w=Math.max(document.documentElement&&document.documentElement.clientWidth||0,window.innerWidth||0);return w<=767?'mobile':w<=1023?'tablet':'desktop';}catch(_){return'unknown';}} 336 function safeRoutePattern(route){try{const matched=route&&route.matched&&route.matched.length?route.matched[route.matched.length-1]:null;return String(matched&&matched.path||route&&route.path||location.pathname||'/').slice(0,160);}catch(_){return'/';}} 337 function sendFrontendPerformanceTelemetry(metrics,routePattern){ 338 try{const rows=safeArray(metrics).map(x=>({metric:String(x&&x.metric||''),value_ms:Number(x&&x.value_ms)})).filter(x=>x.metric&&Number.isFinite(x.value_ms)&&x.value_ms>=0&&x.value_ms<=60000).slice(0,8);if(!rows.length)return;fetch('/api/platform/performance',{method:'POST',credentials:'omit',cache:'no-store',keepalive:true,headers:{'Content-Type':'application/json','Accept':'application/json'},body:JSON.stringify({release_version:VERSION,device_class:frontendDeviceClass(),route:String(routePattern||'/').slice(0,160),metrics:rows})}).catch(()=>{});}catch(_){ } 339 } 340 let __largestContentfulPaintMs=0; 341 function setupInitialFrontendPerformanceTelemetry(route){ 342 try{if('PerformanceObserver' in window){const po=new PerformanceObserver(list=>{for(const e of list.getEntries()){const v=Number(e.startTime||e.renderTime||0);if(Number.isFinite(v)&&v>__largestContentfulPaintMs)__largestContentfulPaintMs=v;}});po.observe({type:'largest-contentful-paint',buffered:true});setTimeout(()=>{try{po.disconnect()}catch(_){ }},10000);}} 343 catch(_){ } 344 const emit=()=>setTimeout(()=>{try{const nav=performance.getEntriesByType&&performance.getEntriesByType('navigation')[0];const metrics=[];if(nav){if(Number(nav.loadEventEnd)>0)metrics.push({metric:'navigation_load_ms',value_ms:Number(nav.loadEventEnd)});if(Number(nav.domContentLoadedEventEnd)>0)metrics.push({metric:'dom_content_loaded_ms',value_ms:Number(nav.domContentLoadedEventEnd)});}if(__largestContentfulPaintMs>0)metrics.push({metric:'largest_contentful_paint_ms',value_ms:__largestContentfulPaintMs});sendFrontendPerformanceTelemetry(metrics,safeRoutePattern(route));}catch(_){ }},1600);
345 if(document.readyState==='complete')emit();else window.addEventListener('load',emit,{once:true}); 346 } 347 348 let __uploadSeq=0; 349 function updateGlobalUpload(patch){ 350 try{ 351 const st=__gzcStore&&__gzcStore.state; 352 if(!st)return; 353 if(!st.upload)st.upload={active:false,progress:0,label:'',loaded:0,total:0}; 354 Object.assign(st.upload,patch||{}); 355 }catch(_){ } 356 } 357 function finishGlobalUpload(token,ok){ 358 try{ 359 if(token!==__uploadSeq)return; 360 updateGlobalUpload({progress:ok?100:0}); 361 setTimeout(()=>{if(token===__uploadSeq)updateGlobalUpload({active:false,label:'',loaded:0,total:0});},ok?420:180); 362 }catch(_){ } 363 } 364 function uploadApi(url,opt){ 365 const options=Object.assign({method:'POST'},opt||{}); 366 const token=++__uploadSeq; 367 const label=String(options.uploadLabel||'Ø¬Ø§Ø±Ù Ø±ÙØ¹ اÙÙ ÙÙ...'); 368 updateGlobalUpload({active:true,progress:0,label,loaded:0,total:0}); 369 return new Promise(resolve=>{ 370 let settled=false; 371 const done=(result,ok)=>{if(settled)return;settled=true;finishGlobalUpload(token,ok);resolve(result);};
372 try{ 373 const xhr=new XMLHttpRequest(); 374 xhr.open(String(options.method||'POST'),url,true); 375 xhr.withCredentials=true; 376 xhr.timeout=120000; 377 const headers=Object.assign({'Accept':'application/json'},options.headers||{}); 378 Object.keys(headers).forEach(k=>{if(String(k).toLowerCase()!=='content-type')xhr.setRequestHeader(k,String(headers[k]));}); 379 if(xhr.upload){xhr.upload.addEventListener('progress',e=>{ 380 if(token!==__uploadSeq)return; 381 if(e&&e.lengthComputable&&Number(e.total)>0){const pct=Math.max(1,Math.min(99,Math.round((Number(e.loaded)/Number(e.total))*100)));updateGlobalUpload({active:true,progress:pct,label,loaded:Number(e.loaded||0),total:Number(e.total||0)});} 382 else updateGlobalUpload({active:true,progress:-1,label}); 383 });} 384 xhr.addEventListener('load',()=>{ 385 let j={};const txt=String(xhr.responseText||''); 386 try{j=txt?JSON.parse(txt):{};}catch(_){j={ok:false,message:txt||'استجابة ØºÙØ± Ù ÙÙÙÙ Ø©'};} 387 if((xhr.status<200||xhr.status>=300)&&!j.status)j.status=xhr.status; 388 done(j,xhr.status>=200&&xhr.status<300&&j.ok!==false); 389 }); 390 xhr.addEventListener('error',()=>done({ok:false,message:'ÙØ´Ù Ø§ÙØ§ØªØµØ§Ù Ø¨Ø§ÙØ³ÙØ±ÙØ±'},false)); 391 xhr.addEventListener('timeout',()=>done({ok:false,message:'Ø§ÙØªÙت Ù ÙÙØ© Ø±ÙØ¹ اÙÙ ÙÙ. أعد اÙÙ ØØ§ÙÙØ©.'},false)); 392 xhr.addEventListener('abort',()=>done({ok:false,message:'ØªÙ Ø¥ÙØºØ§Ø¡ Ø±ÙØ¹ اÙÙ ÙÙ'},false)); 393 xhr.send(options.body||null); 394 }catch(e){done({ok:false,message:e&&e.message||'تعذر بدء Ø±ÙØ¹ اÙÙ ÙÙ'},false);} 395 }); 396 } 397 398 async function svgUrlToPngBlob(svgUrl){ 399 const r=await fetch(svgUrl,{credentials:'include',cache:'no-store'}); 400 if(!r.ok) throw new Error('تعذر تØÙ ÙÙ Ø§ÙØ¨Ø·Ø§ÙØ©'); 401 const svg=await r.text(); 402 const blob=new Blob([svg],{type:'image/svg+xml;charset=utf-8'}); 403 const url=URL.createObjectURL(blob); 404 try{ 405 const img=await new Promise((resolve,reject)=>{const im=new Image();im.onload=()=>resolve(im);im.onerror=()=>reject(new Error('تعذر تØÙÙÙ Ø§ÙØ¨Ø·Ø§ÙØ© ÙØµÙرة'));im.src=url;}); 406 const canvas=document.createElement('canvas'); 407 const ratio=Math.max(2,Math.min(3,window.devicePixelRatio||2)); 408 canvas.width=Math.round((img.naturalWidth||720)*ratio); 409 canvas.height=Math.round((img.naturalHeight||432)*ratio); 410 const ctx=canvas.getContext('2d'); 411 ctx.fillStyle='#ffffff';ctx.fillRect(0,0,canvas.width,canvas.height); 412 ctx.drawImage(img,0,0,canvas.width,canvas.height); 413 return await new Promise((resolve,reject)=>canvas.toBlob(b=>b?resolve(b):reject(new Error('ÙØ´Ù Ø¥ÙØ´Ø§Ø¡ PNG')),'image/png',0.96)); 414 }finally{URL.revokeObjectURL(url);} 415 } 416 async function saveCardPng(svgUrl,fileName,store){ 417 try{ 418 if(store){store.state.busy=true;store.state.msg='جار٠تجÙÙØ² Ø§ÙØ¨Ø·Ø§ÙØ© ÙØµÙرة PNG...';} 419 const blob=await svgUrlToPngBlob(svgUrl); 420 const name=(fileName||'gzc-membership-card')+'.png'; 421 const file=new File([blob],name,{type:'image/png'}); 422 if(store) store.state.busy=false; 423 if(navigator.canShare&&navigator.canShare({files:[file]})&&navigator.share){ 424 await navigator.share({title:'Ø¨Ø·Ø§ÙØ© عضÙÙØ© SMT',text:'Ø¨Ø·Ø§ÙØ© عضÙÙØ© Ù ÙØµØ© SMT China',files:[file]}); 425 if(store) store.state.msg='ØªÙ ÙØªØ Ù Ø´Ø§Ø±ÙØ© اÙÙØ§ØªÙ. اختر ØÙظ Ø§ÙØµÙرة Ø£Ù Ø§ÙØµÙر.'; 426 return; 427 } 428 const url=URL.createObjectURL(blob); 429 const a=document.createElement('a');a.href=url;a.download=name;document.body.appendChild(a);a.click();a.remove(); 430 setTimeout(()=>URL.revokeObjectURL(url),60000); 431 if(store) store.state.msg='ت٠تجÙÙØ² Ø§ÙØµÙرة. إذا ÙÙ ØªÙØÙØ¸ تÙÙØ§Ø¦ÙØ§ÙØ Ø§ÙØªØÙا Ù Ù Ø§ÙØªÙزÙÙØ§Øª.'; 432 }catch(e){if(store){store.state.busy=false;store.state.msg=e.message||'ÙØ´Ù ØÙظ Ø§ÙØ¨Ø·Ø§ÙØ© ÙØµÙرة';}} 433 } 434 435 function createGzcStoreCore(){ 436 const state=reactive({platformBranding:{}, 437 me:null,busy:false,msg:'',interaction:{active:false,count:0,label:'',kind:'',started_at:0},upload:{active:false,progress:0,label:'',loaded:0,total:0},home:null,dash:{},notifications:[],unread:0,memberNotifications:[],memberUnread:0,memberWorkflowSummary:{total:0,needs_action:0,in_progress:0,confirmed:0,completed:0,unread:0},visitorAnalytics:{},storageUsage:{},operationsOverview:{},myWork:{summary:{total:0,overdue:0,mine:0,snoozed:0},items:[]},events:[],eventMeta:{total:0,page:1,limit:30,has_more:false,counts:{total:0,active:0,completed:0,archived:0,media:0}},upcomingEvents:[],engagement:{total_points:0,recent:[],rules:[]},announcements:[],circulars:[],announcementUnread:0,officialAnnouncementUnread:0,digitalServices:[],adminCases:[],emergencie
437s:[],eventMedia:{},eventArchivedMedia:{},eventAudio:[],mediaLibrary:{totals:{},storage:{},items:[],filters:{}}, 438 systemHealth:{},offsiteBackupSettings:{config:{s3:{enabled:false,endpoint:'',region:'auto',bucket:'',prefix:'gzc',tiers:['weekly','monthly']},ssh:{enabled:false,host:'',port:22,user:'',base_path:'/var/backups/gzc',tiers:['weekly','monthly']}},overview:{}},auditLogs:[],auditCounts:[],auditTotals:[],whatsappHealth:{},whatsappQueue:{jobs:[],counts:[],audit:[],worker:{}},whatsappSettings:{templates:{},whatsapp:{}},whatsappNotificationPolicy:{policy:{enabled:true,domains:{},events:{}},catalog:{domains:[],events:[]},otp_independent:true},platformOptions:{groups:[],options:{}},publicOptions:{groups:[],options:{}},countries:[],officialSources:[],workflowHealth:{workflows:[]},officialAccounts:[],communities:[],platform:{name_ar:'Ù ÙØµØ© SMT China'}, 439 members:[],memberTotal:0,memberHasMore:false,memberPage:1,committees:[],selectedMember:null, 440 filters:{search:'',status:'all',role_filter:'all',country_code:'all',city:'all',district:'all',community_id:'all',category:'all',sudan_city:'all'}, community:null, 441 locale:'ar',locales:[{code:'ar',label_ar:'Ø§ÙØ¹Ø±Ø¨ÙØ©',label_en:'Arabic',dir:'rtl'}],localesLoaded:false 442 }); 443 const admin=computed(()=>state.me&&state.me.admin?state.me.admin:null); 444 const official=computed(()=>state.me&&state.me.official?state.me.official:null); 445 const ME_CACHE_MS=15000; 446 let meLoadedAt=0; 447 let meInFlight=null;
448 function invalidateMeCache(){meLoadedAt=0;meInFlight=null;} 449 async function loadMe(force=false){ 450 const now=Date.now(); 451 if(!force&&meLoadedAt&&now-meLoadedAt<ME_CACHE_MS)return state.me; 452 if(!force&&meInFlight)return meInFlight; 453 const request=api('/api/me',{feedback:false}).then(r=>{state.me=r;meLoadedAt=Date.now();return state.me;}); 454 meInFlight=request; 455 try{return await request;}finally{if(meInFlight===request)meInFlight=null;} 456 } 457 async function requireAdmin(router){ 458 const me=await loadMe(); 459 if(!me||!me.authenticated||!me.admin){router.replace('/admin/login');return false;} 460 return true; 461 } 462 async function loadNotifications(status){const qs=status?('?status='+encodeURIComponent(status)):'';const r=await api('/api/admin/notifications'+qs);state.notifications=safeArray(r.notifications);state.unread=Number(r.unread||0);return r;} 463 async function loadMemberNotifications(status='all',limit=40){if(!(state.me&&state.me.authenticated&&state.me.member))return{ok:false,notifications:[],unread:0};const qs=new URLSearchParams({status:String(status||'all'),limit:String(limit||40)});const r=await api('/api/member/notifications?'+qs.toString(),{feedback:false});if(r&&r.ok){state.memberNotifications=safeArray(r.notifications);state.memberUnread=Number(r.unread||0);}return r;} 464 async function loadMemberWorkflowSummary(){if(!(state.me&&state.me.authenticated&&state.me.member))return{ok:false};const r=await api('/api/member/orders',{feedback:false});if(r&&r.ok)state.memberWorkflowSummary=Object.assign({total:0,needs_action:0,in_progress:0,quoted:0,confirmed:0,completed:0,unread:0},r.summary||{});return r;} 465 async function loadPublicContent(){ 466 await loadMe(); 467 if(state.me&&state.me.authenticated&&state.me.member){ 468 await Promise.all([ 469 api('/api/events').then(r=>{state.events=safeArray(r.events)}), 470 api('/api/events/upcoming').then(r=>{state.upcomingEvents=safeArray(r.events)}), 471 api('/api/member/engagement').then(r=>{if(r&&r.ok)state.engagement=r;}), 472 Promise.all([api('/api/announcements?engine=announcement'),api('/api/announcements?engine=circular')]).then(([ar,cr])=>{const announcements=safeArray(ar.announcements);const circulars=safeArray(cr.announcements);state.announcements=announcements;state.circulars=circulars;state.announcementUnread=announcements.filter(a=>a.unread_by_me).length;state.officialAnnouncementUnread=circulars.filter(a=>a.unread_by_me).length;}) 473 ]); 474 } 475 } 476 async function markAnnouncementsRead(channel){const payload=channel?{channel}:{};const r=await api('/api/announcements/mark-read',{method:'POST',body:JSON.stringify(payload)});if(r&&r.ok){if(channel==='announcement'){state.announcements=safeArray(state.announcements).map(a=>Object.assign({},a,{read_by_me:true,unread_by_me:false}));}else if(channel==='embassy'||channel==='consulate'||channel==='official'||channel==='circular'){state.circulars=safeArray(state.circulars).map(a=>{const match=channel==='official'||channel==='circular'||a.channel===channel;return match?Object.assign({},a,{read_by_me:true,unread_by_me:false}):a;});}else{state.announcements=safeArray(state.announcements).map(a=>Object.assign({},a,{read_by_me:true,unread_by_me:false}));state.circulars=safeArray(state.circulars).map(a=>Object.assign({},a,{read_by_me:true,unread_by_me:false}));}state.announcementUnread=safeArray(state.announcements).filter(a=>a.unread_by_me).length;state.officialAnnouncementUnread=safeArray(state.circulars).filter(a=>a.unread_by_me).length;}return r;} 477 async function loadPublicOptions(){const [r,c]=await Promise.all([api('/api/options',{feedback:false}),api('/api/platform/countries',{feedback:false})]);if(r&&r.ok)state.publicOptions=r;if(c&&c.ok)state.countries=safeArray(c.countries);return r;} 478 async function loadWorkflowHealth(router){state.busy=true;const r=await api('/api/admin/workflows');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.workflowHealth=r||{workflows:[]};state.busy=false;return r;} 479 async function loadCommunity(){ 480 const r=await api('/api/community-profile'); 481 state.community=(r&&r.community)||{}; 482 return state.community; 483 } 484 async function requireMember(router,nextPath){ 485 const me=await loadMe(); 486 if(!me||!me.authenticated||!me.member){ 487 if(nextPath) try{sessionStorage.setItem('gzc_vue_next',nextPath)}catch(e){} 488 router.replace('/login'); return false;
489 } 490 if(profileNeedsCompletion(me.member) && router && router.currentRoute && router.currentRoute.value && router.currentRoute.value.path!=='/complete'){ 491 state.msg='Ø£ÙÙ Ù Ø¨ÙØ§Ùات٠أÙÙØ§Ù. ÙØ§ ÙÙ ÙÙ Ø§Ø³ØªØ®Ø¯Ø§Ù Ø£Ù ØµÙØØ© Ø£Ø®Ø±Ù ÙØ¨Ù Ø¥ÙÙ Ø§Ù Ø§ÙØªØ³Ø¬ÙÙ.'; 492 router.replace('/complete'); return false; 493 } 494 return true; 495 } 496 async function requirePublicAccess(router,nextPath){ 497 const me=await loadMe(); 498 if(!me||!me.authenticated||(!me.member&&!me.official)){ 499 if(nextPath) try{sessionStorage.setItem('gzc_vue_next',nextPath)}catch(e){} 500 router.replace('/login'); return false; 501 } 502 if(me.member && profileNeedsCompletion(me.member) && router && router.currentRoute && router.currentRoute.value && router.currentRoute.value.path!=='/complete'){ 503 state.msg='Ø£ÙÙ Ù Ø¨ÙØ§Ùات٠أÙÙØ§Ù. ÙØ§ ÙÙ ÙÙ Ø§Ø³ØªØ®Ø¯Ø§Ù Ø£Ù ØµÙØØ© Ø£Ø®Ø±Ù ÙØ¨Ù Ø¥ÙÙ Ø§Ù Ø§ÙØªØ³Ø¬ÙÙ.'; 504 router.replace('/complete'); return false; 505 } 506 return true; 507 } 508 async function requireOfficial(router){ 509 const me=await loadMe(); 510 if(!me||!me.authenticated||!me.official){router.replace('/official/login');return false;} 511 const path=router&&router.currentRoute&&router.currentRoute.value&&router.currentRoute.value.path; 512 if(needsOfficialTour(me.official)&&path!=='/official/tour'){state.msg='Ø§ÙØ±Ø¬Ø§Ø¡ ÙØ±Ø§Ø¡Ø© جÙÙØ© Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù ٠أÙÙØ§Ù ÙÙØ°Ø§ Ø§ÙØ±ÙÙ .';router.replace('/official/tour');return false;} 513 return true; 514 } 515 async function loadAdminOverview(router){ 516 state.busy=true; 517 const [ops,myWork]=await Promise.all([ 518 api('/api/admin/operations-overview'), 519 api('/api/admin/my-work?limit=10'), 520 api('/api/admin/committees').then(r=>{state.committees=safeArray(r.committees)}), 521 loadNotifications('open') 522 ]); 523 if(ops&&ops.status===401){state.busy=false;router&&router.replace('/admin/login');return;} 524 state.operationsOverview=ops||{}; 525 state.myWork=(myWork&&myWork.ok)?myWork:{summary:{total:0,overdue:0,mine:0,snoozed:0},items:[]}; 526 state.dash=(ops&&ops.counts)||{}; 527 state.busy=false; 528 } 529 async function loadMembers(append,router){ 530 if(!append) state.memberPage=1; 531 state.busy=true; 532 const f=state.filters; 533 const qs=new URLSearchParams({status:f.status||'all',role_filter:f.role_filter||'all',country_code:f.country_code||'all',city:f.city||'all',district:f.district||'all',community_id:f.community_id||'all',category:f.category||'all',sudan_city:f.sudan_city||'all',search:f.search||'',page:String(state.memberPage),limit:'20'}); 534 const r=await api('/api/admin/members?'+qs.toString()); 535 if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;} 536 state.memberTotal=Number(r.total||0); state.memberHasMore=!!r.has_more; 537 state.members=append?state.members.concat(safeArray(r.members)):safeArray(r.members); 538 state.busy=false; 539 } 540 async function loadMoreMembers(router){state.memberPage++; await loadMembers(true,router);} 541 async function loadMember(id,router){state.busy=true;const r=await api('/api/admin/members/'+encodeURIComponent(id)); if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;} state.selectedMember=r; state.busy=false;} 542 async function loadAdminCases(bucket,router){state.busy=true;const qs=bucket?('?bucket='+encodeURIComponent(bucket)):'';const r=await api('/api/admin/cases'+qs);if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.adminCases=safeArray(r.cases);state.busy=false;return r;} 543 async function loadAdminEmergencies(router){state.busy=true;const r=await api('/api/admin/emergencies');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.emergencies=safeArray(r.emergencies);state.busy=false;return r;} 544 async function loadAdminEvents(router,opts){ 545 const o=opts||{}; if(!o.append)state.busy=true; 546 const qs=new URLSearchParams({page:String(o.page||1),limit:String(o.limit||30),status:o.status||'all',search:o.search||''}); 547 const r=await api('/api/admin/events?'+qs.toString()); 548 if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;} 549 state.events=o.append?state.events.concat(safeArray(r.events)):safeArray(r.events); 550 state.eventMeta={total:Number(r.total||0),page:Number(r.page||1),limit:Number(r.limit||30),has_more:!!r.has_more,counts:r.counts||state.eventMeta.counts||{}}; 551 state.busy=false;return r; 552 } 553 async function loadAdminEvent(id,router){ 554 const r=await api('/api/admin/events/'+encodeURIComponent(id)); 555 if(r.status===401){router&&router.replace('/admin/login');return;} 556 if(r.ok&&r.event){const i=state.events.findIndex(x=>String(x.id)===String(id));if(i>=0)state.events.splice(i,1,r.event);else state.events=[r.event];} 557 return r; 558 } 559 function replaceEvent(event){if(!event||!event.id)return;const i=state.events.findIndex(x=>String(x.id)===String(event.id));if(i>=0)state.events.splice(i,1,event);else state.events.unshift(event);} 560 async function loadEventMedia(eventId,router){state.busy=true;const r=await api('/api/admin/events/'+encodeURIComponent(eventId)+'/media');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.eventMedia[eventId]=safeArray(r.media);state.busy=false;return r;} 561 async function loadArchivedEventMedia(eventId,router){state.busy=true;const r=await api('/api/admin/events/'+encodeURIComponent(eventId)+'/media/archived');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.eventArchivedMedia[eventId]=safeArray(r.media);state.busy=false;return r;} 562 async function loadEventAudio(router){state.busy=true;const r=await api('/api/admin/event-audio');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.eventAudio=safeArray(r.audio);state.busy=false;return r;} 563 async function loadMediaLibrary(filters,router){state.busy=true;const qs=new URLSearchParams(filters||{});const r=await api('/api/admin/media-library?'+qs.toString());if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.mediaLibrary=r||{totals:{},storage:{},items:[],filters:{}};state.busy=false;return r;} 564 async function loadAdminAnnouncements(router){state.busy=true;const r=await api('/api/admin/announcements');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.announcements=safeArray(r.announcements);state.busy=false;return r;} 565 async function loadVisitorAnalytics(filters,router){state.busy=true;const qs=new URLSearchParams(filters||{});const r=await api('/api/admin/visitor-analytics?'+qs.toString());if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.visitorAnalytics=r||{};state.busy=false;return r;} 566 async function loadSystemHealth(router){state.busy=true;const r=await api('/api/admin/system-health');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.systemHealth=r||{};state.busy=false;return r;} 567 async function loadOffsiteBackupSettings(router){state.busy=true;const r=await api('/api/admin/settings/offsite-backups');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.offsiteBackupSettings=r||state.offsiteBackupSettings;state.busy=false;return r;} 568 async function saveOffsiteBackupSettings(payload,router){state.busy=true;const r=await api('/api/admin/settings/offsite-backups',{method:'POST',body:JSON.stringify(payload||{})});if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}if(r&&r.ok)state.offsiteBackupSettings=r;state.msg=(r&&r.message)||'';state.busy=false;return r;} 569 async function loadAuditLogs(params,router){state.busy=true;const qs=new URLSearchParams(params||{});const r=await api('/api/admin/audit-logs?'+qs.toString());if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.auditLogs=safeArray(r.logs);state.auditCounts=safeArray(r.counts);state.auditTotals=safeArray(r.totals);state.busy=false;return r;} 570 async function loadWhatsappHealth(router){state.busy=true;const r=await api('/api/admin/settings/whatsapp-health');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.whatsappHealth=(r&&r.health)||{};state.busy=false;return r;} 571 async function loadWhatsappQueue(status,router){state.busy=true;const qs=status?('?status='+encodeURIComponent(status)):'';const r=await api('/api/admin/whatsapp-queue'+qs);if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.whatsappQueue=r||{jobs:[],counts:[],audit:[],worker:{}};state.busy=false;return r;} 572 async function loadWhatsappSettings(router){state.busy=true;const r=await api('/api/admin/settings/templates');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.whatsappSettings=r||{templates:{},whatsapp:{}};state.busy=false;return r;} 573 async function loadWhatsappNotificationPolicy(router){state.busy=true;const r=await api('/api/admin/settings/whatsapp-notifications');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.whatsappNotificationPolicy=r||{policy:{enabled:true,domains:{},events:{}},catalog:{domains:[],events:[]},otp_independent:true};state.busy=false;return r;} 574 async function loadPlatformBranding(router){state.busy=true;const r=await api('/api/admin/platform-branding');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.platformBranding=(r&&r.branding)||{};state.busy=false;return r;} 575 async function loadReleaseInfo(router){state.busy=true;const r=await api('/api/admin/release-info');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.releaseInfo=r||{};state.busy=false;return r;} 576 async function loadSeo(router){state.busy=true;const r=await api('/api/admin/seo');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.seo=r||{seo:{},robots:'',sitemap_preview:''};state.busy=false;return r;} 577 async function saveSeo(payload,router){state.busy=true;const r=await api('/api/admin/seo',{method:'POST',body:JSON.stringify(payload||{})});if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.seo=r||{};state.busy=false;return r;} 578 579 // UI-002: Ø§ÙØ¹ÙÙØ§Ù Ù ØÙÙÙÙ Ø®Ø§Ø¯Ù ÙØ§Ù بÙsafeUrlØ ÙÙØ°Ø§ تØÙ٠ثاÙÙ ÙØ¨Ù ØÙÙÙ ÙÙ url() 580 function applyHeroImage(b){try{const u=b&&b.heroImageUrl;const root=document.documentElement;if(typeof u==='string'&&u.charAt(0)==='/'&&u.charAt(1)!=='/'&&!/[\s"'<>\\]/.test(u)&&u.indexOf('..')<0)root.style.setProperty('--smt-hero-image','url("'+u+'")');else root.style.removeProperty('--smt-hero-image');}catch(e){}} 581 async function loadPublicBranding(){const r=await api('/api/platform/branding');state.platformBranding=(r&&r.branding)||state.platformBranding||{};applyHeroImage(state.platformBranding);return r;} 582 583 async function loadCommunities(router){state.busy=true;const r=await api('/api/admin/communities');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.communities=safeArray(r.communities);state.platform=r.platform||state.platform;state.busy=false;return r;} 584 async function loadOfficialAccounts(router){state.busy=true;const r=await api('/api/admin/official-accounts');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.officialAccounts=safeArray(r.accounts).map(a=>Object.assign({},a,{_phones:safeArray(a.phones).map(p=>p.phone).concat(['','','']).slice(0,3),_status:a.status||'active',_can_publish:!!a.can_publish}));state.busy=false;return r;} 585 async function loadPlatformOptions(router){state.busy=true;const r=await api('/api/admin/options');if(r.status===401){state.busy=false;router&&router.replace('/admin/login');return;}state.platformOptions=r||{groups:[],options:{}};state.busy=false;return r;} 586 async function loadOfficialDashboard(router){state.busy=true;const r=await api('/api/official/dashboard');if(r.status===401){state.busy=false;router&&router.replace('/official/login');return;}state.dash=r.counts||{};state.busy=false;return r;} 587 async function loadOfficialMembers(append,router){if(!append)state.memberPage=1;state.busy=true;const f=state.filters;const qs=new URLSearchParams({status:f.status||'all',search:f.search||'',page:String(state.memberPage),limit:'30'});const r=await api('/api/official/members?'+qs.toString());if(r.status===401){state.busy=false;router&&router.replace('/official/login');return;}state.memberTotal=Number(r.total||0);state.memberHasMore=!!r.has_more;state.members=append?state.members.concat(safeArray(r.members)):safeArray(r.members);state.busy=false;return r;} 588 async function loadOfficialMember(id,router){state.busy=true;const r=await api('/api/official/members/'+encodeURIComponent(id));if(r.status===401){state.busy=false;router&&router.replace('/official/login');return;}state.selectedMember=r;state.busy=false;return r;} 589 async function loadOfficialCases(type,router){state.busy=true;const qs=type?('?type='+encodeURIComponent(type)):'';const r=await api('/api/official/cases'+qs);if(r.status===401){state.busy=false;router&&router.replace('/official/login');return;}state.adminCases=safeArray(r.cases);state.busy=false;return r;}
590 async function loadOfficialEmergencies(router){state.busy=true;const r=await api('/api/official/emergencies');if(r.status===401){state.busy=false;router&&router.replace('/official/login');return;}state.emergencies=safeArray(r.emergencies);state.busy=false;return r;} 591 async function loadOfficialAnnouncements(router){state.busy=true;const r=await api('/api/official/announcements');if(r.status===401){state.busy=false;router&&router.replace('/official/login');return;}state.announcements=safeArray(r.announcements);state.busy=false;return r;} 592 async function logout(router,target){state.busy=true;await api('/api/auth/logout',{method:'POST'});state.busy=false;state.me=null;invalidateMeCache();state.msg='ت٠تسجÙÙ Ø§ÙØ®Ø±Ùج';router.replace(target||'/admin/login');} 593 return {state,admin,official,loadMe,invalidateMeCache,requireAdmin,requireMember,requirePublicAccess,requireOfficial,loadPublicContent,markAnnouncementsRead,loadPublicOptions,loadWorkflowHealth,loadCommunity,loadAdminOverview,loadNotifications,loadMemberNotifications,loadMemberWorkflowSummary,loadMembers,loadMoreMembers,loadMember,loadAdminCases,loadAdminEmergencies,loadAdminEvents,loadAdminEvent,replaceEvent,loadEventMedia,loadArchivedEventMedia,loadEventAudio,loadMediaLibrary,loadAdminAnnouncements,loadVisitorAnalytics,loadSystemHealth,loadOffsiteBackupSettings,saveOffsiteBackupSettings,loadAuditLogs,loadWhatsappHealth,loadWhatsappQueue,loadWhatsappSettings,loadWhatsappNotificationPolicy,loadPlatformBranding,loadReleaseInfo,loadSeo,saveSeo,loadPublicBranding,loadOfficialAccounts,loadCommunities,loadPlatformOptions,loadOfficialDashboard,loadOfficialMembers,loadOfficialMember,loadOfficialCases,loadOfficialEmergencies,loadOfficialAnnouncements,logout}; 594 } 595 const __gzcPiniaStore=window.Pinia.defineStore('gzc-platform',()=>createGzcStoreCore()); 596 function useGzcStore(){ 597 if(__gzcStore) return __gzcStore; 598 if(!window.__GZC_PINIA) throw new Error('Pinia runtime is not initialized'); 599 __gzcStore=__gzcPiniaStore(window.__GZC_PINIA); 600 return __gzcStore; 601 } 602 603 const AdminFrame={ 604 props:['title'], 605 setup(){ 606 const store=useGzcStore(); const router=useRouter(); const route=useRoute(); 607 const drawerOpen=ref(false); const collapsed=ref(false); 608 try{collapsed.value=localStorage.getItem('gzc_admin_sidebar_collapsed')==='1';}catch(e){} 609 const expandedGroups=ref({}); 610 try{expandedGroups.value=JSON.parse(localStorage.getItem('gzc_admin_group_expanded')||'{}')||{};}catch(e){expandedGroups.value={};} 611 const plan=[ 612 {key:'work',label:'ع٠ÙÙ',icon:'tasks',items:[['/admin','ع٠ÙÙ','tasks'],['/admin/notifications','اÙÙØ§Ø±Ø¯ ÙØ§ÙÙ ÙØ§Ù ','tasks'],['/admin/search','Ø¨ØØ« شا٠Ù','search'],['/admin/daily-utility','تشغÙÙ SMT China اÙÙÙÙ Ù','overview','secondary'],['/admin/visitors','Ø§ÙØ²Ùار ÙØ§ÙØ¥ØØµØ§Ø¦Ùات','overview','secondary']]}, 613 {key:'community',label:'Ø§ÙØ£Ø¹Ø¶Ø§Ø¡',icon:'members',items:[['/admin/members','Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ ÙØ§ÙØ·ÙØ¨Ø§Øª','members'],['/admin/emergency','Ø§ÙØ·Ùارئ','emergency'],['/admin/arrivals','اÙÙØµÙ٠إÙÙ Ø§ÙØµÙÙ','arrivals'],['/admin/help','Ø·ÙØ¨Ø§Øª اÙ٠ساعدة','help'],['/admin/country-communities','جاÙÙØ§Øª Ø§ÙØ¯ÙÙ','members','secondary'],['/admin/city-coverage','ØªØºØ·ÙØ© اÙ٠دÙ','content','secondary'],['/admin/city-hubs','Ù Ø±Ø§ÙØ² اÙ٠دÙ','communities','secondary'],['/admin/communities','اÙÙ Ø¯Ù ÙØ§Ù٠جت٠عات','communities','secondary'],['/admin/participation-points','ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©','rewards','secondary']]}, 614 {key:'business',label:'Ø§ÙØ£Ø¹Ù اÙ',icon:'sourcing',items:[['/admin/procurement','Ø·ÙØ¨Ø§Øª Ø§ÙØªÙØ±ÙØ¯','procurement'],['/admin/orders','Ø§ÙØ·Ùبات اÙÙ Ø¤ÙØ¯Ø©','procurement'],['/admin/wallet','Ù ØÙظة SMT','wallet']]}, 615 {key:'content',label:'اÙÙ ØØªÙÙ',icon:'content',items:[['/admin/announcements','Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª','content'],['/admin/content-intake','Ø¥ÙØ´Ø§Ø¡ Ù ØØªÙÙ','content'],['/admin/events','اÙÙØ¹Ø§ÙÙØ§Øª','events'],['/admin/china-guide','دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ','content'],['/admin/trade-shipping','Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ','content','secondary'],['/admin/taxonomy','Ø§ÙØªØµÙÙÙØ§Øª ÙØ§ÙدÙÙ ÙØ§Ù٠سارات','content','secondary'],['/admin/media','Ù ÙØªØ¨Ø© اÙÙØ³Ø§Ø¦Ø·','content','secondary'],['/admin/feedback','اÙÙ ÙØ§ØØ¸Ø§Øª ÙØ§ÙتصØÙØØ§Øª','feedback','secondary']]}, 616 {key:'ai',label:'Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ',icon:'system',items:[['/admin/ai-research','اÙ٠راجعة ÙØ§ÙÙ ØØªÙÙ','content'],['/admin/ai-operations','تشغÙÙ Ø§ÙØ¨ØØ« ÙØ§Ùإعدادات','system'],['/admin/ai-efficiency','اÙÙÙØ§Ø¡Ø© ÙØ§ÙÙ Ø±Ø¯ÙØ¯','content'],['/admin/engineering-advisor','اÙ٠ستشار اÙÙÙØ¯Ø³Ù AI','system','secondary']]}, 617 {key:'communication',label:'Ø§ÙØªÙاصÙ',icon:'communications',items:[['/admin/official-accounts','Ø§ÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ±Ø³Ù ÙØ©','communications'],['/admin/whatsapp','رسائ٠WhatsApp','communications']]}, 618 {key:'system',label:'اÙÙØ¸Ø§Ù ',icon:'system',items:[['/admin/supervisors','اÙ٠ستخد٠ÙÙ ÙØ§ÙØµÙØ§ØÙات','governance'],['/admin/committees','اÙÙØ¬Ø§Ù','governance'],['/admin/options','اÙÙÙØ§Ø¦Ù ÙØ§ÙØ®ÙØ§Ø±Ø§Øª','system','secondary'],['/admin/platform','ÙÙÙØ© اÙÙ ÙØµØ© ÙØ§ÙتطبÙÙ','system','secondary'],['/admin/community','ع٠اÙÙ ÙØµØ©','communities','secondary'],['/admin/brand-assets','أصÙ٠اÙÙÙÙØ© Ø§ÙØ¨ØµØ±ÙØ©','system','secondary'],['/admin/workflows','٠سارات Ø§ÙØ¹Ù Ù','governance','secondary'],['/admin/audit','Ø³Ø¬Ù Ø§ÙØªØ¯ÙÙÙ','governance','secondary'],['/admin/health','ØµØØ© اÙÙØ¸Ø§Ù ÙØ§ÙÙØ³Ø® Ø§ÙØ§ØØªÙØ§Ø·ÙØ©','system','secondary'],['/admin/backup-settings','اÙÙØ³Ø® Ø§ÙØ®Ø§Ø±Ø¬ÙØ© ÙØ§ÙتعاÙÙ','system','secondary'],['/admin/whatsapp-settings','إعدادات ÙØ§ØªØ³Ø§Ø¨ Ø§ÙØªÙÙÙØ©','system','secondary'],['/admin/system','ØªØ´Ø®ÙØµ اÙÙØ¸Ø§Ù ','system','secondary'],['/admin/seo','SEO','system','secondary'],['/admin/releases','Ø§ÙØ¥ØµØ¯Ø§Ø±Ø§Øª','system','secondary'],['/admin/pwa','تطبÙÙ PWA','system','secondary'],['/admin/demo','Ø£Ø¯ÙØ§Øª Ø§ÙØ§Ø®ØªØ¨Ø§Ø±','system','secondary']]} 619 ]; 620 const admin=computed(()=>store.state.me&&store.state.me.admin||null); 621 const allowedGroups=computed(()=>plan.map(g=>Object.assign({},g,{items:g.items.filter(x=>adminCan(admin.value,x[2]))})).filter(g=>g.items.length)); 622 function active(p){return route.path===p || (p!=='/admin' && route.path.startsWith(p)) || (p==='/admin/events'&&route.path.startsWith('/admin/event/'));} 623 const groups=computed(()=>allowedGroups.value); 624 const activeGroup=computed(()=>allowedGroups.value.find(g=>g.items.some(x=>active(x[0])))||allowedGroups.value[0]||null); 625 function groupHasSecondary(g){return !!(g&&g.items&&g.items.some(x=>x[3]==='secondary'));} 626 function groupExpanded(g){return !!(g&&expandedGroups.value&&expandedGroups.value[g.key]);} 627 function visibleItems(g){if(!g)return[];if(groupExpanded(g))return g.items;return g.items.filter(x=>x[3]!=='secondary'||active(x[0]));} 628 const localItems=computed(()=>{const g=activeGroup.value;if(!g)return[];const items=visibleItems(g);return items.length>1&&items.length<=5?items:[];}); 629 function toggleGroup(g){if(!g)return;expandedGroups.value=Object.assign({},expandedGroups.value,{[g.key]:!groupExpanded(g)});try{localStorage.setItem('gzc_admin_group_expanded',JSON.stringify(expandedGroups.value));}catch(e){}} 630 function go(p){drawerOpen.value=false;router.push(p);} 631 function toggleSidebar(){collapsed.value=!collapsed.value;try{localStorage.setItem('gzc_admin_sidebar_collapsed',collapsed.value?'1':'0');}catch(e){}} 632 function iconPath(name){return ({overview:'M4 13h6V4H4v9Zm10 7h6V11h-6v9Zm0-16v5h6V4h-6ZM4 20h6v-5H4v5Z',tasks:'M5 4h14v16H5V4Zm3 4h8M8 12h8M8 16h5',members:'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8-3h5m-2.5-2.5v5',content:'M4 4h16v16H4V4Zm4 4h8M8 12h8M8 16h5',sourcing:'M3 7h18M6 3v4m12-4v4M5 11h14v9H5v-9Zm3 3h3',communications:'M4 5h16v12H7l-3 3V5Zm4 4h8m-8 4h5',system:'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0-5v2m0 14v2M3 12h2m14 0h2M5.6 5.6 7 7m10 10 1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4'}[name])||'';} 633 function headerIconPath(name){return ({search:'M11 4a7 7 0 1 0 4.9 12L21 21l1-1-5.1-5.1A7 7 0 0 0 11 4Zm0 2a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z',tasks:'M6 3h9l4 4v14H6V3Zm8 2v3h3M9 11h6M9 15h6M9 19h4',account:'M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 9a7 7 0 0 1 14 0'}[name])||'';} 634 watch(()=>route.fullPath,()=>{drawerOpen.value=false;}); 635 onMounted(()=>
635{if(admin.value)store.loadNotifications().catch(()=>{});}); 636 return {store,router,drawerOpen,collapsed,groups,activeGroup,localItems,active,go,toggleSidebar,roleName,iconPath,headerIconPath,visibleItems,groupHasSecondary,groupExpanded,toggleGroup}; 637 }, 638 render:(function(){ 639const _Vue = Vue 640const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 641 642const _hoisted_1 = ["onClick"] 643const _hoisted_2 = { 644 class: "adminSidebar", 645 "aria-label": "Ø§ÙØªÙÙÙ Ø§ÙØ¥Ø¯Ø§Ø±Ù" 646} 647const _hoisted_3 = { class: "adminBrand" } 648const _hoisted_4 = ["onClick", "aria-label"] 649const _hoisted_5 = { class: "adminNav" } 650const _hoisted_6 = { class: "adminNavGroupTitle" } 651const _hoisted_7 = { 652 viewBox: "0 0 24 24", 653 "aria-hidden": "true" 654} 655const _hoisted_8 = ["d"] 656const _hoisted_9 = ["onClick"] 657const _hoisted_10 = { key: 0 } 658const _hoisted_11 = ["onClick"] 659const _hoisted_12 = { 660 key: 0, 661 class: "adminSidebarAccount" 662} 663const _hoisted_13 = ["onClick"] 664const _hoisted_14 = ["onClick"] 665const _hoisted_15 = { class: "adminWorkspace" } 666const _hoisted_16 = { class: "adminHeader" } 667const _hoisted_17 = ["onClick"] 668const _hoisted_18 = { class: "adminHeaderTitle" } 669const _hoisted_19 = { key: 0 } 670const _hoisted_20 = { class: "adminHeaderActions" } 671const _hoisted_21 = ["onClick"] 672const _hoisted_22 = { 673 viewBox: "0 0 24 24", 674 "aria-hidden": "true" 675} 676const _hoisted_23 = ["d"] 677const _hoisted_24 = ["onClick"] 678const _hoisted_25 = { 679 viewBox: "0 0 24 24", 680 "aria-hidden": "true" 681} 682const _hoisted_26 = ["d"] 683const _hoisted_27 = { key: 0 } 684const _hoisted_28 = ["onClick"] 685const _hoisted_29 = { 686 viewBox: "0 0 24 24", 687 "aria-hidden": "true" 688} 689const _hoisted_30 = ["d"] 690const _hoisted_31 = { 691 key: 0, 692 class: "adminLocalNav", 693 "aria-label": "Ø§ÙØªÙÙ٠داخ٠اÙÙØ³Ù " 694} 695const _hoisted_32 = ["onClick"] 696const _hoisted_33 = { class: "adminPage" } 697 698return function render(_ctx, _cache) { 699 with (_ctx) { 700 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, createCommentVNode: _createCommentVNode, normalizeClass: _normalizeClass, renderSlot: _renderSlot } = _Vue 701 702 return (_openBlock(), _createElementBlock("section", { class: _normalizeClass(["adminShell", {sidebarCollapsed:collapsed,drawerOpen:drawerOpen}]) }, [_createElementVNode("div", { 703 class: "adminDrawerScrim", 704 onClick: $event => (drawerOpen=false) 705 }, null, 8, _hoisted_1), _createElementVNode("aside", _hoisted_2, [_createElementVNode("div", _hoisted_3, [_cache[0] || (_cache[0] = _createElementVNode("a", { 706 class: "smtBrandLink", 707 href: "https://smtchgz.cn", 708 target: "_blank", 709 rel: "noopener noreferrer", 710 "aria-label": "ÙØªØ Ù ÙÙØ¹ SMT Advanced Business" 711 }, [_createElementVNode("img", { 712 src: "/brand/smt-gold-v1/smt-logo-transparent.png", 713 alt: "SMT" 714 })], -1)), _cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("b", null, "SMT China"), _createElementVNode("small", null, "ÙÙØØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø©")], -1)), _createElementVNode("button", { 715 class: "adminSidebarCollapse", 716 onClick: toggleSidebar, 717 "aria-label": collapsed?'ØªÙØ³Ùع اÙÙØ§Ø¦Ù Ø©':'ط٠اÙÙØ§Ø¦Ù Ø©' 718 }, "â¹", 8, _hoisted_4)]), _createElementVNode("nav", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(groups, (g) => { 719 return (_openBlock(), _createElementBlock("section", { 720 key: g.key, 721 class: _normalizeClass({activeGroup:activeGroup&&activeGroup.key===g.key}) 722 }, [_createElementVNode("div", _hoisted_6, [(_openBlock(), _createElementBlock("svg", _hoisted_7, [_createElementVNode("path", { d: iconPath(g.icon) }, null, 8, _hoisted_8)])), _createElementVNode("span", null, _toDisplayString(g.label), 1)]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleItems(g), (item) => { 723 return (_openBlock(), _createElementBlock("button", { 724 key: item[0], 725 class: _normalizeClass({active:active(item[0])}), 726 onClick: $event => (go(item[0])) 727 }, [_cache[2] || (_cache[2] = _createElementVNode("span", { class: "adminNavDot" }, null, -1)), _createElementVNode("span", null, _toDisplayString(item[1]), 1), (item[0]==='/admin/notifications'&&store.state.unread) 728 ? (_openBlock(), _createElementBlock("b", _hoisted_10, _toDisplayString(store.state.unread), 1)) 729 : _createCommentVNode("", true)], 10, _hoisted_9)) 730 }), 128)), (groupHasSecondary(g)) 731 ? (_openBlock(), _createElementBlock("button", { 732 key: 0, 733 class: "adminGroupMore", 734 onClick: $event => (toggleGroup(g)) 735 }, [_createElementVNode("span", null, _toDisplayString(groupExpanded(g)?'عرض Ø£ÙÙ':'اÙÙ Ø²ÙØ¯'), 1), _createElementVNode("b", null, _toDisplayString(groupExpanded(g)?'â':'+'), 1)], 8, _hoisted_11)) 736 : _createCommentVNode("", true)], 2)) 737 }), 128))]), (store.state.me&&store.state.me.admin) 738 ? (_openBlock(), _createElementBlock("div", _hoisted_12, [_createElementVNode("button", { onClick: $event => (go('/admin/account')) }, [_createElementVNode("span", null, _toDisplayString(store.state.me.admin.name||'Admin'), 1), _createElementVNode("small", null, _toDisplayString(roleName(store.state.me.admin.role)), 1)], 8, _hoisted_13), _createElementVNode("button", { 739 class: "danger", 740 onClick: $event => (store.logout(router)) 741 }, "Ø®Ø±ÙØ¬", 8, _hoisted_14)])) 742 : _createCommentVNode("", true)]), _createElementVNode("div", _hoisted_15, [_
742createElementVNode("header", _hoisted_16, [_createElementVNode("button", { 743 class: "adminMenuButton", 744 onClick: $event => (drawerOpen=true), 745 "aria-label": "ÙØªØ ÙØ§Ø¦Ù Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©" 746 }, "â°", 8, _hoisted_17), _createElementVNode("div", _hoisted_18, [activeGroup 747 ? (_openBlock(), _createElementBlock("small", _hoisted_19, _toDisplayString(activeGroup.label), 1)) 748 : _createCommentVNode("", true), _createElementVNode("h1", null, _toDisplayString(title), 1)]), _createElementVNode("div", _hoisted_20, [ 749 _cache[6] || (_cache[6] = _createElementVNode("a", { 750 class: "adminHeaderSmtLink", 751 href: "https://smtchgz.cn", 752 target: "_blank", 753 rel: "noopener noreferrer", 754 "aria-label": "Ù ÙÙØ¹ SMT Advanced Business", 755 title: "SMT Advanced Business" 756 }, [_createElementVNode("img", { 757 src: "/brand/smt-gold-v1/smt-icon-192.png", 758 alt: "SMT" 759 })], -1)), 760 _createElementVNode("button", { 761 class: "adminHeaderActionButton", 762 onClick: $event => (go('/admin/search')), 763 "aria-label": "Ø§ÙØ¨ØØ« Ø§ÙØ´Ø§Ù Ù", 764 title: "Ø§ÙØ¨ØØ« Ø§ÙØ´Ø§Ù Ù" 765 }, [(_openBlock(), _createElementBlock("svg", _hoisted_22, [_createElementVNode("path", { d: headerIconPath('search') }, null, 8, _hoisted_23)])), _cache[3] || (_cache[3] = _createElementVNode("span", null, "Ø¨ØØ«", -1))], 8, _hoisted_21), 766 _createElementVNode("button", { 767 class: "adminBell adminHeaderActionButton", 768 onClick: $event => (go('/admin/notifications')), 769 "aria-label": "اÙÙ ÙØ§Ù ÙØ§Ùإشعارات", 770 title: "اÙÙ ÙØ§Ù ÙØ§Ùإشعارات" 771 }, [(_openBlock(), _createElementBlock("svg", _hoisted_25, [_createElementVNode("path", { d: headerIconPath('tasks') }, null, 8, _hoisted_26)])), _cache[4] || (_cache[4] = _createElementVNode("span", null, "Ù ÙØ§Ù ", -1)), (store.state.unread) 772 ? (_openBlock(), _createElementBlock("b", _hoisted_27, _toDisplayString(store.state.unread), 1)) 773 : _createCommentVNode("", true)], 8, _hoisted_24), 774 _createElementVNode("button", { 775 class: "adminAccountButton adminHeaderActionButton", 776 onClick: $event => (go('/admin/account')), 777 "aria-label": "Ø§ÙØØ³Ø§Ø¨", 778 title: "Ø§ÙØØ³Ø§Ø¨" 779 }, [(_openBlock(), _createElementBlock("svg", _hoisted_29, [_createElementVNode("path", { d: headerIconPath('account') }, null, 8, _hoisted_30)])), _cache[5] || (_cache[5] = _createElementVNode("span", { class: "srOnly" }, "Ø§ÙØØ³Ø§Ø¨", -1))], 8, _hoisted_28) 780 ])]), (localItems.length) 781 ? (_openBlock(), _createElementBlock("nav", _hoisted_31, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(localItems, (item) => { 782 return (_openBlock(), _createElementBlock("button", { 783 key: item[0], 784 class: _normalizeClass({active:active(item[0])}), 785 onClick: $event => (go(item[0])) 786 }, _toDisplayString(item[1]), 11, _hoisted_32)) 787 }), 128))])) 788 : _createCommentVNode("", true), _createElementVNode("main", _hoisted_33, [_renderSlot($slots, "default")])])], 2)) 789 } 790} 791})() 792 }; 793 794 const LoginPage={ 795 setup(){ 796 const store=useGzcStore(); const router=useRouter(); const route=useRoute(); const phone=ref(''); const code=ref(''); const otp=ref(false); 797 onMounted(()=>{}); 798 async function requestOtp(){store.state.busy=true;store.state.msg='جار٠إرسا٠اÙÙÙØ¯...';const r=await api('/api/auth/request-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),purpose:'admin_login'})});store.state.busy=false;store.state.msg=r.message||r.error||'';otp.value=!!r.ok;} 799 async function verifyOtp(){store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø§ÙØªØÙÙ...';const r=await api('/api/auth/verify-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),code:code.value,purpose:'admin_login'})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){await store.loadMe(true);router.replace('/admin');}} 800 return {store,phone,code,otp,requestOtp,verifyOtp}; 801 }, 802 render:(function(){ 803const _Vue = Vue
804const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 805 806const _hoisted_1 = { class: "card" } 807const _hoisted_2 = ["onUpdate:modelValue"] 808const _hoisted_3 = ["onClick"] 809const _hoisted_4 = ["onUpdate:modelValue"] 810const _hoisted_5 = ["onClick"] 811 812return function render(_ctx, _cache) { 813 with (_ctx) { 814 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode } = _Vue 815 816 return (_openBlock(), _createElementBlock("section", null, [_cache[2] || (_cache[2] = _createElementVNode("div", { class: "top" }, [_createElementVNode("h2", null, "دخÙÙ Ø§ÙØ¥Ø¯Ø§Ø±Ø©")], -1)), _createElementVNode("div", _hoisted_1, [ 817 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©", -1)), 818 _cache[1] || (_cache[1] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ¨ رÙÙ ÙØ§ØªØ³Ø§Ø¨ Ø¨Ø£Ù ØµÙØºØ©Ø ÙØ³Ùت٠تصØÙØÙ تÙÙØ§Ø¦ÙاÙ. ٠ثاÙ: 008613660699600 â 8613660699600", -1)), 819 _withDirectives(_createElementVNode("input", { 820 class: "ltr", 821 "onUpdate:modelValue": $event => ((phone) = $event), 822 placeholder: "رÙÙ ÙØ§ØªØ³Ø§Ø¨" 823 }, null, 8, _hoisted_2), [[_vModelText, phone]]), 824 _createElementVNode("button", { 825 class: "btn", 826 onClick: requestOtp 827 }, "إرسا٠اÙÙÙØ¯", 8, _hoisted_3), 828 otp 829 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_withDirectives(_createElementVNode("input", { 830 class: "ltr otpInput", 831 "onUpdate:modelValue": $event => ((code) = $event), 832 inputmode: "numeric", 833 autocomplete: "one-time-code", 834 maxlength: "6", 835 placeholder: "ر٠ز Ø§ÙØªØÙÙ" 836 }, null, 8, _hoisted_4), [[_vModelText, code]]), _createElementVNode("button", { 837 class: "btn", 838 onClick: verifyOtp 839 }, "تØÙÙ", 8, _hoisted_5)], 64)) 840 : _createCommentVNode("", true) 841 ])])) 842 } 843} 844})() 845 }; 846 847 const DashboardPage={ 848 components:{AdminFrame}, 849 setup(){ 850 const store=useGzcStore(); const router=useRouter(); 851 const refreshedAt=ref(''); const selectedWorkMode=ref('all'); const workMenuOpen=ref({}); 852 const admin=computed(()=>store.state.me&&store.state.me.admin||null); 853 const ops=computed(()=>store.state.operationsOverview||{}); 854 const priorities=computed(()=>safeArray(ops.value.priorities)); 855 const myWork=computed(()=>store.state.myWork||{summary:{},items:[]}); 856 const workItems=computed(()=>safeArray(myWork.value.items).slice(0,10)); 857 const workSummary=computed(()=>myWork.value.summary||{}); 858 const hasOpenWork=computed(()=>Number(workSummary.value.total||0)>0||workItems.value.length>0); 859 const calmWorkState=computed(()=>!hasOpenWork.value&&!priorities.value.length&&!recentTasks.value.length); 860 const recentTasks=computed(()=>safeArray(ops.value.recent_notifications).slice(0,5)); 861 const quickActions=computed(()=>{ 862 const out=[]; 863 if(adminCan(admin.value,'members'))out.push({label:'Ø¥Ø¶Ø§ÙØ© عضÙ',path:'/admin/register'}); 864 if(adminCan(admin.value,'content'))out.push({label:'Ø¥ÙØ´Ø§Ø¡ Ù ØØªÙÙ',path:'/admin/content-intake'}); 865 if(adminCan(admin.value,'procurement'))out.push({label:'Ø·ÙØ¨Ø§Øª Ø§ÙØªÙØ±ÙØ¯',path:'/admin/procurement'}); 866 if(adminCan(admin.value,'events'))out.push({label:'اÙÙØ¹Ø§ÙÙØ§Øª',path:'/admin/events'}); 867 out.push({label:'Ø¨ØØ« شا٠Ù',path:'/admin/search'}); 868 return out.slice(0,5); 869 }); 870 const workModes=[['all','اÙÙÙ'],['overdue','٠تأخر'],['mine','Ø¹ÙØ¯Ù'],['snoozed','٠ؤجÙ']]; 871 function severityLabel(v){return ({critical:'عاجÙ',high:'Ø£ÙÙÙÙØ©',normal:'٠تابعة'}[String(v||'')])||'٠تابعة';} 872 function workTypeLabel(v){return ({emergency:'Ø·ÙØ§Ø±Ø¦',member_pending:'عضÙÙØ©',case_arrival:'ÙØµÙÙ',case_help:'٠ساعدة',case_membership:'٠تابعة عضÙ',procurement_overdue:'ØªÙØ±Ùد ٠تأخر',procurement_current:'ØªÙØ±Ùد',wallet_activation:'Ù ØÙظة',content_verification:'إعادة تØÙÙ',content_pending:'Ù ØØªÙÙ',content_intake:'Ù ØØªÙÙ ÙØ§Ø±Ø¯',feedback:'Ù ÙØ§ØØ¸Ø©',message_failure:'ÙØ§ØªØ³Ø§Ø¨'}[String(v||'')])||'Ù ÙÙ Ø©';} 873 function workAgeLabel(x){const m=Math.max(0,Number(x&&x.age_minutes||0));if(m<60)return m+' د';const h=Math.floor(m/60);if(h<24)return h+' س';
873const d=Math.floor(h/24);return d+' ÙÙÙ ';} 874 function workOwnerLabel(x){const c=x&&x.claim||{};if(!c.active)return'ØºÙØ± ٠ستÙÙ Ø©';if(c.mine)return'Ø¹ÙØ¯Ù';return c.claimed_by_name?('Ø¹ÙØ¯ '+c.claimed_by_name):'Ø¹ÙØ¯ ٠سؤÙ٠آخر';} 875 async function load(showMessage){if(!(await store.requireAdmin(router)))return;selectedWorkMode.value='all';await store.loadAdminOverview(router);refreshedAt.value=new Date().toLocaleTimeString('ar-EG',{hour:'2-digit',minute:'2-digit'});if(showMessage)store.state.msg='ØªÙ ØªØØ¯ÙØ« ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ù Ù';} 876 async function selectWorkMode(mode){selectedWorkMode.value=String(mode||'all');workMenuOpen.value={};const r=await api('/api/admin/my-work?limit=10&mode='+encodeURIComponent(selectedWorkMode.value));if(r&&r.ok)store.state.myWork=r;else store.state.msg=r.message||'تعذر تØÙ ÙÙ ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ù Ù';} 877 async function claimWork(x){if(!x)return;const r=await api('/api/admin/tasks/'+encodeURIComponent(x.type)+'/'+encodeURIComponent(x.id)+'/claim',{method:'POST',body:'{}'});store.state.msg=r.message||'';if(r.ok)await selectWorkMode(selectedWorkMode.value);} 878 async function releaseWork(x){if(!x)return;const r=await api('/api/admin/tasks/'+encodeURIComponent(x.type)+'/'+encodeURIComponent(x.id)+'/release',{method:'POST',body:'{}'});store.state.msg=r.message||'';workMenuOpen.value={};if(r.ok)await selectWorkMode(selectedWorkMode.value);} 879 async function snoozeWork(x){if(!x)return;const r=await api('/api/admin/tasks/'+encodeURIComponent(x.type)+'/'+encodeURIComponent(x.id)+'/snooze',{method:'POST',body:JSON.stringify({hours:4})});store.state.msg=r.message||'';workMenuOpen.value={};if(r.ok)await selectWorkMode(selectedWorkMode.value);} 880 async function openWork(x){if(x&&x.route)await router.push(x.route);} 881 async function openTask(n){if(!n||!n.id)return;await router.push('/admin/task/'+encodeURIComponent(n.id));} 882 function openPriority(p){if(p&&p.path)router.push(p.path);} 883 function toggleWorkMenu(x){if(!x)return;const k=String(x.type)+':'+String(x.id);workMenuOpen.value=Object.assign({},workMenuOpen.value,{[k]:!workMenuOpen.value[k]});} 884 function workMenuIsOpen(x){return !!(x&&workMenuOpen.value[String(x.type)+':'+String(x.id)]);} 885 onMounted(()=>load(false)); 886 return {store,admin,ops,myWork,workItems,workSummary,hasOpenWork,calmWorkState,priorities,recentTasks,quickActions,workModes,selectedWorkMode,workMenuOpen,severityLabel,workTypeLabel,workAgeLabel,workOwnerLabel,refreshedAt,load,selectWorkMode,claimWork,releaseWork,snoozeWork,openWork,openTask,openPriority,toggleWorkMenu,workMenuIsOpen,shortDate}; 887 }, 888 render:(function(){ 889const _Vue = Vue 890const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 891 892const _hoisted_1 = { class: "adminWorkHero" } 893const _hoisted_2 = { class: "adminWorkHeroStats" } 894const _hoisted_3 = { key: 0 } 895const _hoisted_4 = ["onClick"] 896const _hoisted_5 = { key: 1 } 897const _hoisted_6 = { 898 key: 0, 899 class: "card adminTaskFirstPanel", 900 "aria-label": "ÙØ§Ø¦Ù Ø© ع٠ÙÙ" 901} 902const _hoisted_7 = { class: "adminSectionHead" } 903const _hoisted_8 = { class: "adminPriorityCount" } 904const _hoisted_9 = { 905 class: "adminWorkFilterBar", 906 role: "tablist", 907 "aria-label": "تصÙÙØ© ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ù Ù" 908} 909const _hoisted_10 = ["onClick"] 910const _hoisted_11 = { key: 0 } 911const _hoisted_12 = { key: 1 } 912const _hoisted_13 = { key: 2 } 913const _hoisted_14 = { 914 key: 0, 915 class: "adminTaskRows adminTaskFirstRows" 916} 917const _hoisted_15 = ["onClick"] 918const _hoisted_16 = { class: "adminWorkTitleLine" } 919const _hoisted_17 = { class: "statusPill" } 920const _hoisted_18 = { class: "adminWorkFacts" } 921const _hoisted_19 = { class: "adminWorkActions adminTaskFirstActions" } 922const _hoisted_20 = ["onClick"] 923const _hoisted_21 = ["onClick"] 924const _hoisted_22 = { 925 key: 1, 926 class: "adminWorkMoreWrap" 927} 928const _hoisted_23 = ["onClick"] 929const _hoisted_24 = { 930 key: 0, 931 class: "adminWorkMoreMenu" 932} 933const _hoisted_25 = ["onClick"] 934const _hoisted_26 = ["onClick"] 935const _hoisted_27 = { 936 key: 1, 937 class: "adminEmptyState compact" 938} 939const _hoisted_28 = { 940 key: 1, 941 class: "adminQuickActions adminQuickActionsPrimary", 942 "aria-label": "اختصارات Ø³Ø±ÙØ¹Ø©" 943} 944const _hoisted_29 = ["onClick"] 945const _hoisted_30 = { 946 key: 0, 947 class: "card adminPriorityPanel adminOperationalSummaryPanel" 948} 949const _hoisted_31 = { class: "adminPriorityRows" } 950const _hoisted_32 = ["onClick"] 951const _hoisted_33 = { class: "adminPriorityTitle" } 952const _hoisted_34 = { 953 key: 1, 954 class: "card adminIncomingPanel" 955} 956const _hoisted_35 = { class: "adminSectionHead" } 957const _hoisted_36 = ["onClick"] 958const _hoisted_37 = { class: "adminTaskRows compact" } 959const _hoisted_38 = ["onClick"] 960const _hoisted_39 = { 961 key: 3, 962 class: "card adminDecisionCalm adminWorkZeroState" 963} 964const _hoisted_40 = ["onClick"] 965 966return function render(_ctx, _cache) { 967 with (_ctx) {
968 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 969 970 const _component_AdminFrame = _resolveComponent("AdminFrame") 971 972 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ع٠ÙÙ" }, { 973 default: _withCtx(() => [ 974 _createElementVNode("section", _hoisted_1, [_cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ع٠ÙÙ"), _createElementVNode("h2", null, "٠ا Ø§ÙØ°Ù ÙØØªØ§Ø¬ إجراء Ù ÙÙ Ø§ÙØ¢ÙØ"), _createElementVNode("p", null, "ÙØ§Ø¦Ù Ø© ÙØ§ØØ¯Ø© ٠رتبة ØØ³Ø¨ Ø§ÙØ§Ø³ØªØ¹Ø¬Ø§Ù ÙØ§Ùع٠ر ÙÙ ÙØ¹Ø¯ Ø§ÙØ¥Ø¬Ø±Ø§Ø¡Ø Ø¶Ù Ù ØµÙØ§ØÙات٠ÙÙØ·Ø§ÙÙ ÙÙØ·.")], -1)), _createElementVNode("div", _hoisted_2, [ 975 _createElementVNode("strong", null, _toDisplayString(workSummary.total||0), 1), 976 _cache[0] || (_cache[0] = _createElementVNode("span", null, "Ù ÙÙ Ø© Ù ÙØªÙØØ©", -1)), 977 (workSummary.overdue) 978 ? (_openBlock(), _createElementBlock("small", _hoisted_3, _toDisplayString(workSummary.overdue) + " ٠تأخرة", 1)) 979 : _createCommentVNode("", true), 980 _createElementVNode("button", { 981 class: "smallbtn secondary", 982 onClick: $event => (load(true)) 983 }, "ØªØØ¯ÙØ«", 8, _hoisted_4), 984 refreshedAt 985 ? (_openBlock(), _createElementBlock("small", _hoisted_5, "آخر ØªØØ¯ÙØ« " + _toDisplayString(refreshedAt), 1)) 986 : _createCommentVNode("", true) 987 ])]), 988 hasOpenWork 989 ? (_openBlock(), _createElementBlock("section", _hoisted_6, [_createElementVNode("div", _hoisted_7, [_createElementVNode("div", null, [_cache[2] || (_cache[2] = _createElementVNode("span", { class: "adminEyebrow" }, "ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ù Ù", -1)), _cache[3] || (_cache[3] = _createElementVNode("h3", null, "أعÙÙ 10 Ù ÙØ§Ù ØªØØªØ§Ø¬ تÙÙÙØ°Ø§Ù", -1)), _createElementVNode("small", null, _toDisplayString(workSummary.mine||0) + " Ø¹ÙØ¯Ù · " + _toDisplayString(workSummary.snoozed||0) + " Ù Ø¤Ø¬ÙØ©", 1)]), _createElementVNode("span", _hoisted_8, _toDisplayString(workItems.length), 1)]), _createElementVNode("div", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(workModes, (m) => { 990 return (_openBlock(), _createElementBlock("button", { 991 key: m[0], 992 class: _normalizeClass({active:selectedWorkMode===m[0]}), 993 onClick: $event => (selectWorkMode(m[0])) 994 }, [_createTextVNode(_toDisplayString(m[1]), 1), (m[0]==='overdue'&&workSummary.overdue) 995 ? (_openBlock(), _createElementBlock("b", _hoisted_11, _toDisplayString(workSummary.overdue), 1)) 996 : (m[0]==='mine'&&workSummary.mine) 997 ? (_openBlock(), _createElementBlock("b", _hoisted_12, _toDisplayString(workSummary.mine), 1)) 998 : (m[0]==='snoozed'&&workSummary.snoozed) 999 ? (_openBlock(), _createElementBlock("b", _hoisted_13, _toDisplayString(workSummary.snoozed), 1)) 1000 : _createCommentVNode("", true)], 10, _hoisted_10)) 1001 }), 128))]), (workItems.length) 1002 ? (_openBlock(), _createElementBlock("div", _hoisted_14, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(workItems, (x) => { 1003 return (_openBlock(), _createElementBlock("article", { 1004 key: x.type+':'+x.id, 1005 class: _normalizeClass(["adminTaskRow adminWorkItem adminTaskFirstItem", {overdue:x.overdue,mine:x.claim&&x.claim.mine}]) 1006 }, [_createElementVNode("span", { class: _normalizeClass(["adminTaskState", {unread:x.overdue}]) }, null, 2), _createElementVNode("button", { 1007 class: "adminWorkMain", 1008 onClick: $event => (openWork(x)) 1009 }, [_createElementVNode("div", _hoisted_16, [_createElementVNode("b", null, _toDisplayString(x.title), 1), _createElementVNode("span", _hoisted_17, _toDisplayString(workTypeLabel(x.type)), 1
1009)]), _createElementVNode("p", null, _toDisplayString(x.subtitle||x.next_action), 1), _createElementVNode("div", _hoisted_18, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(workAgeLabel(x)), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "Ø§ÙØ¹Ù ر", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(workOwnerLabel(x)), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.next_action||'ÙØªØ'), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1))])])], 8, _hoisted_15), _createElementVNode("div", _hoisted_19, [_createElementVNode("button", { 1010 class: "smallbtn", 1011 onClick: $event => (openWork(x)) 1012 }, _toDisplayString(x.next_action||'ÙØªØ'), 9, _hoisted_20), (!(x.claim&&x.claim.active)) 1013 ? (_openBlock(), _createElementBlock("button", { 1014 key: 0, 1015 class: "smallbtn secondary", 1016 onClick: $event => (claimWork(x)) 1017 }, "Ø§Ø³ØªÙØ§Ù ", 8, _hoisted_21)) 1018 : _createCommentVNode("", true), (!(x.claim&&x.claim.active&&!x.claim.mine)) 1019 ? (_openBlock(), _createElementBlock("div", _hoisted_22, [_createElementVNode("button", { 1020 class: "smallbtn secondary adminWorkMoreButton", 1021 onClick: $event => (toggleWorkMenu(x)), 1022 "aria-label": "إجراءات إضاÙÙØ©" 1023 }, "â¯", 8, _hoisted_23), (workMenuIsOpen(x)) 1024 ? (_openBlock(), _createElementBlock("div", _hoisted_24, [(x.claim&&x.claim.mine) 1025 ? (_openBlock(), _createElementBlock("button", { 1026 key: 0, 1027 onClick: $event => (releaseWork(x)) 1028 }, "إرجاع ÙÙÙØ§Ø¦Ù Ø©", 8, _hoisted_25)) 1029 : _createCommentVNode("", true), _createElementVNode("button", { onClick: $event => (snoozeWork(x)) }, "تأجÙÙ 4 ساعات", 8, _hoisted_26)])) 1030 : _createCommentVNode("", true)])) 1031 : _createCommentVNode("", true)])], 2)) 1032 }), 128))])) 1033 : (_openBlock(), _createElementBlock("div", _hoisted_27, _cache[7] || (_cache[7] = [_createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ Ù ÙØ§Ù ÙÙ ÙØ°Ø§ اÙÙÙØªØ±", -1), _createElementVNode("span", null, "اختر «اÙÙÙ» Ø£Ù ÙÙØªØ±Ùا آخر ÙØ¹Ø±Ø¶ اÙÙ ÙØ§Ù اÙÙ ÙØªÙØØ©.", -1)])))])) 1034 : _createCommentVNode("", true), 1035 (quickActions.length) 1036 ? (_openBlock(), _createElementBlock("section", _hoisted_28, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(quickActions, (x) => { 1037 return (_openBlock(), _createElementBlock("button", { 1038 key: x.path, 1039 onClick: $event => ($router.push(x.path)) 1040 }, _toDisplayString(x.label), 9, _hoisted_29)) 1041 }), 128))])) 1042 : _createCommentVNode("", true), 1043 (priorities.length || recentTasks.length) 1044 ? (_openBlock(), _createElementBlock("section", { 1045 key: 2, 1046 class: _normalizeClass(["adminDecisionGrid adminWorkSecondaryGrid", {single:!priorities.length || !recentTasks.length}]) 1047 }, [(priorities.length) 1048 ? (_openBlock(), _createElementBlock("div", _hoisted_30, [_cache[8] || (_cache[8] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ØµÙØ±Ø© عا٠ة"), _createElementVNode("h3", null, "Ø§ÙØ¹Ù Ù ØØ³Ø¨ اÙ٠جاÙ"), _createElementVNode("small", null, "ÙØ°Ù ٠ؤشرات ØªØ¬Ù ÙØ¹ÙØ©Ø Ø§ÙØªÙÙÙØ° اÙÙØ¹ÙÙ ÙØªÙ Ù Ù ÙØ§Ø¦Ù Ø© «ع٠ÙÙ» Ø£Ø¹ÙØ§Ù.")])], -1)), _createElementVNode("div", _hoisted_31, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(priorities, (p) => { 1049 return (_openBlock(), _createElementBlock("button", { 1050 key: p.key, 1051 class: _normalizeClass(['adminPriorityRow',p.severity]), 1052 onClick: $event => (openPriority(p)) 1053 }, [_createElementVNode("div", null, [_createElementVNode("div", _hoisted_33, [_createElementVNode("b", null, _toDisplayString(p.label), 1), _createElementVNode("span", { class: _normalizeClass(['priorityPill',p.severity]) }
1053, _toDisplayString(severityLabel(p.severity)), 3)]), _createElementVNode("p", null, _toDisplayString(p.reason), 1), _createElementVNode("small", null, _toDisplayString(p.next_action), 1)]), _createElementVNode("strong", null, _toDisplayString(p.count), 1)], 10, _hoisted_32)) 1054 }), 128))])])) 1055 : _createCommentVNode("", true), (recentTasks.length) 1056 ? (_openBlock(), _createElementBlock("div", _hoisted_34, [_createElementVNode("div", _hoisted_35, [_cache[9] || (_cache[9] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙØ§Ø±Ø¯"), _createElementVNode("h3", null, "آخر اÙÙ ÙØ§Ù ÙØ§Ùإشعارات")], -1)), _createElementVNode("button", { 1057 class: "smallbtn secondary", 1058 onClick: $event => ($router.push('/admin/notifications')) 1059 }, "عرض اÙÙÙ", 8, _hoisted_36)]), _createElementVNode("div", _hoisted_37, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(recentTasks, (n) => { 1060 return (_openBlock(), _createElementBlock("button", { 1061 key: n.id, 1062 class: "adminTaskRow", 1063 onClick: $event => (openTask(n)) 1064 }, [_createElementVNode("span", { class: _normalizeClass(["adminTaskState", {unread:n.status==='unread'}]) }, null, 2), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(n.title || 'Ù ÙÙ Ø© Ø¥Ø¯Ø§Ø±ÙØ©'), 1), _createElementVNode("p", null, _toDisplayString(n.body || 'Ø§ÙØªØ Ø§ÙØ³Ø¬Ù اÙ٠رتبط ÙØ¥Ù٠ا٠اÙÙ ÙÙ Ø©.'), 1), _createElementVNode("small", null, _toDisplayString(shortDate(n.created_at)), 1)]), _cache[10] || (_cache[10] = _createElementVNode("em", null, "ÙØªØ", -1))], 8, _hoisted_38)) 1065 }), 128))])])) 1066 : _createCommentVNode("", true)], 2)) 1067 : _createCommentVNode("", true), 1068 calmWorkState 1069 ? (_openBlock(), _createElementBlock("section", _hoisted_39, [_cache[11] || (_cache[11] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminZeroCheck" }, "â"), _createElementVNode("div", null, [_createElementVNode("b", null, "ÙØ§ ÙÙØ¬Ø¯ Ø¹Ù Ù ÙØØªØ§Ø¬ تدخÙÙ Ø§ÙØ¢Ù"), _createElementVNode("p", null, "Ù٠اÙÙ ÙØ§Ù Ø¶Ù Ù ØµÙØ§ØÙات٠ÙÙØ·Ø§ÙÙ Ù ÙØ¬Ø²Ø© Ø£Ù ÙØ§ ØªÙØ¬Ø¯ Ù ÙØ§Ù Ù ÙØªÙØØ© ØØ§ÙÙØ§Ù.")])], -1)), _createElementVNode("button", { 1070 class: "smallbtn secondary", 1071 onClick: $event => ($router.push('/admin/notifications')) 1072 }, "٠راجعة اÙÙØ§Ø±Ø¯", 8, _hoisted_40)])) 1073 : _createCommentVNode("", true) 1074 ]), 1075 _: 1 1076 })) 1077 } 1078} 1079})() 1080 }; 1081 1082 const AdminVisitorAnalyticsPage={ 1083 components:{AdminFrame}, 1084 setup(){ 1085 const store=useGzcStore(); const router=useRouter(); 1086 const filters=reactive({period:'30d',audience:'public',country:'',page_group:'all'}); 1087 const data=computed(()=>store.state.visitorAnalytics||{}); 1088 const summary=computed(()=>data.value.summary||{}); 1089 const trend=computed(()=>safeArray(data.value.trend)); 1090 const topCountries=computed(()=>safeArray(data.value.topCountries)); 1091 const topPages=computed(()=>safeArray(data.value.topPages)); 1092 const topSources=computed(()=>safeArray(data.value.topSources)); 1093 const devices=computed(()=>safeArray(data.value.devices)); 1094 const browsers=computed(()=>safeArray(data.value.browsers)); 1095 const operatingSystems=computed(()=>safeArray(data.value.operatingSystems)); 1096 const recentVisits=computed(()=>safeArray(data.value.recentVisits)); 1097 const recentAutomation=computed(()=>safeArray(data.value.recentAutomation)); 1098 const automationSummary=computed(()=>data.value.automationSummary||{}); 1099 const topPagesPreview=computed(()=>topPages.value.slice(0,5)); 1100 const topCountriesPreview=computed(()=>topCountries.value.slice(0,5)); 1101 const topSourcesPreview=computed(()=>topSources.value.slice(0,5)); 1102 const showAllPages=ref(false); const showAllCountries=ref(false); const showAllSources=ref(false); 1103 const visiblePages=computed(()=>showAllPages.value?topPages.value:topPagesPreview.value); 1104 const visibleCountries=computed(()=>showAllCountries.value?topCountries.value:topCountriesPreview.value); 1105 const visibleSources=computed(()=>showAllSources.value?topSources.value:topSourcesPreview.value); 1106 const recentPage=ref(1); const recentPageSize=6; 1107 const recentPageCount=computed(()=>Math.max(1,Math.ceil(recentVisits.value.length/recentPageSize))); 1108 const visibleRecentVisits=computed(()=>
1108recentVisits.value.slice((recentPage.value-1)*recentPageSize,recentPage.value*recentPageSize)); 1109 const periodLabel=computed(()=>data.value.period&&data.value.period.label||'30 ÙÙÙ '); 1110 const trendMax=computed(()=>Math.max(1,...trend.value.map(x=>Number(x.pageviews||0)))); 1111 const dimensionReady=computed(()=>Number(summary.value.dimension_coverage_pct||0)>=20); 1112 function visitorTypeName(v){return ({guest:'زائر',member:'عضÙ',admin:'إدارة',official:'ØØ³Ø§Ø¨ رس٠Ù',bot:'Bot',scanner:'Scanner'}[String(v||'')])||String(v||'-');} 1113 function trafficSourceName(v){return ({direct:'٠باشر',search:'Ù ØØ±Ùات Ø§ÙØ¨ØØ«',social:'Ø´Ø¨ÙØ§Øª Ø§Ø¬ØªÙ Ø§Ø¹ÙØ©',referral:'Ø¥ØØ§ÙØ© Ù Ù Ù ÙÙØ¹',internal:'تÙÙ٠داخÙÙ',campaign:'ØÙ ÙØ©',unknown:'ØºÙØ± ٠تÙÙØ± ØªØ§Ø±ÙØ®ÙاÙ'}[String(v||'')])||String(v||'-');} 1114 function deviceName(v){return ({mobile:'ÙØ§ØªÙ',tablet:'Ø¬ÙØ§Ø² ÙÙØÙ',desktop:'Ù٠بÙÙØªØ±',other:'Ø¬ÙØ§Ø² آخر',unknown:'ØºÙØ± ٠تÙÙØ± ØªØ§Ø±ÙØ®ÙاÙ'}[String(v||'')])||String(v||'-');} 1115 function pageGroupName(v){return ({all:'ÙÙ Ø§ÙØ£Ùسا٠',home:'Ø§ÙØ±Ø¦ÙØ³ÙØ©',guide:'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ',trade:'Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ',auth:'Ø§ÙØ¯Ø®ÙÙ ÙØ§ÙتسجÙÙ',account:'Ø§ÙØØ³Ø§Ø¨ ÙØ§Ùخد٠ات',events:'اÙÙØ¹Ø§ÙÙØ§Øª',content:'اÙÙ ØØªÙÙ',support:'Ø§ÙØ¯Ø¹Ù ÙØ§ÙØ·ÙØ§Ø±Ø¦',business:'Ø·ÙØ¨Ø§Øª Ø§ÙØªÙØ±ÙØ¯',other:'أخرÙ',admin:'Ø§ÙØ¥Ø¯Ø§Ø±Ø©'}[String(v||'')])||String(v||'-');} 1116 function changeText(v){if(v===null||v===undefined)return 'Ø¬Ø¯ÙØ¯';v=Number(v||0);return (v>0?'+':'')+v+'%';} 1117 function changeClass(v){if(v===null||v===undefined)return 'neutral';v=Number(v||0);return v>0?'up':v<0?'down':'neutral';} 1118 function barHeight(v){return Math.max(5,Math.round((Number(v||0)/trendMax.value)*100));} 1119 function barWidth(v,rows){const max=Math.max(1,...safeArray(rows).map(x=>Number(x.visitors||0)));return Math.max(3,Math.round((Number(v||0)/max)*100));} 1120 function bucketLabel(v){const d=new Date(v);if(Number.isNaN(d.getTime()))return String(v||'');return data.value.period&&data.value.period.bucket==='hour'?d.toLocaleTimeString('ar',{hour:'2-digit'}):d.toLocaleDateString('ar',{month:'short',day:'numeric'});} 1121 function trendTitle(x){return bucketLabel(x&&x.bucket)+' â '+Number(x&&x.visitors||0)+' Ø²Ø§Ø¦Ø±Ø '+Number(x&&x.pageviews||0)+' Ù Ø´Ø§ÙØ¯Ø©';} 1122 async function load(showMessage){if(!(await store.requireAdmin(router)))return;recentPage.value=1;await store.loadVisitorAnalytics(filters,router);if(showMessage)store.state.msg='ØªÙ ØªØØ¯ÙØ« Ø¥ØØµØ§Ø¦Ùات Ø§ÙØ²Ùار';} 1123 function setPeriod(v){filters.period=v;load(false);} 1124 function resetFilters(){Object.assign(filters,{period:'30d',audience:'public',country:'',page_group:'all'});load(false);} 1125 onMounted(()=>load(false)); 1126 return {store,filters,data,summary,trend,topCountries,topPages,topSources,visiblePages,visibleCountries,visibleSources,showAllPages,showAllCountries,showAllSources,devices,browsers,operatingSystems,recentVisits,visibleRecentVisits,recentPage,recentPageCount,recentAutomation,automationSummary,periodLabel,dimensionReady,visitorTypeName,trafficSourceName,deviceName,pageGroupName,changeText,changeClass,barHeight,barWidth,bucketLabel,trendTitle,countryFlag,shortDate,load,setPeriod,resetFilters}; 1127 }, 1128 render:(function(){ 1129const _Vue = Vue 1130const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 1131 1132const _hoisted_1 = { class: "adminOverviewHero visitorAnalyticsHero visitorIntelHero" } 1133const _hoisted_2 = { class: "adminOverviewHeroSide" } 1134const _hoisted_3 = ["disabled", "onClick"] 1135const _hoisted_4 = { 1136 class: "card visitorFilterBar", 1137 "aria-label": "ÙÙØ§ØªØ± Ø¥ØØµØ§Ø¦Ùات Ø§ÙØ²Ùار" 1138} 1139const _hoisted_5 = { 1140 class: "visitorPeriodChips", 1141 role: "group", 1142 "aria-label": "اÙÙØªØ±Ø©" 1143} 1144const _hoisted_6 = ["onClick"] 1145const _hoisted_7 = { class: "visitorFilterFields" } 1146const _hoisted_8 = ["onUpdate:modelValue", "onChange"] 1147const _hoisted_9 = ["onUpdate:modelValue", "onChange"] 1148const _hoisted_10 = ["value"] 1149const _hoisted_11 = ["onUpdate:modelValue", "onChange"] 1150const _hoisted_12 = ["value"] 1151const _hoisted_13 = ["onClick"] 1152const _hoisted_14 = { 1153 class: "visitorMetricGrid visitorMetricGridV2 visitorExecutiveMetrics", 1154 "aria-label": "Ù ÙØ®Øµ Ø§ÙØØ±ÙØ©" 1155} 1156const _hoisted_15 = { class: "card visitorMetric primaryMetric" } 1157const _hoisted_16 = { class: "card visitorMetric" } 1158const _hoisted_17 = { class: "card visitorMetric" } 1159const _hoisted_18 = { class: "card visitorMetric" } 1160const _hoisted_19 = { class: "card visitorPanel visitorTrendPanel" } 1161const _hoisted_20 = { class: "adminSectionHead" } 1162const _hoisted_21 = ["aria-label"] 1163const _hoisted_22 = ["title"] 1164const _hoisted_23 = { class: "visitorTrendValue" } 1165const _hoisted_24 = { class: "visitorTrendBarWrap" } 1166const _hoisted_25 = { 1167 key: 1, 1168 class: "adminEmptyState compact" 1169} 1170const _hoisted_26 = { class: "visitorAnalyticsGrid visitorAnalyticsGridV2" } 1171const _hoisted_27 = { class: "card visitorPanel" } 1172const _hoisted_28 = { 1173 key: 0, 1174 class: "visitorPageRows" 1175} 1176const _hoisted_29 = { dir: "ltr" } 1177const _hoisted_30 = { 1178 key: 1, 1179 class: "adminEmptyState compact" 1180} 1181const _hoisted_31 = ["onClick"] 1182const _hoisted_32 = { class: "card visitorPanel" } 1183const _hoisted_33 = { 1184 key: 0, 1185 class: "visitorCountryRows" 1186} 1187const _hoisted_34 = { class: "visitorFlag" } 1188const _hoisted_35 = { 1189 key: 1, 1190 class: "adminEmptyState compact" 1191} 1192const _hoisted_36 = ["onClick"] 1193const _hoisted_37 = { class: "visitorAnalyticsGrid visitorAnalyticsGridV2" } 1194const _hoisted_38 = { class: "card visitorPanel" } 1195const _hoisted_39 = { class: "adminSectionHead" } 1196const _hoisted_40 = { key: 0 } 1197const _hoisted_41 = { 1198 key: 0, 1199 class: "visitorBreakdownRows" 1200} 1201const _hoisted_42 = ["onClick"] 1202const _hoisted_43 = { class: "card visitorPanel" } 1203const _hoisted_44 = { 1204 key: 0, 1205 class: "visitorBreakdownRows" 1206} 1207const _hoisted_45 = { class: "visitorTechDetails" } 1208const _hoisted_46 = { class: "visitorMiniColumns" } 1209const _hoisted_47 = { class: "card visitorPanel" } 1210const _hoisted_48 = { 1211 key: 0, 1212 class: "visitorRecentRows" 1213} 1214const _hoisted_49 = { class: "visitorFlag" } 1215const _hoisted_50 = { 1216 key: 1, 1217 class: "adminEmptyState compact" 1218} 1219const _hoisted_51 = { 1220 key: 2, 1221 class: "visitorPager" 1222} 1223const _hoisted_52 = ["disabled", "onClick"] 1224const _hoisted_53 = ["disabled", "onClick"] 1225const _hoisted_54 = { class: "card visitorPanel visitorDataQualityPanel" } 1226const _hoisted_55 = { class: "visitorDataQualityGrid" } 1227const _hoisted_56 = { class: "card visitorPanel visitorAutomationPanel" } 1228const _hoisted_57 = { class: "visitorAutomationMetrics" } 1229const _hoisted_58 = { 1230 key: 0, 1231 class: "visitorRecentRows" 1232} 1233const _hoisted_59 = { class: "visitorFlag" } 1234 1235return function render(_ctx, _cache) { 1236 with (_ctx) {
1237 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, normalizeClass: _normalizeClass, vModelSelect: _vModelSelect, withDirectives: _withDirectives, normalizeStyle: _normalizeStyle, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 1238 1239 const _component_AdminFrame = _resolveComponent("AdminFrame") 1240 1241 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØ²Ùار ÙØ§ÙØ¥ØØµØ§Ø¦Ùات" }, { 1242 default: _withCtx(() => [ 1243 _createElementVNode("section", _hoisted_1, [_cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Visitor Intelligence"), _createElementVNode("h2", null, "ØØ±ÙØ© اÙÙ ÙØµØ©"), _createElementVNode("p", null, "Ø§ÙØ§ÙØªØ±Ø§Ø¶Ù ÙØ¹Ø±Ø¶ Ø§ÙØ²Ùار Ø§ÙØÙÙÙÙÙÙ ÙÙØ·. Ø§ÙØ¥Ø¯Ø§Ø±Ø© ÙØ§ÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ±Ø³Ù ÙØ© ÙØ§ÙÙBots ÙØ§ÙÙØÙØµØ§Øª Ø§ÙØ£Ù ÙÙØ© Ù ÙØµÙÙØ© ØØªÙ ÙØ§ تشÙÙÙ Ø§ÙØ£Ø±Ùا٠.")], -1)), _createElementVNode("div", _hoisted_2, [ 1244 _createElementVNode("strong", null, _toDisplayString(summary.now_total||0), 1), 1245 _cache[0] || (_cache[0] = _createElementVNode("span", null, "ÙØ´Ø· Ø§ÙØ¢Ù", -1)), 1246 _createElementVNode("small", null, "آخر " + _toDisplayString(data.online_window_minutes||5) + " Ø¯ÙØ§Ø¦Ù", 1), 1247 _createElementVNode("button", { 1248 class: "smallbtn secondary", 1249 disabled: store.state.busy, 1250 onClick: $event => (load(true)) 1251 }, _toDisplayString(store.state.busy?'Ø¬Ø§Ø±Ù Ø§ÙØªØØ¯ÙØ«...':'ØªØØ¯ÙØ«'), 9, _hoisted_3) 1252 ])]), 1253 _createElementVNode("section", _hoisted_4, [_createElementVNode("div", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList([['1d','24 ساعة'],['7d','7 Ø£ÙØ§Ù '],['30d','30 ÙÙÙ '],['90d','90 ÙÙÙ ']], (p) => { 1254 return (_openBlock(), _createElementBlock("button", { 1255 key: p[0], 1256 type: "button", 1257 class: _normalizeClass({active:filters.period===p[0]}), 1258 onClick: $event => (setPeriod(p[0])) 1259 }, _toDisplayString(p[1]), 11, _hoisted_6)) 1260 }), 128))]), _createElementVNode("div", _hoisted_7, [ 1261 _createElementVNode("label", null, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "Ø§ÙØ¬Ù ÙÙØ±", -1)), _withDirectives(_createElementVNode("select", { 1262 "onUpdate:modelValue": $event => ((filters.audience) = $event), 1263 onChange: $event => (load(false)) 1264 }, _cache[2] || (_cache[2] = [ 1265 _createElementVNode("option", { value: "public" }, "Ø§ÙØ²Ùار", -1), 1266 _createElementVNode("option", { value: "members" }, "Ø§ÙØ£Ø¹Ø¶Ø§Ø¡", -1), 1267 _createElementVNode("option", { value: "staff" }, "Ø§ÙØ¥Ø¯Ø§Ø±Ø© ÙØ§ÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ±Ø³Ù ÙØ©", -1), 1268 _createElementVNode("option", { value: "human" }, "Ø§ÙØ²Ùار + Ø§ÙØ£Ø¹Ø¶Ø§Ø¡", -1), 1269 _createElementVNode("option", { value: "automation" }, "Ø§ÙØØ±ÙØ© Ø§ÙØ¢ÙÙØ©", -1) 1270 ]), 40, _hoisted_8), [[_vModelSelect, filters.audience]])]), 1271 _createElementVNode("label", null, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "Ø§ÙØ¯ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { 1272 "onUpdate:modelValue": $event => ((filters.country) = $event), 1273 onChange: $event => (load(false)) 1274 }, [_cache[4] || (_cache[4] = _createElementVNode("option", { value: "" }, "ÙÙ Ø§ÙØ¯ÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($countryList(filters.country), (c) => { 1275 return (_openBlock(), _createElementBlock("option", { 1276 key: c.value, 1277 value: c.value 1278 }, _toDisplayString(c.label), 9, _hoisted_10)) 1279 }), 128))], 40, _hoisted_9), [[_vModelSelect, filters.country]])]), 1280 _createElementVNode("label", null, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "اÙÙØ³Ù ", -1)), _withDirectives(_createElementVNode("select", { 1281 "onUpdate:modelValue": $event => ((filters.page_group) = $event), 1282 onChange: $event => (load(false)) 1283 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(['all','home','guide','trade','auth','account','events','content','supp
1283ort','business','other','admin'], (g) => { 1284 return (_openBlock(), _createElementBlock("option", { 1285 key: g, 1286 value: g 1287 }, _toDisplayString(pageGroupName(g)), 9, _hoisted_12)) 1288 }), 128))], 40, _hoisted_11), [[_vModelSelect, filters.page_group]])]), 1289 _createElementVNode("button", { 1290 type: "button", 1291 class: "smallbtn secondary visitorResetFilter", 1292 onClick: resetFilters 1293 }, "إعادة Ø§ÙØ¶Ø¨Ø·", 8, _hoisted_13) 1294 ])]), 1295 _createElementVNode("section", _hoisted_14, [ 1296 _createElementVNode("article", _hoisted_15, [ 1297 _cache[7] || (_cache[7] = _createElementVNode("span", null, "Ø§ÙØ²Ùار", -1)), 1298 _createElementVNode("b", null, _toDisplayString(summary.visitors||0), 1), 1299 _createElementVNode("small", null, _toDisplayString(periodLabel), 1), 1300 _createElementVNode("em", { class: _normalizeClass(changeClass(summary.visitors_change_pct)) }, _toDisplayString(changeText(summary.visitors_change_pct)) + " ع٠اÙÙØªØ±Ø© Ø§ÙØ³Ø§Ø¨ÙØ©", 3) 1301 ]), 1302 _createElementVNode("article", _hoisted_16, [ 1303 _cache[8] || (_cache[8] = _createElementVNode("span", null, "Ù Ø´Ø§ÙØ¯Ø§Øª Ø§ÙØµÙØØ§Øª", -1)), 1304 _createElementVNode("b", null, _toDisplayString(summary.pageviews||0), 1), 1305 _createElementVNode("small", null, _toDisplayString(periodLabel), 1), 1306 _createElementVNode("em", { class: _normalizeClass(changeClass(summary.pageviews_change_pct)) }, _toDisplayString(changeText(summary.pageviews_change_pct)) + " ع٠اÙÙØªØ±Ø© Ø§ÙØ³Ø§Ø¨ÙØ©", 3) 1307 ]), 1308 _createElementVNode("article", _hoisted_17, [_cache[9] || (_cache[9] = _createElementVNode("span", null, "ÙØ´Ø· Ø§ÙØ¢Ù", -1)), _createElementVNode("b", null, _toDisplayString(summary.now_total||0), 1), _createElementVNode("small", null, "آخر " + _toDisplayString(data.online_window_minutes||5) + " Ø¯ÙØ§Ø¦Ù", 1)]), 1309 _createElementVNode("article", _hoisted_18, [_cache[10] || (_cache[10] = _createElementVNode("span", null, "ØµÙØØ§Øª ÙÙ٠زائر", -1)), _createElementVNode("b", null, _toDisplayString(summary.pages_per_visitor||0), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "٠ؤشر استخدا٠", -1))]) 1310 ]), 1311 _createElementVNode("section", _hoisted_19, [_createElementVNode("div", _hoisted_20, [_createElementVNode("div", null, [_cache[12] || (_cache[12] = _createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ§ØªØ¬Ø§Ù", -1)), _createElementVNode("h3", null, "Ø§ÙØØ±ÙØ© Ø®ÙØ§Ù " + _toDisplayString(periodLabel), 1)]), _createElementVNode("small", null, _toDisplayString(data.audience_label||'Ø§ÙØ²Ùار') + " · " + _toDisplayString(pageGroupName(filters.page_group)), 1)]), (trend.length) 1312 ? (_openBlock(), _createElementBlock("div", { 1313 key: 0, 1314 class: "visitorTrendChart", 1315 role: "img", 1316 "aria-label": 'Ø§ØªØ¬Ø§Ù Ù Ø´Ø§ÙØ¯Ø§Øª Ø§ÙØµÙØØ§Øª Ø®ÙØ§Ù '+periodLabel 1317 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(trend, (x, i) => { 1318 return (_openBlock(), _createElementBlock("div", { 1319 key: String(x.bucket)+i, 1320 class: "visitorTrendPoint", 1321 title: trendTitle(x) 1322 }, [_createElementVNode("span", _hoisted_23, _toDisplayString(x.pageviews), 1), _createElementVNode("div", _hoisted_24, [_createElementVNode("i", { style: _normalizeStyle({height:barHeight(x.pageviews)+'%'}) }, null, 4)]), _createElementVNode("small", null, _toDisplayString(bucketLabel(x.bucket)), 1)], 8, _hoisted_22)) 1323 }), 128))], 8, _hoisted_21)) 1324 : (_openBlock(), _createElementBlock("div", _hoisted_25, _cache[13] || (_cache[13] = [_createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ ØØ±ÙØ© ÙÙ ÙØ°Ù اÙÙØªØ±Ø©", -1), _createElementVNode("span", null, "غÙÙØ± اÙÙÙØ§ØªØ± أ٠اÙÙØªØ±Ø© ÙØ¹Ø±Ø¶ Ø¨ÙØ§Ùات أخرÙ.", -1)])))]), 1325 _createElementVNode("section", _hoisted_26, [_createElementVNode("article", _hoisted_27, [_cache[17] || (_cache[17] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙ ØØªÙÙ"), _createElementVNode("h3", null, "Ø£ÙØ«Ø± Ø§ÙØµÙØØ§Øª استخدا٠اÙ")])], -1)), (topPages.length) 1326 ? (_openBlock(), _createElementBlock("div", _hoisted_28, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visiblePages, (p) => { 1327 return (_openBlock(), _createElementBlock("div", { 1328 key: p.page, 1329 class: "visitorPageRow" 1330 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(p.page_label||p.page), 1), _createElementVNode("small", null, [_createTextVNode(_toDisplayString(pageGroupName(p.page_group)) + " · ", 1), _createElementVNode("span", _hoisted_29, _toDisplayString(p.page), 1)])]), _createElementVNode("span", null, [_createElementVNode("strong", null, _toDisplayString(p.view_count), 1), _cache[14] || (_cache[14] = _createElementVNode("small", null, "Ù Ø´Ø§ÙØ¯Ø©", -1))]), _createElementVNode("span", null, [_createElementVNode("strong", null, _toDisplayString(p.visitors), 1), _cache[15] || (_cache[15] = _createElementVNode("small", null, "زائر", -1))])])) 1331 }), 128))])) 1332 : (_openBlock(), _createElementBlock("div", _hoisted_30, _cache[16] || (_cache[16] = [_createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ ØµÙØØ§Øª Ù Ø³Ø¬ÙØ©", -1)]))), (topPages.length>5) 1333 ? (_openBlock(), _createElementBlock("button", { 1334 key: 2, 1335 class: "visitorShowAll", 1336 onClick: $event => (showAllPages=!showAllPages) 1337 }, _toDisplayString(showAllPages?'عرض Ø£ÙÙ 5 ÙÙØ·':'عرض اÙÙÙ ('+topPages.length+')'), 9, _hoisted_31)) 1338 : _createCommentVNode("", true)]), _createElementVNode("article", _hoisted_32, [_cache[20] || (_cache[20] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ¯ÙÙ"), _createElementVNode("h3", null, "أعÙÙ Ø§ÙØ¯ÙÙ")]), _createElementVNode("small", null, "UN = ØºÙØ± ٠عرÙÙØ©")], -1)), (topCountries.length) 1339 ? (_openBlock(), _createElementBlock("div", _hoisted_33, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleCountries, (c) => { 1340 return (_openBlock(), _createElementBlock("div", { 1341 key: c.country_code, 1342 class: "visitorCountryRow" 1343 }, [ 1344 _createElementVNode("span", _hoisted_34, _toDisplayString(countryFlag(c.country_code)), 1), 1345 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(c.country_name||'ØºÙØ± ٠عرÙÙ'), 1), _createElementVNode("small", null, _toDisplayString(c.views||0) + " Ù Ø´Ø§ÙØ¯Ø©", 1)]), 1346 _createElementVNode("strong", null, _toDisplayString(c.visitors), 1), 1347 _cache[18] || (_cache[18] = _createElementVNode("em", null, "زائر", -1)) 1348 ])) 1349 }), 128))])) 1350 : (_openBlock(), _createElementBlock("div", _hoisted_35, _cache[19] || (_cache[19] = [_createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ Ø¨ÙØ§Ùات دÙÙ", -1)]))), (topCountries.length>5) 1351 ? (_openBlock(), _createElementBlock("button", { 1352 key: 2, 1353 class: "visitorShowAll", 1354 onClick: $event => (showAllCountries=!showAllCountries) 1355 }, _toDisplayString(showAllCountries?'عرض Ø£ÙÙ 5 ÙÙØ·':'عرض اÙÙÙ ('+topCountries.length+')'), 9, _hoisted_36)) 1356 : _createCommentVNode("", true)])]), 1357 _createElementVNode("section", _hoisted_37, [_createElementVNode("article", _hoisted_38, [_createElementVNode("div", _hoisted_39, [_cache[21] || (_cache[21] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ§Ùتساب"), _createElementVNode("h3", null, "٠صادر اÙÙØµÙÙ")], -1)), (!dimensionReady) 1358 ? (_openBlock(), _createElementBlock("small", _hoisted_40, "Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ¬Ø¯Ùدة ٠ا Ø²Ø§ÙØª تتراÙÙ ")) 1359 : _createCommentVNode("", true)]), (topSources.length) 1360 ? (_openBlock(), _createElementBlock("div", _hoisted_41, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleSources, (x) => { 1361 return (_openBlock(), _createElementBlock("div", { 1362 key: x.key, 1363 class: "visitorBreakdownRow" 1364 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(trafficSourceName(x.key)), 1), _createElementVNode("small", null, _toDisplayString(x.visitors) + " زائر · " + _toDisplayString(x.views) + " Ù Ø´Ø§ÙØ¯Ø©", 1)]), _createElementVNode("span", null, [_createElementVNode("i", { style: _normalizeStyle({width:barWidth(x.visitors,visibleSources)+'%'}) }, null, 4)])])) 1365 }), 128))])) 1366 : _createCommentVNode("", true), (topSources.length>5) 1367 ? (_openBlock(), _createElementBlock("button", { 1368 key: 1, 1369 class: "visitorShowAll", 1370 onClick: $event => (showAllSources=!showAllSources) 1371 }, _toDisplayString(showAllSources?'عرض Ø£ÙÙ 5 ÙÙØ·':'عرض اÙÙÙ ('+topSources.length+')'), 9, _hoisted_42)) 1372 : _createCommentVNode("", true)]), _createElementVNode("article", _hoisted_43, [_cache[25] || (_cache[25] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ£Ø¬Ùزة"), _createElementVNode("h3", null, "ÙÙØ¹ Ø§ÙØ¬Ùاز")]), _createElementVNode("small", null, "بدÙÙ ØÙظ User-Agent خا٠")], -1)), (devices.length) 1373 ? (_openBlock(), _createElementBlock("div", _hoisted_44, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(devices, (x) => { 1374 return (_openBlock(), _createElementBlock("div", { 1375 key: x.key, 1376 class: "visitorBreakdownRow" 1377 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(deviceName(x.key)), 1), _createElementVNode("small", null, _toDisplayString(x.visitors) + " زائر", 1)]), _createElementVNode("span", null, [_createElementVNode("i", { style: _normalizeStyle({width:barWidth(x.visitors,devices)+'%'}) }, null, 4)])])) 1378 }), 128))])) 1379 : _createCommentVNode("", true), _createElementVNode("details", _hoisted_45, [_cache[24] || (_cache[24] = _createElementVNode("summary", null, "اÙÙ ØªØµÙØØ§Øª ÙØ£Ùظ٠ة Ø§ÙØªØ´ØºÙÙ", -1)), _createElementVNode("div", _hoisted_46, [_createElementVNode("div", null, [_cache[22] || (_cache[22] = _createElementVNode("h4", null, "اÙÙ ØªØµÙØØ§Øª", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(browsers, (x) => { 1380 return (_openBlock(), _createElementBlock("p", { key: 'b-'+x.key }
1380, [_createElementVNode("span", null, _toDisplayString(x.key), 1), _createElementVNode("b", null, _toDisplayString(x.visitors), 1)])) 1381 }), 128))]), _createElementVNode("div", null, [_cache[23] || (_cache[23] = _createElementVNode("h4", null, "Ø§ÙØ£Ùظ٠ة", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(operatingSystems, (x) => { 1382 return (_openBlock(), _createElementBlock("p", { key: 'o-'+x.key }, [_createElementVNode("span", null, _toDisplayString(x.key), 1), _createElementVNode("b", null, _toDisplayString(x.visitors), 1)])) 1383 }), 128))])])])])]), 1384 _createElementVNode("section", _hoisted_47, [_cache[27] || (_cache[27] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø£ØØ¯Ø« ÙØ´Ø§Ø·"), _createElementVNode("h3", null, "آخر Ø§ÙØ²Ùارات اÙÙ Ø·Ø§Ø¨ÙØ© ÙÙÙÙØ§ØªØ±")]), _createElementVNode("small", null, "ÙØ§ IP خا٠· ÙØ§ fingerprint")], -1)), (recentVisits.length) 1385 ? (_openBlock(), _createElementBlock("div", _hoisted_48, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleRecentVisits, (v, i) => { 1386 return (_openBlock(), _createElementBlock("div", { 1387 key: i+'-'+v.created_at, 1388 class: "visitorRecentRow" 1389 }, [_createElementVNode("span", _hoisted_49, _toDisplayString(countryFlag(v.country_code)), 1), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(v.page_label||v.page), 1), _createElementVNode("small", null, _toDisplayString(v.country_name||'ØºÙØ± ٠عرÙÙ') + " · " + _toDisplayString(visitorTypeName(v.visitor_type)) + " · " + _toDisplayString(deviceName(v.device_class)) + " · " + _toDisplayString(trafficSourceName(v.traffic_source)), 1)]), _createElementVNode("time", null, _toDisplayString(shortDate(v.created_at)), 1)])) 1390 }), 128))])) 1391 : (_openBlock(), _createElementBlock("div", _hoisted_50, _cache[26] || (_cache[26] = [_createElementVNode("b", null, "ÙØ§ ÙÙØ¬Ø¯ ÙØ´Ø§Ø· ØØ¯ÙØ« ÙÙØ°Ù اÙÙÙØ§ØªØ±", -1)]))), (recentPageCount>1) 1392 ? (_openBlock(), _createElementBlock("div", _hoisted_51, [_createElementVNode("button", { 1393 disabled: recentPage<=1, 1394 onClick: $event => (recentPage--) 1395 }, "Ø§ÙØ³Ø§Ø¨Ù", 8, _hoisted_52), _createElementVNode("span", null, _toDisplayString(recentPage) + " / " + _toDisplayString(recentPageCount), 1), _createElementVNode("button", { 1396 disabled: recentPage>=recentPageCount, 1397 onClick: $event => (recentPage++) 1398 }, "Ø§ÙØªØ§ÙÙ", 8, _hoisted_53)])) 1399 : _createCommentVNode("", true)]), 1400 _createElementVNode("details", _hoisted_54, [_createElementVNode("summary", null, [_cache[28] || (_cache[28] = _createElementVNode("span", null, [_createElementVNode("b", null, "Ø¬ÙØ¯Ø© Ø¨ÙØ§Ùات Ø§ÙØ¥ØØµØ§Ø¦Ùات"), _createElementVNode("small", null, "٠ؤشرات ٠ساعدة ÙØ§ تدخ٠ÙÙ Ø£Ø±ÙØ§Ù Ø§ÙØ²Ùار")], -1)), _createElementVNode("strong", null, _toDisplayString(summary.country_coverage_pct||0) + "%", 1)]), _createElementVNode("div", _hoisted_55, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.country_coverage_pct||0) + "%", 1), _cache[29] || (_cache[29] = _createElementVNode("small", null, "ØªØºØ·ÙØ© Ø§ÙØ¯ÙÙØ©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.dimension_coverage_pct||0) + "%", 1), _cache[30] || (_cache[30] = _createElementVNode("small", null, "Ø¨ÙØ§Ùات Ø§ÙØ¬Ùاز", -1))])])]), 1401 _createElementVNode("details", _hoisted_56, [_createElementVNode("summary", null, [_cache[31] || (_cache[31] = _createElementVNode("span", null, [_createElementVNode("b", null, "Ø§ÙØØ±ÙØ© Ø§ÙØ¢ÙÙØ© ÙØ§ÙÙØÙØµØ§Øª Ø§ÙØ£Ù ÙÙØ©"), _createElementVNode("small", null, "Ù ÙØµÙÙØ© ØªÙ Ø§Ù Ø§Ù Ø¹Ù Ø£Ø±ÙØ§Ù Ø§ÙØ²Ùار")], -1)), _createElementVNode("strong", null, _toDisplayString(automationSummary.events||0), 1)]), _createElementVNode("div", _hoisted_57, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(automationSummary.bots_today||0), 1), _cache[32] || (_cache[32] = _createElementVNode("small", null, "Bots اÙÙÙÙ ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(automationSummary.scanner_events_today||0), 1), _cache[33] || (_cache[33] = _createElementVNode("small", null, "ÙØÙØµØ§Øª Ù ØØ¬Ùبة اÙÙÙÙ ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(automationSummary.actors||0), 1), _cache[34] || (_cache[34] = _createElementVNode("small", null, "٠صادر Ø¢ÙÙØ© Ø®ÙØ§Ù اÙÙØªØ±Ø©", -1))])]), (recentAutomation.length) 1402 ? (_openBlock(), _createElementBlock("div", _hoisted_58, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(recentAutomation, (v, i) => { 1403 return (_openBlock(), _createElementBlock("div", { 1404 key: 'auto-'+i+'-'+v.created_at, 1405 class: "visitorRecentRow" 1406 }, [_createElementVNode("span", _hoisted_59, _toDisplayString(countryFlag(v.country_code)), 1), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(v.page_label||v.page), 1), _createElementVNode("small", null, _toDisplayString(v.country_name||'ØºÙØ± ٠عرÙÙ') + " · " + _toDisplayString(visitorTypeName(v.visitor_type)), 1
1406)]), _createElementVNode("time", null, _toDisplayString(shortDate(v.created_at)), 1)])) 1407 }), 128))])) 1408 : _createCommentVNode("", true)]), 1409 _cache[35] || (_cache[35] = _createElementVNode("p", { class: "visitorPrivacyNote" }, "Ø¥ØØµØ§Ø¦Ùات Ø§ÙØ®ØµÙØµÙØ©: ÙØ§ ÙÙØÙØ¸ عÙÙØ§Ù IP Ø§ÙØ®Ø§Ù Ø ÙÙØ§ User-Agent Ø§ÙØ®Ø§Ù Ø ÙÙØ§ fingerprint. اÙÙReferrer ÙØÙØ¸ ÙÙØ·Ø§Ù ÙÙØ·.", -1)) 1410 ]), 1411 _: 1, 1412 __: [35] 1413 })) 1414 } 1415} 1416})() 1417 }; 1418 1419 const AdminUniversalSearchPage={ 1420 components:{AdminFrame}, 1421 setup(){ 1422 const store=useGzcStore(); const router=useRouter(); const qText=ref(''); const results=ref([]); const groups=ref({}); const total=ref(0); const searched=ref(false); 1423 const labels={members:'Ø§ÙØ£Ø¹Ø¶Ø§Ø¡',admins:'اÙ٠شرÙÙÙ',emergencies:'Ø§ÙØ·Ùارئ',cases:'اÙÙØµÙÙ/اÙ٠ساعدة',feedback:'اÙÙ ÙØ§ØØ¸Ø§Øª',events:'اÙÙØ¹Ø§ÙÙØ§Øª',media:'اÙÙ ÙØ¯Ùا',announcements:'Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª',circulars:'Ø§ÙØªØ¹Ù Ù٠ات',communities:'Ø§ÙØ¬Ø§ÙÙØ§Øª'}; 1424 const icons={member:'ð¤',admin:'ð¡ï¸',emergency:'ð¨',case:'ð',feedback:'ð¬',event:'ðï¸',media:'ð¼ï¸',announcement:'ð¢',circular:'ð',community:'ðï¸'}; 1425 const quick=['عضÙÙØ©','Ø·ÙØ§Ø±Ø¦','ÙØµÙÙ','٠ساعدة','ÙØ¹Ø§ÙÙØ©','Ø¥Ø¹ÙØ§Ù','تع٠ÙÙ ','ÙÙØ§ÙغتشÙ','Ø¥ÙÙÙ']; 1426 let timer=null; 1427 async function search(){ 1428 const v=String(qText.value||'').trim(); searched.value=true; 1429 if(v.length<2){results.value=[];groups.value={};total.value=0;return;} 1430 store.state.busy=true; 1431 const r=await api('/api/admin/search?search='+encodeURIComponent(v)); 1432 if(r.status===401){store.state.busy=false;router.replace('/admin/login');return;} 1433 results.value=safeArray(r.results); groups.value=r.groups||{}; total.value=Number(r.total||results.value.length||0); store.state.busy=false; 1434 } 1435 function delayed(){clearTimeout(timer); timer=setTimeout(search,300)} 1436 function setQuick(v){qText.value=v;search();} 1437 function go(x){if(x&&x.url) router.push(x.url);} 1438 function groupCount(k){return safeArray(groups.value[k]).length;} 1439 function typeIcon(x){return icons[x.result_type]||'ð'} 1440 onMounted(async()=>{await store.requireAdmin(router);}); 1441 return {store,qText,results,groups,total,searched,labels,quick,search,delayed,setQuick,go,groupCount,typeIcon,shortDate}; 1442 }, 1443 render:(function(){ 1444const _Vue = Vue 1445const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 1446 1447const _hoisted_1 = { class: "card dashboardHeaderCard" } 1448const _hoisted_2 = ["onClick"] 1449const _hoisted_3 = { class: "card searchPanel" } 1450const _hoisted_4 = ["onUpdate:modelValue", "onInput", "onKeyup"] 1451const _hoisted_5 = { class: "searchChips" } 1452const _hoisted_6 = ["onClick"] 1453const _hoisted_7 = { 1454 key: 0, 1455 class: "searchGroupStrip" 1456} 1457const _hoisted_8 = { 1458 key: 1, 1459 class: "card emptyCard" 1460} 1461const _hoisted_9 = { 1462 key: 2, 1463 class: "universalResults" 1464} 1465const _hoisted_10 = ["onClick"] 1466const _hoisted_11 = { class: "resultIcon" } 1467 1468return function render(_ctx, _cache) { 1469 with (_ctx) { 1470 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withKeys: _withKeys, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vShow: _vShow, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 1471 1472 const _component_AdminFrame = _resolveComponent("AdminFrame") 1473 1474 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØ¨ØØ« Ø§ÙØ´Ø§Ù Ù" }, { 1475 default: _withCtx(() => [ 1476 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "Ø§ÙØ¨ØØ« Ø§ÙØ´Ø§Ù Ù"), _createElementVNode("p", { class: "hint" }, "Ø¨ØØ« ÙØ§ØØ¯ Ø¯Ø§Ø®Ù Ø£ÙØ¸Ù Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø© بدÙÙ Ø®ÙØ· Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ®Ø§ØµØ© ٠ع Ø§ÙØµÙØØ§Øª Ø§ÙØ¹Ø§Ù Ø©.")], -1)), _createElementVNode("button", { 1477 class: "smallbtn", 1478 onClick: search 1479 }, "Ø¨ØØ«", 8, _hoisted_2)]), 1480 _createElementVNode("section", _hoisted_3, [_withDirectives(_createElementVNode("input", { 1481 class: "searchInput", 1482 "onUpdate:modelValue": $event => ((qText) = $event), 1483 onInput: delayed, 1484 onKeyup: _withKeys(search, ["enter"]), 1485 placeholder: "Ø§Ø¨ØØ«: Ø§Ø³Ù Ø Ø±ÙÙ Ø GZC IDØ ÙØ¹Ø§ÙÙØ©Ø تع٠ÙÙ Ø Ù Ø¯ÙÙØ©Ø Ù ÙØ§ØØ¸Ø©..." 1486 }, null, 40, _hoisted_4), [[_vModelText, qText]]), _createElementVNode("div", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(quick, (x) => { 1487 return (_openBlock(), _createElementBlock("button", { 1488 key: x, 1489 onClick: $event => (setQuick(x)) 1490 }, _toDisplayString(x), 9, _hoisted_6)) 1491 }), 128))])]), 1492 total 1493 ? (_openBlock(), _createElementBlock("section", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(labels, (label, key) => { 1494 return _withDirectives((_openBlock(), _createElementBlock("span", { key: key }, [_createElementVNode("b", null, _toDisplayString(groupCount(key)), 1), _createElementVNode("small", null, _toDisplayString(label), 1)])), [[_vShow, groupCount(key)]]) 1495 }), 128))])) 1496 : _createCommentVNode("", true), 1497 (searched && !results.length && !store.state.busy) 1498 ? (_openBlock(), _createElementBlock("section", _hoisted_8, "ÙØ§ ØªÙØ¬Ø¯ ÙØªØ§Ø¦Ø¬. Ø§ÙØªØ¨ ÙÙÙ Ø© أ٠رÙÙ Ø§Ù Ø£Ù Ø§Ø³ØªØ®Ø¯Ù ØµÙØºØ© أخرÙ.")) 1499 : _createCommentVNode("", true), 1500 (results.length) 1501 ? (_openBlock(), _createElementBlock("section", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(results, (x) => { 1502 return (_openBlock(), _createElementBlock("button", { 1503 class: "card resultCard", 1504 key: x.group+'-'+x.id, 1505 onClick: $event => (go(x)) 1506 }, [_createElementVNode("span", _hoisted_11, _toDisplayString(typeIcon(x)), 1), _createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(x.title || x.full_name || '-'), 1), _createElementVNode("p", null, _toDisplayString(x.subtitle || x.gzc_id || ''), 1), _createElementVNode("small", null, _toDisplayString(labels[x.group] || x.result_type) + " â " + _toDisplayString(x.status || '-') + " â " + _toDisplayString(shortDate(x.created_at)), 1)]), _cache[1] || (_cache[1] = _createElementVNode("em", null, "ÙØªØ", -1))], 8, _hoisted_10)) 1507 }), 128))])) 1508 : _createCommentVNode("", true) 1509 ]), 1510 _: 1 1511 })) 1512 } 1513} 1514})() 1515 }; 1516 1517 1518 const AdminTaskWorkspacePage={ 1519 components:{AdminFrame}, 1520 setup(){ 1521 const store=useGzcStore();const router=useRouter();const route=useRoute(); 1522 const notification=ref(null);const record=ref(null);const payload=ref(null);const context=reactive({hub:'china_guide',status:'',mode:'help',actionUrl:'',fullPath:''}); 1523 const categories=ref([]);const localBusy=ref(false);const loadError=ref('');const note=ref('');const reviewChecks=reactive({source_verified:false,content_verified:false,image_verified:false,publish_confirmed:false});const useImage=ref(false);const baseline=ref(''); 1524 const taskType=computed(()=>String(notification.value&¬ification.value.related_type||'')); 1525 const taskResolved=computed(()=>['completed','resolved','closed'].includes(String(notification.value&¬ification.value.status||''))); 1526 const taskTitle=computed(()=>String(notification.value&¬ification.value.title||'Ù ÙÙ Ø© Ø¥Ø¯Ø§Ø±ÙØ©')); 1527 const fullRecordPath=computed(()=>String(context.fullPath||context.actionUrl||'/admin/notifications')); 1528 const admin=computed(()=>store.state.me&&store.state.me.admin||null); 1529 const aiSuggestion=computed(()=>taskType.value==='ai_research_suggestion'?record.value:null); 1530 const aiDedupStatus=computed(()=>{ 1531 const x=aiSuggestion.value;if(!x)return 'unchecked'; 1532 if(aiDirty.value)return 'unchecked'; 1533 if(String(x.dedup_current_status||x.dedup_status||'')==='conflict')return 'conflict';
1534 if(String(x.dedup_current_status||x.dedup_status||'')==='clear'&&!x.dedup_stale)return 'clear'; 1535 return 'unchecked'; 1536 }); 1537 const aiDirty=computed(()=>!!(aiSuggestion.value&&String(aiSuggestion.value.status)==='pending'&&baseline.value&&baseline.value!==aiSnapshot(aiSuggestion.value))); 1538 const aiApprovalReady=computed(()=>reviewChecks.source_verified&&reviewChecks.content_verified&&reviewChecks.publish_confirmed&&(!useImage.value||reviewChecks.image_verified)); 1539 function safeActionUrl(n){let u=String(n&&n.action_url||'').trim();if(!u)return '/admin/notifications';try{const parsed=new URL(u,PRIMARY_PUBLIC_ORIGIN);if(!PLATFORM_HOSTS.has(parsed.hostname))return '/admin/notifications';return parsed.pathname+parsed.search;}catch(_){return '/admin/notifications';}} 1540 function parseContext(n){const u=safeActionUrl(n);context.actionUrl=u;context.fullPath=u;try{const x=new URL(u,PRIMARY_PUBLIC_ORIGIN);context.hub=x.searchParams.get('hub')||((x.pathname.includes('trade-shipping'))?'trade_shipping':(x.pathname.includes('sudan-digital')?'sudan_digital':'china_guide'));context.status=x.searchParams.get('status')||'';context.mode=x.pathname.includes('/arrivals')?'arrival':'help';}catch(_){} } 1541 function findRelated(list,n,codeKey){const id=String(n&&n.related_id||'');return safeArray(list).find(x=>String(x.id||'')===id||String(x&&x[codeKey]||'')===id)||null;} 1542 function aiSnapshot(x){if(!x)return '';return JSON.stringify(['category_id','service_type','direction','title_ar','summary_ar','description_ar','source_name','source_url','risk_level','admin_note'].map(k=>[k,String(x[k]??'')]));} 1543 function hydrateAi(x){if(!x)return null;const v={...x};useImage.value=String(v.image_status||'')==='ready'&&!!v.image_url;baseline.value=aiSnapshot(v);reviewChecks.source_verified=false;reviewChecks.content_verified=false;reviewChecks.image_verified=false;reviewChecks.publish_confirmed=false;return v;} 1544 function aiRisk(v){return ({low:'Ù ÙØ®Ùض',standard:'عادÙ',high:'عاÙ٠اÙ٠خاطر'}[String(v||'')])||String(v||'-');} 1545 function aiStatus(v){return ({pending:'Ù Ø³ÙØ¯Ø©',in_review:'Ø¬Ø§ÙØ² ÙÙØ§Ø¹ØªÙ اد',approved:'٠عت٠د ÙÙ ÙØ´Ùر',rejected:'٠رÙÙØ¶'}[String(v||'')])||String(v||'-');} 1546 function dedupLabel(v){return ({clear:'ÙØ§ ÙÙØ¬Ø¯ ØªÙØ±Ø§Ø±',conflict:'ÙÙØ¬Ø¯ تعارض / ØªÙØ±Ø§Ø±',unchecked:'ÙØØªØ§Ø¬ ÙØØµØ§Ù'}[String(v||'')])||'ÙØØªØ§Ø¬ ÙØØµØ§Ù';} 1547 function procurementStatus(v){return PROCUREMENT_STATUS_LABELS[String(v||'')]||String(v||'-');} 1548 function orderStatus(v){return CUSTOMER_ORDER_STATUS_LABELS[String(v||'')]||String(v||'-');} 1549 function closeWorkspace(){if(window.history.length>1)router.back();else router.replace('/admin/notifications');} 1550 async function loadNotification(){ 1551 loadError.value='';localBusy.value=true; 1552 const id=String(route.params.id||''); 1553 let r=await api('/api/admin/notifications?status=open'); 1554 if(r.status===401){localBusy.value=false;router.replace('/admin/login');return false;} 1555 let n=safeArray(r.notifications).find(x=>String(x.id)===id); 1556 if(!n){r=await api('/api/admin/notifications?status=history');n=safeArray(r.notifications).find(x=>String(x.id)===id);} 1557 if(!n){localBusy.value=false;loadError.value='اÙÙ ÙÙ Ø© ØºÙØ± Ù ÙØ¬Ùدة أ٠خرجت Ù Ù ÙØ·Ø§Ù ØµÙØ§ØÙات ÙØ°Ø§ Ø§ÙØØ³Ø§Ø¨.';return false;} 1558 notification.value=n;parseContext(n); 1559 if(String(n.status)==='unread'){ 1560 n.status='read';await api('/api/admin/notifications/'+encodeURIComponent(n.id)+'/read',{method:'POST'}); 1561 store.state.unread=Math.max(0,Number(store.state.unread||0)-1); 1562 } 1563 return true; 1564 } 1565 async function loadTask(){ 1566 if(!(await loadNotification()))return; 1567 const n=notification.value,t=String(n.related_type||''),id=String(n.related_id||'');record.value=null;payload.value=null;categories.value=[]; 1568 try{ 1569 if(t==='member'){ 1570 const r=await api('/api/admin/members/'+encodeURIComponent(id));if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ ÙÙ Ø§ÙØ¹Ø¶Ù');payload.value=r;record.value=r.member||null; 1571 }else if(t==='case'){ 1572 const r=await api('/api/admin/cases?type='+(context.mode==='arrival'?'arrival':''));if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ ÙÙ Ø§ÙØØ§ÙØ©');
1572record.value=findRelated(r.cases,n,'case_code'); 1573 }else if(t==='emergency'){ 1574 const r=await api('/api/admin/emergencies');if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ ÙÙ Ø§ÙØ¨Ùاغ');record.value=findRelated(r.emergencies,n,'ticket_code'); 1575 }else if(t==='feedback'){ 1576 const r=await api('/api/admin/feedback?status=all');if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ Ù٠اÙÙ ÙØ§ØØ¸Ø©');record.value=findRelated(r.feedback,n,'id'); 1577 }else if(t==='guide_suggestion'||t==='guide_report'){ 1578 const r=await api('/api/admin/china-guide?hub='+encodeURIComponent(context.hub));if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ ÙÙ Ù ÙÙ Ø© اÙÙ ØØªÙÙ');record.value=t==='guide_suggestion'?findRelated(r.suggestions,n,'id'):findRelated(r.reports,n,'id');payload.value=r; 1579 }else if(t==='procurement_request'){ 1580 const r=await api('/api/admin/procurement/'+encodeURIComponent(id));if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ ÙÙ Ø·ÙØ¨ Ø§ÙØªÙØ±ÙØ¯');payload.value=r;record.value=r.request; 1581 }else if(t==='customer_order'){ 1582 const r=await api('/api/admin/orders/'+encodeURIComponent(id));if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ ÙÙ Ø§ÙØ·Ùب');payload.value=r;record.value=r.order; 1583 }else if(t==='ai_research_suggestion'){ 1584 const status=context.status||'in_review';const rr=await Promise.all([api('/api/admin/ai-research?hub='+encodeURIComponent(context.hub)+'&status='+encodeURIComponent(status)),api('/api/china-guide/categories?hub='+encodeURIComponent(context.hub))]); 1585 if(!rr[0].ok)throw new Error(rr[0].message||rr[0].error||'تعذر تØÙ Ù٠اÙÙ ÙØªØ±Ø');record.value=hydrateAi(safeArray(rr[0].suggestions).find(x=>String(x.id)===id));payload.value=rr[0];categories.value=safeArray(rr[1].categories); 1586 }else if(t==='ai_research_job'){ 1587 const r=await api('/api/admin/ai-research?hub='+encodeURIComponent(context.hub)+'&status=pending');if(!r.ok)throw new Error(r.message||r.error||'تعذر تØÙ ÙÙ Ù ÙÙ Ø© Ø§ÙØ¨ØØ«');record.value=findRelated(r.jobs,n,'id');payload.value={...r,jobSuggestions:safeArray(r.suggestions).filter(x=>String(x.job_id||'')===id)}; 1588 } 1589 if(!record.value)loadError.value='تعذر Ø§ÙØ¹Ø«Ùر عÙÙ Ø§ÙØ³Ø¬Ù اÙ٠رتبط. ÙØ¯ تÙÙ٠اÙÙ ÙÙ Ø© ÙØ¯ Ø§ÙØªÙ ÙØª باÙÙØ¹Ù.'; 1590 }catch(e){loadError.value=e.message||'تعذر تØÙ Ù٠اÙÙ ÙÙ Ø©';} 1591 localBusy.value=false; 1592 } 1593 async function callAction(url,options={},closeOnSuccess=false){localBusy.value=true;const r=await api(url,options);localBusy.value=false;store.state.msg=r.message||r.error||'';if(r.ok){if(closeOnSuccess){await store.loadNotifications('open');closeWorkspace();}else await loadTask();}return r;} 1594 async function memberApprove(){const x=record.value;if(!x||!x.id)return;await callAction('/api/admin/members/'+encodeURIComponent(x.id)+'/approve',{method:'POST'},true);} 1595 async function memberRemind(){const x=record.value;if(!x||!x.id)return;await callAction('/api/admin/members/'+encodeURIComponent(x.id)+'/send-registration-reminder',{method:'POST'});} 1596 async function caseSetStatus(st){const x=record.value;if(!x||!x.id)return;await callAction('/api/admin/cases/'+encodeURIComponent(x.id)+'/status',{method:'POST',body:JSON.stringify({status:st})},st==='closed');} 1597 async function emergencySetStatus(st){const x=record.value;if(!x||!x.id)return;await callAction('/api/admin/emergencies/'+encodeURIComponent(x.id)+'/status',{method:'POST',body:JSON.stringify({status:st})},st==='closed');} 1598 async function feedbackAction(st){const x=record.value;if(!x||!x.id)return;if((st==='rejected'||st==='archived')&&!note.value.trim()){store.state.msg='Ø§ÙØªØ¨ Ù ÙØ§ØØ¸Ø© أ٠سبب Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø£ÙÙØ§Ù';return;}await callAction('/api/admin/feedback/'+encodeURIComponent(x.id),{method:'POST',body:JSON.stringify({status:st,admin_note:note.value})},['done','rejected','archived'].includes(st));} 1599 async function guideReview(action){const x=record.value;if(!x||!x.id)return;if(action==='reject'&&!note.value.trim()){store.state.msg='سبب Ø§ÙØ±Ùض Ù Ø·ÙÙØ¨';return;}const path=taskType.value==='guide_suggestion'?'suggestions':'reports';await callAction('/api/admin/china-guide/'+path+'/'+encodeURIComponent(x.id)+'/review',{method:'POST',body:JSON.stringify({action,note:note.value})},true);} 1600 async function claimProcurement(){const x=record.value;if(!x||!x.id||!admin.value||!admin.value.id)return;await callAction('/api/admin/procurement/'+encodeURIComponent(x.id)+'/assign',{method:'POST',body:JSON.stringify({admin_id:admin.value.id})},true);} 1601 async function claimOrder(){const x=record.value;if(!x||!x.procurement_request_id||!admin.value||!admin.value.id)return;await callAction('/api/admin/procurement/'+encodeURIComponent(x.procurement_request_id)+'/assign',{method:'POST',body:JSON.stringify({admin_id:admin.value.id})},String(notification.value&¬ification.value.type)!=='customer_order_payment_proof');} 1602 async function startPaidOrder(){const x=record.value;if(!x||!x.procurement_request_id)return;const msg=note.value.trim()||'ت٠ت ٠راجعة إثبات Ø§ÙØ¯Ùع ÙØ¨Ø¯Ø¡ Ø§ÙØªÙÙÙØ°';await callAction('/api/admin/procurement/'+encodeURIComponent(x.procurement_request_id)+'/status',{method:'POST',body:JSON.stringify({status:'processing',note:msg})},true);} 1603 async function aiSaveAndCheck(){const x=record.value;if(!x||!['pending','in_review'].includes(String(x.status)))return;localBusy.value=true;
1603if(String(x.status)==='pending'){const saved=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(x.id)+'/update',{method:'POST',body:JSON.stringify(x)});if(!saved.ok){localBusy.value=false;store.state.msg=saved.message||saved.error||'';return;}}const checked=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(x.id)+'/dedup-check',{method:'POST'});localBusy.value=false;store.state.msg=checked.message||checked.error||'';await loadTask();} 1604 async function aiReview(action){ 1605 const x=record.value;if(!x)return;let n=note.value.trim(); 1606 if(['reject','return'].includes(action)&&!n){store.state.msg=action==='return'?'Ø§ÙØªØ¨ Ø§ÙØªØ¹Ø¯Ù٠اÙÙ Ø·ÙÙØ¨ ÙØ¨Ù Ø§ÙØ¥Ø±Ø¬Ø§Ø¹':'سبب Ø§ÙØ±Ùض Ù Ø·ÙÙØ¨';return;} 1607 if(action==='submit'&&aiDedupStatus.value!=='clear'){store.state.msg='ÙÙÙØ° ÙØØµ Ø§ÙØªÙرار Ø£ÙÙØ§Ù';return;} 1608 if(action==='approve'&&!aiApprovalReady.value){store.state.msg='Ø£Ù٠٠تØÙ٠اÙ٠صدر ÙØ§ÙÙ ØØªÙÙ'+(useImage.value?' ÙØ§ÙØµÙØ±Ø©':'')+' ÙØªØ£ÙÙØ¯ اÙÙØ´Ø±';return;} 1609 localBusy.value=true;const r=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(x.id)+'/review',{method:'POST',body:JSON.stringify({action,note:n,source_verified:reviewChecks.source_verified===true,content_verified:reviewChecks.content_verified===true,use_suggested_image:useImage.value===true,image_verified:reviewChecks.image_verified===true,publish_confirmed:reviewChecks.publish_confirmed===true})});localBusy.value=false;store.state.msg=r.message||r.error||''; 1610 if(r.ok&&['approve','reject','return'].includes(action)){await store.loadNotifications('open');closeWorkspace();}else if(r.ok)await loadTask(); 1611 } 1612 function openFull(){router.push(fullRecordPath.value||'/admin/notifications');} 1613 onMounted(async()=>{if(await store.requireAdmin(router))await loadTask();}); 1614 return {store,notification,record,payload,context,categories,localBusy,loadError,note,reviewChecks,useImage,taskType,taskResolved,taskTitle,fullRecordPath,admin,aiSuggestion,aiDedupStatus,aiDirty,aiApprovalReady,canApproveMember,caseStatusName,caseTypeName,statusName,shortDate,mediaSrc,procurementStatus,orderStatus,aiRisk,aiStatus,dedupLabel,closeWorkspace,openFull,loadTask,memberApprove,memberRemind,caseSetStatus,emergencySetStatus,feedbackAction,guideReview,claimProcurement,claimOrder,startPaidOrder,aiSaveAndCheck,aiReview}; 1615 }, 1616 render:(function(){ 1617const _Vue = Vue 1618const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 1619 1620const _hoisted_1 = { class: "taskWorkspaceShell" } 1621const _hoisted_2 = { class: "taskWorkspaceHeader" } 1622const _hoisted_3 = ["onClick"] 1623const _hoisted_4 = { key: 0 } 1624const _hoisted_5 = { 1625 key: 0, 1626 class: "statusPill" 1627} 1628const _hoisted_6 = { 1629 key: 0, 1630 class: "card taskWorkspaceLoading" 1631} 1632const _hoisted_7 = { 1633 key: 1, 1634 class: "card errorCard" 1635} 1636const _hoisted_8 = { class: "row" } 1637const _hoisted_9 = ["onClick"] 1638const _hoisted_10 = ["onClick"] 1639const _hoisted_11 = { 1640 key: 0, 1641 class: "card taskFocusCard" 1642} 1643const _hoisted_12 = { class: "taskFocusIdentity" } 1644const _hoisted_13 = ["src"] 1645const _hoisted_14 = { 1646 key: 1, 1647 class: "memberThumb memberThumbPlaceholder large" 1648} 1649const _hoisted_15 = { class: "taskFacts" } 1650const _hoisted_16 = { dir: "ltr" } 1651const _hoisted_17 = { class: "taskPrimaryActions" } 1652const _hoisted_18 = ["onClick", "disabled"] 1653const _hoisted_19 = ["onClick", "disabled"] 1654const _hoisted_20 = { 1655 key: 1, 1656 class: "card taskFocusCard" 1657} 1658const _hoisted_21 = { class: "vueBadge" } 1659const _hoisted_22 = { class: "taskLead" } 1660const _hoisted_23 = { class: "taskFacts" } 1661const _hoisted_24 = { dir: "ltr" } 1662const _hoisted_25 = { 1663 key: 0, 1664 class: "taskMediaStrip" 1665} 1666const _hoisted_26 = ["href"] 1667const _hoisted_27 = ["src"] 1668const _hoisted_28 = { class: "taskPrimaryActions" } 1669const _hoisted_29 = ["onClick", "disabled"] 1670const _hoisted_30 = ["onClick", "disabled"] 1671const _hoisted_31 = { 1672 key: 2, 1673 class: "card taskFocusCard emergencyTaskFocus" 1674} 1675const _hoisted_32 = { class: "taskLead" } 1676const _hoisted_33 = { class: "taskFacts" } 1677const _hoisted_34 = { dir: "ltr" } 1678const _hoisted_35 = { 1679 key: 0, 1680 class: "taskLocation" 1681} 1682const _hoisted_36 = { 1683 key: 1, 1684 class: "taskMediaStrip" 1685} 1686const _hoisted_37 = ["href"] 1687const _hoisted_38 = ["src"] 1688const _hoisted_39 = { class: "taskPrimaryActions" } 1689const _hoisted_40 = ["href"] 1690const _hoisted_41 = ["onClick", "disabled"] 1691const _hoisted_42 = ["onClick", "disabled"] 1692const _hoisted_43 = { 1693 key: 3, 1694 class: "card taskFocusCard" 1695} 1696const _hoisted_44 = { class: "taskLead" } 1697const _hoisted_45 = { class: "taskFacts" } 1698const _hoisted_46 = { dir: "ltr" } 1699const _hoisted_47 = ["onUpdate:modelValue"] 1700const _hoisted_48 = { class: "taskPrimaryActions" } 1701const _hoisted_49 = ["onClick", "disabled"] 1702const _hoisted_50 = ["onClick", "disabled"] 1703const _hoisted_51 = ["onClick", "disabled"] 1704const _hoisted_52 = { 1705 key: 4, 1706 class: "card taskFocusCard" 1707} 1708const _hoisted_53 = { class: "vueBadge" } 1709const _hoisted_54 = { class: "taskLead" } 1710const _hoisted_55 = { class: "taskFacts" } 1711const _hoisted_56 = { dir: "ltr" } 1712const _hoisted_57 = { 1713 key: 0, 1714 class: "hint" 1715} 1716const _hoisted_58 = ["onUpdate:modelValue"] 1717const _hoisted_59 = { class: "taskPrimaryActions" } 1718const _hoisted_60 = ["onClick", "disabled"] 1719const _hoisted_61 = ["onClick", "disabled"] 1720const _hoisted_62 = { 1721 key: 5,
1722 class: "card taskFocusCard sourcingTaskFocus" 1723} 1724const _hoisted_63 = { class: "taskLead" } 1725const _hoisted_64 = { class: "taskFacts" } 1726const _hoisted_65 = { 1727 key: 0, 1728 class: "taskDocumentList" 1729} 1730const _hoisted_66 = ["href"] 1731const _hoisted_67 = { class: "taskPrimaryActions" } 1732const _hoisted_68 = ["onClick", "disabled"] 1733const _hoisted_69 = { 1734 key: 6, 1735 class: "card taskFocusCard sourcingTaskFocus" 1736} 1737const _hoisted_70 = { class: "taskFacts" } 1738const _hoisted_71 = { 1739 key: 0, 1740 class: "taskLead" 1741} 1742const _hoisted_72 = ["onUpdate:modelValue"] 1743const _hoisted_73 = { class: "taskPrimaryActions" } 1744const _hoisted_74 = ["onClick", "disabled"] 1745const _hoisted_75 = ["onClick", "disabled"] 1746const _hoisted_76 = { 1747 key: 7, 1748 class: "card taskFocusCard aiTaskWorkspace" 1749} 1750const _hoisted_77 = { class: "aiTaskHeadline" } 1751const _hoisted_78 = { 1752 key: 0, 1753 class: "taskEditGrid" 1754} 1755const _hoisted_79 = ["onUpdate:modelValue"] 1756const _hoisted_80 = ["value"] 1757const _hoisted_81 = ["onUpdate:modelValue"] 1758const _hoisted_82 = ["onUpdate:modelValue"] 1759const _hoisted_83 = { class: "aiTaskSource" } 1760const _hoisted_84 = ["href"] 1761const _hoisted_85 = { 1762 key: 1, 1763 class: "aiTaskImage" 1764} 1765const _hoisted_86 = ["src", "alt"] 1766const _hoisted_87 = ["href"] 1767const _hoisted_88 = { class: "taskLead" } 1768const _hoisted_89 = { key: 0 } 1769const _hoisted_90 = { key: 1 } 1770const _hoisted_91 = { key: 2 } 1771const _hoisted_92 = ["onUpdate:modelValue"] 1772const _hoisted_93 = { 1773 key: 2, 1774 class: "taskPrimaryActions" 1775} 1776const _hoisted_94 = ["onClick", "disabled"] 1777const _hoisted_95 = ["onClick", "disabled"] 1778const _hoisted_96 = ["onClick", "disabled"] 1779const _hoisted_97 = { 1780 key: 3, 1781 class: "taskApprovalChecklist" 1782} 1783const _hoisted_98 = ["onClick", "disabled"] 1784const _hoisted_99 = { class: "taskCheckRow" } 1785const _hoisted_100 = ["onUpdate:modelValue"] 1786const _hoisted_101 = { class: "taskCheckRow" } 1787const _hoisted_102 = ["onUpdate:modelValue"] 1788const _hoisted_103 = { 1789 key: 1, 1790 class: "taskCheckRow" 1791} 1792const _hoisted_104 = ["onUpdate:modelValue"] 1793const _hoisted_105 = { 1794 key: 2, 1795 class: "taskCheckRow" 1796} 1797const _hoisted_106 = ["onUpdate:modelValue"] 1798const _hoisted_107 = { class: "taskCheckRow" } 1799const _hoisted_108 = ["onUpdate:modelValue"] 1800const _hoisted_109 = { class: "taskPrimaryActions" } 1801const _hoisted_110 = ["onClick", "disabled"] 1802const _hoisted_111 = ["onClick", "disabled"] 1803const _hoisted_112 = ["onClick", "disabled"] 1804const _hoisted_113 = { 1805 key: 8, 1806 class: "card taskFocusCard aiTaskWorkspace" 1807} 1808const _hoisted_114 = { class: "taskFacts" } 1809const _hoisted_115 = { class: "taskPrimaryActions" } 1810const _hoisted_116 = ["onClick"] 1811const _hoisted_117 = { 1812 key: 9, 1813 class: "card taskFocusCard" 1814} 1815const _hoisted_118 = ["onClick"] 1816const _hoisted_119 = { class: "taskWorkspaceFooter" } 1817const _hoisted_120 = ["onClick"] 1818const _hoisted_121 = ["onClick"] 1819const _hoisted_122 = { key: 0 } 1820 1821return function render(_ctx, _cache) { 1822 with (_ctx) { 1823 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, vModelText: _vModelText, withDirectives: _withDirectives, normalizeClass: _normalizeClass, vModelSelect: _vModelSelect, createTextVNode: _createTextVNode, vModelCheckbox: _vModelCheckbox, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 1824 1825 const _component_AdminFrame = _resolveComponent("AdminFrame") 1826 1827 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù Ø³Ø§ØØ© اÙÙ ÙÙ Ø©" }, { 1828 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_createElementVNode("header", _hoisted_2, [_createElementVNode("button", { 1829 class: "taskWorkspaceClose", 1830 type: "button", 1831 onClick: closeWorkspace, 1832 "aria-label": "Ø¥ØºÙØ§Ù Ù Ø³Ø§ØØ© اÙÙ ÙÙ Ø©" 1833 }, "Ã", 8, _hoisted_3), _createElementVNode("div", null, [_cache[0] || (_cache[0] = _createElementVNode("span", { class: "adminEyebrow" }, "Ù ÙÙ Ø© Ù Ø±ÙØ²Ø©", -1)), _createElementVNode("h2", null, _toDisplayString(taskTitle), 1), notification 1834 ? (_openBlock(), _createElementBlock("p", _hoisted_4, _toDisplayString(notification.body || 'راجع Ø§ÙØ³Ø¬Ù ÙÙÙÙØ° Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ اÙÙ Ø·ÙÙØ¨.'), 1)) 1835 : _createCommentVNode("", true)]), notification 1836 ? (_openBlock(), _createElementBlock("span", _hoisted_5, _toDisplayString(taskResolved?'Ù ÙØªÙÙØ©':'Ù ÙØªÙØØ©'), 1)) 1837 : _createCommentVNode("", true)]), (localBusy&&!record) 1838 ? (_openBlock(), _createElementBlock("div", _hoisted_6, "جار٠تØÙ ÙÙ Ø§ÙØ³Ø¬Ù اÙÙ Ø·ÙÙØ¨ ÙÙØ·...")) 1839 : loadError 1840 ? (_openBlock(), _createElementBlock("div", _hoisted_7, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "تعذر ÙØªØ اÙÙ ÙÙ Ø©", -1)), _createElementVNode("p", null, _toDisplayString(loadError), 1), _createElementVNode("div", _hoisted_8, [_createElementVNode("button", { 1841 class: "btn secondary", 1842 onClick: loadTask 1843 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_9), _createElementVNode("button", { 1844 class: "btn", 1845 onClick: closeWorkspace 1846 }, "Ø§ÙØ¹Ùدة ÙÙØµÙدÙÙ", 8, _hoisted_10)])])) 1847 : record 1848 ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [(taskType==='member') 1849 ? (_openBlock(), _createElementBlock("section", _hoisted_11, [_createElementVNode("div", _hoisted_12, [($memberPhoto(record,'profile')) 1850 ? (_openBlock(), _createElementBlock("img", { 1851 key: 0, 1852 src: $memberPhoto(record,'profile'), 1853 alt: "ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù" 1854 }, null, 8, _hoisted_13)) 1855 : (_openBlock(), _createElementBlock("div", _hoisted_14, "ð¤")), _createElementVNode("div", null, [_cache[2] || (_cache[2] = _createElementVNode("span", { class: "vueBadge" }, "عضÙÙØ©", -1)), _createElementVNode("h3", null, _toDisplayString(record.full_name||'عضÙ'), 1), _createElementVNode("p", null, _toDisplayString(record.gzc_id||'بدÙ٠رÙ٠عضÙÙØ©') + " · " + _toDisplayString($cityLabel(record.china_city)||'-') + " · " + _toDisplayString(statusName(record.status)), 1)])]), _createElementVNode("div", _hoisted_15, [_
1855createElementVNode("span", null, [_createElementVNode("b", _hoisted_16, _toDisplayString(record.whatsapp||record.china_phone||'-'), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "Ø§ÙØªÙاصÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.category||'-'), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "اÙÙØ¦Ø©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.china_district||'-'), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "اÙÙ ÙØ·ÙØ©", -1))])]), _createElementVNode("div", _hoisted_17, [(canApproveMember(record)) 1856 ? (_openBlock(), _createElementBlock("button", { 1857 key: 0, 1858 class: "btn", 1859 onClick: memberApprove, 1860 disabled: localBusy 1861 }, "اعت٠اد Ø§ÙØ¹Ø¶Ù ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_18)) 1862 : _createCommentVNode("", true), (record.status!=='approved') 1863 ? (_openBlock(), _createElementBlock("button", { 1864 key: 1, 1865 class: "btn secondary", 1866 onClick: memberRemind, 1867 disabled: localBusy 1868 }, "إرسا٠تذÙÙØ±", 8, _hoisted_19)) 1869 : _createCommentVNode("", true)])])) 1870 : (taskType==='case') 1871 ? (_openBlock(), _createElementBlock("section", _hoisted_20, [ 1872 _createElementVNode("span", _hoisted_21, _toDisplayString(context.mode==='arrival'?'ÙØµÙÙ':'٠ساعدة'), 1), 1873 _createElementVNode("h3", null, _toDisplayString(record.case_code||record.title||'ØØ§ÙØ©'), 1), 1874 _createElementVNode("p", _hoisted_22, _toDisplayString(record.description||'ÙØ§ ÙÙØ¬Ø¯ ÙØµÙ.'), 1), 1875 _createElementVNode("div", _hoisted_23, [ 1876 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.full_name||record.contact_name||'-'), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "Ø§ÙØ§Ø³Ù ", -1))]), 1877 _createElementVNode("span", null, [_createElementVNode("b", _hoisted_24, _toDisplayString(record.whatsapp||record.contact_whatsapp||record.china_phone||'-'), 1), _cache[7] || (_cache[7] = _createElementVNode("small", null, "Ø§ÙØªÙاصÙ", -1))]), 1878 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString($cityLabel(record.china_city)||'-'), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "اÙ٠دÙÙØ©", -1))]), 1879 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(caseStatusName(record.status)), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))]) 1880 ]), 1881 (record.media&&record.media.length) 1882 ? (_openBlock(), _createElementBlock("div", _hoisted_25, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.media, (m) => { 1883 return (_openBlock(), _createElementBlock("a", { 1884 key: m.id, 1885 href: m.file_url, 1886 target: "_blank", 1887 rel: "noopener" 1888 }, [_createElementVNode("img", { 1889 src: mediaSrc(m), 1890 alt: "٠رÙÙ Ø§ÙØØ§ÙØ©" 1891 }, null, 8, _hoisted_27)], 8, _hoisted_26)) 1892 }), 128))])) 1893 : _createCommentVNode("", true), 1894 _createElementVNode("div", _hoisted_28, [_createElementVNode("button", { 1895 class: "btn secondary", 1896 onClick: $event => (caseSetStatus('in_progress')), 1897 disabled: localBusy 1898 }, "بدء اÙ٠تابعة", 8, _hoisted_29), _createElementVNode("button", { 1899 class: "btn danger", 1900 onClick: $event => (caseSetStatus('closed')), 1901 disabled: localBusy 1902 }, "Ø¥ØºÙØ§Ù Ø§ÙØØ§ÙØ© ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_30)]) 1903 ])) 1904 : (taskType==='emergency') 1905 ? (_openBlock(), _createElementBlock("section", _hoisted_31, [ 1906 _cache[14] || (_cache[14] = _createElementVNode("span", { class: "vueBadge" }, "Ø·ÙØ§Ø±Ø¦", -1)), 1907 _createElementVNode("h3", null, _toDisplayString(record.ticket_code||'Ø¨ÙØ§Øº Ø·ÙØ§Ø±Ø¦'), 1), 1908 _createElementVNode("p", _hoisted_32, _toDisplayString(record.description||'ÙØ§ ÙÙØ¬Ø¯ ÙØµÙ.'), 1), 1909 _createElementVNode("div", _hoisted_33, [ 1910 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.full_name||'عضÙ'), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "Ø§ÙØ¹Ø¶Ù", -1))]), 1911 _createElementVNode("span", null, [_createElementVNode("b", _hoisted_34, _toDisplayString(record.whatsapp||record.china_ph
1911one||'-'), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "Ø§ÙØªÙاصÙ", -1))]), 1912 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.priority||'-'), 1), _cache[12] || (_cache[12] = _createElementVNode("small", null, "Ø§ÙØ£ÙÙÙÙØ©", -1))]), 1913 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(caseStatusName(record.status)), 1), _cache[13] || (_cache[13] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))]) 1914 ]), 1915 (record.location_text) 1916 ? (_openBlock(), _createElementBlock("p", _hoisted_35, "اÙÙ ÙÙØ¹: " + _toDisplayString(record.location_text), 1)) 1917 : _createCommentVNode("", true), 1918 (record.media&&record.media.length) 1919 ? (_openBlock(), _createElementBlock("div", _hoisted_36, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(record.media, (m) => { 1920 return (_openBlock(), _createElementBlock("a", { 1921 key: m.id, 1922 href: m.file_url, 1923 target: "_blank", 1924 rel: "noopener" 1925 }, [_createElementVNode("img", { 1926 src: mediaSrc(m), 1927 alt: "ØµÙØ±Ø© Ø§ÙØ¨Ùاغ" 1928 }, null, 8, _hoisted_38)], 8, _hoisted_37)) 1929 }), 128))])) 1930 : _createCommentVNode("", true), 1931 _createElementVNode("div", _hoisted_39, [(record.whatsapp) 1932 ? (_openBlock(), _createElementBlock("a", { 1933 key: 0, 1934 class: "btn secondary", 1935 href: 'https://wa.me/'+record.whatsapp, 1936 target: "_blank", 1937 rel: "noopener" 1938 }, "ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_40)) 1939 : _createCommentVNode("", true), _createElementVNode("button", { 1940 class: "btn secondary", 1941 onClick: $event => (emergencySetStatus('in_progress')), 1942 disabled: localBusy 1943 }, "ÙÙØ¯ اÙ٠تابعة", 8, _hoisted_41), _createElementVNode("button", { 1944 class: "btn danger", 1945 onClick: $event => (emergencySetStatus('closed')), 1946 disabled: localBusy 1947 }, "Ø¥ØºÙØ§Ù Ø§ÙØ¨Ùاغ ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_42)]) 1948 ])) 1949 : (taskType==='feedback') 1950 ? (_openBlock(), _createElementBlock("section", _hoisted_43, [ 1951 _cache[19] || (_cache[19] = _createElementVNode("span", { class: "vueBadge" }, "Ù ÙØ§ØØ¸Ø© عضÙ", -1)), 1952 _createElementVNode("h3", null, _toDisplayString(record.title||record.feedback_type||'Ù ÙØ§ØØ¸Ø©'), 1), 1953 _createElementVNode("p", _hoisted_44, _toDisplayString(record.message), 1), 1954 _createElementVNode("div", _hoisted_45, [ 1955 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.full_name||'-'), 1), _cache[15] || (_cache[15] = _createElementVNode("small", null, "Ø§ÙØ¹Ø¶Ù", -1))]), 1956 _createElementVNode("span", null, [_createElementVNode("b", _hoisted_46, _toDisplayString(record.whatsapp||'-'), 1), _cache[16] || (_cache[16] = _createElementVNode("small", null, "ÙØ§ØªØ³Ø§Ø¨", -1))]), 1957 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString($cityLabel(record.china_city)||'-'), 1), _cache[17] || (_cache[17] = _createElementVNode("small", null, "اÙ٠دÙÙØ©", -1))]), 1958 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.status||'-'), 1), _cache[18] || (_cache[18] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))]) 1959 ]), 1960 _withDirectives(_createElementVNode("textarea", { 1961 "onUpdate:modelValue": $event => ((note) = $event), 1962 placeholder: "Ù ÙØ§ØØ¸Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø© / سبب اÙÙØ±Ø§Ø±" 1963 }, null, 8, _hoisted_47), [[_vModelText, note]]), 1964 _createElementVNode("div", _hoisted_48, [_createElementVNode("button", { 1965 class: "btn secondary", 1966 onClick: $event => (feedbackAction('reviewing')), 1967 disabled: localBusy 1968 }, "ÙÙØ¯ اÙ٠راجعة", 8, _hoisted_49), _createElementVNode("button", { 1969 class: "btn", 1970 onClick: $event => (feedbackAction('done')), 1971 disabled: localBusy 1972 }, "ØªÙ Ø§ÙØªÙÙÙØ° ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_50), _createElementVNode("button", { 1973 class: "btn danger", 1974 onClick: $event => (feedbackAction('rejected')), 1975 disabled: localBusy 1976 }, "Ø±ÙØ¶ ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_51)]) 1977 ])) 1978 : (taskType==='guide_suggestion'||taskType==='guide_report') 1979 ? (_openBlock(), _createElementBlock("section", _hoisted_52, [ 1980 _createElementVNode("span", _hoisted_53, _toDisplayString(taskType==='guide_suggestion'?'Ø§ÙØªØ±Ø§Ø دÙÙÙ Ø§ÙØµÙÙ':'Ø¨ÙØ§Øº تصØÙØ'), 1), 1981 _createElementVNode("h3", null, _toDisplayString(record.title||record.item_title||'Ù ÙÙ Ø© Ù ØØªÙÙ'), 1), 1982 _createElementVNode("p", _hoisted_54, _toDisplayString(record.details||record.message||'-'), 1), 1983 _createElementVNode("div", _hoisted_55, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.member_name||'عضÙ'), 1), _cache[20] || (_cache[20] = _createElementVNode("small", null, "اÙ٠رسÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", _hoisted_56, _toDisplayString(record.member_phone||'-'), 1), _cache[21] || (_cache[21] = _createElementVNode("small", null, "Ø§ÙØªÙاصÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.status||'-'), 1), _cache[22] || (_cache[22] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))])]), 1984 (taskType==='guide_suggestion'&&record.category==='Ù ÙØªØ±Ø Ù ÙØ§Ù â ÙØØªØ§Ø¬ ٠راجعة') 1985 ? (_openBlock(), _createElementBlock("p", _hoisted_57, "ÙØ°Ø§ ٠رجع Ù ÙØ§Ù Ù Ù AMapØ ÙÙÙØ³ ØµÙØØ© Ø¬Ø§ÙØ²Ø© ÙÙØ¯ÙÙÙ. تØÙ٠٠٠اÙÙØ±Ø¹ ÙØ§ÙعÙÙØ§ÙØ ÙØ§Ùتب اÙÙØµ ٠٠٠صادر Ù ÙØ«ÙÙØ©Ø ÙØ£Ø¶Ù ØµÙØ±Ø© ٠رخصة Ù٠رتبطة باÙÙ ÙØ§Ù ÙÙ Ù ØØ±Ø± Ø§ÙØ¯ÙÙÙ ÙØ¨Ù اÙÙØ´Ø±.")) 1986 : _createCommentVNode("", true), 1987 _withDirectives(_createElementVNode("textarea", { 1988 "onUpdate:modelValue": $event => ((note) = $event), 1989 placeholder: "Ù ÙØ§ØØ¸Ø© اÙ٠راجع / سبب Ø§ÙØ±Ùض" 1990 }, null, 8, _hoisted_58), [[_vModelText, note]]), 1991 _createElementVNode("div", _hoisted_59, [_createElementVNode("button", { 1992 class: "btn", 1993 onClick: $event => (guideReview('accept')), 1994 disabled: localBusy 1995 }, _toDisplayString(taskType==='guide_suggestion'&&record.category==='Ù ÙØªØ±Ø Ù ÙØ§Ù â ÙØØªØ§Ø¬ ٠راجعة'?'ÙØ¨Ù٠اÙÙÙØ±Ø© ÙÙØ· ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©':'ÙØ¨ÙÙ ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©'), 9, _hoisted_60), _createElementVNode("button", { 1996 class: "btn danger", 1997 onClick: $event => (guideReview('reject')), 1998 disabled: localBusy 1999 }, "Ø±ÙØ¶ ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_61)]) 2000 ])) 2001 : (taskType==='procurement_request') 2002 ? (_openBlock(), _createElementBlock("section", _hoisted_62, [
2003 _cache[27] || (_cache[27] = _createElementVNode("span", { class: "vueBadge" }, "Ø·ÙØ¨ ØªÙØ±Ùد", -1)), 2004 _createElementVNode("h3", null, _toDisplayString(record.request_code) + " â " + _toDisplayString(record.title), 1), 2005 _createElementVNode("p", _hoisted_63, _toDisplayString(record.description), 1), 2006 _createElementVNode("div", _hoisted_64, [ 2007 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.member_name||'-'), 1), _cache[23] || (_cache[23] = _createElementVNode("small", null, "Ø§ÙØ¹Ù ÙÙ", -1))]), 2008 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(procurementStatus(record.status)), 1), _cache[24] || (_cache[24] = _createElementVNode("small", null, "اÙ٠رØÙØ©", -1))]), 2009 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.assigned_admin_name||'ØºÙØ± ٠عÙÙ'), 1), _cache[25] || (_cache[25] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1))]), 2010 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.service_type||'-'), 1), _cache[26] || (_cache[26] = _createElementVNode("small", null, "Ø§ÙØ®Ø¯Ù Ø©", -1))]) 2011 ]), 2012 (payload&&payload.documents&&payload.documents.length) 2013 ? (_openBlock(), _createElementBlock("div", _hoisted_65, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(payload.documents, (d) => { 2014 return (_openBlock(), _createElementBlock("a", { 2015 key: d.id, 2016 href: d.file_url, 2017 target: "_blank", 2018 rel: "noopener" 2019 }, [_createElementVNode("b", null, _toDisplayString(d.original_name), 1), _createElementVNode("small", null, _toDisplayString(d.document_type), 1)], 8, _hoisted_66)) 2020 }), 128))])) 2021 : _createCommentVNode("", true), 2022 _createElementVNode("div", _hoisted_67, [_createElementVNode("button", { 2023 class: "btn", 2024 onClick: claimProcurement, 2025 disabled: localBusy 2026 }, "Ø§Ø³ØªÙØ§Ù اÙÙ ÙÙ Ø© ÙØ¥ÙÙØ§Ø¡ Ø§ÙØ¥Ø´Ø¹Ø§Ø±", 8, _hoisted_68)]) 2027 ])) 2028 : (taskType==='customer_order') 2029 ? (_openBlock(), _createElementBlock("section", _hoisted_69, [ 2030 _cache[32] || (_cache[32] = _createElementVNode("span", { class: "vueBadge" }, "Ø·ÙØ¨ ع٠ÙÙ Ù Ø¤ÙØ¯", -1)), 2031 _createElementVNode("h3", null, _toDisplayString(record.order_code) + " â " + _toDisplayString(record.title_snapshot), 1), 2032 _createElementVNode("div", _hoisted_70, [ 2033 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.member_name||'-'), 1), _cache[28] || (_cache[28] = _createElementVNode("small", null, "Ø§ÙØ¹Ù ÙÙ", -1))]), 2034 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(orderStatus(record.status)), 1), _cache[29] || (_cache[29] = _createElementVNode("small", null, "ØØ§ÙØ© Ø§ÙØ·Ùب", -1))]), 2035 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.payment_status||'-'), 1), _cache[30] || (_cache[30] = _createElementVNode("small", null, "Ø§ÙØ¯Ùع", -1))]), 2036 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.total_amount) + " " + _toDisplayString(record.currency), 1), _cache[31] || (_cache[31] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙÙ", -1))]) 2037 ]), 2038 (notification.type==='customer_order_payment_proof') 2039 ? (_openBlock(), _createElementBlock("p", _hoisted_71, "ØªÙ Ø±ÙØ¹ إثبات Ø¯ÙØ¹. راجع اÙÙ Ø³ØªÙØ¯Ø§Øª اÙ٠رتبطة ÙØ¨Ù بدء Ø§ÙØªÙÙÙØ°.")) 2040 : _createCommentVNode("", true), 2041 (notification.type==='customer_order_payment_proof') 2042 ? _withDirectives((_openBlock(), _createElementBlock("textarea", { 2043 key: 1, 2044 "onUpdate:modelValue": $event => ((note) = $event), 2045 placeholder: "Ù ÙØ§ØØ¸Ø© ٠راجعة Ø§ÙØ¯Ùع" 2046 }, null, 8, _hoisted_72)), [[_vModelText, note]]) 2047 : _createCommentVNode("", true), 2048 _createElementVNode("div", _hoisted_73, [(notification.type!=='customer_order_payment_proof') 2049 ? (_openBlock(), _createElementBlock("button", { 2050 key: 0, 2051 class: "btn", 2052 onClick: claimOrder, 2053 disabled: localBusy 2054 }, "Ø§Ø³ØªÙØ§Ù Ø§ÙØ·Ùب ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_74)) 2055 : (_openBlock(), _createElementBlock("button", { 2056 key: 1, 2057 class: "btn", 2058 onClick: startPaidOrder, 2059 disabled: localBusy 2060 }, "تأÙÙØ¯ Ø§ÙØ¯Ùع ÙØ¨Ø¯Ø¡ Ø§ÙØªÙÙÙØ°", 8, _hoisted_75))]) 2061 ])) 2062 : (taskType==='ai_research_suggestion') 2063 ? (_openBlock(), _createElementBlock("section", _hoisted_76, [ 2064 _createElementVNode("div", _hoisted_77, [_createElementVNode("div", null, [_cache[33] || (_cache[33] = _createElementVNode("span", { class: "vueBadge" }, "٠راجعة AI", -1)), _createElementVNode("h3", null, "#" + _toDisplayString(record.id) + " â " + _toDisplayString(record.title_ar||'Ù ÙØªØ±Ø Ø¨ÙØ§ عÙÙØ§Ù'), 1), _createElementVNode("p", null, _toDisplayString(record.category_name_ar||'بدÙ٠تصÙÙÙ') + " · " + _toDisplayString(aiStatus(record.status)) + " · ٠خاطر " + _toDisplayString(aiRisk(record.risk_level)), 1)]), _createElementVNode("span", { class: _normalizeClass(["statusPill", {'canaryPill':aiDedupStatus==='clear','danger':aiDedupStatus==='conflict'}]) }, _toDisplayString(dedupLabel(aiDedupStatus)), 3)]), 2065 (record.status==='pending') 2066 ? (_openBlock(), _createElementBlock("div", _hoisted_78, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((record.category_id) = $event) }, [_cache[34] || (_cache[34] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØªØµÙÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(categories, (c) => { 2067 return (_openBlock(), _createElementBlock("option", { 2068 key: c.id, 2069 value: c.id 2070 }, _toDisplayString(c.icon) + " " + _toDisplayString(c.name_ar), 9, _hoisted_80)) 2071 }), 128))], 8, _hoisted_79), [[_vModelSelect, record.category_id]]), _withDirectives(_createElementVNode("input", { 2072 "onUpdate:modelValue": $event => ((record.title_ar) = $event), 2073 placeholder: "Ø§ÙØ¹ÙÙØ§Ù" 2074 }, null, 8, _hoisted_81), [[_vModelText, record.title_ar]]), _withDirectives(_createElementVNode("textarea", { 2075 "onUpdate:modelValue": $event => ((record.summary_ar) = $event), 2076 placeholder: "اÙÙ ÙØ®Øµ" 2077 }, null, 8, _hoisted_82), [[_vModelText, record.summary_ar]])])) 2078 : _createCommentVNode("", true), 2079 _createElementVNode("div", _hoisted_83, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(record.source_name||record.source_domain||'اÙ٠صدر'), 1), _createElementVNode("small", null, _toDisplayString(record.source_domain||'-'), 1)]), _createElementVNode("a", { 2080 href: record.source_url, 2081 target: "_blank", 2082 rel: "noopener" 2083 }, "ÙØªØ اÙ٠صدر", 8, _hoisted_84)]), 2084 (record.image_status==='ready'&&record.image_url) 2085 ? (_openBlock(), _createElementBlock("figure", _hoisted_85, [_createElementVNode("img", { 2086 src: record.image_thumb_url||record.image_url, 2087 alt: record.title_ar 2088 }, null, 8, _hoisted_86), _createElementVNode("figcaption", null, [(record.image_source_url) 2089 ? (_openBlock(), _createElementBlock("a", { 2090 key: 0, 2091 href: record.image_source_url, 2092 target: "_blank", 2093 rel: "noopener" 2094 }, "ÙØªØ Ø£ØµÙ Ø§ÙØµÙرة", 8, _hoisted_87)) 2095 : _createCommentVNode("", true)])])) 2096 : _createCommentVNode("", true), 2097 _createElementVNode("p", _hoisted_88, [_cache[35] || (_cache[35] = _createElementVNode("b", null, "Ø®ÙØ§ØµØ© Ø§ÙØ¯ÙÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(record.evidence_summary||'ÙØ§ ØªÙØ¬Ø¯ Ø®ÙØ§ØµØ©.'), 1)]), 2098 _createElementVNode("section", { class: _normalizeClass(["taskDedupBox", 'state-'+aiDedupStatus]) }, [_createElementVNode("b", null, "Ù ÙØ¹ Ø§ÙØªÙرار: " + _toDisplayString(dedupLabel(aiDedupStatus)), 1), (record.dedup_current_match_item_title) 2099 ? (_openBlock(), _createElementBlock("small", _hoisted_89, "Ø§ÙØªØ¹Ø§Ø±Ø¶ ٠ع: " + _toDisplayString(record.dedup_current_match_item_title), 1)) 2100 : (record.dedup_current_match_suggestion_title) 2101 ? (_openBlock(), _createElementBlock("small", _hoisted_90, "Ø§ÙØªØ¹Ø§Ø±Ø¶ ٠ع Ù ÙØªØ±Ø: " + _toDisplayString(record.dedup_current_match_suggestion_title), 1)) 2102 : (_openBlock(), _createElementBlock("small", _hoisted_91, "ت٠ت Ù ÙØ§Ø±ÙØ© اÙÙ ÙØªØ±Ø باÙÙ ØØªÙÙ ÙØ§ÙÙ ÙØªØ±ØØ§Øª اÙÙØ´Ø·Ø©."))], 2), 2103 _withDirectives(_createElementVNode("textarea", { 2104 "onUpdate:modelValue": $event => ((note) = $event), 2105 placeholder: "Ù ÙØ§ØØ¸Ø© اÙ٠راجع / سبب Ø§ÙØ¥Ø±Ø¬Ø§Ø¹ Ø£Ù Ø§ÙØ±Ùض" 2106 }, null, 8, _hoisted_92), [[_vModelText, note]]), 2107 (record.status==='pending') 2108 ? (_openBlock(), _createElementBlock("div", _hoisted_93, [_createElementVNode("button", { 2109 class: "btn secondary", 2110 onClick: aiSaveAndCheck, 2111 disabled: localBusy 2112 }, _toDisplayString(aiDirty?'ØÙظ ÙÙØØµ Ø§ÙØªÙرار':'ÙØØµ Ø§ÙØªÙرار'), 9, _hoisted_94), _createElementVNode("button", { 2113 class: "btn", 2114 onClick: $event => (aiReview('submit')), 2115 disabled: localBusy||aiDedupStatus!=='clear' 2116 }, _toDisplayString(localBusy?'Ø¬Ø§Ø±Ù Ø§ÙØ¥Ø±Ø³Ø§Ù...':'إرسا٠ÙÙ٠راجعة'), 9, _hoisted_95), _createElementVNode("button", { 2117 class: "btn danger", 2118 onClick: $event => (aiReview('reject')), 2119 disabled: localBusy 2120 }, "Ø±ÙØ¶", 8, _hoisted_96)])) 2121 : (record.status==='in_review') 2122 ? (_openBlock(), _createElementBlock("section", _hoisted_97, [ 2123 _cache[41] || (_cache[41] = _createElementVNode("h4", null, "Ø§ÙØªØÙÙ ÙØ¨Ù اÙÙØ´Ø±", -1)), 2124 (aiDedupStatus!=='clear') 2125 ? (_openBlock(), _createElementBlock("button", { 2126 key: 0, 2127 class: "btn secondary", 2128 onClick: aiSaveAndCheck, 2129 disabled: localBusy 2130 }, "إعادة ÙØØµ Ø§ÙØªÙرار", 8, _hoisted_98)) 2131 : _createCommentVNode("", true), 2132 _createElementVNode("label", _hoisted_99, [_withDirectives(_createElementVNode("input", { 2133 type: "checkbox", 2134 "onUpdate:modelValue": $event => ((reviewChecks.source_verified) = $event) 2135 }, null, 8, _hoisted_100), [[_vModelCheckbox, reviewChecks.source_verified]]), _cache[36] || (_cache[36] = _createElementVNode("span", null, "ÙØªØØª اÙ٠صدر ÙØªØ£Ùدت Ø£ÙÙ ÙØ«Ø¨Øª اÙ٠عÙÙÙ Ø©.", -1))]), 2136 _createElementVNode("label", _hoisted_101, [_withDirectives(_createElementVNode("input", { 2137 type: "checkbox", 2138 "onUpdate:modelValue": $event => ((reviewChecks.content_verified) = $event) 2139 }, null, 8, _hoisted_102), [[_vModelCheckbox, reviewChecks.content_verified]]), _cache[37] || (_cache[37] = _createElementVNode("span", null, "راجعت Ø§ÙØ¹ÙÙØ§Ù ÙØ§ÙÙ ÙØ®Øµ ÙØ§ÙتصÙÙÙ.", -1))]), 2140 (record.image_status==='ready') 2141 ? (_openBlock(), _createElementBlock("label", _hoisted_103, [_withDirectives(_createElementVNode("input", { 2142 type: "checkbox", 2143 "onUpdate:modelValue": $event => ((useImage) = $event) 2144 }, null, 8, _hoisted_104), [[_vModelCheckbox, useImage]]), _cache[38] || (_cache[38] = _createElementVNode("span", null, "ÙØ´Ø± Ø§ÙØµÙرة اÙÙ ÙØªØ±ØØ© ٠ع Ø§ÙØ¹Ùصر.", -1))])) 2145 : _createCommentVNode("", true), 2146 useImage 2147 ? (_openBlock(), _createElementBlock("label", _hoisted_105, [_withDirectives(_createElementVNode("input", { 2148 type: "checkbox", 2149 "onUpdate:modelValue": $event => ((reviewChecks.image_verified) = $event) 2150
2150 }, null, 8, _hoisted_106), [[_vModelCheckbox, reviewChecks.image_verified]]), _cache[39] || (_cache[39] = _createElementVNode("span", null, "راجعت Ø§ÙØµÙرة ÙÙ ØµØ¯Ø±ÙØ§ ÙØªØ£Ùدت Ù Ù ØµÙØ§ØÙØªÙØ§.", -1))])) 2151 : _createCommentVNode("", true), 2152 _createElementVNode("label", _hoisted_107, [_withDirectives(_createElementVNode("input", { 2153 type: "checkbox", 2154 "onUpdate:modelValue": $event => ((reviewChecks.publish_confirmed) = $event) 2155 }, null, 8, _hoisted_108), [[_vModelCheckbox, reviewChecks.publish_confirmed]]), _cache[40] || (_cache[40] = _createElementVNode("span", null, "Ø£ÙÙÙ Ø£Ù Ø§ÙØ§Ø¹ØªÙ اد سÙÙØ´Ø± Ø£Ù ÙØØ¯ÙØ« Ø§ÙØ¹Ùصر بعد اÙÙØØµ اÙÙÙØ§Ø¦Ù.", -1))]), 2156 _createElementVNode("div", _hoisted_109, [_createElementVNode("button", { 2157 class: "btn", 2158 onClick: $event => (aiReview('approve')), 2159 disabled: localBusy||!aiApprovalReady||aiDedupStatus!=='clear' 2160 }, "اعت٠اد ÙÙØ´Ø± ÙØ¥ÙÙØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_110), _createElementVNode("button", { 2161 class: "btn secondary", 2162 onClick: $event => (aiReview('return')), 2163 disabled: localBusy 2164 }, "إرجاع ÙÙØªØµØÙØ", 8, _hoisted_111), _createElementVNode("button", { 2165 class: "btn danger", 2166 onClick: $event => (aiReview('reject')), 2167 disabled: localBusy 2168 }, "Ø±ÙØ¶", 8, _hoisted_112)]) 2169 ])) 2170 : _createCommentVNode("", true) 2171 ])) 2172 : (taskType==='ai_research_job') 2173 ? (_openBlock(), _createElementBlock("section", _hoisted_113, [ 2174 _cache[45] || (_cache[45] = _createElementVNode("span", { class: "vueBadge" }, "Ù ÙÙ Ø© Ø¨ØØ« AI", -1)), 2175 _createElementVNode("h3", null, "#" + _toDisplayString(record.id) + " â " + _toDisplayString(record.query_text||'Ø¨ØØ« ÙØ³Ø¯ ÙØ¬Ùات اÙÙ ØØªÙÙ'), 1), 2176 _createElementVNode("div", _hoisted_114, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.result_count||0), 1), _cache[42] || (_cache[42] = _createElementVNode("small", null, "Ù ÙØªØ±ØØ§Øª", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.source_count||0), 1), _cache[43] || (_cache[43] = _createElementVNode("small", null, "٠صادر", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(record.status||'-'), 1), _cache[44] || (_cache[44] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))])]), 2177 _cache[46] || (_cache[46] = _createElementVNode("p", { class: "taskLead" }, "ÙØ°Ù اÙÙ ÙÙ Ø© ÙØ¯ ØªØØªÙÙ Ø£ÙØ«Ø± Ù Ù Ù ÙØªØ±ØØ ÙØ°Ù٠تبÙÙ Ù ÙØªÙØØ© ØØªÙ ٠راجعة اÙÙ ÙØªØ±ØØ§Øª اÙ٠رتبطة.", -1)), 2178 _createElementVNode("div", _hoisted_115, [_createElementVNode("button", { 2179 class: "btn", 2180 onClick: openFull 2181 }, "ÙØªØ ØµÙØ¯Ù٠اÙÙ ÙØªØ±ØØ§Øª اÙ٠رتبط", 8, _hoisted_116)]) 2182 ])) 2183 : (_openBlock(), _createElementBlock("section", _hoisted_117, [_cache[47] || (_cache[47] = _createElementVNode("h3", null, "اÙÙ ÙÙ Ø© ٠رتبطة بسج٠تشغÙÙÙ", -1)), _cache[48] || (_cache[48] = _createElementVNode("p", null, "ÙØ°Ø§ اÙÙÙØ¹ ÙØ§ ÙÙ ÙÙ Ø¥Ø¬Ø±Ø§Ø¡Ù Ù Ø®ØªØµØ±Ø§Ù Ø¯Ø§Ø®Ù Ù Ø³Ø§ØØ© اÙÙ ÙÙ Ø© بعد.", -1)), _createElementVNode("button", { 2184 class: "btn", 2185 onClick: openFull 2186 }, "ÙØªØ Ø§ÙØ³Ø¬Ù اÙÙØ§Ù Ù", 8, _hoisted_118)])), _createElementVNode("footer", _hoisted_119, [_createElementVNode("button", { 2187 class: "smallbtn secondary", 2188 onClick: closeWorkspace 2189 }, "Ø¥ØºÙØ§Ù", 8, _hoisted_120), _createElementVNode("button", { 2190 class: "smallbtn secondary", 2191 onClick: openFull 2192 }, "ÙØªØ Ø§ÙØ³Ø¬Ù اÙÙØ§Ù Ù", 8, _hoisted_121), localBusy 2193 ? (_openBlock(), _createElementBlock("span", _hoisted_122, "جار٠تÙÙÙØ° Ø§ÙØ¥Ø¬Ø±Ø§Ø¡...")) 2194 : _createCommentVNode("", true)])], 64)) 2195 : _createCommentVNode("", true)])]), 2196 _: 1 2197 })) 2198 } 2199} 2200})() 2201 }; 2202 2203 const NotificationsPage={ 2204 components:{AdminFrame}, 2205 setup(){ 2206 const store=useGzcStore();const router=useRouter();const status=ref('open');const openItems=reactive({}); 2207 async function load(){if(await store.requireAdmin(router)) await store.loadNotifications(status.value);} 2208 onMounted(load);
2208 watch(status,load); 2209 const notifStats=computed(()=>{ 2210 const xs=safeArray(store.state.notifications); 2211 return { 2212 total:xs.length, 2213 unread:xs.filter(x=>String(x.status)==='unread').length, 2214 action:xs.filter(x=>normalizeAction(x)).length, 2215 committee:new Set(xs.map(x=>x.target_committee||x.target_role||'عا٠')).size 2216 }; 2217 }); 2218 function toggleItem(id){openItems[id]=!openItems[id];} 2219 function normalizeAction(n){let u=String((n&&n.action_url)||(n&&n.url)||'').trim();if(!u)return ''; 2220 if(u.startsWith(PRIMARY_PUBLIC_ORIGIN)) u=u.replace(PRIMARY_PUBLIC_ORIGIN,''); 2221 if(u.startsWith(LEGACY_PUBLIC_ORIGIN)) u=u.replace(LEGACY_PUBLIC_ORIGIN,''); 2222 if(u.startsWith('/vue')) u=u.slice(4)||'/'; 2223 if(u.startsWith('/admin/members/')) u=u.replace('/admin/members/','/admin/member/'); 2224 return u.startsWith('/admin')&&!u.startsWith('//')&&!u.includes('\\')?u:'/admin/notifications'; 2225 } 2226 function typeLabel(n){const v=String((n&&n.target_committee)||(n&&n.target_role)||'');return ({super_admin:'Ø§ÙØ¥Ø¯Ø§Ø±Ø©',it_admin:'تÙÙÙØ© اÙ٠عÙÙ٠ات',system_admin:'تشغÙ٠اÙÙØ¸Ø§Ù ',membership:'ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©',events:'اÙÙØ¹Ø§ÙÙØ§Øª',arrival:'اÙÙØµÙÙ',help:'اÙ٠ساعدة',emergency:'Ø§ÙØ·Ùارئ',guide:'اÙÙ ØØªÙÙ'}[v])||'إدارة اÙÙ ÙØµØ©';} 2227 function taskKindLabel(n){const v=String(n&&n.related_type||'');return ({member:'عضÙÙØ©',case:'ØØ§ÙØ© Ù Ø¬ØªÙ Ø¹ÙØ©',emergency:'Ø·ÙØ§Ø±Ø¦',feedback:'Ù ÙØ§ØØ¸Ø© عضÙ',guide_suggestion:'Ø§ÙØªØ±Ø§Ø Ù ØØªÙÙ',guide_report:'Ø¨ÙØ§Øº تصØÙØ',procurement_request:'Ø·ÙØ¨ ØªÙØ±Ùد',customer_order:'Ø·ÙØ¨ Ù Ø¤ÙØ¯',ai_research_suggestion:'٠راجعة Ù ÙØªØ±Ø AI',ai_research_job:'Ù ÙÙ Ø© Ø¨ØØ« AI'}[v])||'Ù ÙÙ Ø© Ø¥Ø¯Ø§Ø±ÙØ©';} 2228 function notificationState(n){if(status.value==='history')return 'done';return String(n&&n.status||'')==='unread'?'unread':'open';} 2229 function notificationStateMark(n){return ({done:'â',unread:'â',open:'â'}[notificationState(n)])||'â';} 2230 function notificationStateLabel(n){return ({done:'Ù ÙÙ Ø© Ù ÙØªÙÙØ©',unread:'Ù ÙÙ Ø© Ø¬Ø¯ÙØ¯Ø© ØºÙØ± Ù ÙØ±Ùءة',open:'Ù ÙÙ Ø© Ù ÙØªÙØØ©'}[notificationState(n)])||'Ù ÙÙ Ø© Ù ÙØªÙØØ©';} 2231 async function openAction(n){ 2232 const u=normalizeAction(n);if(!u||!n||!n.id)return; 2233 await router.push('/admin/task/'+encodeURIComponent(n.id)); 2234 } 2235 return {store,status,openItems,notifStats,toggleItem,typeLabel,taskKindLabel,notificationState,notificationStateMark,notificationStateLabel,load,openAction,normalizeAction,shortDate}; 2236 }, 2237 render:(function(){ 2238const _Vue = Vue 2239const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 2240 2241const _hoisted_1 = { class: "miniStats notifStats" } 2242const _hoisted_2 = { class: "segmented" } 2243const _hoisted_3 = ["onClick"] 2244const _hoisted_4 = ["onClick"] 2245const _hoisted_5 = { 2246 key: 0, 2247 class: "card emptyCard" 2248} 2249const _hoisted_6 = { 2250 key: 1, 2251 class: "notificationList notificationListCompact" 2252} 2253const _hoisted_7 = ["onClick", "onKeyup"] 2254const _hoisted_8 = ["aria-label"] 2255const _hoisted_9 = { class: "notificationTaskCopy" } 2256const _hoisted_10 = { class: "statusPill" } 2257const _hoisted_11 = { 2258 key: 0, 2259 class: "notificationTaskArrow" 2260} 2261const _hoisted_12 = { 2262 key: 1, 2263 class: "notificationTaskArrow" 2264} 2265const _hoisted_13 = { 2266 key: 2,
2267 class: "notificationTaskDetails" 2268} 2269 2270return function render(_ctx, _cache) { 2271 with (_ctx) { 2272 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, withKeys: _withKeys, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 2273 2274 const _component_AdminFrame = _resolveComponent("AdminFrame") 2275 2276 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙÙ ÙØ§Ù ÙØ§Ùإشعارات" }, { 2277 default: _withCtx(() => [ 2278 _cache[3] || (_cache[3] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "ØµÙØ¯Ù٠اÙÙ ÙØ§Ù Ø§ÙØ¥Ø¯Ø§Ø±ÙØ©"), _createElementVNode("p", null, "ÙÙ Ø¹ÙØµØ± ÙÙØ§ Ù ÙÙ Ø© ÙØ¹ÙÙØ©. Ø§ÙØªØÙا ÙØªÙÙÙØ° Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ عÙÙ Ø§ÙØ³Ø¬Ù اÙÙ Ø·ÙÙØ¨ ÙÙØ·Ø ÙØªÙغÙ٠تÙÙØ§Ø¦ÙØ§Ù Ø¹ÙØ¯ Ø§ÙØªÙ Ø§Ù Ø§ÙØ¥Ø¬Ø±Ø§Ø¡.")], -1)), 2279 _createElementVNode("div", _hoisted_1, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(notifStats.total), 1), _cache[0] || (_cache[0] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(notifStats.unread), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "ØºÙØ± Ù ÙØ±ÙØ¡", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(notifStats.action), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "ÙÙØ§ إجراء", -1))])]), 2280 _createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 2281 class: _normalizeClass({active:status==='open'}), 2282 onClick: $event => (status='open') 2283 }, "اÙÙ ÙØªÙØØ©", 10, _hoisted_3), _createElementVNode("button", { 2284 class: _normalizeClass({active:status==='history'}), 2285 onClick: $event => (status='history') 2286 }, "Ø§ÙØ³Ø¬Ù", 10, _hoisted_4)]), 2287 (!store.state.notifications.length && !store.state.busy) 2288 ? (_openBlock(), _createElementBlock("div", _hoisted_5, "ÙØ§ ØªÙØ¬Ø¯ إشعارات ØØ§ÙÙØ§Ù.")) 2289 : (_openBlock(), _createElementBlock("div", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.notifications, (n) => { 2290 return (_openBlock(), _createElementBlock("article", { 2291 class: _normalizeClass(["card notificationTaskRow", {unread:n.status==='unread',actionable:!!normalizeAction(n),open:openItems[n.id]}]), 2292 key: n.id, 2293 onClick: $event => (normalizeAction(n)?openAction(n):toggleItem(n.id)), 2294 onKeyup: _withKeys($event => (normalizeAction(n)?openAction(n):toggleItem(n.id)), ["enter"]), 2295 tabindex: "0" 2296 }, [ 2297 _createElementVNode("span", { 2298 class: _normalizeClass(["notificationTaskIcon", 'state-'+notificationState(n)]), 2299 "aria-label": notificationStateLabel(n), 2300 role: "img" 2301 }, _toDisplayString(notificationStateMark(n)), 11, _hoisted_8), 2302 _createElementVNode("div", _hoisted_9, [_createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(n.title || n.type || 'إشعار'), 1), _createElementVNode("span", _hoisted_10, _toDisplayString(typeLabel(n)), 1)]), _createElementVNode("p", null, _toDisplayString(n.body || n.message || 'اضغط ÙÙØªØ اÙÙ ÙÙ Ø© اÙ٠رتبطة.'), 1), _createElementVNode("small", null, _toDisplayString(shortDate(n.created_at)) + " · " + _toDisplayString(taskKindLabel(n)), 1)]), 2303 (normalizeAction(n)) 2304 ? (_openBlock(), _createElementBlock("span", _hoisted_11, "ÙØªØ اÙÙ ÙÙ Ø© â")) 2305 : (_openBlock(), _createElementBlock("span", _hoisted_12, _toDisplayString(openItems[n.id]?'Ø¥Ø®ÙØ§Ø¡':'ØªÙØ§ØµÙÙ'), 1)), 2306 (openItems[n.id]&&!normalizeAction(n)) 2307 ? (_openBlock(), _createElementBlock("div", _hoisted_13, [_createElementVNode("span", null, _toDisplayString(n.target_committee || n.target_role || 'عا٠'), 1), _createElementVNode("span", null, _toDisplayString(n.related_type || '-'), 1)])) 2308 : _createCommentVNode("", true) 2309 ], 42, _hoisted_7)) 2310 }), 128))])) 2311 ]), 2312 _: 1, 2313 __: [3] 2314 })) 2315 } 2316} 2317})() 2318 }; 2319 2320 const RegisterPage={ 2321 components:{AdminFrame}, 2322 setup(){ 2323 const store=useGzcStore(); const router=useRouter(); 2324 const pre=reactive({target_type:'member',role:'membership',name:'',whatsapp:'',china_ph
2324one:'',china_city:'Guangzhou',china_district:'',community_id:'',committees:['membership']}); 2325 onMounted(async()=>{if(await store.requireAdmin(router)){await store.loadAdminOverview(router);await store.loadCommunities(router);}}); 2326 function toggleCommittee(k){const i=pre.committees.indexOf(k); if(i>=0)pre.committees.splice(i,1); else pre.committees.push(k);} 2327 async function submit(){store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø¥Ø¶Ø§ÙØ© Ø§ÙØ±ÙÙ ...';const payload=Object.assign({},pre,{whatsapp:norm(pre.whatsapp),china_phone:norm(pre.china_phone||pre.whatsapp)});const r=await api('/api/admin/pre-register',{method:'POST',body:JSON.stringify(payload)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){pre.target_type='member';pre.role='membership';pre.name='';pre.whatsapp='';pre.china_phone='';pre.china_city='Guangzhou';pre.china_district='';pre.community_id='';pre.committees=['membership'];}} 2328 return {store,pre,toggleCommittee,submit}; 2329 }, 2330 render:(function(){ 2331const _Vue = Vue 2332const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 2333 2334const _hoisted_1 = { class: "card" } 2335const _hoisted_2 = { class: "typeGrid" } 2336const _hoisted_3 = ["onClick"] 2337const _hoisted_4 = ["onClick"] 2338const _hoisted_5 = ["onClick"] 2339const _hoisted_6 = ["onUpdate:modelValue"] 2340const _hoisted_7 = ["onUpdate:modelValue"] 2341const _hoisted_8 = ["onUpdate:modelValue"] 2342const _hoisted_9 = ["onUpdate:modelValue"] 2343const _hoisted_10 = ["value"] 2344const _hoisted_11 = { class: "formTwo" } 2345const _hoisted_12 = ["onUpdate:modelValue"] 2346const _hoisted_13 = ["value"] 2347const _hoisted_14 = ["onUpdate:modelValue"] 2348const _hoisted_15 = ["value"] 2349const _hoisted_16 = { 2350 key: 0, 2351 class: "checkgrid" 2352} 2353const _hoisted_17 = ["checked", "onChange"] 2354const _hoisted_18 = ["onClick"] 2355 2356return function render(_ctx, _cache) { 2357 with (_ctx) { 2358 const { createElementVNode: _createElementVNode, normalizeClass: _normalizeClass, vModelText: _vModelText, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, createTextVNode: _createTextVNode, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 2359 2360 const _component_AdminFrame = _resolveComponent("AdminFrame") 2361 2362 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø¥Ø¶Ø§ÙØ© عض٠أ٠٠شرÙ" }, { 2363 default: _withCtx(() => [_createElementVNode("div", _hoisted_1, [ 2364 _cache[4] || (_cache[4] = _createElementVNode("h3", null, "+ تسجÙ٠رÙÙ Ø¬Ø¯ÙØ¯", -1)), 2365 _cache[5] || (_cache[5] = _createElementVNode("p", { class: "hint" }, "اÙÙÙ ÙØ°Ø¬ Ø¸Ø§ÙØ± ٠باشرة ÙØªØ³ÙÙÙ Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù ٠٠اÙÙØ§ØªÙ.", -1)), 2366 _createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 2367 class: _normalizeClass(["typeCard", {active:pre.target_type==='member'}]), 2368 onClick: $event => (pre.target_type='member') 2369 }, _cache[0] || (_cache[0] = [_createElementVNode("b", null, "عضÙ", -1), _createElementVNode("span", null, "ÙÙÙ Ù Ø¨ÙØ§Ùات٠بعد Ø§ÙØªØÙÙ", -1)]), 10, _hoisted_3), _createElementVNode("button", { 2370 class: _normalizeClass(["typeCard", {active:pre.target_type==='supervisor'}]), 2371 onClick: $event => (pre.target_type='supervisor') 2372 }, _cache[1] || (_cache[1] = [_createElementVNode("b", null, "٠شرÙ", -1), _createElementVNode("span", null, "ØµÙØ§ØÙات ØØ³Ø¨ اÙÙØ¬ÙØ©", -1)]), 10, _hoisted_4), _createElementVNode("button", { 2373 class: _normalizeClass(["typeCard", {active:pre.target_type==='admin'}]), 2374 onClick: $event => (pre.target_type='admin') 2375 }, _cache[2] || (_cache[2] = [_createElementVNode("b", null, "Ù Ø¯ÙØ± اÙÙØ¸Ø§Ù ", -1), _createElementVNode("span", null, "ØµÙØ§ØÙØ© ÙØ§Ù ÙØ©", -1)]), 10, _hoisted_5)]), 2376 _withDirectives(_createElementVNode("input", { 2377 "onUpdate:modelValue": $event => ((pre.name) = $event), 2378 placeholder: "Ø§ÙØ§Ø³Ù Ø§Ø®ØªÙØ§Ø±Ù" 2379 }, null, 8, _hoisted_6), [[_vModelText, pre.name]]), 2380 _withDirectives(_createElementVNode("input", { 2381 class: "ltr", 2382 "onUpdate:modelValue": $event => ((pre.whatsapp) = $event), 2383 placeholder: "رÙÙ ÙØ§ØªØ³Ø§Ø¨ ٠ثا٠8613922430742" 2384 }, null, 8, _hoisted_7), [[_vModelText, pre.whatsapp]]), 2385 _withDirectives(_createElementVNode("input", { 2386 class: "ltr", 2387 "onUpdate:modelValue": $event =>
2387 ((pre.china_phone) = $event), 2388 placeholder: "رÙ٠اÙÙØ§ØªÙ ÙÙ Ø§ÙØµÙÙ Ø¥Ù ÙØ¬Ø¯" 2389 }, null, 8, _hoisted_8), [[_vModelText, pre.china_phone]]), 2390 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((pre.community_id) = $event) }, [_cache[3] || (_cache[3] = _createElementVNode("option", { value: "" }, "ØªØØ¯Ùد تÙÙØ§Ø¦Ù ØØ³Ø¨ اÙ٠دÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.communities.filter(x=>x.slug!=='all-china'), (c) => { 2391 return (_openBlock(), _createElementBlock("option", { 2392 key: c.id, 2393 value: c.id 2394 }, _toDisplayString(c.name_ar), 9, _hoisted_10)) 2395 }), 128))], 8, _hoisted_9), [[_vModelSelect, pre.community_id]]), 2396 _createElementVNode("div", _hoisted_11, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((pre.china_city) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(pre.china_city), (o) => { 2397 return (_openBlock(), _createElementBlock("option", { 2398 key: o.value, 2399 value: o.value 2400 }, _toDisplayString(o.label), 9, _hoisted_13)) 2401 }), 128))], 8, _hoisted_12), [[_vModelSelect, pre.china_city]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((pre.china_district) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($districtList(pre.china_city,pre.china_district), (o) => { 2402 return (_openBlock(), _createElementBlock("option", { 2403 key: o.value, 2404 value: o.value 2405 }, _toDisplayString(o.label), 9, _hoisted_15)) 2406 }), 128))], 8, _hoisted_14), [[_vModelSelect, pre.china_district]])]), 2407 (pre.target_type==='supervisor') 2408 ? (_openBlock(), _createElementBlock("div", _hoisted_16, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.committees, (c) => { 2409 return (_openBlock(), _createElementBlock("label", { 2410 class: "check", 2411 key: c.key 2412 }, [_createElementVNode("input", { 2413 type: "checkbox", 2414 checked: pre.committees.includes(c.key), 2415 onChange: $event => (toggleCommittee(c.key)) 2416 }, null, 40, _hoisted_17), _createTextVNode(" " + _toDisplayString(c.name_ar || c.key), 1)])) 2417 }), 128))])) 2418 : _createCommentVNode("", true), 2419 _cache[6] || (_cache[6] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ¨ Ø§ÙØ±ÙÙ Ø¨Ø£Ù ØµÙØºØ©Ø ÙØ³Ùت٠تصØÙØÙ تÙÙØ§Ø¦ÙاÙ.", -1)), 2420 _createElementVNode("button", { 2421 class: "btn loadMore", 2422 onClick: submit 2423 }, "Ø¥Ø¶Ø§ÙØ© Ø§ÙØ±ÙÙ ", 8, _hoisted_18) 2424 ])]), 2425 _: 1 2426 })) 2427 } 2428} 2429})() 2430 }; 2431 2432 const MembersPage={ 2433 components:{AdminFrame}, 2434 setup(){ 2435 const store=useGzcStore(); const router=useRouter(); 2436 onMounted(async()=>{if(await store.requireAdmin(router)){await store.loadCommunities(router);await store.loadMembers(false,router);}}); 2437 watch(()=>store.state.filters.status,()=>store.loadMembers(false,router)); 2438 function search(){store.loadMembers(false,router);} 2439 function more(){store.loadMoreMembers(router);} 2440 const visibleTotal=computed(()=>store.state.members.length); 2441 async function remindAll(){if(!confirm('إرسا٠تذÙÙØ± Ø¥ÙÙ Ø§Ù Ø§ÙØªØ³Ø¬ÙÙ ÙÙÙ Ø§ÙØØ³Ø§Ø¨Ø§Øª ØºÙØ± اÙÙ ÙØªÙ ÙØ©Ø'))return;store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø¥Ø±Ø³Ø§Ù Ø§ÙØªØ°ÙÙØ±Ø§Øª...';const r=await api('/api/admin/members/registration-reminders/send-all',{method:'POST',body:JSON.stringify({force:true})});store.state.busy=false;store.state.msg=(r.message||r.error||'')+' â queued: '+(r.queued||0)+' / recipients: '+(r.recipients||0);} 2442 function openMember(m){if(m&&m.id)router.push('/admin/member/'+encodeURIComponent(m.id));} 2443 return {store,search,more,remindAll,openMember,statusName,memberType,visibleTotal,adminRecordUpdatedAt,adminQueueOwner,memberQueueNextAction}; 2444 }, 2445 render:(function(){ 2446const _Vue = Vue
2447const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 2448 2449const _hoisted_1 = { class: "adminQueueIntro" } 2450const _hoisted_2 = ["onClick"] 2451const _hoisted_3 = { class: "memberSearchPanel adminListFilters" } 2452const _hoisted_4 = { class: "memberSearchHead" } 2453const _hoisted_5 = ["onClick"] 2454const _hoisted_6 = { class: "filterGrid" } 2455const _hoisted_7 = ["onUpdate:modelValue", "onKeyup"] 2456const _hoisted_8 = ["onUpdate:modelValue"] 2457const _hoisted_9 = ["value"] 2458const _hoisted_10 = ["onUpdate:modelValue", "onChange"] 2459const _hoisted_11 = ["value"] 2460const _hoisted_12 = ["onUpdate:modelValue", "onChange"] 2461const _hoisted_13 = ["value"] 2462const _hoisted_14 = ["onUpdate:modelValue", "onChange"] 2463const _hoisted_15 = ["value"] 2464const _hoisted_16 = ["onUpdate:modelValue", "onChange"] 2465const _hoisted_17 = ["value"] 2466const _hoisted_18 = ["onUpdate:modelValue", "onChange"] 2467const _hoisted_19 = ["value"] 2468const _hoisted_20 = ["onClick"] 2469const _hoisted_21 = { class: "adminQueueList memberQueueList" } 2470const _hoisted_22 = ["onClick", "onKeyup"] 2471const _hoisted_23 = { class: "adminQueueIdentity" } 2472const _hoisted_24 = ["src"] 2473const _hoisted_25 = { 2474 key: 1, 2475 class: "memberThumb memberThumbPlaceholder" 2476} 2477const _hoisted_26 = { class: "adminQueueFacts adminWorkflowFacts" } 2478const _hoisted_27 = { class: "adminQueueNextAction" } 2479const _hoisted_28 = ["onClick"] 2480const _hoisted_29 = ["onClick"] 2481const _hoisted_30 = { 2482 key: 1, 2483 class: "card adminQueueState adminQueueLoading" 2484} 2485const _hoisted_31 = { 2486 key: 2, 2487 class: "card emptyCard adminQueueState" 2488} 2489 2490return function render(_ctx, _cache) { 2491 with (_ctx) { 2492 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, vModelText: _vModelText, withKeys: _withKeys, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, vModelSelect: _vModelSelect, createCommentVNode: _createCommentVNode, withModifiers: _withModifiers, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 2493 2494 const _component_AdminFrame = _resolveComponent("AdminFrame") 2495 2496 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ ÙØ·Ùبات Ø§ÙØ¹Ø¶ÙÙØ©" }, { 2497 default: _withCtx(() => [ 2498 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ù Ù"), _createElementVNode("h2", null, "Ø§ÙØ¹Ø¶ÙÙØ§Øª"), _createElementVNode("p", null, "اÙÙØ§Ø¦Ù Ø© ÙÙÙØ±Ø² ÙØ§ÙÙØµÙÙ ÙÙØ·. Ø§ÙØ§Ø¹ØªÙ اد ÙØ§ÙتعدÙÙ ÙØ§ÙتعÙÙ٠تت٠داخ٠٠ÙÙ Ø§ÙØ¹Ø¶Ù ØØªÙ ÙØ¨ÙÙ Ø³ÙØ§Ù اÙÙØ±Ø§Ø± ÙØ§Ø¶ØØ§Ù.")], -1)), _createElementVNode("button", { 2499 class: "btn primaryInlineAction", 2500 onClick: $event => ($router.push('/admin/register')) 2501 }, "+ Ø¥Ø¶Ø§ÙØ© عض٠أ٠٠شرÙ", 8, _hoisted_2)]), 2502 _createElementVNode("div", _hoisted_3, [_createElementVNode("div", _hoisted_4, [_createElementVNode("div", null, [_cache[1] || (_cache[1] = _createElementVNode("b", null, "اÙÙØªØ§Ø¦Ø¬", -1)), _createElementVNode("span", null, _toDisplayString(visibleTotal) + " / " + _toDisplayString(store.state.memberTotal || 0), 1)]), _createElementVNode("button", { 2503 class: "smallbtn secondary", 2504 onClick: remindAll 2505 }, "تذÙÙØ± ØºÙØ± اÙÙ ÙØªÙ ÙÙÙ", 8, _hoisted_5)]), _createElementVNode("div", _hoisted_6, [ 2506 _withDirectives(_createElementVNode("input", { 2507 "onUpdate:modelValue": $event => ((store.state.filters.search) = $event), 2508 onKeyup: _withKeys(search, ["enter"]), 2509 placeholder: "Ø¨ØØ« Ø¨Ø§ÙØ§Ø³Ù Ø£Ù Ø§ÙØ±ÙÙ " 2510 }, null, 40, _hoisted_7), [[_vModelText, store.state.filters.search]]), 2511 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((store.state.filters.status) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('member_status',store.state.filters.status), (o) => { 2512 return (_openBlock(), _createElementBlock("option", { 2513 key: o.value, 2514 value: o.value 2515 }, _toDisplayString(o.label), 9, _hoisted_9)) 2516 }), 128))], 8, _hoisted_8), [[_vModelSelect, store.state.filters.status]]), 2517 _withDirectives(_createElementVNode("select", { 2518 "onUpdate:modelValue": $event => ((store.state.filters.country_code) = $event), 2519 onChange: search 2520 }, [_cache[2] || (_cache[2] = _createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØ¯ÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($countryList(store.state.filters.country_code), (c) => { 2521 return (_openBlock(), _createElementBlock("option", { 2522 key: c.value, 2523 value: c.value 2524 }, _toDisplayString(c.label), 9, _hoisted_11)) 2525 }), 128))], 40, _hoisted_10), [[_vModelSelect, store.state.filters.country_code]]), 2526 _withDirectives(_createElementVNode("select", { 2527 "onUpdate:modelValue": $event => ((store.state.filters.community_id) = $event), 2528 onChange: search 2529 }, [_cache[3] || (_cache[3] = _createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØ¬Ø§ÙÙØ§Øª", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.communities, (c) => { 2530 return (_openBlock(), _createElementBlock("option", { 2531 key: c.id, 2532 value: c.id 2533 }, _toDisplayString(c.name_ar), 9, _hoisted_13)) 2534 }), 128))], 40, _hoisted_12), [[_vModelSelect, store.state.filters.community_id]]), 2535 _withDirectives(_createElementVNode("select", { 2536 "onUpdate:modelValue": $event => ((store.state.filters.city) = $event), 2537 onChange: $event => {store.state.filters.district='all';search()} 2538 }, [_cache[4] || (_cache[4] = _createElementVNode("option", { value: "all" }, "Ù٠اÙ٠دÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(store.state.filters.city), (c) => { 2539 return (_openBlock(), _createElementBlock("option", { 2540 key: c.value, 2541 value: c.value 2542 }, _toDisplayString(c.label), 9, _hoisted_15)) 2543 }), 128))], 40, _hoisted_14), [[_vModelSelect, store.state.filters.city]]), 2544 _withDirectives(_createElementVNode("select", { 2545 "onUpdate:modelValue": $event => ((store.state.filters.district) = $event), 2546 onChange: search 2547 }, [_cache[5] || (_cache[5] = _createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØ£ØÙاء", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($districtList(store.state.filters.city==='all'?'':store.state.filters.city,store.state.filters.district), (d) => { 2548 return (_openBlock(), _createElementBlock("option", { 2549 key: d.value, 2550 value: d.value 2551 }, _toDisplayString(d.label), 9, _hoisted_17)) 2552 }), 128))], 40, _hoisted_16), [[_vModelSelect, store.state.filters.district]]), 2553 _withDirectives(_createElementVNode("select", { 2554 "onUpdate:modelValue": $event => ((store.state.filters.category) = $event), 2555 onChange: search 2556 }, [_cache[6] || (_cache[6] = _createElementVNode("option", { value: "all" }, "Ù٠اÙÙØ¦Ø§Øª", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('member_category',store.state.filters.category), (o) => { 2557 return (_openBlock(), _createElementBlock("option", { 2558 key: o.value, 2559 value: o.value 2560 }, _toDisplayString(o.label), 9, _hoisted_19)) 2561 }), 128))], 40, _hoisted_18), [[_vModelSelect, store.state.filters.category]]), 2562 _createElementVNode("button", { 2563 class: "btn secondary", 2564 onClick: search 2565 }, "تطبÙ٠اÙÙÙØ§ØªØ±", 8, _hoisted_20) 2566 ])]), 2567 _createElementVNode("div", _hoisted_21, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.members, (m) => { 2568 return (_openBlock(), _createElementBlock("article", { 2569 class: "adminQueueRow memberQueueRow", 2570 key: m.id, 2571 onClick: $event => (openMember(m)), 2572 tabindex: "0", 2573 onKeyup: _withKeys($event => (openMember(m)), ["enter"]) 2574 }, [_createElementVNode("div", _hoisted_23, [($memberPhoto(m,'thumb')) 2575 ? (_openBlock(), _createElementBlock("img", { 2576 key: 0, 2577 class: "memberThumb", 2578 src: $memberPhoto(m,'thumb'), 2579 loading: "lazy", 2580 alt: "ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù" 2581 }, null, 8, _hoisted_24)) 2582 : (_openBlock(), _createElementBlock("div", _hoisted_25, "ð¤")), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(m.full_name || m.whatsapp || m.china_ph
2582one || 'عضÙ'), 1), _createElementVNode("small", null, _toDisplayString(m.country_name_ar || m.country_code || 'Ø§ÙØ¯ÙÙØ© ØºÙØ± Ù ØØ¯Ø¯Ø©') + " · " + _toDisplayString($cityLabel(m.china_city) || '-'), 1)])]), _createElementVNode("div", _hoisted_26, [ 2583 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(statusName(m.status)), 1), _cache[7] || (_cache[7] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))]), 2584 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminQueueOwner('members',m)), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1))]), 2585 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminRecordUpdatedAt(m)), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "آخر ØªØØ¯ÙØ«", -1))]), 2586 _createElementVNode("span", _hoisted_27, [_createElementVNode("b", null, _toDisplayString(memberQueueNextAction(m)), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1))]) 2587 ]), _createElementVNode("button", { 2588 class: "smallbtn secondary adminQueueOpen", 2589 onClick: _withModifiers($event => (openMember(m)), ["stop"]) 2590 }, "ÙØªØ Ù ÙÙ Ø§ÙØ¹Ø¶Ù", 8, _hoisted_28)], 40, _hoisted_22)) 2591 }), 128))]), 2592 (store.state.memberHasMore) 2593 ? (_openBlock(), _createElementBlock("button", { 2594 key: 0, 2595 class: "btn loadMore", 2596 onClick: more 2597 }, "تØÙ Ù٠اÙÙ Ø²ÙØ¯", 8, _hoisted_29)) 2598 : _createCommentVNode("", true), 2599 (store.state.busy && !store.state.members.length) 2600 ? (_openBlock(), _createElementBlock("div", _hoisted_30, "جار٠تØÙ ÙÙ Ø§ÙØ¹Ø¶ÙÙØ§Øª...")) 2601 : (!store.state.members.length) 2602 ? (_openBlock(), _createElementBlock("div", _hoisted_31, "ÙØ§ ØªÙØ¬Ø¯ عضÙÙØ§Øª Ù Ø·Ø§Ø¨ÙØ©.")) 2603 : _createCommentVNode("", true) 2604 ]), 2605 _: 1 2606 })) 2607 } 2608} 2609})() 2610 }; 2611 2612 const MemberDetailPage={ 2613 components:{AdminFrame}, 2614 setup(){ 2615 const store=useGzcStore();const router=useRouter();const route=useRoute(); 2616 const editOpen=ref(false);const photoFile=ref(null);const photoName=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©');const photo=ref('');const statusTarget=ref('');const deletePreview=ref(null);const memberPhotoFailed=ref(false); 2617 const edit=reactive({full_name:'',gender:'',whatsapp:'',china_phone:'',wechat:'',category:'',country_code:'',china_city:'',china_district:'',sudan_city:'',profession:'',workplace:'',university:'',family_count:0}); 2618 const m=computed(()=>store.state.selectedMember&&store.state.selectedMember.member?store.state.selectedMember.member:null); 2619 const cases=computed(()=>safeArray(store.state.selectedMember&&store.state.selectedMember.cases)); 2620 const emergencies=computed(()=>safeArray(store.state.selectedMember&&store.state.selectedMember.emergencies)); 2621 const audit=computed(()=>safeArray(store.state.selectedMember&&store.state.selectedMember.audit)); 2622 const cardUrl=computed(()=>canShowMemberCard(m.value)?('/api/admin/members/'+m.value.id+'/card?v='+(Date.now())):'#'); 2623 const canPermanentDelete=computed(()=>String(store.state.me&&store.state.me.admin&&store.state.me.admin.role||'')==='super_admin'); 2624 function isPlaceholderMemberName(x){x=x||{};const name=String(x.full_name||'').trim();if(!name)return true;const digits=norm(name);return !!digits && (digits===norm(x.whatsapp||'') || digits===norm(x.china_phone||'') || /^\+?\d{7,}$/.test(name.replace(/\s+/g,'')));} 2625 function memberDisplayName(x){return isPlaceholderMemberName(x)?'Ø¹Ø¶Ù Ø¨Ø§ÙØªØ¸Ø§Ø± Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª':String((x&&x.full_name)||'عضÙ').trim();} 2626 function memberFieldName(x){return isPlaceholderMemberName(x)?'ÙÙ ÙÙØªÙ ٠بعد':String((x&&x.full_name)||'').trim();} 2627 function fillEdit(){const x=m.value||{};['gender','whatsapp','china_phone','wechat','category','country_code','china_city','china_district','sudan_city','profession','workplace','university'].forEach(k=>edit[k]=x[k]||'');edit.full_name=isPlaceholderMemberName(x)?'':(x.full_name||'');
2627edit.family_count=x.family_count||1;statusTarget.value=x.status||'pending';} 2628 async function refresh(){await store.loadMember(route.params.id,router);memberPhotoFailed.value=false;fillEdit();} 2629 watch(()=>m.value&&memberPhoto(m.value,'profile'),()=>{memberPhotoFailed.value=false;}); 2630 onMounted(async()=>{if(await store.requireAdmin(router)) await refresh();}); 2631 async function approve(){if(!m.value)return;store.state.msg='جار٠اعت٠اد Ø§ÙØ¹Ø¶Ù...';const r=await runBusyAction(store,'member-detail.approve',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/approve',{method:'POST'}));store.state.msg=r.message||r.error||'';await refresh();} 2632 async function remind(){if(!m.value)return;store.state.msg='جار٠إرسا٠تذÙÙØ± Ø§ÙØªØ³Ø¬ÙÙ...';const r=await runBusyAction(store,'member-detail.remind',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/send-registration-reminder',{method:'POST'}));store.state.msg=r.message||r.error||'';} 2633 async function saveProfile(){if(!m.value)return;store.state.msg='جار٠ØÙظ Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶Ù...';const payload=Object.assign({},edit,{whatsapp:norm(edit.whatsapp),china_phone:norm(edit.china_phone),family_count:Math.max(1,Number(edit.family_count||1))});const r=await runBusyAction(store,'member-detail.save-profile',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/update-profile',{method:'POST',body:JSON.stringify(payload)}));store.state.msg=r.message||r.error||'';if(r.ok){editOpen.value=false;await refresh();}} 2634 async function changeStatus(){if(!m.value||!statusTarget.value)return;if(statusTarget.value==='approved'){await approve();return;}if(statusTarget.value==='suspended'){await suspend();return;}store.state.msg='Ø¬Ø§Ø±Ù ØªØØ¯ÙØ« Ø§ÙØØ§ÙØ©...';const r=await runBusyAction(store,'member-detail.change-status',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/status',{method:'POST',body:JSON.stringify({status:statusTarget.value})}));store.state.msg=r.message||r.error||'';await refresh();} 2635 async function suspend(){if(!m.value)return;const reason=prompt('سبب تعÙÙÙ Ø§ÙØ¹Ø¶ÙÙØ©:','تعÙÙÙ Ø¨ÙØ§Ø³Ø·Ø© ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©');if(reason===null)return;store.state.msg='جار٠تعÙÙÙ Ø§ÙØ¹Ø¶ÙÙØ© ÙØ¥ÙÙØ§Ø¡ Ø¬ÙØ³Ø§ØªÙا...';const r=await runBusyAction(store,'member-detail.suspend',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/suspend',{method:'POST',body:JSON.stringify({reason})}));store.state.msg=r.message||r.error||'';await refresh();} 2636 async function archiveMember(){if(!m.value)return;if(!confirm('تأÙÙØ¯ Ø£Ø±Ø´ÙØ© Ø§ÙØ¹Ø¶ÙØ'))return;const r=await runBusyAction(store,'member-detail.archive',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/archive',{method:'POST'}));store.state.msg=r.message||r.error||'';if(r.ok)router.replace('/admin/members');} 2637 async function permanentDelete(){ 2638 if(!m.value||!canPermanentDelete.value)return; 2639 store.state.msg='Ø¬Ø§Ø±Ù ÙØØµ Ø§ÙØ³Ø¬Ùات اÙ٠رتبطة ÙØ¨Ù Ø§ÙØØ°Ù...'; 2640 const preview=await runBusyAction(store,'member-detail.deletion-preview',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/deletion-preview')); 2641 if(!preview.ok){store.state.msg=preview.message||preview.error||'تعذر ÙØØµ Ø§ÙØØ°Ù';return;} 2642 deletePreview.value=preview; 2643 const retained=Number(preview.policy&&preview.policy.retained_records||0); 2644 const linked=preview.counts||{}; 2645 const summary='ÙØ°Ø§ ØØ°Ù ÙÙØ§Ø¦Ù ÙØºÙر ÙØ§Ø¨Ù ÙÙØªØ±Ø§Ø¬Ø¹.\n\nØ³ÙØªÙ ØØ°Ù Ø¨ÙØ§Ùات Ø§ÙØ¯Ø®ÙÙ ÙØ§ÙÙÙÙØ© ÙØ§ÙØµÙØ± ÙØ¥ÙÙØ§Ù أ٠إشرا٠٠رتبط.\n'+(retained?'Ø³ÙØªÙ Ø§ÙØ§ØØªÙاظ ب٠'+retained+' سج٠تشغÙÙÙ/ØªØ§Ø±ÙØ®Ù ٠رتبط بعد Ø¥Ø²Ø§ÙØ© ÙÙÙØ© اÙ٠ستخد٠.\n':'ÙØ§ ØªÙØ¬Ø¯ Ø³Ø¬ÙØ§Øª تشغÙÙÙØ© Ø±Ø¦ÙØ³ÙØ© ٠رتبطة.\n')+(Number(linked.inflight_messages||0)?'ØªÙØ¨ÙÙ: ØªÙØ¬Ø¯ Ø±Ø³Ø§ÙØ© ÙØ§ØªØ³Ø§Ø¨ ÙÙØ¯ Ø§ÙØ¥Ø±Ø³Ø§Ù.\n':'')+'\nÙÙ ØªØ±ÙØ¯ اÙ٠تابعةØ'; 2646 if(!confirm(summary))return; 2647 const token=prompt('ÙÙØªØ£ÙÙØ¯ Ø§ÙØªØ¨ Ø§ÙØ±Ù ز Ø§ÙØªØ§ÙÙ Ù٠ا ÙÙ:\n'+preview.confirmation_token,''); 2648 if(token===null)return; 2649 if(String(token).trim()!==String(preview.confirmation_token||'')){store.state.msg='ر٠ز Ø§ÙØªØ£ÙÙØ¯ ØºÙØ± ٠طابÙ. ÙÙ ÙØªÙ ØØ°Ù Ø£Ù Ø´ÙØ¡.';return;} 2650 store.state.msg='جار٠تÙÙÙØ° Ø§ÙØØ°Ù Ø§ÙÙÙØ§Ø¦Ù بأ٠اÙ...'; 2651 const r=await runBusyAction(store,'member-detail.permanent-delete',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/permanent-delete',{method:'POST',body:JSON.stringify({confirmation:token})}));store.state.msg=r.message||r.error||''; 2652 if(r.ok)router.replace('/admin/members'); 2653 }
2654 function onAdminPhoto(e){photoFile.value=e.target.files&&e.target.files[0]?e.target.files[0]:null;photoName.value=photoFile.value?photoFile.value.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';photo.value=photoFile.value?URL.createObjectURL(photoFile.value):'';} 2655 async function uploadAdminPhoto(){if(!m.value)return;if(!photoFile.value){store.state.msg='اختر ØµÙØ±Ø© Ø£ÙÙØ§Ù';return;}const fd=new FormData();fd.append('file',photoFile.value);store.state.msg='Ø¬Ø§Ø±Ù Ø±ÙØ¹ ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù...';const r=await runBusyAction(store,'member-detail.upload-photo',()=>uploadApi('/api/admin/members/'+encodeURIComponent(m.value.id)+'/photo',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù'}));store.state.msg=r.message||r.error||'';photoFile.value=null;photoName.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';photo.value='';await refresh();} 2656 async function removeAdminPhoto(){if(!m.value||!(m.value.photo_profile_url||m.value.photo_url)){store.state.msg='ÙØ§ ØªÙØ¬Ø¯ ØµÙØ±Ø© Ù ØÙÙØ¸Ø©';return;}if(!confirm('ØØ°Ù ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù ٠٠اÙÙ ÙÙØ'))return;const r=await runBusyAction(store,'member-detail.remove-photo',()=>api('/api/admin/members/'+encodeURIComponent(m.value.id)+'/photo/remove',{method:'POST'}));store.state.msg=r.message||r.error||'';await refresh();} 2657 function saveAdminCardPng(){if(!canShowMemberCard(m.value)){store.state.msg='Ø§ÙØ¨Ø·Ø§ÙØ© Ù ØªØ§ØØ© بعد اعت٠اد Ø§ÙØ¹Ø¶ÙÙØ© ÙØ¥ØµØ¯Ø§Ø± Ø§ÙØ±ÙÙ ';return;}saveCardPng(cardUrl.value,m.value.gzc_id,store);} 2658 return {store,m,cases,emergencies,audit,editOpen,edit,statusTarget,photoName,photo,memberPhotoFailed,cardUrl,deletePreview,canPermanentDelete,statusName,memberType,memberDisplayName,memberFieldName,canApproveMember,canShowMemberCard,approve,remind,saveProfile,changeStatus,suspend,archiveMember,permanentDelete,onAdminPhoto,uploadAdminPhoto,removeAdminPhoto,saveAdminCardPng}; 2659 }, 2660 render:(function(){ 2661const _Vue = Vue 2662const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 2663 2664const _hoisted_1 = { 2665 key: 0, 2666 class: "card skeleton" 2667} 2668const _hoisted_2 = { 2669 key: 1, 2670 class: "adminRecordWorkspace memberRecordWorkspace" 2671} 2672const _hoisted_3 = { class: "memberRecordContent" } 2673const _hoisted_4 = { class: "adminWorkspaceBackBar memberWorkspaceTop" } 2674const _hoisted_5 = ["onClick"] 2675const _hoisted_6 = { class: "card memberDetailHero memberRecordHero" } 2676const _hoisted_7 = { class: "detailIdentity" } 2677const _hoisted_8 = ["src", "onError"] 2678const _hoisted_9 = { 2679 key: 1, 2680 class: "avatar placeholder" 2681} 2682const _hoisted_10 = { class: "memberMiniFoot" } 2683const _hoisted_11 = { key: 0 } 2684const _hoisted_12 = { class: "quickActionGrid memberPrimaryActions" } 2685const _hoisted_13 = ["onClick"] 2686const _hoisted_14 = ["onClick"] 2687const _hoisted_15 = ["onClick"] 2688const _hoisted_16 = ["href"] 2689const _hoisted_17 = ["onClick"] 2690const _hoisted_18 = { class: "memberWorkspaceGrid" } 2691const _hoisted_19 = { class: "card memberDetailCard memberCurrentDataCard" } 2692const _hoisted_20 = { class: "memberSectionHead" } 2693const _hoisted_21 = ["onClick"] 2694const _hoisted_22 = { class: "memberDataGrid" } 2695const _hoisted_23 = { class: "profileLine" } 2696const _hoisted_24 = { class: "profileLine" } 2697const _hoisted_25 = { class: "profileLine" } 2698const _hoisted_26 = { class: "profileLine" } 2699const _hoisted_27 = { class: "profileLine" } 2700const _hoisted_28 = { class: "ltr" } 2701const _hoisted_29 = { class: "profileLine" } 2702const _hoisted_30 = { class: "ltr" } 2703const _hoisted_31 = { class: "profileLine" } 2704const _hoisted_32 = { class: "profileLine" } 2705const _hoisted_33 = { class: "profileLine" } 2706const _hoisted_34 = { class: "profileLine" } 2707const _hoisted_35 = { class: "profileLine" } 2708const _hoisted_36 = { class: "profileLine" } 2709const _hoisted_37 = { class: "profileLine" } 2710const _hoisted_38 = { class: "profileLine" } 2711const _hoisted_39 = { class: "profileLine" } 2712const _hoisted_40 = { class: "profileLine" } 2713const _hoisted_41 = { class: "card actionPanel memberAdminActionsCard" } 2714const _hoisted_42 = { class: "statusChangeRow" } 2715const _hoisted_43 = ["onUpdate:modelValue"] 2716const _hoisted_44 = ["onClick"] 2717const _hoisted_45 = { class: "memberActions" } 2718const _hoisted_46 = ["onClick"] 2719const _hoisted_47 = ["onClick"] 2720const _hoisted_48 = { 2721 key: 0, 2722 class: "memberDangerZone" 2723} 2724const _hoisted_49 = ["onClick"] 2725const _hoisted_50 = { 2726 key: 0, 2727 class: "card memberEditCard" 2728} 2729const _hoisted_51 = { class: "memberSectionHead" } 2730const _hoisted_52 = ["onClick"] 2731const _hoisted_53 = { class: "editGrid memberEditGrid" } 2732const _hoisted_54 = { class: "fieldBlock" } 2733const _hoisted_55 = ["onUpdate:modelValue"] 2734const _hoisted_56 = { class: "fieldBlock" } 2735const _hoisted_57 = ["onUpdate:modelValue"] 2736const _hoisted_58 = ["value"] 2737const _hoisted_59 = { class: "fieldBlock" } 2738const _hoisted_60 = ["onUpdate:modelValue"] 2739const _hoisted_61 = { class: "fieldBlock" } 2740const _hoisted_62 = ["onUpdate:modelValue"] 2741const _hoisted_63 = { class: "fieldBlock" } 2742const _hoisted_64 = ["onUpdate:modelValue"] 2743const _hoisted_65 = { class: "fieldBlock" } 2744const _hoisted_66 = ["onUpdate:modelValue"] 2745const _hoisted_67 = ["value"] 2746const _hoisted_68 = { class: "fieldBlock" } 2747const _hoisted_69 = ["onUpdate:modelValue"] 2748const _hoisted_70 = ["value"] 2749const _hoisted_71 = { class: "fieldBlock" } 2750const _hoisted_72 = ["onUpdate:modelValue", "onChange"] 2751const _hoisted_73 = ["value"] 2752const _hoisted_74 = { class: "fieldBlock" } 2753const _hoisted_75 = ["onUpdate:modelValue"] 2754const _hoisted_76 = ["value"] 2755const _hoisted_77 = { class: "fieldBlock" } 2756const _hoisted_78 = ["onUpdate:modelValue"] 2757const _hoisted_79 = ["value"] 2758const _hoisted_80 = { class: "fieldBlock" } 2759const _hoisted_81 = ["onUpdate:modelValue"] 2760const _hoisted_82 = { class: "fieldBlock" } 2761const _hoisted_83 = ["onUpdate:modelValue"] 2762const _hoisted_84 = { class: "fieldBlock" } 2763const _hoisted_85 = ["onUpdate:modelValue"] 2764const _hoisted_86 = { class: "memberEditSaveBar" } 2765const _hoisted_87 = ["onClick"] 2766const _hoisted_88 = ["onClick"] 2767const _hoisted_89 = { class: "card uploadBoxPro photoManagerCard" } 2768const _hoisted_90 = { class: "photoManager" } 2769const _hoisted_91 = ["src", "onError"] 2770const _hoisted_92 = { 2771 key: 1, 2772 class: "memberThumb memberThumbPlaceholder large" 2773} 2774const _hoisted_93 = { class: "filePicker" } 2775const _hoisted_94 = ["onChange"] 2776const _hoisted_95 = { class: "row" } 2777const _hoisted_96 = ["onClick"] 2778const _hoisted_97 = ["onClick"] 2779const _hoisted_98 = { class: "card relatedCard" } 2780const _hoisted_99 = { 2781 key: 0, 2782 class: "hint" 2783} 2784const _hoisted_100 = { class: "card relatedCard" } 2785const _hoisted_101 = { 2786 key: 0, 2787 class: "hint" 2788} 2789const _hoisted_102 = ["onClick"] 2790 2791return function render(_ctx, _cache) { 2792 with (_ctx) { 2793 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _
2793createCommentVNode, createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 2794 2795 const _component_AdminFrame = _resolveComponent("AdminFrame") 2796 2797 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ØªÙØ§ØµÙÙ Ø§ÙØ¹Ø¶Ù" }, { 2798 default: _withCtx(() => [(!m) 2799 ? (_openBlock(), _createElementBlock("div", _hoisted_1, "جار٠تØÙ ÙÙ ØªÙØ§ØµÙÙ Ø§ÙØ¹Ø¶Ù...")) 2800 : (_openBlock(), _createElementBlock("section", _hoisted_2, [_createElementVNode("div", _hoisted_3, [ 2801 _createElementVNode("div", _hoisted_4, [_createElementVNode("button", { 2802 class: "smallbtn secondary", 2803 onClick: $event => ($router.push('/admin/members')) 2804 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙØ¹Ø¶ÙÙØ§Øª", 8, _hoisted_5), _cache[0] || (_cache[0] = _createElementVNode("span", null, "Ù ÙÙ Ø§ÙØ¹Ø¶Ù â Ø¹Ø±Ø¶ Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ§ÙتعدÙÙ ÙØ§Ùإجراءات ÙÙ Ù Ø³Ø§ØØ© ÙØ§ØØ¯Ø©", -1))]), 2805 _createElementVNode("div", _hoisted_6, [_createElementVNode("div", _hoisted_7, [(!memberPhotoFailed && $memberPhoto(m,'profile')) 2806 ? (_openBlock(), _createElementBlock("img", { 2807 key: 0, 2808 src: $memberPhoto(m,'profile'), 2809 loading: "lazy", 2810 alt: "ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù", 2811 onError: $event => (memberPhotoFailed=true) 2812 }, null, 40, _hoisted_8)) 2813 : (_openBlock(), _createElementBlock("div", _hoisted_9, "ð¤")), _createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(memberDisplayName(m)), 1), _createElementVNode("div", _hoisted_10, [_createElementVNode("span", null, _toDisplayString(statusName(m.status)), 1), _createElementVNode("span", null, _toDisplayString(memberType(m)), 1), (m.gzc_id) 2814 ? (_openBlock(), _createElementBlock("span", _hoisted_11, _toDisplayString(m.gzc_id), 1)) 2815 : _createCommentVNode("", true)])])]), _createElementVNode("div", _hoisted_12, [ 2816 _createElementVNode("button", { 2817 class: "btn secondary", 2818 onClick: $event => (editOpen=!editOpen) 2819 }, _toDisplayString(editOpen?'Ø¥ØºÙØ§Ù Ø§ÙØªØ¹Ø¯ÙÙ':'تعدÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª'), 9, _hoisted_13), 2820 (canApproveMember(m)) 2821 ? (_openBlock(), _createElementBlock("button", { 2822 key: 0, 2823 class: "btn", 2824 onClick: approve 2825 }, "اعت٠اد Ø§ÙØ¹Ø¶Ù", 8, _hoisted_14)) 2826 : _createCommentVNode("", true), 2827 (m.status!=='approved') 2828 ? (_openBlock(), _createElementBlock("button", { 2829 key: 1, 2830 class: "btn secondary", 2831 onClick: remind 2832 }, "تذÙÙØ± Ø§ÙØªØ³Ø¬ÙÙ", 8, _hoisted_15)) 2833 : _createCommentVNode("", true), 2834 (canShowMemberCard(m)) 2835 ? (_openBlock(), _createElementBlock("a", { 2836 key: 2, 2837 class: "btn secondary", 2838 href: cardUrl, 2839 target: "_blank" 2840 }, "عرض Ø§ÙØ¨Ø·Ø§ÙØ©", 8, _hoisted_16)) 2841 : _createCommentVNode("", true), 2842 (canShowMemberCard(m)) 2843 ? (_openBlock(), _createElementBlock("button", { 2844 key: 3, 2845 class: "btn secondary", 2846 onClick: saveAdminCardPng 2847 }, "ØÙظ Ø§ÙØ¨Ø·Ø§ÙØ© ÙØµÙرة", 8, _hoisted_17)) 2848 : _createCommentVNode("", true) 2849 ])]), 2850 _createElementVNode("div", _hoisted_18, [_createElementVNode("div", _hoisted_19, [_createElementVNode("div", _hoisted_20, [_cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙ ÙÙ Ø§ÙØØ§ÙÙ"), _createElementVNode("h3", null, "Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶Ù")], -1)), _createElementVNode("button", { 2851 class: "smallbtn secondary", 2852 onClick: $event => (editOpen=true) 2853 }, "تعدÙÙ", 8, _hoisted_21)]), _createElementVNode("div", _hoisted_22, [ 2854 _createElementVNode("div", _hoisted_23, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "Ø§ÙØ§Ø³Ù ", -1)), _createElementVNode("span", null, _toDisplayString(memberFieldName(m)), 1
2854)]), 2855 _createElementVNode("div", _hoisted_24, [_cache[3] || (_cache[3] = _createElementVNode("b", null, "GZC ID", -1)), _createElementVNode("span", null, _toDisplayString(m.gzc_id || '-'), 1)]), 2856 _createElementVNode("div", _hoisted_25, [_cache[4] || (_cache[4] = _createElementVNode("b", null, "Ø§ÙØØ§ÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(statusName(m.status)), 1)]), 2857 _createElementVNode("div", _hoisted_26, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "اÙÙÙØ¹", -1)), _createElementVNode("span", null, _toDisplayString(memberType(m)), 1)]), 2858 _createElementVNode("div", _hoisted_27, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "ÙØ§ØªØ³Ø§Ø¨", -1)), _createElementVNode("span", _hoisted_28, _toDisplayString(m.whatsapp || '-'), 1)]), 2859 _createElementVNode("div", _hoisted_29, [_cache[7] || (_cache[7] = _createElementVNode("b", null, "ÙØ§ØªÙ Ø§ÙØµÙÙ", -1)), _createElementVNode("span", _hoisted_30, _toDisplayString(m.china_phone || '-'), 1)]), 2860 _createElementVNode("div", _hoisted_31, [_cache[8] || (_cache[8] = _createElementVNode("b", null, "WeChat", -1)), _createElementVNode("span", null, _toDisplayString(m.wechat || '-'), 1)]), 2861 _createElementVNode("div", _hoisted_32, [_cache[9] || (_cache[9] = _createElementVNode("b", null, "Ø§ÙØ¯ÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(m.country_name_ar || m.country_code || 'ØºÙØ± Ù ØØ¯Ø¯Ø©'), 1)]), 2862 _createElementVNode("div", _hoisted_33, [_cache[10] || (_cache[10] = _createElementVNode("b", null, "٠دÙÙØ© Ø§ÙØ¥Ùا٠ة ÙÙ Ø§ÙØµÙÙ", -1)), _createElementVNode("span", null, _toDisplayString($cityLabel(m.china_city) || '-'), 1)]), 2863 _createElementVNode("div", _hoisted_34, [_cache[11] || (_cache[11] = _createElementVNode("b", null, "Ø§ÙØÙ / اÙÙ ÙØ·ÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(m.china_district || '-'), 1)]), 2864 _createElementVNode("div", _hoisted_35, [_cache[12] || (_cache[12] = _createElementVNode("b", null, "ÙØ¦Ø© Ø§ÙØ¹Ø¶ÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(m.category || '-'), 1)]), 2865 _createElementVNode("div", _hoisted_36, [_cache[13] || (_cache[13] = _createElementVNode("b", null, "Ø§ÙØ¬Ùس", -1)), _createElementVNode("span", null, _toDisplayString(m.gender || '-'), 1)]), 2866 _createElementVNode("div", _hoisted_37, [_cache[14] || (_cache[14] = _createElementVNode("b", null, "اÙÙ ÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(m.profession || '-'), 1)]), 2867 _createElementVNode("div", _hoisted_38, [_cache[15] || (_cache[15] = _createElementVNode("b", null, "Ø¬ÙØ© Ø§ÙØ¹Ù Ù", -1)), _createElementVNode("span", null, _toDisplayString(m.workplace || '-'), 1)]), 2868 _createElementVNode("div", _hoisted_39, [_cache[16] || (_cache[16] = _createElementVNode("b", null, "Ø§ÙØ¬Ø§Ù عة", -1)), _createElementVNode("span", null, _toDisplayString(m.university || '-'), 1)]), 2869 _createElementVNode("div", _hoisted_40, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "عدد Ø£ÙØ±Ø§Ø¯ Ø§ÙØ£Ø³Ø±Ø©", -1)), _createElementVNode("span", null, _toDisplayString(m.family_count || 0), 1)]) 2870 ])]), _createElementVNode("div", _hoisted_41, [ 2871 _cache[21] || (_cache[21] = _createElementVNode("span", { class: "adminEyebrow" }, "إدارة Ø§ÙØ¹Ø¶ÙÙØ©", -1)), 2872 _cache[22] || (_cache[22] = _createElementVNode("h3", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡Ø§Øª", -1)), 2873 _cache[23] || (_cache[23] = _createElementVNode("label", { class: "fieldLabel" }, "تغÙÙØ± Ø§ÙØØ§ÙØ©", -1)), 2874 _createElementVNode("div", _hoisted_42, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((statusTarget) = $event) }, _cache[18] || (_cache[18] = [ 2875 _createElementVNode("option", { value: "pre_registered" }, "تذÙÙØ± Ø§ÙØªØ³Ø¬ÙÙ", -1), 2876 _createElementVNode("option", { value: "profile_pending" }, "٠راجعة Ø¨ÙØ§Ùات", -1), 2877 _createElementVNode("option", { value: "pending" }, "٠راجعة", -1), 2878 _createElementVNode("option", { value: "approved" }, "٠عت٠د", -1), 2879 _createElementVNode("option", { value: "suspended" }, "٠عÙÙ", -1) 2880 ]), 8, _hoisted_43), [[_vModelSelect, statusTarget]]), _createElementVNode("button", { 2881 class: "smallbtn", 2882 onClick: changeStatus 2883 }, "ØªØØ¯ÙØ« Ø§ÙØØ§ÙØ©", 8, _hoisted_44)]), 2884 _createElementVNode("div", _hoisted_45, [_createElementVNode("button", { 2885 class: "smallbtn danger", 2886 onClick: suspend 2887 }, "تعÙÙÙ Ø§ÙØ¹Ø¶ÙÙØ©", 8, _hoisted_46), _createElementVNode("button", { 2888 class: "smallbtn danger", 2889 onClick: archiveMember 2890 }, "Ø£Ø±Ø´ÙØ© Ø§ÙØ¹Ø¶Ù", 8, _hoisted_47)]), 2891 canPermanentDelete 2892 ? (_openBlock(), _createElementBlock("div", _hoisted_48, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "Ù ÙØ·ÙØ© خطرة", -1)), _cache[20] || (_cache[20] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØØ°Ù Ø§ÙÙÙØ§Ø¦Ù ÙØ²ÙÙ ØØ³Ø§Ø¨ اÙÙ Ø³ØªØ®Ø¯Ù ÙØ¨ÙØ§ÙØ§Øª ÙÙÙØªÙ ÙØµÙر٠ÙÙÙÙÙÙ Ø¬ÙØ³Ø§ØªÙ. Ø§ÙØ³Ø¬Ùات Ø§ÙØªØ´ØºÙÙÙØ© اÙÙØ§Ø²Ù Ø© Ù Ø«Ù Ø§ÙØ·Ùبات ÙAudit تبÙÙ Ù ØÙÙØ¸Ø© بدÙ٠إعادة ØªÙØ¹ÙÙ Ø§ÙØØ³Ø§Ø¨.", -1)), _createElementVNode("button", { 2893 class: "smallbtn danger permanentDeleteButton", 2894 onClick: permanentDelete 2895 }, "ØØ°Ù اÙ٠ستخد٠ÙÙØ§Ø¦ÙاÙ", 8, _hoisted_49)])) 2896 : _createCommentVNode("", true) 2897 ])]), 2898 editOpen 2899 ? (_openBlock(), _createElementBlock("div", _hoisted_50, [_createElementVNode("div", _hoisted_51, [_cache[24] || (_cache[24] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ØªØØ±Ùر ٠باشر"), _createElementVNode("h3", null, "تعدÙÙ Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶Ù"), _createElementVNode("p", { class: "hint" }, "Ø§ÙØÙÙ٠ذات Ø§ÙØ®Ùارات اÙÙ ØØ¯Ø¯Ø© تستخد٠ÙÙØ§Ø¦Ù Ø§Ø®ØªÙØ§Ø±. اضغط ØÙظ بعد اÙ٠راجعة.")], -1)), _createElementVNode("button", { 2900 class: "smallbtn secondary", 2901 onClick: $event => (editOpen=false) 2902 }, "Ø¥ØºÙØ§Ù", 8, _hoisted_52)]), _createElementVNode("div", _hoisted_53, [ 2903 _createElementVNode("label", _hoisted_54, [_cache[25] || (_cache[25] = _createElementVNode("b", null, "Ø§ÙØ§Ø³Ù اÙÙØ§Ù Ù", -1)), _withDirectives(_createElementVNode("input", { 2904 "onUpdate:modelValue": $event => ((edit.full_name) = $event), 2905 placeholder: "Ø§ÙØ§Ø³Ù اÙÙØ§Ù Ù" 2906 }, null, 8, _hoisted_55), [[_vModelText, edit.full_name]])]), 2907 _createElementVNode("label", _hoisted_56, [_cache[27] || (_cache[27] = _
2907createElementVNode("b", null, "Ø§ÙØ¬Ùس", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.gender) = $event) }, [_cache[26] || (_cache[26] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØ¬Ùس", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('gender',edit.gender), (o) => { 2908 return (_openBlock(), _createElementBlock("option", { 2909 key: o.value, 2910 value: o.value 2911 }, _toDisplayString(o.label), 9, _hoisted_58)) 2912 }), 128))], 8, _hoisted_57), [[_vModelSelect, edit.gender]])]), 2913 _createElementVNode("label", _hoisted_59, [_cache[28] || (_cache[28] = _createElementVNode("b", null, "ÙØ§ØªØ³Ø§Ø¨", -1)), _withDirectives(_createElementVNode("input", { 2914 class: "ltr", 2915 "onUpdate:modelValue": $event => ((edit.whatsapp) = $event), 2916 placeholder: "رÙÙ ÙØ§ØªØ³Ø§Ø¨" 2917 }, null, 8, _hoisted_60), [[_vModelText, edit.whatsapp]])]), 2918 _createElementVNode("label", _hoisted_61, [_cache[29] || (_cache[29] = _createElementVNode("b", null, "ÙØ§ØªÙ Ø§ÙØµÙÙ", -1)), _withDirectives(_createElementVNode("input", { 2919 class: "ltr", 2920 "onUpdate:modelValue": $event => ((edit.china_phone) = $event), 2921 placeholder: "ÙØ§ØªÙ Ø§ÙØµÙÙ" 2922 }, null, 8, _hoisted_62), [[_vModelText, edit.china_phone]])]), 2923 _createElementVNode("label", _hoisted_63, [_cache[30] || (_cache[30] = _createElementVNode("b", null, "WeChat", -1)), _withDirectives(_createElementVNode("input", { 2924 "onUpdate:modelValue": $event => ((edit.wechat) = $event), 2925 placeholder: "WeChat" 2926 }, null, 8, _hoisted_64), [[_vModelText, edit.wechat]])]), 2927 _createElementVNode("label", _hoisted_65, [_cache[32] || (_cache[32] = _createElementVNode("b", null, "ÙØ¦Ø© Ø§ÙØ¹Ø¶ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.category) = $event) }, [_cache[31] || (_cache[31] = _createElementVNode("option", { value: "" }, "اختر ÙØ¦Ø© Ø§ÙØ¹Ø¶ÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('member_category',edit.category), (o) => { 2928 return (_openBlock(), _createElementBlock("option", { 2929 key: o.value, 2930 value: o.value 2931 }, _toDisplayString(o.label), 9, _hoisted_67)) 2932 }), 128))], 8, _hoisted_66), [[_vModelSelect, edit.category]])]), 2933 _createElementVNode("label", _hoisted_68, [_cache[34] || (_cache[34] = _createElementVNode("b", null, "Ø§ÙØ¯ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.country_code) = $event) }, [_cache[33] || (_cache[33] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØ¯ÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($countryList(edit.country_code), (c) => { 2934 return (_openBlock(), _createElementBlock("option", { 2935 key: c.value, 2936 value: c.value 2937 }, _toDisplayString(c.label), 9, _hoisted_70)) 2938 }), 128))], 8, _hoisted_69), [[_vModelSelect, edit.country_code]])]), 2939 _createElementVNode("label", _hoisted_71, [_cache[36] || (_cache[36] = _createElementVNode("b", null, "٠دÙÙØ© Ø§ÙØ¥Ùا٠ة ÙÙ Ø§ÙØµÙÙ", -1)), _withDirectives(_createElementVNode("select", { 2940 "onUpdate:modelValue": $event => ((edit.china_city) = $event), 2941 onChange: $event => (edit.china_district='') 2942 }, [_cache[35] || (_cache[35] = _createElementVNode("option", { value: "" }, "اختر اÙ٠دÙÙØ© ÙÙ Ø§ÙØµÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(edit.china_city), (c) => { 2943 return (_openBlock(), _createElementBlock("option", { 2944 key: c.value, 2945 value: c.value 2946 }, _toDisplayString(c.label), 9, _hoisted_73)) 2947 }), 128))], 40, _hoisted_72), [[_vModelSelect, edit.china_city]])]), 2948 _createElementVNode("label", _hoisted_74, [_cache[38] || (_cache[38] = _createElementVNode("b", null, "Ø§ÙØÙ / اÙÙ ÙØ·ÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.china_district) = $event) }, [_cache[37] || (_cache[37] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØÙ / اÙÙ ÙØ·ÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($districtList(edit.china_city,edit.china_district), (d) => { 2949 return (_openBlock(), _createElementBlock("option", { 2950 key: d.value, 2951 value: d.value 2952 }, _toDisplayString(d.label), 9, _hoisted_76)) 2953 }), 128))], 8, _hoisted_75), [[_vModelSelect, edit.china_district]])]), 2954 _createElementVNode("label", _hoisted_77, [_cache[40] || (_cache[40] = _createElementVNode("b", null, "اÙÙ ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.profession) = $event) }, [_cache[39] || (_cache[39] = _createElementVNode("option", { value: "" }, "اختر اÙÙ ÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($professionList(edit.profession), (p) => { 2955 return (_openBlock(), _createElementBlock("option", { 2956 key: p.value, 2957 value: p.value 2958 }, _toDisplayString(p.label), 9, _hoisted_79)) 2959 }), 128))], 8, _hoisted_78), [[_vModelSelect, edit.profession]])]), 2960 _createElementVNode("label", _hoisted_80, [_cache[41] || (_cache[41] = _createElementVNode("b", null, "Ø¬ÙØ© Ø§ÙØ¹Ù Ù", -1)), _withDirectives(_createElementVNode("input", { 2961 "onUpdate:modelValue": $event => ((edit.workplace) = $event), 2962 placeholder: "Ø¬ÙØ© Ø§ÙØ¹Ù Ù" 2963 }, null, 8, _hoisted_81), [[_vModelText, edit.workplace]])]), 2964 _createElementVNode("label", _hoisted_82, [_cache[42] || (_cache[42] = _createElementVNode("b", null, "Ø§ÙØ¬Ø§Ù عة", -1)), _withDirectives(_createElementVNode("input", { 2965 "onUpdate:modelValue": $event => ((edit.university) = $event), 2966 placeholder: "Ø§ÙØ¬Ø§Ù عة" 2967 }, null, 8, _hoisted_83), [[_vModelText, edit.university]])]), 2968 _createElementVNode("label", _hoisted_84, [_cache[43] || (_cache[43] = _createElementVNode("b", null, "عدد Ø£ÙØ±Ø§Ø¯ Ø§ÙØ£Ø³Ø±Ø©", -1)), _withDirectives(_createElementVNode("input", { 2969 type: "number", 2970 min: "1", 2971 "onUpdate:modelValue": $event => ((edit.family_count) = $event), 2972 placeholder: "عدد Ø£ÙØ±Ø§Ø¯ Ø§ÙØ£Ø³Ø±Ø©" 2973 }
2973, null, 8, _hoisted_85), [[_vModelText, edit.family_count]])]) 2974 ]), _createElementVNode("div", _hoisted_86, [_createElementVNode("button", { 2975 class: "btn", 2976 onClick: saveProfile 2977 }, "ØÙظ Ø§ÙØªØ¹Ø¯ÙÙ", 8, _hoisted_87), _createElementVNode("button", { 2978 class: "btn secondary", 2979 onClick: $event => (editOpen=false) 2980 }, "Ø¥ÙØºØ§Ø¡", 8, _hoisted_88)])])) 2981 : _createCommentVNode("", true), 2982 _createElementVNode("div", _hoisted_89, [ 2983 _cache[46] || (_cache[46] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØµÙرة"), _createElementVNode("h3", null, "ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù")])], -1)), 2984 _createElementVNode("div", _hoisted_90, [(photo || (!memberPhotoFailed && $memberPhoto(m,'profile'))) 2985 ? (_openBlock(), _createElementBlock("img", { 2986 key: 0, 2987 src: photo || $memberPhoto(m,'profile'), 2988 alt: "ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù", 2989 onError: $event => (!photo && (memberPhotoFailed=true)) 2990 }, null, 40, _hoisted_91)) 2991 : (_openBlock(), _createElementBlock("div", _hoisted_92, "ð¤")), _cache[44] || (_cache[44] = _createElementVNode("p", { class: "hint" }, "Ø³ÙØªÙ ضبط Ø§ÙØµÙرة تÙÙØ§Ø¦ÙØ§Ù ÙØªÙاسب ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ø¶ÙÙØ§ØªØ ØµÙØØ© Ø§ÙØ¹Ø¶ÙØ ÙØ¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©.", -1))]), 2992 _createElementVNode("label", _hoisted_93, [_createElementVNode("input", { 2993 type: "file", 2994 accept: "image/*", 2995 onChange: onAdminPhoto 2996 }, null, 40, _hoisted_94), _cache[45] || (_cache[45] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©", -1)), _createElementVNode("em", null, _toDisplayString(photoName), 1)]), 2997 _createElementVNode("div", _hoisted_95, [_createElementVNode("button", { 2998 class: "btn secondary", 2999 onClick: uploadAdminPhoto 3000 }, "Ø±ÙØ¹ Ø§ÙØµÙرة Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©", 8, _hoisted_96), ($memberPhoto(m,'profile')) 3001 ? (_openBlock(), _createElementBlock("button", { 3002 key: 0, 3003 class: "btn danger", 3004 onClick: removeAdminPhoto 3005 }, "ØØ°Ù Ø§ÙØµÙرة", 8, _hoisted_97)) 3006 : _createCommentVNode("", true)]) 3007 ]), 3008 _createElementVNode("div", _hoisted_98, [ 3009 _cache[47] || (_cache[47] = _createElementVNode("h3", null, "Ø§ÙØØ§ÙØ§Øª ÙØ§ÙØ·ÙØ§Ø±Ø¦", -1)), 3010 (!cases.length && !emergencies.length) 3011 ? (_openBlock(), _createElementBlock("div", _hoisted_99, "ÙØ§ ØªÙØ¬Ø¯ ØØ§Ùات ٠رتبطة.")) 3012 : _createCommentVNode("", true), 3013 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(cases, (c) => { 3014 return (_openBlock(), _createElementBlock("div", { 3015 class: "relatedItem", 3016 key: 'c'+c.id 3017 }, [_createElementVNode("b", null, _toDisplayString(c.case_code), 1), _createElementVNode("span", null, _toDisplayString(c.type) + " â " + _toDisplayString(c.status), 1), _createElementVNode("small", null, _toDisplayString(String(c.created_at||'').slice(0,16).replace('T',' ')), 1)])) 3018 }), 128)), 3019 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(emergencies, (e) => { 3020 return (_openBlock(), _createElementBlock("div", { 3021 class: "relatedItem dangerRelated", 3022 key: 'e'+e.id 3023 }, [_createElementVNode("b", null, _toDisplayString(e.ticket_code), 1), _createElementVNode("span", null, _toDisplayString(e.type) + " â " + _toDisplayString(e.status) + " â " + _toDisplayString(e.priority), 1), _createElementVNode("small", null, _toDisplayString(String(e.created_at||'').slice(0,16).replace('T',' ')), 1
3023)])) 3024 }), 128)) 3025 ]), 3026 _createElementVNode("div", _hoisted_100, [_cache[48] || (_cache[48] = _createElementVNode("h3", null, "آخر سج٠Audit", -1)), (!audit.length) 3027 ? (_openBlock(), _createElementBlock("div", _hoisted_101, "ÙØ§ ÙÙØ¬Ø¯ Ø³Ø¬Ù ØØ¯ÙØ«.")) 3028 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(audit.slice(0,8), (a) => { 3029 return (_openBlock(), _createElementBlock("div", { 3030 class: "relatedItem", 3031 key: a.created_at+a.action 3032 }, [_createElementVNode("b", null, _toDisplayString(a.action), 1), _createElementVNode("span", null, _toDisplayString(a.entity_type) + " / " + _toDisplayString(a.entity_id), 1), _createElementVNode("small", null, _toDisplayString(String(a.created_at||'').slice(0,16).replace('T',' ')), 1)])) 3033 }), 128))]), 3034 _createElementVNode("button", { 3035 class: "btn secondary loadMore", 3036 onClick: $event => ($router.push('/admin/members')) 3037 }, "Ø±Ø¬ÙØ¹ ÙÙØ¹Ø¶ÙÙØ§Øª", 8, _hoisted_102) 3038 ])]))]), 3039 _: 1 3040 })) 3041 } 3042} 3043})() 3044 }; 3045 3046 3047 // v3.8.55 â i18n foundation. Arabic is the source locale; English and Chinese are 3048 // activated per key as translations land. A missing key never breaks the UI: it falls back to Arabic. 3049 const I18N_DEFAULT_LOCALE='ar'; 3050 const I18N={ 3051 ar:{ 3052 'nav.home':'Ø§ÙØ±Ø¦ÙØ³ÙØ©','nav.login':'دخÙÙ','nav.guide':'Ø§ÙØ¯ÙÙÙ','nav.events':'اÙÙØ¹Ø§ÙÙØ§Øª','nav.emergency':'Ø·ÙØ§Ø±Ø¦', 3053 'nav.account':'ØØ³Ø§Ø¨Ù','nav.orders':'Ø·ÙØ¨Ø§ØªÙ','nav.notifications':'إشعارات', 3054 'footer.privacy':'Ø§ÙØ®ØµÙØµÙØ©','footer.terms':'Ø§ÙØ´Ø±ÙØ·','footer.contact':'Ø§ÙØªÙاصÙ','footer.platform':'Ù ÙØµØ© SMT China', 3055 'common.language':'اÙÙØºØ©' 3056 }, 3057 en:{ 3058 'nav.home':'Home','nav.login':'Sign in','nav.guide':'Guide','nav.events':'Events','nav.emergency':'Emergency', 3059 'nav.account':'Account','nav.orders':'My orders','nav.notifications':'Alerts', 3060 'footer.privacy':'Privacy','footer.terms':'Terms','footer.contact':'Contact','footer.platform':'SMT China Platform', 3061 'common.language':'Language' 3062 }, 3063 zh:{ 3064 'nav.home':'é¦é¡µ','nav.login':'ç»å½','nav.guide':'æå','nav.events':'æ´»å¨','nav.emergency':'ç´§æ¥', 3065 'nav.account':'æç','nav.orders':'æç订å','nav.notifications':'éç¥', 3066 'footer.privacy':'éç§','footer.terms':'æ¡æ¬¾','footer.contact':'èç³»','footer.platform':'SMT China å¹³å°', 3067 'common.language':'è¯è¨' 3068 } 3069 }; 3070 function i18nStoredLocale(){try{return String(localStorage.getItem('gzc_locale')||'')}catch(e){return ''}} 3071 function i18nPersistLocale(code){try{localStorage.setItem('gzc_locale',String(code||''))}catch(e){}} 3072 function i18nApplyDocument(code,dir){try{const el=document.documentElement;if(!el)return;el.setAttribute('lang',code==='zh'?'zh-Hans':String(code||'ar'));el.setAttribute('dir',dir||(code==='ar'?'rtl':'ltr'));}catch(e){}} 3073 function i18nTranslate(locale,key){ 3074 const table=I18N[String(locale||I18N_DEFAULT_LOCALE)]||I18N[I18N_DEFAULT_LOCALE]; 3075 const fallback=I18N[I18N_DEFAULT_LOCALE]||{}; 3076 const value=table&&Object.prototype.hasOwnProperty.call(table,key)?table[key]:undefined; 3077 if(value!==undefined&&String(value).trim()!=='')return value; 3078 return Object.prototype.hasOwnProperty.call(fallback,key)?fallback[key]:key; 3079 } 3080 3081 const PublicFrame={ 3082 props:['title','home'], 3083 setup(){ 3084 const store=useGzcStore(); const router=useRouter(); const route=useRoute(); 3085 const navLogged=computed(()=>store.state.me&&store.state.me.authenticated&&store.state.me.member); 3086 const ordersShortcutVisible=computed(()=>!!(store.state.me&&store.state.me.member&&store.state.me.member.show_orders_navigation)); 3087 const tabs=computed(()=>navLogged.value? 3088 ([['/','Ø§ÙØ±Ø¦ÙØ³ÙØ©','â',''], 3089 ['/notifications','إشعارات','ð','notifications'], 3090 ['/china-guide','Ø§ÙØ¯ÙÙÙ','ð',''], 3091 ...(ordersShortcutVisible.value 3092 ? [['/orders','Ø·ÙØ¨Ø§ØªÙ','ð§¾','workflow']] 3093 : [['/events','اÙÙØ¹Ø§ÙÙØ§Øª','â·','']]), 3094 ['/account','ØØ³Ø§Ø¨Ù','ð¤','']]) 3095 : 3096 [['/','Ø§ÙØ±Ø¦ÙØ³ÙØ©','â',''], 3097 ['/login','دخÙÙ','ð¤',''], 3098 ['/china-guide','Ø§ÙØ¯ÙÙÙ','ð',''], 3099 ['/events','اÙÙØ¹Ø§ÙÙØ§Øª','â·',''], 3100 ['/emergency','٠تابعة','!','']] 3101 ); 3102 function active(p){if(p==='/orders')return route.path==='/orders'||route.path.startsWith('/procurement');if(p!=='/'&&route.path.startsWith(p+'/'))return true;return route.path===p;} 3103 function go(p){router.push(p);} 3104 function badgeFor(t){if(t[3]==='notifications')return Number(store.state.memberUnread||0);if(t[3]==='workflow')return Number(store.state.memberWorkflowSummary&&store.state.memberWorkflowSummary.needs_action||0);return 0;} 3105 async function refreshMemberSignals(){if(!navLogged.value)return;await Promise.all([store.loadMemberNotifications('all',8),store.loadMemberWorkflowSummary()]);} 3106 onMounted(async()=>{await store.loadMe();await refreshMemberSignals();}); 3107 return {store,router,tabs,active,go,navLogged,ordersShortcutVisible,badgeFor,refreshMemberSignals}; 3108 }, 3109 render:(function(){ 3110const _Vue = Vue
3111const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 3112 3113const _hoisted_1 = { class: "publicShell" } 3114const _hoisted_2 = { 3115 key: 0, 3116 class: "publicHero pageHeroV2" 3117} 3118const _hoisted_3 = { class: "pageHeroBar" } 3119const _hoisted_4 = ["onClick"] 3120const _hoisted_5 = ["onClick"] 3121const _hoisted_6 = { key: 0 } 3122const _hoisted_7 = { class: "smtFooter compactBrandFooter" } 3123const _hoisted_8 = { 3124 class: "footerLinks", 3125 "aria-label": "Ø±ÙØ§Ø¨Ø· ٠عÙÙ٠ات اÙÙ ÙØµØ©" 3126} 3127const _hoisted_9 = ["onClick"] 3128const _hoisted_10 = ["onClick"] 3129const _hoisted_11 = ["onClick"] 3130const _hoisted_12 = { 3131 class: "nav bottomPro memberOpsNav", 3132 "aria-label": "Ø§ÙØªÙÙÙ Ø§ÙØ³ÙÙÙ" 3133} 3134const _hoisted_13 = ["onClick"] 3135const _hoisted_14 = { class: "navIcon" } 3136const _hoisted_15 = ["src"] 3137const _hoisted_16 = { 3138 key: 0, 3139 class: "navCounter" 3140} 3141const _hoisted_17 = { class: "navText" } 3142 3143return function render(_ctx, _cache) { 3144 with (_ctx) { 3145 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderSlot: _renderSlot, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass } = _Vue 3146 3147 return (_openBlock(), _createElementBlock("section", _hoisted_1, [ 3148 (!home) 3149 ? (_openBlock(), _createElementBlock("header", _hoisted_2, [_createElementVNode("div", _hoisted_3, [_createElementVNode("button", { 3150 class: "back", 3151 onClick: $event => (go('/')) 3152 }, "Ø§ÙØ±Ø¦ÙØ³ÙØ©", 8, _hoisted_4), _cache[1] || (_cache[1] = _createElementVNode("a", { 3153 class: "smtBrandLink pageHeroBrand", 3154 href: "https://smtchgz.cn", 3155 target: "_blank", 3156 rel: "noopener noreferrer", 3157 "aria-label": "ÙØªØ Ù ÙÙØ¹ SMT Advanced Business" 3158 }, [_createElementVNode("img", { 3159 src: "/brand/smt-gold-v1/smt-logo-transparent.png", 3160 alt: "SMT", 3161 width: "44", 3162 height: "44" 3163 })], -1)), navLogged 3164 ? (_openBlock(), _createElementBlock("button", { 3165 key: 0, 3166 class: "memberTopBell", 3167 onClick: $event => (go('/notifications')), 3168 "aria-label": "إشعاراتÙ" 3169 }, [_cache[0] || (_cache[0] = _createElementVNode("span", null, "ð", -1)), (store.state.memberUnread) 3170 ? (_openBlock(), _createElementBlock("b", _hoisted_6, _toDisplayString(store.state.memberUnread>99?'99+':store.state.memberUnread), 1)) 3171 : _createCommentVNode("", true)], 8, _hoisted_5)) 3172 : _createCommentVNode("", true)]), _createElementVNode("h1", null, _toDisplayString(title), 1)])) 3173 : _createCommentVNode("", true), 3174 _renderSlot($slots, "default"), 3175 _createElementVNode("footer", _hoisted_7, [_createElementVNode("div", null, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "SMT Advanced Business", -1)), _cache[3] || (_cache[3] = _createElementVNode("span", null, "Ù ÙØµØ© SMT China", -1)), _createElementVNode("nav", _hoisted_8, [_createElementVNode("button", { onClick: $event => (go('/privacy')) }, "Ø§ÙØ®ØµÙØµÙØ©", 8, _hoisted_9), _createElementVNode("button", { onClick: $event => (go('/terms')) }, "Ø§ÙØ´Ø±ÙØ·", 8, _hoisted_10), _createElementVNode("button", { onClick: $event => (go('/contact')) }, "Ø§ÙØªÙاصÙ", 8, _hoisted_11)])])]), 3176 _createElementVNode("nav", _hoisted_12, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tabs, (t) => { 3177 return (_openBlock(), _createElementBlock("button", { 3178 key: t[0], 3179 class: _normalizeClass({active:active(t[0])}), 3180 onClick: $event => (go(t[0])) 3181 }, [_createElementVNode("span", _hoisted_14, [_createElementVNode("img", { 3182 class: "smtNavArt", 3183 src: '/brand/smt-gold-v1/'+(t[0]==='/'?'smt-logo.png':'service-'+({'/china-guide':'guide','/events':'notifications','/notifications':'notifications','/orders':'business','/emergency':'help'}[t[0]]||'account')+'.webp'), 3184 alt: "", 3185 width: "32", 3186 height: "32" 3187 }, null, 8, _hoisted_15), (badgeFor(t)) 3188 ? (_openBlock(), _createElementBlock("b", _hoisted_16, _toDisplayString(badgeFor(t)>99?'99+':badgeFor(t)), 1)) 3189 : _createCommentVNode("", true)]), _createElementVNode("span", _hoisted_17, _toDisplayString(t[1]), 1)], 10, _hoisted_13)) 3190 }), 128))]) 3191 ])) 3192 } 3193} 3194})() 3195 }; 3196 3197 const PublicHomePage={ 3198 components:{PublicFrame}, 3199 setup(){ 3200 const store=useGzcStore(); const router=useRouter(); const pwa=reactive(pwaState()); 3201 const loggedMember=computed(()=>store.state.me&&store.state.me.authenticated&&store.state.me.member); 3202 const installVisible=computed(()=>!pwa.standalone&&(pwa.installReady||/iphone|ipad|ipod|android/i.test(String(navigator.userAgent||'')))); 3203 const officialUnread=computed(()=>safeArray(store.state.circulars).filter(a=>a.unread_by_me).length); 3204 const ordersShortcutVisible=computed(()=>!!(store.state.me&&store.state.me.member&&store.state.me.member.show_orders_navigation)); 3205 function openOfficial(){router.push('/circulars/all');} 3206 function sync(e){Object.assign(pwa,(e&&e.detail)||pwaState());} 3207 onMounted(async()=>{await store.loadMe();store.loadPublicBranding();api('/api/home').then(r=>{store.state.home=r||null});if(loggedMember.value)store.loadPublicContent();sync();window.addEventListener('gzc-pwa-state',sync);}); 3208 function go(p){router.push(p)} 3209 async function installApp(){const r=window.__gzcInstallApp?await window.__gzcInstallApp():{ok:false,message:iosInstallHint()};store.state.msg=r.message||iosInstallHint();sync();}
3210 async function acknowledge(channel){const r=await store.markAnnouncementsRead(channel);store.state.msg=(r&&r.message)||'ت٠تسجÙÙ Ø§ÙØ§Ø·Ùاع';} 3211 function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');} 3212 const branding=computed(()=>store.state.platformBranding||{});return {store,go,pwa,installVisible,installApp,loggedMember,ordersShortcutVisible,openOfficial,officialUnread,branding}; 3213 }, 3214 render:(function(){ 3215const _Vue = Vue 3216const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 3217 3218const _hoisted_1 = { class: "publicHero smtExperienceHero modernHero compactHomeHero homeVisualHierarchyHero finalHomeHero" } 3219const _hoisted_2 = { class: "heroUtilityBar" } 3220const _hoisted_3 = { class: "heroBadge" } 3221const _hoisted_4 = ["onClick"] 3222const _hoisted_5 = { class: "heroContent heroFocusedContent" } 3223const _hoisted_6 = { class: "heroFocusedSummary" } 3224const _hoisted_7 = { class: "experiencePillars modernPillars compactHomePillars finalQuickAccess" } 3225const _hoisted_8 = ["onClick"] 3226const _hoisted_9 = ["onClick"] 3227const _hoisted_10 = ["onClick"] 3228const _hoisted_11 = ["onClick"] 3229const _hoisted_12 = { class: "smtCompanySection modernCompany compactCompanyCard homeCompanyStrip businessBridgeStrip" } 3230const _hoisted_13 = ["onClick"] 3231const _hoisted_14 = { 3232 key: 0, 3233 class: "smartBanner" 3234} 3235const _hoisted_15 = ["onClick"] 3236const _hoisted_16 = { class: "homeGrid orderedHomeGrid compactServiceGrid" } 3237const _hoisted_17 = ["onClick"] 3238const _hoisted_18 = { 3239 key: 0, 3240 class: "tileBadge" 3241} 3242const _hoisted_19 = ["onClick"] 3243const _hoisted_20 = ["onClick"] 3244const _hoisted_21 = ["onClick"] 3245const _hoisted_22 = ["onClick"] 3246const _hoisted_23 = { 3247 key: 0, 3248 class: "tileBadge" 3249} 3250const _hoisted_24 = ["onClick"] 3251const _hoisted_25 = { 3252 key: 0, 3253 class: "tileBadge" 3254} 3255const _hoisted_26 = ["onClick"] 3256const _hoisted_27 = { 3257 key: 0, 3258 class: "tileBadge" 3259} 3260const _hoisted_28 = ["onClick"] 3261const _hoisted_29 = ["onClick"] 3262const _hoisted_30 = ["onClick"] 3263const _hoisted_31 = ["onClick"] 3264const _hoisted_32 = ["onClick"] 3265const _hoisted_33 = ["onClick"] 3266const _hoisted_34 = ["onClick"] 3267const _hoisted_35 = ["onClick"] 3268const _hoisted_36 = ["onClick"] 3269 3270return function render(_ctx, _cache) { 3271 with (_ctx) { 3272 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 3273 3274 const _component_PublicFrame = _resolveComponent("PublicFrame") 3275 3276 return (_openBlock(), _createBlock(_component_PublicFrame, { 3277 title: "Ø§ÙØ±Ø¦ÙØ³ÙØ©", 3278 home: true 3279 }, { 3280 default: _withCtx(() => [ 3281 _createElementVNode("section", _hoisted_1, [ 3282 _cache[2] || (_cache[2] = _createElementVNode("div", { class: "heroGlow heroGlowOne" }, null, -1)), 3283 _cache[3] || (_cache[3] = _createElementVNode("div", { class: "heroGlow heroGlowTwo" }, null, -1)), 3284 _createElementVNode("div", _hoisted_2, [_createElementVNode("span", _hoisted_3, _toDisplayString(branding.badge || 'SMT China'), 1), installVisible 3285 ? (_openBlock(), _createElementBlock("button", { 3286 key: 0, 3287 type: "button", 3288 class: "compactHeroInstall", 3289 onClick: installApp, 3290 "aria-label": "ØªØ«Ø¨ÙØª Ù ÙØµØ© SMT عÙ٠اÙÙØ§ØªÙ" 3291 }, _cache[0] || (_cache[0] = [_createElementVNode("span", { "aria-hidden": "true" }, "+", -1), _createTextVNode(" ØªØ«Ø¨ÙØª اÙÙ ÙØµØ©")]), 8, _hoisted_4)) 3292 : _createCommentVNode("", true)]), 3293 _cache[4] || (_cache[4] = _createElementVNode("div", { class: "heroTopline" }, [_createElementVNode("a", { 3294 class: "smtBrandLink", 3295 href: "https://smtchgz.cn", 3296 target: "_blank", 3297 rel: "noopener noreferrer", 3298 "aria-label": "ÙØªØ Ù ÙÙØ¹ SMT Advanced Business" 3299 }, [_createElementVNode("img", { 3300 class: "smtHeroLogo", 3301 src: "/brand/smt-gold-v1/smt-logo.png", 3302 alt: "شعار SMT" 3303 })]), _createElementVNode("div", { class: "heroPlatformIdentity" }, [_createElementVNode("b", null, "Ù ÙØµØ© SMT"), _createElementVNode("span", null, "خد٠ات Ù٠جت٠عات ÙÙ Ø§ÙØµÙÙ")])], -1)), 3304 _createElementVNode("div", _hoisted_5, [_createElementVNode("p", _hoisted_6, _toDisplayString(branding.subtitle || 'خد٠ات Ù٠عÙÙ٠ات Ù ÙØ«ÙÙØ© ÙÙ٠جت٠ع ÙØ§ÙØÙاة اÙÙÙÙ ÙØ© ÙØ§Ùأع٠ا٠ÙÙ Ø§ÙØµÙÙ.'), 1), _cache[1] || (_cache[1] = _createElementVNode("div", { class: "heroCtas heroSingleAction" }, [_createElementVNode("a", { 3305 class: "heroPrimary", 3306 href: "/china-guide" 3307 }, "ابدأ Ù Ù Ø§ÙØ¯ÙÙÙ")], -1))]) 3308 ]), 3309 _createElementVNode("section", _hoisted_7, [ 3310 _createElementVNode("button", { 3311 type: "button", 3312 onClick: $event => (go('/about')) 3313 }, _cache[5] || (_cache[5] = [_createElementVNode("span", { class: "pillarIcon" }, [_createElementVNode("img", { 3314 class: "smtServiceArt", 3315 src: "/brand/smt-gold-v1/service-community.webp", 3316 alt: "", 3317 width: "96", 3318 height: "96", 3319 loading: "lazy"
3320 })], -1), _createElementVNode("span", null, [_createElementVNode("b", null, "اÙ٠جت٠ع"), _createElementVNode("small", null, "Ø§ÙØ¹Ø¶ÙÙØ© ÙØ§ÙجاÙÙØ§Øª")], -1), _createElementVNode("em", null, "â", -1)]), 8, _hoisted_8), 3321 _createElementVNode("button", { 3322 type: "button", 3323 onClick: $event => (go('/china-guide')) 3324 }, _cache[6] || (_cache[6] = [_createElementVNode("span", { class: "pillarIcon" }, [_createElementVNode("img", { 3325 class: "smtServiceArt", 3326 src: "/brand/smt-gold-v1/service-guide.webp", 3327 alt: "", 3328 width: "96", 3329 height: "96", 3330 loading: "lazy" 3331 })], -1), _createElementVNode("span", null, [_createElementVNode("b", null, "Ø§ÙØÙØ§Ø© ÙÙ Ø§ÙØµÙÙ"), _createElementVNode("small", null, "Ø§ÙØ®Ø¯Ù ات اÙÙÙÙ ÙØ©")], -1), _createElementVNode("em", null, "â", -1)]), 8, _hoisted_9), 3332 _createElementVNode("button", { 3333 type: "button", 3334 onClick: $event => (go('/trade-shipping')) 3335 }, _cache[7] || (_cache[7] = [_createElementVNode("span", { class: "pillarIcon" }, [_createElementVNode("img", { 3336 class: "smtServiceArt", 3337 src: "/brand/smt-gold-v1/service-business.webp", 3338 alt: "", 3339 width: "96", 3340 height: "96", 3341 loading: "lazy" 3342 })], -1), _createElementVNode("span", null, [_createElementVNode("b", null, "Ø§ÙØ£Ø¹Ù اÙ"), _createElementVNode("small", null, "Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ")], -1), _createElementVNode("em", null, "â", -1)]), 8, _hoisted_10), 3343 _createElementVNode("button", { 3344 type: "button", 3345 onClick: $event => (go('/help')) 3346 }, _cache[8] || (_cache[8] = [_createElementVNode("span", { class: "pillarIcon" }, [_createElementVNode("img", { 3347 class: "smtServiceArt", 3348 src: "/brand/smt-gold-v1/service-help.webp", 3349 alt: "", 3350 width: "96", 3351 height: "96", 3352 loading: "lazy" 3353 })], -1), _createElementVNode("span", null, [_createElementVNode("b", null, "Ø§ÙØ¯Ø¹Ù "), _createElementVNode("small", null, "اÙ٠ساعدة ÙØ§Ù٠تابعة")], -1), _createElementVNode("em", null, "â", -1)]), 8, _hoisted_11) 3354 ]), 3355 _createElementVNode("section", _hoisted_12, [_cache[9] || (_cache[9] = _createElementVNode("div", { class: "companyHeader businessBridgeHeader" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "sectionEyebrow" }, "خد٠ات Ø§ÙØªØ¬Ø§Ø±Ø© Ù Ù Ø§ÙØµÙÙ"), _createElementVNode("h2", null, "SMT Advanced Business")])], -1)), _cache[10] || (_cache[10] = _createElementVNode("p", null, "ØªÙØ±ÙØ¯Ø ÙØØµ Ø¬ÙØ¯Ø©Ø Ø´ØÙ ÙØ¥Ø¯Ø§Ø±Ø© Ø³ÙØ§Ø³Ù Ø§ÙØ¥Ù داد.", -1)), _createElementVNode("button", { 3356 class: "companyAction", 3357 onClick: $event => (go('/trade-shipping')) 3358 }, "Ø§Ø³ØªÙØ´Ù خد٠ات Ø§ÙØ£Ø¹Ù اÙ", 8, _hoisted_13)]), 3359 (store.state.home&&store.state.home.banner) 3360 ? (_openBlock(), _createElementBlock("section", _hoisted_14, [_createElementVNode("div", null, [_createElementVNode("small", null, _toDisplayString(store.state.home.banner.kind), 1), _createElementVNode("b", null, _toDisplayString(store.state.home.banner.title), 1), _createElementVNode("p", null, _toDisplayString(store.state.home.banner.body), 1)]), (store.state.home.banner.url) 3361 ? (_openBlock(), _createElementBlock("button", { 3362 key: 0, 3363 class: "smallbtn", 3364 onClick: $event => (go(store.state.home.banner.url)) 3365 }, "ÙØªØ", 8, _hoisted_15)) 3366 : _createCommentVNode("", true)])) 3367 : _createCommentVNode("", true), 3368 _createElementVNode("section", _hoisted_16, [ 3369 (store.state.me&&store.state.me.authenticated&&store.state.me.member) 3370 ? (_openBlock(), _createElementBlock("button", { 3371 key: 0, 3372 type: "button", 3373 class: "homeTile officialTile officialTileEmbassy", 3374 onClick: $event => (openOfficial()) 3375 }, [ 3376 officialUnread 3377 ? (_openBlock(), _createElementBlock("span", _hoisted_18, _toDisplayString(officialUnread), 1)) 3378 : _createCommentVNode("", true), 3379 _cache[11] || (_cache[11] = _createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3380 class: "smtServiceArt", 3381 src: "/brand/smt-gold-v1/service-community.webp", 3382 alt: "", 3383 width: "96", 3384 height: "96", 3385 loading: "lazy"
3386 })], -1)), 3387 _cache[12] || (_cache[12] = _createElementVNode("b", null, "Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©", -1)), 3388 _cache[13] || (_cache[13] = _createElementVNode("small", null, "Ø³ÙØ§Ø±Ø§Øª ÙÙÙØµÙÙØ§Øª ÙØ¬Ùات Ø±Ø³Ù ÙØ© Ù ÙØ«ÙÙØ©", -1)), 3389 _cache[14] || (_cache[14] = _createElementVNode("em", null, "ÙØªØ اÙÙØ³Ù ", -1)) 3390 ], 8, _hoisted_17)) 3391 : _createCommentVNode("", true), 3392 _createElementVNode("button", { 3393 class: "homeTile guideTile", 3394 onClick: $event => (go('/china-guide')) 3395 }, _cache[15] || (_cache[15] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3396 class: "smtServiceArt", 3397 src: "/brand/smt-gold-v1/service-guide.webp", 3398 alt: "", 3399 width: "96", 3400 height: "96", 3401 loading: "lazy" 3402 })], -1), _createElementVNode("b", null, "دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ", -1), _createElementVNode("small", null, "Ø§ÙØÙØ§Ø© ÙØ§Ùخد٠ات Ø¯Ø§Ø®Ù Ø§ÙØµÙÙ", -1)]), 8, _hoisted_19), 3403 _createElementVNode("button", { 3404 class: "homeTile guideTile chinaAppsHomeTile", 3405 onClick: $event => (go('/apps-in-china')) 3406 }, _cache[16] || (_cache[16] = [_createElementVNode("span", { 3407 class: "ico chinaAppsHomeIcon", 3408 "aria-hidden": "true" 3409 }, [_createElementVNode("span", { class: "chinaAppsMosaic" }, [ 3410 _createElementVNode("img", { 3411 src: "/brand/app-media/alipay-icon.webp", 3412 alt: "", 3413 width: "42", 3414 height: "42", 3415 loading: "lazy" 3416 }), 3417 _createElementVNode("img", { 3418 src: "/brand/app-media/wechat-icon.webp", 3419 alt: "", 3420 width: "42", 3421 height: "42", 3422 loading: "lazy" 3423 }), 3424 _createElementVNode("img", { 3425 src: "/brand/app-media/trip-icon.webp", 3426 alt: "", 3427 width: "42", 3428 height: "42", 3429 loading: "lazy" 3430 }), 3431 _createElementVNode("img", { 3432 src: "/brand/app-media/amap-icon.webp", 3433 alt: "", 3434 width: "42", 3435 height: "42", 3436 loading: "lazy" 3437 }) 3438 ])], -1), _createElementVNode("b", null, "تطبÙÙØ§Øª Ù ÙÙ Ø© ÙÙ Ø§ÙØµÙÙ", -1), _createElementVNode("small", null, "Ø§ÙØ¯Ùع ÙØ§ÙتÙÙÙ ÙØ§ÙتسÙÙ ÙØ§ÙØªØ¬Ø§Ø±Ø©Ø Ù Ø¹ Ø®Ø·ÙØ§Øª ÙFAQ", -1)]), 8, _hoisted_20), 3439 _createElementVNode("button", { 3440 class: "homeTile guideTile", 3441 onClick: $event => (go('/trade-shipping')) 3442 }, _cache[17] || (_cache[17] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3443 class: "smtServiceArt", 3444 src: "/brand/smt-gold-v1/service-shipping.webp", 3445 alt: "", 3446 width: "96", 3447 height: "96", 3448 loading: "lazy" 3449 })], -1), _createElementVNode("b", null, "Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ", -1), _createElementVNode("small", null, "Ø§ÙØµÙÙ â Ø§ÙعاÙÙ ", -1)]), 8, _hoisted_21), 3450 (store.state.me&&store.state.me.authenticated&&store.state.me.member) 3451 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 3452 ordersShortcutVisible 3453 ? (_openBlock(), _createElementBlock("button", { 3454 key: 0, 3455 class: "homeTile memberOpsTile", 3456 onClick: $event => (go('/orders')) 3457 }, [ 3458 (store.state.memberWorkflowSummary.needs_action) 3459 ? (_openBlock(), _createElementBlock("span", _hoisted_23, _toDisplayString(store.state.memberWorkflowSummary.needs_action), 1)) 3460 : _createCommentVNode("", true), 3461 _cache[18] || (_cache[18] = _createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3462 class: "smtServiceArt", 3463 src: "/brand/smt-gold-v1/service-business.webp", 3464 alt: "", 3465 width: "96", 3466 height: "96", 3467 loading: "lazy"
3468 })], -1)), 3469 _cache[19] || (_cache[19] = _createElementVNode("b", null, "Ø·ÙØ¨Ø§ØªÙ", -1)), 3470 _createElementVNode("small", null, _toDisplayString(store.state.memberWorkflowSummary.total?'٠تابعة '+store.state.memberWorkflowSummary.total+' Ø·ÙØ¨':'Ø·ÙØ¨Ø§Øª Ø§ÙØªÙØ±ÙØ¯ ÙØ§Ù٠تابعة'), 1) 3471 ], 8, _hoisted_22)) 3472 : _createCommentVNode("", true), 3473 _createElementVNode("button", { 3474 class: "homeTile memberOpsTile noticeTile", 3475 onClick: $event => (go('/notifications')) 3476 }, [ 3477 (store.state.memberUnread) 3478 ? (_openBlock(), _createElementBlock("span", _hoisted_25, _toDisplayString(store.state.memberUnread), 1)) 3479 : _createCommentVNode("", true), 3480 _cache[20] || (_cache[20] = _createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3481 class: "smtServiceArt", 3482 src: "/brand/smt-gold-v1/service-notifications.webp", 3483 alt: "", 3484 width: "96", 3485 height: "96", 3486 loading: "lazy" 3487 })], -1)), 3488 _cache[21] || (_cache[21] = _createElementVNode("b", null, "إشعاراتÙ", -1)), 3489 _createElementVNode("small", null, _toDisplayString(store.state.memberUnread?'ØªØØ¯Ùثات ØªØØªØ§Ø¬ ٠راجعة':'ÙØ§ ØªÙØ¬Ø¯ ØªØØ¯Ùثات Ø¬Ø¯ÙØ¯Ø©'), 1) 3490 ], 8, _hoisted_24), 3491 _createElementVNode("button", { 3492 class: "homeTile noticeTile", 3493 onClick: $event => (go('/announcements')) 3494 }, [ 3495 (store.state.announcementUnread) 3496 ? (_openBlock(), _createElementBlock("span", _hoisted_27, _toDisplayString(store.state.announcementUnread), 1)) 3497 : _createCommentVNode("", true), 3498 _cache[22] || (_cache[22] = _createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3499 class: "smtServiceArt", 3500 src: "/brand/smt-gold-v1/service-notifications.webp", 3501 alt: "", 3502 width: "96", 3503 height: "96", 3504 loading: "lazy" 3505 })], -1)), 3506 _cache[23] || (_cache[23] = _createElementVNode("b", null, "Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª", -1)), 3507 _createElementVNode("small", null, _toDisplayString(store.state.announcementUnread?'Ø¥Ø¹ÙØ§Ùات Ø¬Ø¯ÙØ¯Ø©':'Ù Ø±ÙØ² Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª'), 1) 3508 ], 8, _hoisted_26), 3509 _createElementVNode("button", { 3510 class: "homeTile", 3511 onClick: $event => (go('/events')) 3512 }, _cache[24] || (_cache[24] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3513 class: "smtServiceArt", 3514 src: "/brand/smt-gold-v1/service-notifications.webp", 3515 alt: "", 3516 width: "96", 3517 height: "96", 3518 loading: "lazy" 3519 })], -1), _createElementVNode("b", null, "اÙÙØ¹Ø§ÙÙØ§Øª", -1), _createElementVNode("small", null, "أرشÙÙ ÙØ£Ùشطة", -1)]), 8, _hoisted_28), 3520 _createElementVNode("button", { 3521 class: "homeTile", 3522 onClick: $event => (go('/about')) 3523 }, _cache[25] || (_cache[25] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3524 class: "smtServiceArt", 3525 src: "/brand/smt-gold-v1/service-community.webp", 3526 alt: "", 3527 width: "96", 3528 height: "96", 3529 loading: "lazy" 3530 })], -1), _createElementVNode("b", null, "ع٠اÙÙ ÙØµØ©", -1), _createElementVNode("small", null, "Ø§ÙØªØ¹Ø±ÙÙ ÙØ§Ùخد٠ات", -1)]), 8, _hoisted_29), 3531 _createElementVNode("button", { 3532 class: "homeTile", 3533 onClick: $event => (go('/account')) 3534 }, _cache[26] || (_cache[26] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3535 class: "smtServiceArt", 3536 src: "/brand/smt-gold-v1/service-account.webp", 3537 alt: "", 3538 width: "96", 3539 height: "96", 3540 loading: "lazy"
3541 })], -1), _createElementVNode("b", null, "ØØ³Ø§Ø¨Ù", -1), _createElementVNode("small", null, "Ù ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª", -1)]), 8, _hoisted_30) 3542 ], 64)) 3543 : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [_createElementVNode("button", { 3544 class: "homeTile", 3545 onClick: $event => (go('/login')) 3546 }, _cache[27] || (_cache[27] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3547 class: "smtServiceArt", 3548 src: "/brand/smt-gold-v1/service-account.webp", 3549 alt: "", 3550 width: "96", 3551 height: "96", 3552 loading: "lazy" 3553 })], -1), _createElementVNode("b", null, "دخÙÙ Ø£Ù Ø·ÙØ¨ عضÙÙØ©", -1), _createElementVNode("small", null, "تØÙ٠آ٠٠عبر ÙØ§ØªØ³Ø§Ø¨", -1)]), 8, _hoisted_31), _createElementVNode("button", { 3554 class: "homeTile", 3555 onClick: $event => (go('/arrival')) 3556 }, _cache[28] || (_cache[28] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3557 class: "smtServiceArt", 3558 src: "/brand/smt-gold-v1/service-arrival.webp", 3559 alt: "", 3560 width: "96", 3561 height: "96", 3562 loading: "lazy" 3563 })], -1), _createElementVNode("b", null, "ÙØµÙت ØØ¯ÙثاÙ", -1), _createElementVNode("small", null, "Ø§Ø³ØªÙØ¨Ø§Ù Ù٠تابعة", -1)]), 8, _hoisted_32), _createElementVNode("button", { 3564 class: "homeTile lockedTile", 3565 onClick: $event => (go('/login')) 3566 }, _cache[29] || (_cache[29] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3567 class: "smtServiceArt", 3568 src: "/brand/smt-gold-v1/service-account.webp", 3569 alt: "", 3570 width: "96", 3571 height: "96", 3572 loading: "lazy" 3573 })], -1), _createElementVNode("b", null, "Ù ØØªÙÙ Ø§ÙØ£Ø¹Ø¶Ø§Ø¡", -1), _createElementVNode("small", null, "Ø§ÙØ®Ø¯Ù ات Ø§ÙØ®Ø§ØµØ© بعد Ø§ÙØ¯Ø®ÙÙ", -1)]), 8, _hoisted_33)], 64)), 3574 _createElementVNode("button", { 3575 class: "homeTile dangerTile endActionTile", 3576 onClick: $event => (go('/emergency')) 3577 }, _cache[30] || (_cache[30] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3578 class: "smtServiceArt", 3579 src: "/brand/smt-gold-v1/service-help.webp", 3580 alt: "", 3581 width: "96", 3582 height: "96", 3583 loading: "lazy" 3584 })], -1), _createElementVNode("b", null, "Ø¨ÙØ§Øº ٠تابعة", -1), _createElementVNode("small", null, "٠تابعة Ø¯Ø§Ø®Ù Ø§ÙØ´Ø±ÙØ© ÙÙØ£Ø¹Ø¶Ø§Ø¡", -1)]), 8, _hoisted_34), 3585 _createElementVNode("button", { 3586 class: "homeTile endActionTile", 3587 onClick: $event => (go('/help')) 3588 }, _cache[31] || (_cache[31] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3589 class: "smtServiceArt", 3590 src: "/brand/smt-gold-v1/service-help.webp", 3591 alt: "", 3592 width: "96", 3593 height: "96", 3594 loading: "lazy" 3595 })], -1), _createElementVNode("b", null, "Ø£ØØªØ§Ø¬ ٠ساعدة", -1), _createElementVNode("small", null, "Ø·ÙØ¨ دع٠", -1)]), 8, _hoisted_35), 3596 (store.state.me&&store.state.me.authenticated&&store.state.me.member) 3597 ? (_openBlock(), _createElementBlock("button", { 3598 key: 3, 3599 class: "homeTile feedbackTile endActionTile", 3600 onClick: $event => (go('/feedback')) 3601 }, _cache[32] || (_cache[32] = [_createElementVNode("span", { class: "ico" }, [_createElementVNode("img", { 3602 class: "smtServiceArt", 3603 src: "/brand/smt-gold-v1/service-help.webp", 3604 alt: "", 3605 width: "96", 3606 height: "96", 3607 loading: "lazy" 3608 })], -1), _createElementVNode("b", null, "Ù ÙØ§ØØ¸Ø§Øª ÙØ§ÙØªØ±Ø§ØØ§Øª", -1), _createElementVNode("small", null, "Ø³Ø§Ø¹Ø¯ÙØ§ ÙØ·Ùر اÙÙ ÙØµØ©", -1)]), 8, _hoisted_36)) 3609 : _createCommentVNode("", true) 3610 ]) 3611 ]), 3612 _: 1 3613 }, 8, ["home"])) 3614 } 3615} 3616})() 3617 }; 3618 3619 3620 3621 const ChinaGuidePage={ 3622 components:{PublicFrame}, 3623 setup(){ 3624 const store=useGzcStore(); const router=useRouter(); 3625 const taxonomyV2=ref(false); const categories=ref([]); const items=ref([]); const pagination=ref(null); const itemsQuery=ref(''); const loadingMore=ref(false); const GUIDE_PAGE_SIZE=20; const totalCount=computed(()=>pagination.value&&Number.isFinite(Number(pagination.value.total))?Number(pagination.value.total):items.value.length); const hubs=ref([]); const growthHubs=ref({city_hubs:[],topic_hubs:[],total:0}); const selected=ref(null); const reportText=ref(''); 3626 const loading=ref(true); const loaded=ref(false); const loadError=ref(''); 3627 const searchMeta=ref(null); const autoSuggestions=ref([]); const autoOpen=ref(false); const autoIndex=ref(-1); 3628 const recentSearches=ref([]); 3629 const guideJourneys=[ 3630 {key:'just_arrived',icon:'ð¬',label:'ÙØµÙت ÙÙØªÙ'}, 3631 {key:'papers',icon:'ð',label:'Ø£ÙØ±Ø§Ù ÙØ¥Ùا٠ة'}, 3632 {key:'daily_life',icon:'ð ',label:'Ø§ÙØÙØ§Ø© اÙÙÙÙ ÙØ©'}, 3633 {key:'trade',icon:'ð¬',label:'تجارة ÙØ´ØÙ'} 3634 ]; 3635 const guideCities=computed(()=>safeArray(growthHubs.value.city_hubs) 3636 .filter(x=>String(x.city_key||x.key||'').trim()) 3637 .slice(0,12) 3638 .map(x=>({ 3639 key:String(x.city_key||x.key||''), 3640 label:cityLabel(x), 3641 zh:String(x.label_zh||x.name_zh||'') 3642 }))); 3643 const featuredAreas=[ 3644 {key:'Xiaobei',city:'Guangzhou',label:'Ø´ÙØ§ÙبÙ',zh:'å°å',q:'Ø´ÙØ§ÙبÙ'}, 3645 {key:'Sanyuanli',city:'Guangzhou',label:'ساÙÙÙØ§ÙÙÙ',zh:'ä¸å é',q:'ساÙÙÙØ§ÙÙÙ'}, 3646 {key:'GuangzhouRailwayStation',city:'Guangzhou',label:'Ù ØØ·Ø© ÙØ·Ø§Ø± ÙÙØ§ÙغتشÙ',zh:'广å·ç«è½¦ç«',q:'Ù ØØ·Ø© ÙØ·Ø§Ø± ÙÙØ§ÙغتشÙ'}, 3647 {key:'Pazhou',city:'Guangzhou',label:'باتشÙ',zh:'ç¶æ´²',q:'باتشÙ'}, 3648 {key:'Lecong',city:'Foshan',label:'ÙÙÙÙÙØº',zh:'ä¹ä»',q:'ÙÙÙÙÙØº'}, 3649 {key:'YiwuInternationalTradeCity',city:'Yiwu',label:'ÙÙØªÙا٠/ ÙÙÙÙ',zh:'ä¹ä¹å½é åè´¸å',q:'٠دÙÙØ© ÙÙÙÙ ÙÙØªØ¬Ø§Ø±Ø© Ø§ÙØ¯ÙÙÙØ©'} 3650 ]; 3651 const brokenGuideImages=reactive({}); 3652 let autoTimer=null; 3653 const route=useRoute(); 3654 function routeHub(){ 3655 const p=String(route.path||''); 3656 if(p.indexOf('/trade-shipping')===0) return 'trade_shipping'; 3657 if(p.indexOf('/sudan-digital')===0) return 'sudan_digital'; 3658 return 'china_guide'; 3659 } 3660 function routeGrowthType(){const p=String(route.path||'');return p.includes('/city/')?'city':(p.includes('/topic/')?'topic':'');} 3661 function routeGrowthValue(){return String(route.params&& (route.params.city||route.params.service)||'').trim().toLowerCase();} 3662 const filters=reactive({search:'',category:'',city:'',area:'',hub:routeHub(),direction:'',service_type:'',origin_country:'',destination_country:'',company_
3662sector:'',journey:'',community:'',diet:''}); 3663 const tradeMeta=ref({countries:[],services:[],coverage:[]}); 3664 const tradeMetaLoaded=ref(false); 3665 const tradeCountries=computed(()=>safeArray(tradeMeta.value.countries)); 3666 // Company sectors (registry-driven). The chips only appear inside the companies category. 3667 const companySectors=ref({enabled:false,featured:[],sectors:[]}); 3668 const sectorsLoaded=ref(false);const showAllSectors=ref(false); 3669 const SECTOR_FEATURED_LIMIT=8; 3670 const tradeOriginIsDefault=computed(()=>!!filters.origin_country&&filters.origin_country===String(tradeMeta.value.default_origin||'')); 3671 function sectorLabel(key){const row=safeArray(companySectors.value.sectors).find(x=>x.sector_key===key);return row?row.name_ar:String(key||'');} 3672 const isCompaniesCategory=computed(()=>['china-companies-business-services','companies_business'].includes(String(filters.category||''))); 3673 const sectorChips=computed(()=>safeArray(showAllSectors.value?companySectors.value.sectors:companySectors.value.featured).slice(0,showAllSectors.value?200:SECTOR_FEATURED_LIMIT)); 3674 async function loadCompanySectors(){ 3675 if(sectorsLoaded.value)return; 3676 sectorsLoaded.value=true; 3677 const r=await api('/api/company-sectors',{feedback:false}); 3678 if(r&&r.ok&&r.enabled)companySectors.value={enabled:true,featured:safeArray(r.featured),sectors:safeArray(r.sectors)}; 3679 } 3680 function pickSector(key){filters.company_sector=filters.company_sector===key?'':String(key||'');load();} 3681 // Trade search understanding («شØÙ Ø¨ØØ±Ù Ù Ù Ø§ÙØµÙÙ ÙÙØ³Ø¹ÙØ¯ÙØ©Â»): shown as a one-tap route suggestion. 3682 const tradeHint=ref(null); 3683 let tradeHintSequence=0; 3684 async function resolveTradeHint(){ 3685 const sequence=++tradeHintSequence; 3686 tradeHint.value=null; 3687 const text=String(filters.search||'').trim(); 3688 if(filters.hub!=='trade_shipping'||text.length<3)return; 3689 const r=await api('/api/trade/resolve?q='+encodeURIComponent(text),{feedback:false}); 3690 // A slower answer for an older query must never replace a newer one. 3691 if(sequence!==tradeHintSequence||text!==String(filters.search||'').trim())return; 3692 const found=r&&r.ok&&r.enabled?r.resolved:null; 3693 if(found&&found.understood&&(found.destination||found.service_type))tradeHint.value={origin:found.origin||'',destination:found.destination||'',service_type:found.service_type||''}; 3694 } 3695 // The service is applied only when the registry covers it for that route; otherwise the route 3696 // alone is applied (an uncovered service would otherwise produce an empty page). 3697 function hintService(hint){ 3698 if(!hint.service_type||!hint.origin||!hint.destination)return ''; 3699 const covered=safeArray(tradeMeta.value.coverage).some(x=>String(x.origin_country_code)===hint.origin&&String(x.destination_country_code)===hint.destination&&String(x.service_type)===hint.service_type); 3700 return covered?hint.service_type:''; 3701 } 3702 function applyTradeHint(){ 3703 const hint=tradeHint.value;if(!hint)return; 3704 if(hint.origin)filters.origin_country=hint.origin; 3705 if(hint.destination)filters.destination_country=hint.destination; 3706 filters.service_type=hintService(hint); 3707 filters.search='';tradeHint.value=null;tradeHintSequence++;load(); 3708 } 3709 function tradeHintLabel(){ 3710 const hint=tradeHint.value;if(!hint)return ''; 3711 const route=[hint.origin&&tradeCountryLabel(hint.origin),hint.destination&&tradeCountryLabel(hint.destination)].filter(Boolean).join(' â '); 3712 return [route,hint.service_type&&tradeServiceLabel(hint.service_type)].filter(Boolean).join(' · '); 3713 } 3714 3715 function tradeCountryLabel(code){ 3716 const row=tradeCountries.value.find(x=>String(x.code||'').toUpperCase()===String(code||'').toUpperCase()); 3717 return row?(row.name_ar||row.name_en||row.code):String(code||''); 3718 } 3719 3720 const tradeRouteServices=computed(()=>{ 3721 const from=String(filters.origin_country||'').toUpperCase(); 3722 const to=String(filters.destination_country||'').toUpperCase(); 3723 if(!from||!to||from===to)return []; 3724 const allowed=new Set( 3725 safeArray(tradeMeta.value.coverage) 3726 .filter(x=>String(x.origin_country_code||'').toUpperCase()===from&&String(x.destination_country_code||'').toUpperCase()===to) 3727 .map(x=>String(x.service_type||'')) 3728 ); 3729 return safeArray(tradeMeta.value.services).filter(x=>allowed.has(String(x.service_type||''))&&String(x.service_type||'')!=='general'); 3730 }); 3731 3732 const tradeRouteSupported=computed(()=>{ 3733 const from=String(filters.origin_country||'').toUpperCase(); 3734 const to=String(filters.destination_country||'').toUpperCase(); 3735 if(!from||!to||from===to)return false;
3736 return safeArray(tradeMeta.value.coverage).some(x=>String(x.origin_country_code||'').toUpperCase()===from&&String(x.destination_country_code||'').toUpperCase()===to); 3737 }); 3738 3739 function tradeSelectedRouteLabel(){ 3740 if(!filters.origin_country||!filters.destination_country)return ''; 3741 return tradeCountryLabel(filters.origin_country)+' â '+tradeCountryLabel(filters.destination_country); 3742 } 3743 3744 function tradeServiceLabel(key){ 3745 const row=safeArray(tradeMeta.value.services).find(x=>String(x.service_type||'')===String(key||'')); 3746 return row?(row.name_ar||row.name_en||row.service_type):guideServiceLabel(key); 3747 } 3748 3749 async function loadTradeMeta(){ 3750 if(filters.hub!=='trade_shipping')return true; 3751 if(tradeMetaLoaded.value){ 3752 if(!filters.origin_country&&tradeMeta.value.default_origin)filters.origin_country=tradeMeta.value.default_origin; 3753 return true; 3754 } 3755 const r=await api('/api/china-guide/trade-meta'); 3756 if(!r||!r.ok)return false; 3757 tradeMeta.value={ 3758 countries:safeArray(r.countries), 3759 services:safeArray(r.services), 3760 coverage:safeArray(r.coverage), 3761 default_origin:String(r.default_origin||'') 3762 }; 3763 if(!filters.origin_country&&tradeMeta.value.default_origin)filters.origin_country=tradeMeta.value.default_origin; 3764 tradeMetaLoaded.value=true; 3765 return true; 3766 } 3767 3768 function pickTradeService(key){ 3769 const value=String(key||''); 3770 filters.service_type=filters.service_type===value?'':value; 3771 load(); 3772 } 3773 3774 function clearTradeRoute(){ 3775 filters.origin_country=String(tradeMeta.value.default_origin||''); 3776 filters.destination_country=''; 3777 filters.service_type=''; 3778 load(); 3779 } 3780 const tradeNeedCategories=computed(()=>safeArray(categories.value).filter(c=> 3781 Number(c.item_count||0)>0 && 3782 !['trade-china-to-sudan','trade-sudan-to-china'].includes(String(c.slug||'')) 3783 )); 3784 function applyGrowthRouteFilters(){ 3785 const type=routeGrowthType(),value=routeGrowthValue(); 3786 if(type==='city'&&filters.hub==='china_guide'){const row=safeArray(growthHubs.value.city_hubs).find(x=>String(x.key||x.city_key||'').toLowerCase()===value);filters.city=row&&(row.city_key||row.key)||'';} 3787 if(type==='topic'&&filters.hub==='trade_shipping'){filters.service_type=value;} 3788 } 3789 const suggestion=reactive({title:'',category:'',details:''}); 3790 const sudanPortalSections=[ 3791 {slug:'sudan-identity-passports',icon:'ðªª',title:'اÙÙÙÙØ© ÙØ§ÙØ¬ÙØ§Ø²Ø§Øª',desc:'Ø³ÙØ¯Ø§Ø¨Ø§Ø³Ø Ø§ÙØ¬ÙØ§Ø²Ø§ØªØ Ø§ÙØ±Ù٠اÙÙØ·ÙÙ ÙØ§Ùسج٠اÙ٠دÙÙ.'}, 3792 {slug:'sudan-visas-immigration',icon:'ð',title:'Ø§ÙØªØ£Ø´Ùرات ÙØ§ÙÙØ¬Ø±Ø©',desc:'Ø§ÙØªØ£Ø´ÙØ±Ø§ØªØ ÙØ«Ø§Ø¦Ù Ø§ÙØ³Ùر ÙØ¥Ø¬Ø±Ø§Ø¡Ø§Øª Ø§ÙØ¯Ø®ÙÙ ÙØ§ÙØ®Ø±ÙØ¬.'}, 3793 {slug:'sudan-embassies-consulates',icon:'ðï¸',title:'Ø§ÙØ³Ùارات ÙØ§ÙÙÙØµÙÙØ§Øª',desc:'اÙÙ Ø¹Ø§Ù ÙØ§Øª اÙÙÙØµÙÙØ© ÙØ§Ùبعثات Ø§ÙØ³ÙداÙÙØ© Ø¨Ø§ÙØ®Ø§Ø±Ø¬.'}, 3794 {slug:'sudan-civil-services',icon:'ð',title:'Ø§ÙØ®Ø¯Ù ات اÙ٠دÙÙØ©',desc:'Ø§ÙØ®Ø¯Ù ات Ø§ÙØÙÙÙ ÙØ© ÙØ§ÙÙØ«Ø§Ø¦Ù ÙØ§Ùإجراءات Ø§ÙØ¹Ø§Ù Ø©.'}, 3795 {slug:'sudan-education-certificates',icon:'ð',title:'Ø§ÙØªØ¹ÙÙÙ ÙØ§ÙØ´ÙØ§Ø¯Ø§Øª',desc:'Ø§ÙØ´Ùادات ÙØ§ÙØªÙØ«ÙÙ ÙØ§Ùخد٠ات Ø§ÙØªØ¹ÙÙÙ ÙØ© Ø§ÙØ±Ø³Ù ÙØ©.'}, 3796 {slug:'sudan-health-medical',icon:'ð¥',title:'Ø§ÙØµØØ© ÙØ§Ùخد٠ات Ø§ÙØ·Ø¨ÙØ©',desc:'Ø§ÙØ®Ø¯Ù ات Ø§ÙØµØÙØ© ÙØ§ÙÙ ÙØµØ§Øª ÙØ§ÙØ¬ÙØ§Øª Ø§ÙØ·Ø¨ÙØ© Ø§ÙØ±Ø³Ù ÙØ©.'}, 3797 {slug:'sudan-banking-remittances',icon:'ð³',title:'Ø§ÙØ¨ÙÙÙ ÙØ§ÙتØÙÙÙØ§Øª',desc:'Ø§ÙØªØ¹Ø§Ù Ù٠اÙ٠صرÙÙØ© ÙØ§ÙتØÙÙÙØ§Øª ÙÙØ¸Ù Ø§ÙØ¯Ùع.'}, 3798 {slug:'sudan-taxes-customs',icon:'ð§¾',title:'Ø§ÙØ¶Ø±Ø§Ø¦Ø¨ ÙØ§Ùج٠ارÙ',desc:'اÙÙØ§Ø±Ø¯ ÙØ§Ùصادر ÙACD ÙØ§Ùإجراءات Ø§ÙØ¬Ù رÙÙØ©.'}, 3799 {slug:'sudan-investment-companies',icon:'ð¢',title:'Ø§ÙØ§Ø³ØªØ«Ù ار ÙØªØ£Ø³Ùس Ø§ÙØ´Ø±Ùات',desc:'Ø§ÙØªØ±Ø§Ø®Ùص ÙØ§ÙØ³Ø¬Ù Ø§ÙØªØ¬Ø§Ø±Ù ÙØ®Ø¯Ù ات اÙ٠ستث٠رÙÙ.'}, 3800 {slug:'sudan-ports-aviation',icon:'âï¸',title:'اÙÙ ÙØ§Ùئ ÙØ§ÙØ·ÙØ±Ø§Ù',desc:'اÙÙ ÙØ§Ùئ ÙØ§Ù٠طارات ÙØ§ÙØ¬ÙØ§Øª Ø§ÙØªØ´ØºÙÙÙØ© Ø§ÙØ±Ø³Ù ÙØ©.'}, 3801 {slug:'sudan-laws-alerts',icon:'âï¸',title:'اÙÙÙØ§ÙÙÙ ÙØ§ÙØªÙØ¨ÙÙØ§Øª Ø§ÙØ±Ø³Ù ÙØ©',desc:'اÙÙØ±Ø§Ø±Ø§Øª ÙØ§Ùتعا٠ÙÙ ÙØ§ÙØªÙØ¨ÙÙØ§Øª Ù Ù Ù ØµØ§Ø¯Ø±ÙØ§.'}, 3802 {slug:'sudan-diaspora-services',icon:'ð',title:'خد٠ات Ø§ÙØ³ÙداÙÙÙÙ Ø¨Ø§ÙØ®Ø§Ø±Ø¬',desc:'Ø§ÙØ®Ø¯Ù ات ÙØ§ÙÙØ«Ø§Ø¦Ù ÙØ§ÙÙ Ø³Ø§ÙØ¯Ø© اÙÙ ÙØ¬ÙØ© ÙÙ٠غتربÙÙ.'} 3803 ]; 3804 const member=computed(()=>store.state.me&&store.state.me.authenticated&&store.state.me.member); 3805 const smartSearchActive=computed(()=>['china_guide','trade_shipping'].includes(filters.hub)&&(String(filters.search||'').trim().length>0||String(filters.area||'').trim().length>0)); 3806 const visibleFeaturedAreas=computed(()=>filters.hub==='china_guide'&&filters.city?featuredAreas.filter(a=>String(a.city||'').toLowerCase()===String(filters.city||'').toLowerCase()):[]); 3807 const populatedCategories=computed(()=>categories.value.filter(c=>Number(c.item_count||0)>0)); 3808 const emptyCategories=computed(()=>categories.value.filter(c=>Number(c.item_count||0)===0)); 3809 function sectionCount(slug){const c=categories.value.find(x=>x.slug===slug);return Number(c&&c.item_count||0);} 3810 const populatedSudanSections=computed(()=>sudanPortalSections.filter(sec=>sectionCount(sec.slug)>0)); 3811 const emptySudanSections=computed(()=>sudanPortalSections.filter(sec=>sectionCount(sec.slug)===0)); 3812 async function load(){ 3813 loading.value=true;loadError.value='';store.state.busy=true; 3814 if(filters.hub==='trade_shipping'){ 3815 const metaOk=await loadTradeMeta(); 3816 if(!metaOk){ 3817 loadError.value='تعذر تØÙ ÙÙ Ø®ÙØ§Ø±Ø§Øª Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ Ø§ÙØ¢Ù. أعد اÙÙ ØØ§ÙÙØ©.'; 3818 loaded.value=true; 3819 loading.value=false; 3820 store.state.busy=false; 3821 return; 3822 } 3823 } 3824 const growthRequest=['china_guide','trade_shipping'].includes(filters.hub)?api('/api/china-guide/growth-hubs?hub='+encodeURIComponent(filters.hub)):Promise.resolve({ok:true,city_hubs:[],topic_hubs:[],total:0}); 3825 const first=await Promise.all([api('/api/knowledge/summary'),api('/api/china-guide/categories?hub='+encodeURIComponent(filters.hub||'')),growthRequest]); 3826 if(first.every(x=>x&&x.ok)){ 3827 hubs.value=safeArray(first[0].hubs);categories.value=safeArray(first[1].categories);growthHubs.value={city_hubs:safeArray(first[2].city_hubs),topic_hubs:safeArray(first[2].topic_hubs),total:Number(first[2].total||0)}; 3828 const tax=filters.hub==='china_guide'?await api('/api/china-guide/taxonomy'):{enabled:false}; 3829 taxonomyV2.value=tax.enabled===true&&tax.version===2; 3830 if(taxonomyV2.value){categories.value=safeArray(tax.categories);growthHubs.value.topic_hubs=[];} 3831 applyGrowthRouteFilters(); 3832 if(route.query.category_key)filters.category=String(route.query.category_key); 3833 else if(route.query.category)filters.category=String(route.query.category); 3834 3835 const qs=new URLSearchParams({search:filters.search||'',category:filters.category||'',city:filters.city||'',area:filters.area||'',hub:filters.hub||'',direction:filters.direction||'',service_type:filters.hub==='china_guide'?'':(filters.service_type||''),page:'1',page_size:String(GUIDE_PAGE_SIZE)}); 3836 if(filters.hub==='trade_shipping'){ 3837 if(filters.origin_country)qs.set('origin_country',String(filters.origin_country)); 3838 if(filters.destination_country)qs.set('destination_country',String(filters.destination_country)); 3839 }
3840 if(filters.hub==='china_guide'&&filters.company_sector)qs.set('company_sector',String(filters.company_sector)); 3841 qs.set('taxonomy',taxonomyV2.value?'2':'1'); 3842 if(!taxonomyV2.value&&route.query.category_key){const legacy={emergency:'china-emergency',visa_residence:'china-residence-immigration',gov_consulate:'china-government-services',health:'china-health-pharmacies',transport:'china-transport',payments:'china-payments-banking',telecom:'china-telecom-internet',education:'china-education-universities',markets:'china-business-markets',logistics:'china-shipping-logistics',hotels:'china-hotels-accommodation',housing:'china-hotels-accommodation',restaurants:'china-tourism-restaurants',tourism:'china-tourism-restaurants',worship:'china-tourism-restaurants',exhibitions:'china-exhibitions-conferences'};qs.set('category',legacy[route.query.category_key]||'');} 3843 if(!taxonomyV2.value&&route.query.community==='sudanese')qs.set('category','china-sudanese-services'); 3844 if(taxonomyV2.value){ 3845 if(filters.community)qs.set('community',String(filters.community)); 3846 if(filters.journey)qs.set('journey',String(filters.journey)); 3847 if(filters.diet)qs.set('diet',String(filters.diet)); 3848 for(const key of ['cuisine','sector'])if(route.query[key])qs.set(key,String(route.query[key])); 3849 } 3850 qs.delete('page');qs.delete('page_size');itemsQuery.value=qs.toString(); 3851 qs.set('page','1');qs.set('page_size',String(GUIDE_PAGE_SIZE)); 3852 const itemResult=await api('/api/china-guide/items?'+qs.toString()); 3853 if(itemResult&&itemResult.ok){items.value=safeArray(itemResult.items);searchMeta.value=itemResult.search||null;pagination.value=itemResult.pagination||null;}else loadError.value='تعذر تØÙ ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ¢Ù. تØÙÙ Ù Ù Ø§ÙØ§ØªØµØ§Ù ث٠أعد اÙÙ ØØ§ÙÙØ©.'; 3854 }else loadError.value='تعذر تØÙ ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ¢Ù. تØÙÙ Ù Ù Ø§ÙØ§ØªØµØ§Ù ث٠أعد اÙÙ ØØ§ÙÙØ©.'; 3855 loaded.value=true;loading.value=false;store.state.busy=false;autoOpen.value=false;autoIndex.value=-1; 3856 if(filters.hub==='china_guide')loadCompanySectors(); 3857 resolveTradeHint(); 3858 } 3859 // "Load more": next page of the same filters, appended without duplicates. 3860 async function loadMoreItems(){ 3861 const current=pagination.value; 3862 if(!current||!current.has_more||loadingMore.value)return; 3863 loadingMore.value=true; 3864 const expectedQuery=itemsQuery.value; 3865 const qs=new URLSearchParams(expectedQuery);qs.set('page',String(current.page+1));qs.set('page_size',String(current.page_size||GUIDE_PAGE_SIZE)); 3866 const result=await api('/api/china-guide/items?'+qs.toString(),{feedback:false}); 3867 loadingMore.value=false; 3868 // The member changed filters while this page was loading: drop the stale page instead of mixing result sets. 3869 if(expectedQuery!==itemsQuery.value)return; 3870 if(!result||!result.ok){store.state.msg='تعذر تØÙ Ù٠اÙÙ Ø²ÙØ¯ Ø§ÙØ¢Ù. ØØ§Ù٠٠رة أخرÙ.';return;} 3871 const known=new Set(items.value.map(row=>String(row.id))); 3872 items.value=[...items.value,...safeArray(result.items).filter(row=>!known.has(String(row.id)))]; 3873 pagination.value=result.pagination||current; 3874 } 3875 function pickHub(key){filters.hub=key;filters.search='';filters.category='';filters.city='';filters.area='';filters.direction='';filters.service_type='';filters.origin_country='';filters.company_sector='';filters.destination_country='';filters.journey='';filters.community='';filters.diet='';searchMeta.value=null;autoSuggestions.value=[];recentSearches.value=readRecentSearches(key);load();} 3876 function pickCat(slug){filters.category=filters.category===slug?'':slug;selected.value=null;load();} 3877 function clearGuideFilters(){filters.search='';filters.category='';filters.city='';filters.area='';filters.direction='';filters.service_type='';filters.origin_country='';filters.company_sector='';filters.destination_country='';filters.journey='';filters.community='';filters.diet='';selected.value=null;searchMeta.value=null;autoSuggestions.value=[];autoOpen.value=false;load();} 3878 function activeFilterCount(){return [filters.search,filters.category,filters.city,filters.area,filters.hub==='china_guide'?'':filters.service_type,filters.hub==='trade_shipping'&&filters.origin_country!==tradeMeta.value.default_origin?filters.origin_country:'',filters.hub==='trade_shipping'?filters.destination_country:'',filters.company_
3878sector,filters.direction,filters.journey,filters.community,filters.diet].filter(Boolean).length;} 3879 function cityFilterLabel(){const row=guideCities.value.find(c=>String(c.key).toLowerCase()===String(filters.city||'').toLowerCase());return row&&row.label||filters.city||'';} 3880 function areaFilterLabel(){const row=featuredAreas.find(a=>a.key===filters.area);return row&&row.label||filters.area||'';} 3881 function serviceFilterLabel(){return guideServiceLabel(filters.service_type);} 3882 function tradeDirectionLabel(x){ 3883 const v=String((x&&x.direction)||x||''); 3884 return v==='china_to_arab' 3885 ?'Ø§ÙØµÙÙ â Ø§ÙدÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ©' 3886 :(v==='arab_to_china'?'Ø§ÙØ¯ÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ© â Ø§ÙصÙÙ':'Ø§ÙØ§ØªØ¬Ø§ÙÙÙ'); 3887 } 3888 function pickTradeNeed(slug){ 3889 const next=filters.category===slug?'':slug; 3890 if(routeGrowthType()==='topic'){ 3891 router.push({ 3892 path:'/trade-shipping', 3893 query:next?{category:next}:{} 3894 }); 3895 return; 3896 } 3897 filters.category=next; 3898 filters.service_type=''; 3899 selected.value=null; 3900 load(); 3901 } 3902 function openTradeServiceRequest(){ 3903 const query={service_type:'shipping_logistics'}; 3904 const routeLabel=tradeSelectedRouteLabel(); 3905 if(routeLabel)query.route_label=routeLabel; 3906 router.push({path:'/procurement/new',query}); 3907 } 3908 function pickSudanSection(slug){filters.category=slug;filters.search='';load();} 3909 function clearSudanSection(){filters.category='';selected.value=null;load();} 3910 function currentSudanSection(){return sudanPortalSections.find(x=>x.slug===filters.category)||null;} 3911 function growthRouteHub(){const type=routeGrowthType(),value=routeGrowthValue();const list=type==='city'?safeArray(growthHubs.value.city_hubs):safeArray(growthHubs.value.topic_hubs);return list.find(x=>String(x.key||'').toLowerCase()===value)||null;} 3912 function isGrowthRoot(){return !routeGrowthType();} 3913 function hubTitle(){const gh=growthRouteHub();if(gh)return gh.type==='city'?cityLabel(gh):gh.title_ar||gh.label_ar||'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ';return (hubs.value.find(h=>h.key===filters.hub)||{}).title||'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ'} 3914 function itemTitle(x){return x.title_ar||x.title_en||x.title_zh||'Ø¹ÙØµØ± ÙÙ Ø§ÙØ¯ÙÙÙ';} 3915 function itemSummary(x){return x.summary_ar||x.summary_en||x.description_ar||x.description_en||'';} 3916 function guideImageUrl(x,kind='thumb'){ 3917 const candidates=kind==='main'?[x&&x.image_url,x&&x.image_thumb_url]:[x&&x.image_thumb_url,x&&x.image_url]; 3918 return candidates.find(url=>url&&!brokenGuideImages[String(url)])||''; 3919 } 3920 function markGuideImageBroken(url){if(url)brokenGuideImages[String(url)]=true;} 3921 function addressOf(x){return x.address_zh||x.address_ar||x.address_en||'';} 3922 async function copyAddress(x){try{await navigator.clipboard.writeText(addressOf(x));store.state.msg='ØªÙ ÙØ³Ø® Ø§ÙØ¹ÙÙØ§Ù';}catch(e){store.state.msg='ÙÙ ÙØªÙ اÙÙØ³Ø® تÙÙØ§Ø¦ÙاÙ. Ø§ÙØ³Ø® Ø§ÙØ¹ÙÙØ§Ù ÙØ¯ÙÙØ§Ù.';}} 3923 function openMap(x){openAmapAppPlace(x,message=>{store.state.msg=message;});} 3924 async function sendReport(x){const msg=String(reportText.value||'').trim(); if(!msg){store.state.msg='Ø§ÙØªØ¨ Ø§ÙØªØµØÙØ Ø£ÙÙØ§Ù';return;} store.state.busy=true;const r=await api('/api/china-guide/items/'+encodeURIComponent(x.id)+'/report',{method:'POST',body:JSON.stringify({message:msg,hub_key:filters.hub})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)reportText.value='';} 3925 async function sendSuggestion(){if(!member.value){try{sessionStorage.setItem('gzc_vue_next','/china-guide')}catch(e){} router.push('/login'); return;} if(!suggestion.title||!suggestion.details){store.state.msg='Ø§ÙØªØ¨ اس٠اÙÙ ÙØ§Ù ÙØ§ÙØªÙØ§ØµÙÙ';return;} store.state.busy=true;const r=await api('/api/china-guide/suggestions',{method:'POST',body:JSON.stringify(suggestion)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){suggestion.title='';suggestion.category='';suggestion.details='';}} 3926 function scheduleSuggestions(){ 3927 if(autoTimer)clearTimeout(autoTimer); 3928 autoIndex.value=-1; 3929 if(!['china_guide','trade_shipping'].includes(filters.hub)||!String(filters.search||'').trim()){autoSuggestions.value=[];autoOpen.value=false;return;} 3930 // Search is universal inside each knowledge hub. A previously opened category 3931 // must never silently hide a relevant result. Direction remains an explicit trade filter. 3932 filters.category='';filters.service_type=''; 3933 autoTimer=setTimeout(async()=>{ 3934 const q=String(filters.search||'').trim(); 3935 const r=await api('/api/china-guide/search-suggestions?q='+encodeURIComponent(q)+'&city='+encodeURIComponent(filters.city||'')+'&area='+encodeURIComponent(filters.area||'')+'&hub='+encodeURIComponent(filters.hub)); 3936 if(q!==String(filters.search||'').trim())return; 3937 autoSuggestions.value=r&&r.ok?safeArray(r.suggestions):[];autoOpen.value=autoSuggestions.value.length>0; 3938 },180); 3939 } 3940 async function chooseAutocomplete(s){ 3941 if(!s)return; 3942 filters.search=s.query||s.label||filters.search; 3943 rememberSearch(filters.search); 3944 if(s.city){filters.city=s.city;if(filters.area&&!featuredAreas.some(a=>a.key===filters.area&&a.city===s.city))filters.area='';} if(s.area)filters.area=s.area; 3945 autoOpen.value=false;autoSuggestions.value=[];autoIndex.value=-1; 3946 await load(); 3947 if(s.item_id)selected.value=s.item_id; 3948 } 3949 function closeSuggestionsSoon(){setTimeout(()=>{autoOpen.value=false;autoIndex.value=-1;},160);} 3950 function recentStorageKey(hub){return 'gzc_recent_searches_'+String(hub||'china_guide');} 3951 function readRecentSearches(hub){try{const raw=JSON.parse(sessionStorage.getItem(recentStorageKey(hub))||'[]');
3951return Array.isArray(raw)?raw.filter(Boolean).slice(0,5):[];}catch(_){return [];}} 3952 function rememberSearch(query){const value=String(query||'').trim().slice(0,80);if(!value)return;const next=[value,...recentSearches.value.filter(x=>String(x).toLowerCase()!==value.toLowerCase())].slice(0,5);recentSearches.value=next;try{sessionStorage.setItem(recentStorageKey(filters.hub),JSON.stringify(next));}catch(_){}} 3953 function popularTerms(){return filters.hub==='trade_shipping'?[{q:'Ø´ØÙ Ø¨ØØ±Ù',icon:'ð¢'},{q:'Ø§ÙØªØ®ÙÙØµ Ø§ÙØ¬Ù رÙÙ',icon:'ð§¾'},{q:'Ù Ø³ØªÙØ¯Ø§Øª Ø§ÙØ´ØÙ',icon:'ð'},{q:'HS Code',icon:'ðï¸'},{q:'اÙÙ ÙØ§Ùئ',icon:'â'}]:[{q:'Ø§ÙØ£Ø³ÙاÙ',icon:'ð¬'},{q:'اÙ٠عارض ÙØ§Ù٠ؤت٠رات',icon:'ðï¸'},{q:'اÙ٠طاع٠',icon:'ð½ï¸'},{q:'اÙÙÙØ§Ø¯Ù',icon:'ð¨'},{q:'اÙ٠ستشÙÙØ§Øª',icon:'ð¥'},{q:'٠ترج٠',icon:'ð£ï¸'},{q:'Ø§ÙØ´ØÙ ÙØ§ÙÙÙØ¬Ø³ØªÙات',icon:'ð¢'}];} 3954 async function runSearch(){rememberSearch(filters.search);autoOpen.value=false;await load();} 3955 function searchKeydown(e){ 3956 if(e.key==='ArrowDown'&&autoSuggestions.value.length){e.preventDefault();autoOpen.value=true;autoIndex.value=(autoIndex.value+1)%autoSuggestions.value.length;return;} 3957 if(e.key==='ArrowUp'&&autoSuggestions.value.length){e.preventDefault();autoOpen.value=true;autoIndex.value=(autoIndex.value<=0?autoSuggestions.value.length:autoIndex.value)-1;return;} 3958 if(e.key==='Escape'){autoOpen.value=false;autoIndex.value=-1;return;} 3959 if(e.key==='Enter'){e.preventDefault();const s=autoOpen.value&&autoIndex.value>=0?autoSuggestions.value[autoIndex.value]:null;s?chooseAutocomplete(s):runSearch();} 3960 } 3961 function popularSearch(query){filters.search=query;filters.category='';filters.service_type='';autoOpen.value=false;rememberSearch(query);load();} 3962 function pickFeaturedCity(city){const next=filters.city===city?'':city;filters.city=next;filters.area='';load();} 3963 function pickFeaturedArea(area){if(!area)return;filters.city=area.city||filters.city||'';filters.area=filters.area===area.key?'':area.key;autoOpen.value=false;load();} 3964 function pickJourney(key){filters.journey=filters.journey===key?'':key;selected.value=null;load();} 3965 function pickDiet(key){filters.diet=filters.diet===key?'':key;selected.value=null;load();} 3966 function journeyFilterLabel(){const row=guideJourneys.find(x=>x.key===filters.journey);return row&&row.label||filters.journey||'';} 3967 function categoryFilterLabel(){const row=categories.value.find(x=>String(x.slug||x.key||x.category_key||'')===String(filters.category||''));return row&&row.name_ar||filters.category||'';} 3968 function callPlace(x){const phone=String(x&&x.phone||'').trim();if(!phone){store.state.msg='ÙØ§ ÙÙØ¬Ø¯ رÙÙ Ø§ØªØµØ§Ù Ù ÙØ«Ù ÙÙØ°Ø§ اÙÙ ÙØ§Ù';return;}const dial=phone.split('/')[0].replace(/[^+0-9]/g,'');if(dial)window.location.href='tel:'+dial;} 3969 function detailRoute(x){ 3970 if(!x||!x.id)return '/china-guide'; 3971 const base=filters.hub==='trade_shipping'?'/trade-shipping':(filters.hub==='sudan_digital'?'/sudan-digital':'/china-guide'); 3972 const ctx=searchMeta.value&&searchMeta.value.quality_context; 3973 const query=smartSearchActive.value&&ctx?{from_search:'1',search_hub:String(ctx.hub_key||filters.hub||''),search_intent:String(ctx.intent_key||'unclassified'),search_city:String(ctx.city_key||''),search_service:String(ctx.service_type||'')}:{}; 3974 if(filters.hub==='trade_shipping'){ 3975 if(filters.origin_country)query.origin_country=String(filters.origin_country); 3976 if(filters.destination_country)query.destination_country=String(filters.destination_country); 3977 const routeLabel=tradeSelectedRouteLabel(); 3978 if(routeLabel)query.route_label=routeLabel; 3979 } 3980 return {path:base+'/'+encodeURIComponent(x.id),query}; 3981 } 3982 function openDetail(x){if(!x||!x.id)return;router.push(detailRoute(x));} 3983 function hubExperience(){return filters.hub==='trade_shipping'?{eyebrow:'Ø§ÙØ£Ø¹Ù Ø§Ù Ù Ù Ø§ÙØµÙÙ',image:'/brand/smt-gold-v1/service-shipping.webp',alt:'Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ',points:['ØªÙØ±Ùد ÙÙØØµ','Ø´ØÙ ÙÙÙØ¬Ø³ØªÙات','ج٠ار٠ÙÙ Ø³ØªÙØ¯Ø§Øª']}:{eyebrow:'Ø§ÙØÙØ§Ø© ÙÙ Ø§ÙØµÙÙ',image:'/brand/smt-gold-v1/service-guide.webp',alt:'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ',points:['أ٠اÙÙ Ù ÙØ«ÙØ©','ØµÙØ± ÙØ¹ÙاÙÙÙ','Ø¨ØØ« عرب٠· English · 䏿']};} 3984 function openAskSearch(){const q=String(filters.search||'').trim();router.push(q?{path:'/ask',query:{q}}:{path:'/ask'});} 3985 function resultTrustLabel(x){return x&&x.trust_tier==='official'?'٠صدر رس٠Ù':(x&&x.trust_tier==='smt_verified'?'Ù ÙØ«Ù Ù Ù SMT':(x&&x.verification_status==='verified'?'٠عÙÙÙ Ø© Ù ÙØ«ÙØ©':'٠عÙÙÙ Ø© Ù ÙØ´Ùرة'));} 3986 onMounted(async()=>{filters.hub=routeHub();filters.journey=String(route.query.journey||'');filters.community=String(route.query.community||'');filters.diet=String(route.query.diet||'');recentSearches.value=readRecentSearches(filters.hub);await store.loadMe();await load();}); 3987 onUnmounted(()=>
3987{if(autoTimer)clearTimeout(autoTimer);}); 3988 watch(()=>route.fullPath,async()=>{const h=routeHub();filters.hub=h;filters.search='';filters.category='';filters.city='';filters.area='';filters.direction='';filters.service_type='';filters.origin_country='';filters.company_sector='';filters.destination_country='';filters.journey=String(route.query.journey||'');filters.community=String(route.query.community||'');filters.diet=String(route.query.diet||'');growthHubs.value={city_hubs:[],topic_hubs:[],total:0};selected.value=null;searchMeta.value=null;autoSuggestions.value=[];autoOpen.value=false;recentSearches.value=readRecentSearches(h);await load();}); 3989 function searchPlaceholder(){return filters.hub==='trade_shipping'?'Ø§Ø¨ØØ«: ACDØ ØØ§ÙÙØ§ØªØ تخÙÙØµØ Ù ÙØ§ÙØ¦Ø HS Code...':(filters.hub==='sudan_digital'?'Ø§Ø¨ØØ«: BankakØ SudaPassØ Ø¬ÙØ§Ø²Ø§ØªØ Ù ÙØµØ© ØÙÙÙ ÙØ©...':'٠ثاÙ: ٠عرض ÙØ§ÙتÙÙØ Ù Ø·Ø§Ø¹Ù Ø´ÙØ§ÙØ¨ÙØ ÙÙØ§Ø¯Ù å°åØ Ø£Ø³ÙØ§Ù ÙÙÙÙ...')} 3990 return {tradeOriginIsDefault,sectorLabel,companySectors,isCompaniesCategory,sectorChips,showAllSectors,pickSector,tradeHint,applyTradeHint,tradeHintLabel,pagination,totalCount,loadingMore,loadMoreItems,store,router,categories,populatedCategories,emptyCategories,items,hubs,growthHubs,growthRouteHub,isGrowthRoot,filters,selected,reportText,suggestion,sudanPortalSections,populatedSudanSections,emptySudanSections,sectionCount,member,loading,loaded,loadError,searchMeta,autoSuggestions,autoOpen,autoIndex,recentSearches,taxonomyV2,guideJourneys,guideCities,tradeNeedCategories,tradeCountries,tradeRouteServices,tradeRouteSupported,featuredAreas,visibleFeaturedAreas,smartSearchActive,load,runSearch,pickHub,pickCat,clearGuideFilters,activeFilterCount,cityFilterLabel,areaFilterLabel,serviceFilterLabel,pickSudanSection,clearSudanSection,currentSudanSection,hubTitle,searchPlaceholder,itemTitle,itemSummary,guideImageUrl,markGuideImageBroken,addressOf,copyAddress,openMap,sendReport,sendSuggestion,scheduleSuggestions,chooseAutocomplete,closeSuggestionsSoon,searchKeydown,popularSearch,popularTerms,pickTradeNeed,pickTradeService,clearTradeRoute,openTradeServiceRequest,tradeDirectionLabel,tradeCountryLabel,tradeSelectedRouteLabel,tradeServiceLabel,pickFeaturedCity,pickFeaturedArea,pickJourney,pickDiet,journeyFilterLabel,categoryFilterLabel,guideServiceLabel,callPlace,detailRoute,openDetail,hubExperience,openAskSearch,resultTrustLabel,compactContentExcerpt,shortDate}; 3991 }, 3992 render:(function(){ 3993const _Vue = Vue 3994const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 3995 3996const _hoisted_1 = { class: "hubExperienceCopy" } 3997const _hoisted_2 = { class: "sectionEyebrow" } 3998const _hoisted_3 = { key: 0 } 3999const _hoisted_4 = { key: 1 } 4000const _hoisted_5 = { 4001 class: "hubPromiseRow", 4002 "aria-label": "Ù Ø²Ø§ÙØ§ اÙÙØ³Ù " 4003} 4004const _hoisted_6 = { class: "hubPromiseText" } 4005const _hoisted_7 = { class: "hubExperienceArt" } 4006const _hoisted_8 = ["src", "alt"] 4007const _hoisted_9 = { key: 1 } 4008const _hoisted_10 = { 4009 key: 0, 4010 class: "card loadingState", 4011 role: "status" 4012} 4013const _hoisted_11 = { 4014 key: 1, 4015 class: "card errorState", 4016 role: "alert" 4017} 4018const _hoisted_12 = ["onClick"] 4019const _hoisted_13 = { 4020 key: 2, 4021 class: "sudanHubGrid" 4022} 4023const _hoisted_14 = { class: "sudanHubIcon" } 4024const _hoisted_15 = ["onClick"] 4025const _hoisted_16 = { 4026 key: 0, 4027 class: "card comingSoonCategories" 4028} 4029const _hoisted_17 = { class: "comingSoonList" } 4030const _hoisted_18 = { 4031 key: 3, 4032 class: "card sudanSectionHeader" 4033} 4034const _hoisted_19 = ["onClick"] 4035const _hoisted_20 = { class: "hint" } 4036const _hoisted_21 = { 4037 key: 4, 4038 class: "card sudanSectionHeader searchGrowthContext" 4039} 4040const _hoisted_22 = ["onClick"] 4041const _hoisted_23 = { class: "hint" } 4042const _hoisted_24 = { 4043 key: 5, 4044 class: "card searchGrowthCrossLinks" 4045} 4046const _hoisted_25 = { class: "guideCategoryGrid searchGrowthHubGrid" } 4047const _hoisted_26 = { 4048 key: 6, 4049 class: "card guideSearchCard visualDiscoverySearch" 4050} 4051const _hoisted_27 = { 4052 key: 0, 4053 class: "guideSearchHeader" 4054} 4055const _hoisted_28 = { class: "row" } 4056const _hoisted_29 = ["onClick"] 4057const _hoisted_30 = ["onClick"] 4058const _hoisted_31 = { class: "guideSearch" }
4059const _hoisted_32 = { class: "guideSmartInput" } 4060const _hoisted_33 = ["onUpdate:modelValue", "onInput", "onFocus", "onBlur", "onKeydown", "placeholder", "aria-label", "aria-expanded"] 4061const _hoisted_34 = ["onMousedown", "onClick"] 4062const _hoisted_35 = { 4063 key: 1, 4064 class: "guideAutocomplete", 4065 role: "listbox" 4066} 4067const _hoisted_36 = ["aria-selected", "onMousedown", "onClick"] 4068const _hoisted_37 = { class: "guideAutocompleteIcon" } 4069const _hoisted_38 = { key: 0 } 4070const _hoisted_39 = { key: 1 } 4071const _hoisted_40 = ["onUpdate:modelValue", "onChange"] 4072const _hoisted_41 = ["value"] 4073const _hoisted_42 = ["onClick"] 4074const _hoisted_43 = { 4075 key: 1, 4076 class: "guideFilterLayer guideServiceLayer" 4077} 4078const _hoisted_44 = { 4079 class: "guideHorizontalRail guideCategoryRail", 4080 "aria-label": "Ù ÙØ¶Ùع Ø§ÙØªØ¬Ø§Ø±Ø© Ø£Ù Ø§ÙØ´ØÙ" 4081} 4082const _hoisted_45 = ["onClick"] 4083const _hoisted_46 = ["onClick"] 4084const _hoisted_47 = { 4085 key: 2, 4086 class: "guideFilterLayer guideLocationLayer" 4087} 4088const _hoisted_48 = { 4089 class: "guideCityChips guideHorizontalRail", 4090 "aria-label": "Ø§Ø®ØªÙØ§Ø± اÙ٠دÙÙØ©" 4091} 4092const _hoisted_49 = ["onClick"] 4093const _hoisted_50 = { 4094 key: 0, 4095 lang: "zh-CN", 4096 dir: "ltr" 4097} 4098const _hoisted_51 = { 4099 key: 3, 4100 class: "guideMobileDiscovery" 4101} 4102const _hoisted_52 = { 4103 key: 0, 4104 class: "guideFilterLayer guideJourneyLayer" 4105} 4106const _hoisted_53 = { 4107 class: "guideHorizontalRail guideJourneyRail", 4108 "aria-label": "٠سارات Ø§ÙØ¯ÙÙÙ" 4109} 4110const _hoisted_54 = ["onClick"] 4111const _hoisted_55 = { class: "guideFilterLayer guideCategoryLayer" } 4112const _hoisted_56 = { 4113 class: "guideHorizontalRail guideCategoryRail", 4114 "aria-label": "تصÙÙÙØ§Øª Ø§ÙØ¯ÙÙÙ" 4115} 4116const _hoisted_57 = ["onClick"] 4117const _hoisted_58 = ["onClick"] 4118const _hoisted_59 = { 4119 key: 1, 4120 class: "guideFilterLayer guideDietLayer" 4121} 4122const _hoisted_60 = { class: "guideHorizontalRail" } 4123const _hoisted_61 = ["onClick"] 4124const _hoisted_62 = { 4125 key: 4, 4126 class: "guideFilterLayer guideAreaLayer" 4127} 4128const _hoisted_63 = ["aria-label"] 4129const _hoisted_64 = ["onClick"] 4130const _hoisted_65 = { 4131 key: 5, 4132 class: "guideRecentSearches" 4133} 4134const _hoisted_66 = ["onClick"] 4135const _hoisted_67 = { 4136 key: 6, 4137 class: "guideSearchUnderstanding", 4138 role: "status" 4139} 4140const _hoisted_68 = { key: 0 } 4141const _hoisted_69 = { 4142 key: 7, 4143 class: "guideFilterSummary" 4144} 4145const _hoisted_70 = { 4146 class: "guideActiveFilters guideHorizontalRail", 4147 "aria-label": "اÙÙÙØ§ØªØ± اÙÙØ´Ø·Ø©" 4148} 4149const _hoisted_71 = { key: 0 } 4150const _hoisted_72 = { key: 1 } 4151const _hoisted_73 = { key: 2 } 4152const _hoisted_74 = { key: 3 } 4153const _hoisted_75 = { key: 4 } 4154const _hoisted_76 = { key: 5 } 4155const _hoisted_77 = { key: 6 } 4156const _hoisted_78 = { key: 7 } 4157const _hoisted_79 = { key: 8 } 4158const _hoisted_80 = { key: 9 } 4159const _hoisted_81 = ["onClick"] 4160const _hoisted_82 = { 4161 key: 7, 4162 class: "card tradeResolveHint", 4163 role: "status" 4164} 4165const _hoisted_83 = ["onClick"] 4166const _hoisted_84 = { 4167 key: 8, 4168 class: "card guideSectorCard" 4169} 4170const _hoisted_85 = { 4171 class: "guideHorizontalRail guideQuickChips", 4172 "aria-label": "ÙØ·Ø§Ø¹Ø§Øª Ø§ÙØ´Ø±Ùات" 4173} 4174const _hoisted_86 = ["onClick"] 4175const _hoisted_87 = ["onClick"] 4176const _hoisted_88 = { key: 0 } 4177const _hoisted_89 = ["onClick"] 4178const _hoisted_90 = { 4179 key: 9, 4180 class: "card tradeDirectionCard tradeRouteCard" 4181} 4182const _hoisted_91 = { class: "formTwo tradeCountrySelectors" } 4183const _hoisted_92 = { class: "fieldLabel" } 4184const _hoisted_93 = ["onUpdate:modelValue", "onChange"] 4185const _hoisted_94 = ["value", "disabled"] 4186const _hoisted_95 = { class: "fieldLabel" } 4187const _hoisted_96 = ["onUpdate:modelValue", "onChange"] 4188const _hoisted_97 = ["value", "disabled"] 4189const _hoisted_98 = { 4190 key: 0, 4191 class: "hint" 4192} 4193const _hoisted_99 = { 4194 key: 1, 4195 class: "guideEmptyInline" 4196} 4197const _hoisted_100 = { class: "row" } 4198const _hoisted_101 = ["onClick"] 4199const _hoisted_102 = ["onClick"] 4200const _hoisted_103 = { key: 2 } 4201const _hoisted_104 = { class: "hint" } 4202const _hoisted_105 = { 4203 key: 0, 4204 class: "guideFilterLayer" 4205} 4206const _hoisted_106 = { 4207 class: "guideHorizontalRail guideQuickChips", 4208 "aria-label": "ÙÙØ¹ خد٠ة Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ" 4209} 4210const _hoisted_107 = ["onClick"] 4211const _hoisted_108 = ["onClick"] 4212const _hoisted_109 = { 4213 key: 10,
4214 class: "guideCategoryGrid" 4215} 4216const _hoisted_110 = ["onClick"] 4217const _hoisted_111 = ["onClick"] 4218const _hoisted_112 = { 4219 key: 0, 4220 class: "card comingSoonCategories" 4221} 4222const _hoisted_113 = { class: "comingSoonList" } 4223const _hoisted_114 = { 4224 key: 11, 4225 class: "guidePills" 4226} 4227const _hoisted_115 = ["onClick"] 4228const _hoisted_116 = ["onClick"] 4229const _hoisted_117 = { 4230 key: 12, 4231 class: "guideResultsBar" 4232} 4233const _hoisted_118 = { class: "sectionEyebrow" } 4234const _hoisted_119 = ["onClick"] 4235const _hoisted_120 = { 4236 key: 0, 4237 class: "card guideEmptyState" 4238} 4239const _hoisted_121 = { class: "hint" } 4240const _hoisted_122 = { 4241 key: 0, 4242 class: "guideEmptyQuick" 4243} 4244const _hoisted_123 = ["onClick"] 4245const _hoisted_124 = ["onClick"] 4246const _hoisted_125 = ["onClick"] 4247const _hoisted_126 = ["onClick"] 4248const _hoisted_127 = { class: "guideEmptyActions" } 4249const _hoisted_128 = ["onClick"] 4250const _hoisted_129 = ["onClick"] 4251const _hoisted_130 = ["onClick"] 4252const _hoisted_131 = { class: "guideVisualFrame" } 4253const _hoisted_132 = ["src", "alt", "onError"] 4254const _hoisted_133 = { 4255 key: 1, 4256 class: "guideItemImg icon", 4257 "aria-hidden": "true" 4258} 4259const _hoisted_134 = { 4260 key: 2, 4261 class: "guideVisualBadge" 4262} 4263const _hoisted_135 = { 4264 key: 3, 4265 class: "guideVisualVerified" 4266} 4267const _hoisted_136 = { class: "guideDiscoveryBody" } 4268const _hoisted_137 = { 4269 key: 0, 4270 class: "guideBestMatchLabel" 4271} 4272const _hoisted_138 = { class: "guideCardTop" } 4273const _hoisted_139 = { key: 0 } 4274const _hoisted_140 = { key: 1 } 4275const _hoisted_141 = { class: "contentQueueExcerpt" } 4276const _hoisted_142 = { class: "guideDiscoveryMeta" } 4277const _hoisted_143 = { key: 0 } 4278const _hoisted_144 = { class: "guideActions row" } 4279const _hoisted_145 = ["onClick"] 4280const _hoisted_146 = ["onClick"] 4281const _hoisted_147 = { 4282 key: 1, 4283 class: "guideLoadMore" 4284} 4285const _hoisted_148 = ["disabled", "onClick"] 4286const _hoisted_149 = { 4287 key: 14, 4288 class: "card guideSuggest", 4289 open: "" 4290} 4291const _hoisted_150 = ["onUpdate:modelValue"] 4292const _hoisted_151 = ["onUpdate:modelValue"] 4293const _hoisted_152 = ["value"] 4294const _hoisted_153 = ["onUpdate:modelValue"] 4295const _hoisted_154 = ["onClick"] 4296 4297return function render(_ctx, _cache) { 4298 with (_ctx) { 4299 const { toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock, vModelText: _vModelText, withDirectives: _withDirectives, withModifiers: _withModifiers, vModelSelect: _vModelSelect, createTextVNode: _createTextVNode, createVNode: _createVNode } = _Vue 4300 4301 const _component_router_link = _resolveComponent("router-link") 4302 const _component_PublicFrame = _resolveComponent("PublicFrame") 4303 4304 return (_openBlock(), _createBlock(_component_PublicFrame, { title: hubTitle() }, { 4305 default: _withCtx(() => [ 4306 _createElementVNode("section", { class: _normalizeClass(['guideHero',filters.hub==='sudan_digital'?'sudanHero':'',filters.hub!=='sudan_digital'?'hubExperienceHero':'']) }, [(filters.hub!=='sudan_digital') 4307 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("div", _hoisted_1, [_createElementVNode("span", _hoisted_2, _toDisplayString(hubExperience().eyebrow), 1), (filters.hub==='china_guide') 4308 ? (_openBlock(), _createElementBlock("p", _hoisted_3, "اعثر عÙÙ Ø§ÙØ£Ù اÙÙ ÙØ§Ùخد٠ات ÙØ§Ù٠عÙÙ٠ات Ø§ÙØ¹Ù ÙÙØ© ÙÙ Ø§ÙØµÙÙ Ø¨Ø³Ø±Ø¹Ø©Ø Ù Ø¹ ØµÙØ± ÙØ¹ÙاÙÙÙ ÙØØ§ÙØ© ØªÙØ«ÙÙ ÙØ§Ø¶ØØ©.")) 4309 : (_openBlock(), _createElementBlock("p", _hoisted_4, "اعثر عÙ٠٠عÙÙ٠ات Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ ØØ³Ø¨ دÙÙØ© Ø§ÙØ¨Ø¯Ø§ÙØ© ÙØ§ÙÙØ¬ÙØ©: Ø§ÙØªÙØ±ÙØ¯Ø اÙÙØØµØ Ø§ÙÙ Ø³ØªÙØ¯Ø§ØªØ Ø§ÙØ¬Ù Ø§Ø±ÙØ Ø§ÙØªØ®ÙÙØµ ÙØ§ÙÙ ÙØ§Ùئ.")), _createElementVNode("div", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(hubExperience().points, (x) => { 4310 return (_openBlock(), _createElementBlock("span", { key: x }, [_cache[0] || (_cache[0] = _createElementVNode("i", { 4311 class: "hubPromiseMark", 4312 "aria-hidden": "true" 4313 }, "â", -1)), _createElementVNode("b", _hoisted_6, _toDisplayString(x), 1)])) 4314 }), 128))])]), _createElementVNode("figure", _hoisted_7, [_createElementVNode("img", { 4315 class: "smtServiceArt hubExperienceIcon", 4316 src: hubExperience().image, 4317 alt: hubExperience().alt, 4318 width: "144", 4319 height: "144", 4320 loading: "eager" 4321 }, null, 8, _hoisted_8)])], 64)) 4322 : (_openBlock(), _createElementBlock("p", _hoisted_9, "Ø¨ÙØ§Ø¨Ø© Ù ÙØ¸Ù Ø© ÙÙØ®Ø¯Ù ات Ø§ÙØ³ÙداÙÙØ© Ø§ÙØ±Ø³Ù ÙØ© ÙØ§ÙرÙÙ ÙØ©Ø ٠ع ٠صدر ÙØªØ§Ø±ÙØ® تØÙÙ ÙÙ٠٠عÙÙÙ Ø©."))], 2), 4323 (loading && !loaded) 4324 ? (_openBlock(), _createElementBlock("section", _hoisted_10, _cache[1] || (_cache[1] = [_createElementVNode("span", { 4325 class: "loadingSpinner", 4326 "aria-hidden": "true" 4327 }, null, -1), _createElementVNode("h3", null, "جار٠تØÙ Ù٠اÙ٠عÙÙ٠ات...", -1), _createElementVNode("p", { class: "hint" }, "ÙØ±Ø¬Ù Ø§ÙØ§Ùتظار ÙÙÙÙØ§Ù.", -1)]))) 4328 : loadError 4329 ? (_openBlock(), _createElementBlock("section", _hoisted_11, [ 4330 _cache[2] || (_cache[2] = _createElementVNode("span", { 4331 class: "metricMark", 4332 "aria-hidden": "true" 4333 }, null, -1)), 4334 _cache[3] || (_cache[3] = _createElementVNode("h3", null, "تعذر تØÙ ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª", -1)), 4335 _createElementVNode("p", null, _toDisplayString(loadError), 1), 4336 _createElementVNode("button", { 4337 class: "btn secondary", 4338 onClick: load 4339 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_12) 4340 ])) 4341 : _createCommentVNode("", true), 4342 (loaded && !loadError && filters.hub==='sudan_digital' && !filters.category) 4343 ? (_openBlock(), _createElementBlock("section", _hoisted_13, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(populatedSudanSections, (sec) => { 4344 return (_openBlock(), _createElementBlock("article", { 4345 key: sec.slug, 4346 class: "card sudanHubCard" 4347 }, [ 4348 _createElementVNode("span", _hoisted_14, _toDisplayString(sec.icon), 1), 4349 _createElementVNode("h3", null, _toDisplayString(sec.title), 1), 4350 _createElementVNode("p", null, _toDisplayString(sec.desc), 1), 4351 _createElementVNode("button", { 4352 class: "smallbtn secondary", 4353 onClick: $event => (pickSudanSection(sec.slug)) 4354 }, "ÙØªØ اÙÙØ³Ù · " + _toDisplayString(sectionCount(sec.slug)), 9, _hoisted_15) 4355 ])) 4356 }), 128)), (emptySudanSections.length) 4357 ? (_openBlock(), _createElementBlock("details", _hoisted_16, [_createElementVNode("summary", null, "Ø£ÙØ³Ø§Ù ÙØ§Ø¯Ù Ø© (" + _toDisplayString(emptySudanSections.length) + ")", 1), _cache[4] || (_cache[4] = _createElementVNode("p", { class: "hint" }, "Ø³ÙØªÙ تÙÙÙØ± Ù ØØªÙÙ ÙØ°Ù Ø§ÙØ£ÙØ³Ø§Ù ÙØ§ØÙاÙ.", -1)), _createElementVNode("div", _hoisted_17, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(emptySudanSections, (sec) => { 4358 return (_openBlock(), _createElementBlock("span", { key: sec.slug }, _toDisplayString(sec.icon) + " " + _toDisplayString(sec.title) + " · ÙØ±ÙباÙ", 1)) 4359 }), 128))])])) 4360 : _createCommentVNode("", true)])) 4361 : _createCommentVNode("", true), 4362 (loaded && !loadError && filters.hub==='sudan_digital' && filters.category) 4363 ? (_openBlock(), _createElementBlock("section", _hoisted_18, [_createElementVNode("button", { 4364 class: "smallbtn secondary", 4365 onClick: clearSudanSection 4366 }, "Ø±Ø¬ÙØ¹ ÙÙØ£Ùسا٠", 8, _hoisted_19), _createElementVNode("h3", null, _toDisplayString((currentSudanSection()||{}).icon) + " " + _toDisplayString((currentSudanSection()||{}).title || 'ÙØ³Ù Ø§ÙØ¨Ùابة'), 1), _createElementVNode("p", _hoisted_20, _toDisplayString((currentSudanSection()||{}).desc), 1)])) 4367 : _createCommentVNode("", true), 4368 (loaded && !loadError && growthRouteHub()) 4369 ? (_openBlock(), _createElementBlock("section", _hoisted_21, [_createElementVNode("button", { 4370 class: "smallbtn secondary", 4371 onClick: $event => (router.push(filters.hub==='trade_shipping'?'/trade-shipping':'/china-guide')) 4372 }, "Ø±Ø¬ÙØ¹ ÙÙÙØ³Ù ", 8, _hoisted_22), _createElementVNode("h3", null, _toDisplayString(growthRouteHub().title_ar||growthRouteHub().label_ar), 1), _createElementVNode("p", _hoisted_23, _toDisplayString(growthRouteHub().description_ar) + " · " + _toDisplayString(growthRouteHub().item_count) + " ٠عÙÙÙ Ø© Ù ÙØ«ÙØ©", 1)])) 4373 : _createCommentVNode("", true), 4374 (loaded && !loadError && growthRouteHub() && growthRouteHub().context_links && growthRouteHub().context_links.length) 4375 ? (_openBlock(), _createElementBlock("section", _hoisted_24, [_cache[5] || (_cache[5] = _createElementVNode("div", { class: "guideDetailSectionHead" }, [_createElementVNode("span", null, "ð"), _createElementVNode("div", null, [_createElementVNode("h3", null, "Ø§Ø³ØªÙØ´Ù Ø£ÙØ¶Ø§Ù"), _createElementVNode("small", null, "Ø±ÙØ§Ø¨Ø· ٠رتبطة بÙÙØ³ اÙ٠دÙÙØ© أ٠اÙÙ ÙØ¶Ùع")])], -1)), _createElementVNode("div", _hoisted_25, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(growthRouteHub().context_links, (h) => { 4376 return (_openBlock(), _createBlock(_component_router_link, { 4377 key: h.path, 4378 to: h.path, 4379 class: "guideCategoryCard searchGrowthHubCard" 4380 }, { 4381 default: _withCtx(() => [_createElementVNode("span", null, _toDisplayString(h.icon||'â'), 1), _createElementVNode("b", null, _toDisplayString(h.type==='city'?$cityLabel(h):h.label_ar), 1), _createElementVNode("small", null, _toDisplayString(h.item_count) + " ÙØªÙجة ٠رتبطة", 1)]), 4382 _: 2 4383 }, 1032, ["to"])) 4384 }), 128))])])) 4385 : _createCommentVNode("", true), 4386 (loaded && !loadError && (filters.hub!=='sudan_digital' || filters.category)) 4387 ? (_openBlock(), _createElementBlock("section", _hoisted_26, [ 4388 (filters.hub!=='sudan_digital') 4389 ? (_openBlock(), _createElementBlock("div", _hoisted_27, [_createElementVNode("div", null, [_cache[6] || (_cache[6] = _createElementVNode("span", { class: "sectionEyebrow" }, "Ø§ÙØªØ´Ù بسرعة", -1)), _createElementVNode("h2", null, _toDisplayString(filters.hub==='trade_shipping'?'Ø§Ø¨ØØ« ÙÙ Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ':'Ø§Ø¨ØØ« ÙÙ Ø§ÙØµÙÙ'), 1), _cache[7] || (_cache[7] = _
4389createElementVNode("small", null, "ابدأ بÙÙÙ Ø© Ø£Ù Ù ÙØ§Ù أ٠خد٠ة. ÙØ±ØªØ¨ اÙÙØªØ§Ø¦Ø¬ اÙÙ ÙØ«ÙØ© Ø§ÙØ£Ùرب ÙØ¨ØØ«Ù Ø£ÙÙØ§Ù.", -1))]), _createElementVNode("div", _hoisted_28, [(filters.hub==='trade_shipping') 4390 ? (_openBlock(), _createElementBlock("button", { 4391 key: 0, 4392 class: "smallbtn", 4393 onClick: openTradeServiceRequest 4394 }, "Ø·ÙØ¨ خد٠ة Ø´ØÙ ÙÙÙØ¬Ø³ØªÙات", 8, _hoisted_29)) 4395 : _createCommentVNode("", true), _createElementVNode("button", { 4396 class: "smallbtn guideAiSearchCta", 4397 onClick: openAskSearch 4398 }, "⦠اسأ٠SMT Ø¹Ù ÙØ°Ø§", 8, _hoisted_30)])])) 4399 : _createCommentVNode("", true), 4400 _createElementVNode("div", _hoisted_31, [_createElementVNode("div", _hoisted_32, [ 4401 _cache[8] || (_cache[8] = _createElementVNode("span", { 4402 class: "guideSearchIcon", 4403 "aria-hidden": "true" 4404 }, "â", -1)), 4405 _withDirectives(_createElementVNode("input", { 4406 "onUpdate:modelValue": $event => ((filters.search) = $event), 4407 type: "search", 4408 autocomplete: "off", 4409 inputmode: "search", 4410 onInput: scheduleSuggestions, 4411 onFocus: scheduleSuggestions, 4412 onBlur: closeSuggestionsSoon, 4413 onKeydown: searchKeydown, 4414 placeholder: searchPlaceholder(), 4415 "aria-label": filters.hub==='trade_shipping'?'Ø§Ø¨ØØ« ÙÙ Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ':'Ø§Ø¨ØØ« Ù٠دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ', 4416 "aria-expanded": autoOpen?'true':'false' 4417 }, null, 40, _hoisted_33), [[_vModelText, filters.search]]), 4418 (filters.search) 4419 ? (_openBlock(), _createElementBlock("button", { 4420 key: 0, 4421 class: "guideSearchClear", 4422 type: "button", 4423 "aria-label": "Ù Ø³Ø Ø§ÙØ¨ØØ«", 4424 onMousedown: _withModifiers(() => {}, ["prevent"]), 4425 onClick: $event => {filters.search='';searchMeta=null;autoSuggestions=[];autoOpen=false;load()} 4426 }, "Ã", 40, _hoisted_34)) 4427 : _createCommentVNode("", true), 4428 (autoOpen && autoSuggestions.length) 4429 ? (_openBlock(), _createElementBlock("div", _hoisted_35, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(autoSuggestions, (s, i) => { 4430 return (_openBlock(), _createElementBlock("button", { 4431 key: s.type+'-'+(s.item_id||s.query)+'-'+i, 4432 type: "button", 4433 role: "option", 4434 "aria-selected": autoIndex===i?'true':'false', 4435 class: _normalizeClass({active:autoIndex===i}), 4436 onMousedown: _withModifiers(() => {}, ["prevent"]), 4437 onClick: $event => (chooseAutocomplete(s)) 4438 }, [_createElementVNode("span", _hoisted_37, _toDisplayString(s.icon||'â'), 1), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(s.type==='city'?$cityLabel(s.city):s.label), 1), (s.subtitle) 4439 ? (_openBlock(), _createElementBlock("small", _hoisted_38, _toDisplayString(s.city?s.subtitle.split(s.city).join($cityLabel(s.city)):s.subtitle), 1)) 4440 : (s.type==='intent') 4441 ? (_openBlock(), _createElementBlock("small", _hoisted_39, "Ø¨ØØ« ذÙÙ ØØ³Ø¨ اÙÙÙØ¹ ÙØ§Ù٠دÙÙØ© ÙØ§ÙÙ ÙØ·ÙØ©")) 4442 : _createCommentVNode("", true)])], 42, _hoisted_36)) 4443 }), 128))])) 4444 : _createCommentVNode("", true) 4445 ]), (filters.hub==='china_guide') 4446 ? _withDirectives((_openBlock(), _createElementBlock("select", { 4447 key: 0, 4448 "onUpdate:modelValue": $event => ((filters.city) = $event), 4449 onChange: $event => {filters.area='';load()} 4450 }, [_cache[9] || (_cache[9] = _createElementVNode("option", { value: "" }, "Ù٠اÙ٠دÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(filters.city), (c) => { 4451 return (_openBlock(), _createElementBlock("option", { 4452 key: c.value, 4453 value: c.value 4454 }, _toDisplayString(c.label), 9, _hoisted_41)) 4455 }), 128))], 40, _hoisted_40)), [[_vModelSelect, filters.city]]) 4456 : _createCommentVNode("", true), _createElementVNode("button", { 4457 class: "btn", 4458 onClick: runSearch 4459 }, "Ø¨ØØ«", 8, _hoisted_42)]), 4460 (filters.hub==='trade_shipping') 4461 ? (_openBlock(), _createElementBlock("div", _hoisted_43, [_cache[10] || (_cache[10] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "٠ا Ø§ÙØ°Ù ØªØØªØ§Ø¬ Ù Ø¹Ø±ÙØªÙØ", -1)), _createElementVNode("div", _hoisted_44, [_createElementVNode("button", { 4462 type: "button", 4463 class: _normalizeClass({active:!filters.category}), 4464 onClick: $event => (pickTradeNeed('')) 4465 }, "اÙÙÙ", 10, _hoisted_45), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tradeNeedCategories, (c) => { 4466 return (_openBlock(), _createElementBlock("button", { 4467 key: c.id||c.slug, 4468 type: "button", 4469 class: _normalizeClass({active:filters.category===c.slug}), 4470 onClick: $event => (pickTradeNeed(c.slug)) 4471 }, [_createElementVNode("span", null, _toDisplayString(c.icon||'ð¦'), 1), _createElementVNode("b", null, _toDisplayString(c.name_ar), 1)], 10, _hoisted_46)) 4472 }), 128))])])) 4473 : _createCommentVNode("", true), 4474 (filters.hub==='china_guide' && guideCities.length) 4475 ? (_openBlock(), _createElementBlock("div", _hoisted_47, [_cache[11] || (_cache[11] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "اÙ٠دÙÙØ©", -1)), _createElementVNode("div", _hoisted_48, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(guideCities, (c) => { 4476 return (_openBlock(), _createElementBlock("button", { 4477 key: c.key, 4478 type: "button", 4479 class: _normalizeClass({active:String(filters.city).toLowerCase()===String(c.key).toLowerCase()}), 4480 onClick: $event => (pickFeaturedCity(c.key)) 4481 }, [_createElementVNode("span", null, "ð " + _toDisplayString(c.label), 1), (c.zh) 4482 ? (_openBlock(), _createElementBlock("small", _hoisted_50, _toDisplayString(c.zh), 1)) 4483 : _createCommentVNode("", true)], 10, _hoisted_49)) 4484 }), 128))])])) 4485 : _createCommentVNode("", true), 4486 (filters.hub==='china_guide') 4487 ? (_openBlock(), _createElementBlock("div", _hoisted_51, [taxonomyV2 4488 ? (_openBlock(), _createElementBlock("div", _hoisted_52, [_cache[12] || (_cache[12] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "ابدأ Ù Ù ØØ§Ø¬ØªÙ", -1)), _createElementVNode("div", _hoisted_53, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(guideJourneys, (j) => { 4489 return (_openBlock(), _createElementBlock("button", { 4490 key: j.key, 4491 type: "button", 4492 class: _normalizeClass({active:filters.journey===j.key}), 4493 onClick: $event => (pickJourney(j.key)) 4494 }, [_createElementVNode("span", null, _toDisplayString(j.icon), 1), _createElementVNode("b", null, _toDisplayString(j.label), 1)], 10, _hoisted_54)) 4495 }), 128))])])) 4496 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_55, [_cache[13] || (_cache[13] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "Ø§ÙØªØµÙÙÙ", -1)), _createElementVNode("div", _hoisted_56, [_createElementVNode("button", { 4497 type: "button", 4498 class: _normalizeClass({active:!filters.category}), 4499 onClick: $event => (pickCat('')) 4500 }, "اÙÙÙ", 10, _hoisted_57), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(populatedCategories, (c) => { 4501 return (_openBlock(), _createElementBlock("button", { 4502 key: c.id||c.key||c.slug, 4503 type: "button", 4504 class: _normalizeClass({active:filters.category===(c.slug||c.key||c.category_key)}), 4505 onClick: $event => (pickCat(c.slug||c.key||c.category_key)) 4506 }, [_createElementVNode("span", null, _toDisplayString(c.icon||'ð§'), 1), _createElementVNode("b", null, _toDisplayString(c.name_ar), 1)], 10, _hoisted_58)) 4507 }), 128))])]), taxonomyV2 4508 ? (_openBlock(), _createElementBlock("div", _hoisted_59, [_cache[14] || (_cache[14] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "Ø®ÙØ§Ø±Ø§Øª Ù ÙÙØ¯Ø©", -1)), _createElementVNode("div", _hoisted_60, [_createElementVNode("button", { 4509 type: "button", 4510 class: _normalizeClass({active:filters.diet==='halal'}), 4511 onClick: $event => (pickDiet('halal')) 4512 }, "â ØÙØ§Ù", 10, _hoisted_61)])])) 4513 : _createCommentVNode("", true)])) 4514 : _createCommentVNode("", true), 4515 (filters.hub==='china_guide' && filters.city && visibleFeaturedAreas.length) 4516 ? (_openBlock(), _createElementBlock("div", _hoisted_62, [_cache[15] || (_cache[15] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "اÙÙ ÙØ·ÙØ©", -1)), _createElementVNode("div", { 4517 class: "guideCityChips guideAreaChips", 4518 "aria-label": 'Ù ÙØ§Ø·Ù '+cityFilterLabel() 4519 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleFeaturedAreas, (a) => { 4520 return (_openBlock(), _createElementBlock("button", { 4521 key: a.key, 4522 type: "button", 4523 class: _normalizeClass({active:filters.area===a.key}), 4524 onClick: $event => (pickFeaturedArea(a)) 4525 }, [_createTextVNode("â " + _toDisplayString(a.label) + " ", 1), _createElementVNode("small", null, _toDisplayString(a.zh), 1)], 10, _hoisted_64)) 4526 }), 128))], 8, _hoisted_63)])) 4527 : _createCommentVNode("", true), 4528 (recentSearches.length && (filters.hub==='china_guide'||filters.hub==='trade_shipping')) 4529 ? (_openBlock(), _createElementBlock("div", _hoisted_65, [_
4529cache[16] || (_cache[16] = _createElementVNode("span", null, "Ø¨ØØ«Øª ٠ؤخراÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(recentSearches, (q) => { 4530 return (_openBlock(), _createElementBlock("button", { 4531 key: q, 4532 type: "button", 4533 onClick: $event => (popularSearch(q)) 4534 }, "â» " + _toDisplayString(q), 9, _hoisted_66)) 4535 }), 128))])) 4536 : _createCommentVNode("", true), 4537 (smartSearchActive && searchMeta) 4538 ? (_openBlock(), _createElementBlock("div", _hoisted_67, [_cache[18] || (_cache[18] = _createElementVNode("span", null, "â¦", -1)), _createElementVNode("p", null, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "Ø£ÙØ¶Ù ØªØ·Ø§Ø¨Ù ÙØ¨ØØ«Ù", -1)), _createElementVNode("small", null, [ 4539 (searchMeta.intent_label_ar) 4540 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(_toDisplayString(searchMeta.intent_label_ar), 1)], 64)) 4541 : _createCommentVNode("", true), 4542 (searchMeta.area_label_ar) 4543 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createTextVNode(" · " + _toDisplayString(searchMeta.area_label_ar), 1)], 64)) 4544 : (searchMeta.city_label_ar) 4545 ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [_createTextVNode(" · " + _toDisplayString($cityLabel(searchMeta.city_label_ar)), 1)], 64)) 4546 : _createCommentVNode("", true), 4547 (!searchMeta.intent_label_ar&&!searchMeta.area_label_ar&&!searchMeta.city_label_ar) 4548 ? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [_createTextVNode(" · Ø¨ØØ« Ø¨Ø§ÙØ§Ø³Ù ÙØ§ÙÙ ØØªÙÙ")], 64)) 4549 : _createCommentVNode("", true), 4550 (searchMeta.fuzzy) 4551 ? (_openBlock(), _createElementBlock(_Fragment, { key: 4 }, [_createTextVNode(" · ØµØØÙØ§ Ø§ÙØ®Ø·Ø£ تÙÙØ§Ø¦ÙاÙ")], 64)) 4552 : _createCommentVNode("", true), 4553 (searchMeta.local_match_count) 4554 ? (_openBlock(), _createElementBlock(_Fragment, { key: 5 }, [_createTextVNode(" · " + _toDisplayString(searchMeta.local_match_count) + " Ù ØÙÙ", 1)], 64)) 4555 : _createCommentVNode("", true) 4556 ])]), _createElementVNode("strong", null, [_createTextVNode(_toDisplayString(totalCount) + " ÙØªÙجة", 1), (searchMeta.image_count) 4557 ? (_openBlock(), _createElementBlock("small", _hoisted_68, " · " + _toDisplayString(searchMeta.image_count) + " Ø¨ØµÙØ±Ø©", 1)) 4558 : _createCommentVNode("", true)])])) 4559 : _createCommentVNode("", true), 4560 ((filters.hub==='china_guide'||filters.hub==='trade_shipping') && activeFilterCount()) 4561 ? (_openBlock(), _createElementBlock("div", _hoisted_69, [_createElementVNode("div", _hoisted_70, [ 4562 (filters.search) 4563 ? (_openBlock(), _createElementBlock("span", _hoisted_71, "Ø¨ØØ«: " + _toDisplayString(filters.search), 1)) 4564 : _createCommentVNode("", true), 4565 (filters.category) 4566 ? (_openBlock(), _createElementBlock("span", _hoisted_72, "تصÙÙÙ: " + _toDisplayString(categoryFilterLabel()), 1)) 4567 : _createCommentVNode("", true), 4568 (filters.city) 4569 ? (_openBlock(), _createElementBlock("span", _hoisted_73, "٠دÙÙØ©: " + _toDisplayString(cityFilterLabel()), 1)) 4570 : _createCommentVNode("", true), 4571 (filters.area) 4572 ? (_openBlock(), _createElementBlock("span", _hoisted_74, "Ù ÙØ·ÙØ©: " + _toDisplayString(areaFilterLabel()), 1)) 4573 : _createCommentVNode("", true), 4574 (filters.journey) 4575 ? (_openBlock(), _createElementBlock("span", _hoisted_75, "٠سار: " + _toDisplayString(journeyFilterLabel()), 1)) 4576 : _createCommentVNode("", true), 4577 (filters.diet==='halal') 4578 ? (_openBlock(), _createElementBlock("span", _hoisted_76, "ØÙاÙ")) 4579 : _createCommentVNode("", true), 4580 (filters.hub==='trade_shipping'&&filters.origin_country&&!tradeOriginIsDefault) 4581 ? (_openBlock(), _createElementBlock("span", _hoisted_77, "Ù Ù: " + _toDisplayString(tradeCountryLabel(filters.origin_country)), 1)) 4582 : _createCommentVNode("", true),
4583 (filters.company_sector) 4584 ? (_openBlock(), _createElementBlock("span", _hoisted_78, "اÙÙØ·Ø§Ø¹: " + _toDisplayString(sectorLabel(filters.company_sector)), 1)) 4585 : _createCommentVNode("", true), 4586 (filters.hub==='trade_shipping'&&filters.destination_country) 4587 ? (_openBlock(), _createElementBlock("span", _hoisted_79, "Ø¥ÙÙ: " + _toDisplayString(tradeCountryLabel(filters.destination_country)), 1)) 4588 : _createCommentVNode("", true), 4589 (filters.hub==='trade_shipping'&&filters.service_type) 4590 ? (_openBlock(), _createElementBlock("span", _hoisted_80, "خد٠ة: " + _toDisplayString(tradeServiceLabel(filters.service_type)), 1)) 4591 : _createCommentVNode("", true) 4592 ]), _createElementVNode("button", { 4593 class: "smallbtn secondary", 4594 onClick: clearGuideFilters 4595 }, "Ù Ø³Ø Ø§ÙÙÙ", 8, _hoisted_81)])) 4596 : _createCommentVNode("", true) 4597 ])) 4598 : _createCommentVNode("", true), 4599 (loaded && !loadError && filters.hub==='trade_shipping' && tradeHint) 4600 ? (_openBlock(), _createElementBlock("section", _hoisted_82, [_cache[19] || (_cache[19] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "ÙÙÙ ÙØ§ Ø¨ØØ«Ù", -1)), _createElementVNode("p", null, [_createElementVNode("b", null, _toDisplayString(tradeHintLabel()), 1)]), _createElementVNode("button", { 4601 class: "smallbtn", 4602 type: "button", 4603 onClick: applyTradeHint 4604 }, "اعرض ÙØ°Ø§ اÙ٠سار", 8, _hoisted_83)])) 4605 : _createCommentVNode("", true), 4606 (loaded && !loadError && filters.hub==='china_guide' && isCompaniesCategory && companySectors.enabled && sectorChips.length) 4607 ? (_openBlock(), _createElementBlock("section", _hoisted_84, [_cache[20] || (_cache[20] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "اÙÙØ·Ø§Ø¹", -1)), _createElementVNode("div", _hoisted_85, [_createElementVNode("button", { 4608 type: "button", 4609 class: _normalizeClass({active:!filters.company_sector}), 4610 onClick: $event => (pickSector('')) 4611 }, "Ù٠اÙÙØ·Ø§Ø¹Ø§Øª", 10, _hoisted_86), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(sectorChips, (s) => { 4612 return (_openBlock(), _createElementBlock("button", { 4613 key: s.sector_key, 4614 type: "button", 4615 class: _normalizeClass({active:filters.company_sector===s.sector_key}), 4616 onClick: $event => (pickSector(s.sector_key)) 4617 }, [_createTextVNode(_toDisplayString(s.name_ar), 1), (s.item_count) 4618 ? (_openBlock(), _createElementBlock("small", _hoisted_88, " · " + _toDisplayString(s.item_count), 1)) 4619 : _createCommentVNode("", true)], 10, _hoisted_87)) 4620 }), 128)), _createElementVNode("button", { 4621 type: "button", 4622 class: "guideSectorMore", 4623 onClick: $event => (showAllSectors=!showAllSectors) 4624 }, _toDisplayString(showAllSectors?'عرض Ø§ÙØ£ÙÙ ÙÙØ·':'اÙÙ Ø²ÙØ¯'), 9, _hoisted_89)])])) 4625 : _createCommentVNode("", true), 4626 (loaded && !loadError && filters.hub==='trade_shipping') 4627 ? (_openBlock(), _createElementBlock("section", _hoisted_90, [_cache[27] || (_cache[27] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "٠سار Ø§ÙØªØ¬Ø§Ø±Ø© Ø£Ù Ø§ÙØ´ØÙ", -1)), _createElementVNode("div", _hoisted_91, [_createElementVNode("label", _hoisted_92, [_cache[22] || (_cache[22] = _createElementVNode("span", null, "Ù Ù", -1)), _withDirectives(_createElementVNode("select", { 4628 "onUpdate:modelValue": $event => ((filters.origin_country) = $event), 4629 onChange: $event => {filters.service_type='';load()} 4630 }, [_cache[21] || (_cache[21] = _createElementVNode("option", { value: "" }, "اختر دÙÙØ© Ø§ÙØ¨Ø¯Ø§ÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tradeCountries, (c) => { 4631 return (_openBlock(), _createElementBlock("option", { 4632 key: 'from-'+c.code, 4633 value: c.code, 4634 disabled: c.code===filters.destination_country 4635 }, _toDisplayString(c.name_ar||c.name_en), 9, _hoisted_94)) 4636 }), 128))], 40, _hoisted_93), [[_vModelSelect, filters.origin_country]])]), _createElementVNode("label", _hoisted_95, [_cache[24] || (_cache[24] = _createElementVNode("span", null, "Ø¥ÙÙ", -1)), _withDirectives(_createElementVNode("select", { 4637 "onUpdate:modelValue": $event => ((filters.destination_country) = $event), 4638 onChange: $event => {filters.service_type='';load()} 4639 }, [_cache[23] || (_cache[23] = _createElementVNode("option", { value: "" }, "اختر دÙÙØ© اÙÙØµÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tradeCountries, (c) => { 4640 return (_openBlock(), _createElementBlock("option", { 4641 key: 'to-'+c.code, 4642 value: c.code, 4643 disabled: c.code===filters.origin_country 4644 }, _toDisplayString(c.name_ar||c.name_en), 9, _hoisted_97)) 4645 }), 128))], 40, _hoisted_96), [[_vModelSelect, filters.destination_country]])])]), (!filters.origin_country||!filters.destination_country) 4646 ? (_openBlock(), _createElementBlock("p", _hoisted_98, "اختر دÙÙØ© Ø§ÙØ¨Ø¯Ø§ÙØ© ÙØ¯ÙÙØ© اÙÙØµÙÙ ÙØ¹Ø±Ø¶ اÙ٠عÙÙ٠ات اÙÙ ØªØ§ØØ© ÙÙØ°Ø§ اÙ٠سار.")) 4647 : (!tradeRouteSupported) 4648 ? (_openBlock(), _createElementBlock("div", _hoisted_99, [_cache[25] || (_cache[25] = _createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ ٠عÙÙ٠ات Ù ÙØ«ÙØ© ÙÙØ°Ø§ اÙ٠سار ØØ§ÙÙÙØ§", -1)), _createElementVNode("small", null, _toDisplayString(tradeSelectedRouteLabel()), 1), _createElementVNode("div", _hoisted_100, [_createElementVNode("button", { 4649 class: "smallbtn secondary", 4650 type: "button", 4651 onClick: clearTradeRoute 4652 }, "Ù Ø³Ø Ø§Ù٠سار", 8, _hoisted_101), _createElementVNode("button", { 4653 class: "smallbtn", 4654 type: "button",
4655 onClick: openTradeServiceRequest 4656 }, "Ø§Ø·ÙØ¨ خد٠ة Ù Ù SMT", 8, _hoisted_102)])])) 4657 : (_openBlock(), _createElementBlock("div", _hoisted_103, [_createElementVNode("p", _hoisted_104, _toDisplayString(tradeSelectedRouteLabel()), 1), (tradeRouteServices.length) 4658 ? (_openBlock(), _createElementBlock("div", _hoisted_105, [_cache[26] || (_cache[26] = _createElementVNode("span", { class: "guideFilterLayerLabel" }, "ÙÙØ¹ Ø§ÙØ®Ø¯Ù Ø©", -1)), _createElementVNode("div", _hoisted_106, [_createElementVNode("button", { 4659 type: "button", 4660 class: _normalizeClass({active:!filters.service_type}), 4661 onClick: $event => (pickTradeService('')) 4662 }, "ÙÙ Ø§ÙØ®Ø¯Ù ات", 10, _hoisted_107), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tradeRouteServices, (svc) => { 4663 return (_openBlock(), _createElementBlock("button", { 4664 key: svc.service_type, 4665 type: "button", 4666 class: _normalizeClass({active:filters.service_type===svc.service_type}), 4667 onClick: $event => (pickTradeService(svc.service_type)) 4668 }, _toDisplayString(svc.icon||'ð¦') + " " + _toDisplayString(svc.name_ar||svc.name_en), 11, _hoisted_108)) 4669 }), 128))])])) 4670 : _createCommentVNode("", true)]))])) 4671 : _createCommentVNode("", true), 4672 (loaded && !loadError && filters.hub==='trade_shipping' && growthRouteHub()) 4673 ? (_openBlock(), _createElementBlock("section", _hoisted_109, [_createElementVNode("button", { 4674 class: _normalizeClass(["guideCategoryCard", {active:!filters.category}]), 4675 onClick: $event => (pickCat('')) 4676 }, [_createElementVNode("span", null, _toDisplayString(filters.hub==='trade_shipping'?'ð¢':'ð§'), 1), _cache[28] || (_cache[28] = _createElementVNode("b", null, "ÙÙ Ø§ÙØ£Ùسا٠", -1)), _createElementVNode("small", null, _toDisplayString(totalCount) + " ÙØªÙجة", 1)], 10, _hoisted_110), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(populatedCategories, (c) => { 4677 return (_openBlock(), _createElementBlock("button", { 4678 key: c.id, 4679 class: _normalizeClass(["guideCategoryCard", {active:filters.category===c.slug}]), 4680 onClick: $event => (pickCat(c.slug)) 4681 }, [_createElementVNode("span", null, _toDisplayString(c.icon||'ð§'), 1), _createElementVNode("b", null, _toDisplayString(c.name_ar), 1), _createElementVNode("small", null, _toDisplayString(c.item_count||0) + " ٠عÙÙÙ Ø©", 1)], 10, _hoisted_111)) 4682 }), 128)), (emptyCategories.length) 4683 ? (_openBlock(), _createElementBlock("details", _hoisted_112, [_createElementVNode("summary", null, "Ø£ÙØ³Ø§Ù ÙÙØ¯ Ø§ÙØ¥Ù٠ا٠(" + _toDisplayString(emptyCategories.length) + ")", 1), _createElementVNode("div", _hoisted_113, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(emptyCategories, (c) => { 4684 return (_openBlock(), _createElementBlock("span", { key: c.id }, _toDisplayString(c.icon||'ð§') + " " + _toDisplayString(c.name_ar) + " · ÙØ±ÙباÙ", 1)) 4685 }), 128))])])) 4686 : _createCommentVNode("", true)])) 4687 : (loaded && !loadError && filters.hub==='sudan_digital' && filters.category) 4688 ? (_openBlock(), _createElementBlock("div", _hoisted_114, [_createElementVNode("button", { 4689 class: _normalizeClass({active:!filters.category}), 4690 onClick: $event => (pickCat('')) 4691 }, "اÙÙÙ", 10, _hoisted_115), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(populatedCategories, (c) => { 4692 return (_openBlock(), _createElementBlock("button", { 4693 key: c.id, 4694 class: _normalizeClass({active:filters.category===c.slug}), 4695 onClick: $event => (pickCat(c.slug)) 4696 }, [_createElementVNode("span", null, _toDisplayString(c.icon||'ð§'), 1), _createTextVNode(_toDisplayString(c.name_ar), 1), _createElementVNode("small", null, _toDisplayString(c.item_count||0), 1)], 10, _hoisted_116)) 4697 }), 128))])) 4698 : _createCommentVNode("", true), 4699 (loaded && !loadError && (filters.hub==='china_guide'||filters.hub==='trade_shipping')) 4700 ? (_openBlock(), _createElementBlock("section", _hoisted_117, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_118, _toDisplayString(smartSearchActive?'ÙØªØ§Ø¦Ø¬ Ø§ÙØ¨ØØ«':'اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر'), 1), _createElementVNode("h2", null, _toDisplayString(smartSearchActive?'Ø§ÙØ£Ùرب Ù٠ا ØªØ¨ØØ« عÙÙ':(filters.hub==='trade_shipping'?'٠عÙÙ٠ات Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ':'Ø§Ø³ØªÙØ´Ù دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ')), 1), _createElementVNode("small", null, [_createTextVNode(_toDisplayString(totalCount) + " ÙØªÙجة", 1), (searchMeta&&searchMeta.image_count) 4701 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(searchMeta.image_count) + " Ø¨ØµÙØ±Ø©", 1)], 64)) 4702 : _createCommentVNode("", true)])]), smartSearchActive 4703 ? (_openBlock(), _createElementBlock("button", { 4704 key: 0, 4705 class: "smallbtn secondary", 4706 onClick: openAskSearch 4707 }, "Ù٠تجد اÙÙ Ø·ÙÙØ¨Ø اسأ٠SMT", 8, _hoisted_119)) 4708 : _createCommentVNode("", true)])) 4709 : _createCommentVNode("", true), 4710 (loaded && !loadError && (filters.hub!=='sudan_digital' || filters.category)) 4711 ? (_openBlock(), _createElementBlock("section", { 4712 key: 13, 4713 class: _normalizeClass(['guideList',(filters.hub==='china_guide'||filters.hub==='trade_shipping')?'guideDiscoveryList':'']) 4714 }, [(!loading && !items.length) 4715 ? (_openBlock(), _createElementBlock("div", _hoisted_120, [ 4716 _cache[29] || (_cache[29] = _createElementVNode("span", null, "ð", -1)), 4717 _cache[30] || (_cache[30] = _createElementVNode("h3", null, "ÙÙ ÙØ¬Ø¯ ÙØªÙجة بعد", -1)), 4718 _createElementVNode("p", _hoisted_121, _toDisplayString(filters.hub==='trade_shipping'&&filters.origin_country&&filters.destination_country&&!tradeRouteSupported?'ÙØ§ ØªÙØ¬Ø¯ ٠عÙÙ٠ات Ù ÙØ«ÙØ© ÙÙØ°Ø§ اÙ٠سار ØØ§ÙÙÙØ§. ÙÙ ÙÙÙ Ù Ø³Ø Ø§Ù٠سار Ø£Ù Ø·ÙØ¨ خد٠ة Ù Ù SMT.':(filters.hub==='trade_shipping'?'Ø¬Ø±ÙØ¨ اس٠اÙÙ Ø³ØªÙØ¯ Ø£Ù ÙÙØ¹ Ø§ÙØ´ØÙ أ٠اÙÙ ÙÙØ§Ø¡ Ø£Ù Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØ°Ù ØªØ¨ØØ« عÙÙ.':'Ø¬Ø±ÙØ¨ ÙÙØ¹ اÙÙ ÙØ§Ù + اÙÙ ÙØ·ÙØ©. Ø§ÙØ¨ØØ« ÙÙÙÙ Ø§ÙØ£Ø³Ù اء Ø¨Ø§ÙØ¹Ø±Ø¨ÙØ© ÙØ§ÙØ¥ÙØ¬ÙÙØ²ÙØ© ÙØ§ÙصÙÙÙØ© Ù Ø«Ù: Ù Ø·Ø§Ø¹Ù Ø´ÙØ§ÙØ¨ÙØ å°å é åºØ Ø£Ø³ÙØ§Ù ÙÙÙÙ.')), 1), 4719 (filters.hub==='china_guide') 4720 ? (_openBlock(), _createElementBlock("div", _hoisted_122, [ 4721 _createElementVNode("button", { onClick: $event => (popularSearch('Ù Ø·Ø§Ø¹Ù Ø´ÙØ§ÙبÙ')) }, "ð½ï¸ Ù Ø·Ø§Ø¹Ù Ø´ÙØ§ÙبÙ", 8, _hoisted_123), 4722 _createElementVNode("button", { onClick: $event => (popularSearch('ÙÙØ§Ø¯Ù Ø´ÙØ§ÙبÙ')) }, "ð¨ ÙÙØ§Ø¯Ù Ø´ÙØ§ÙبÙ", 8, _hoisted_124), 4723 _createElementVNode("button", { onClick: $event => (popularSearch('Ø§ÙØ£Ø³ÙاÙ')) }, "ð¬ Ø§ÙØ£Ø³ÙØ§Ù", 8, _hoisted_125), 4724 _createElementVNode("button", { onClick: $event => (popularSearch('اÙ٠ستشÙÙØ§Øª')) }, "ð¥ Ø§Ù٠ستشÙÙØ§Øª", 8, _hoisted_126) 4725 ])) 4726 : _createCommentVNode("", true), 4727 _createElementVNode("div", _hoisted_127, [(activeFilterCount()) 4728 ? (_openBlock(), _createElementBlock("button", { 4729 key: 0, 4730 class: "smallbtn secondary", 4731 onClick: clearGuideFilters 4732 }, "عرض Ù٠اÙ٠عÙÙ٠ات", 8, _hoisted_128)) 4733 : _createCommentVNode("", true), (filters.hub==='trade_shipping') 4734 ? (_openBlock(), _createElementBlock("button", { 4735 key: 1, 4736 class: "smallbtn",
4737 onClick: openTradeServiceRequest 4738 }, "Ø§Ø·ÙØ¨ خد٠ة Ø´ØÙ", 8, _hoisted_129)) 4739 : _createCommentVNode("", true), (filters.hub==='china_guide'||filters.hub==='trade_shipping') 4740 ? (_openBlock(), _createElementBlock("button", { 4741 key: 2, 4742 class: "smallbtn", 4743 onClick: openAskSearch 4744 }, "اسأ٠SMT Ø¹Ù Ø¨ØØ«Ù", 8, _hoisted_130)) 4745 : _createCommentVNode("", true)]) 4746 ])) 4747 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (x, index) => { 4748 return (_openBlock(), _createElementBlock("article", { 4749 key: x.id, 4750 class: _normalizeClass(['card','guideItemCard',(filters.hub==='china_guide'||filters.hub==='trade_shipping')?'guideDiscoveryCard':'',{guideBestMatch:smartSearchActive&&index===0}]) 4751 }, [_createVNode(_component_router_link, { 4752 class: "guideCardOpen", 4753 to: detailRoute(x) 4754 }, { 4755 default: _withCtx(() => [_createElementVNode("span", _hoisted_131, [(guideImageUrl(x,'thumb')) 4756 ? (_openBlock(), _createElementBlock("img", { 4757 key: 0, 4758 class: "guideItemImg", 4759 loading: "lazy", 4760 src: guideImageUrl(x,'thumb'), 4761 alt: 'ØµÙØ±Ø© '+itemTitle(x), 4762 onError: $event => (markGuideImageBroken(guideImageUrl(x,'thumb'))) 4763 }, null, 40, _hoisted_132)) 4764 : (_openBlock(), _createElementBlock("span", _hoisted_133, _toDisplayString(x.category_icon||'ð§'), 1)), (x.is_recommended) 4765 ? (_openBlock(), _createElementBlock("em", _hoisted_134, "â Ù ÙØµÙ بÙ")) 4766 : _createCommentVNode("", true), (x.verification_status==='verified') 4767 ? (_openBlock(), _createElementBlock("em", _hoisted_135, "â Ù ÙØ«Ù")) 4768 : _createCommentVNode("", true)]), _createElementVNode("span", _hoisted_136, [ 4769 (smartSearchActive&&index===0) 4770 ? (_openBlock(), _createElementBlock("span", _hoisted_137, "Ø£ÙØ¶Ù تطابÙ")) 4771 : _createCommentVNode("", true), 4772 _createElementVNode("span", _hoisted_138, [_createElementVNode("small", null, _toDisplayString(filters.hub==='trade_shipping'?(x.category_name_ar||'Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ'):(filters.hub==='sudan_digital'?'Ø¨ÙØ§Ø¨Ø© Ø§ÙØ³ÙداÙ':(x.category_name_ar||'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ')+' · '+($cityLabel(x.city_key||x.city)||'China'))), 1), (filters.hub==='trade_shipping'&&x.direction&&x.direction!=='general') 4773 ? (_openBlock(), _createElementBlock("small", _hoisted_139, _toDisplayString(tradeDirectionLabel(x)), 1)) 4774 : _createCommentVNode("", true), (filters.hub==='china_guide'&&x.district) 4775 ? (_openBlock(), _createElementBlock("small", _hoisted_140, "ð " + _toDisplayString(x.district), 1)) 4776 : _createCommentVNode("", true)]), 4777 _createElementVNode("h3", null, _toDisplayString(itemTitle(x)), 1), 4778 _createElementVNode("p", _hoisted_141, _toDisplayString(compactContentExcerpt(itemSummary(x),170)||'اضغط ÙØ¹Ø±Ø¶ Ø§ÙØªÙاصÙÙ.'), 1), 4779 _createElementVNode("span", _hoisted_142, [_createElementVNode("b", null, _toDisplayString(resultTrustLabel(x)), 1), (x.last_verified_at||x.updated_at) 4780 ? (_openBlock(), _createElementBlock("small", _hoisted_143, "آخر تØÙÙ " + _toDisplayString(shortDate(x.last_verified_at||x.updated_at)), 1)) 4781 : _createCommentVNode("", true)]) 4782 ])]), 4783 _: 2 4784 }, 1032, ["to"]), _createElementVNode("div", _hoisted_144, [_createVNode(_component_router_link, { 4785 class: "smallbtn secondary", 4786 to: detailRoute(x) 4787 }, { 4788 default: _withCtx(() => _cache[31] || (_cache[31] = [_createTextVNode("Ø§ÙØªÙاصÙÙ")])), 4789 _: 2, 4790 __: [31] 4791 }, 1032, ["to"]), (filters.hub==='china_guide'&&(x.title_zh||x.title_ar||x.title_en)) 4792 ? (_openBlock(), _createElementBlock("button", { 4793 key: 0, 4794 class: "smallbtn", 4795 onClick: $event => (openMap(x)) 4796 }, "ÙØªØ ÙÙ AMap", 8, _hoisted_145)) 4797 : _createCommentVNode("", true), (filters.hub==='china_guide'&&x.phone) 4798 ? (_openBlock(), _createElementBlock("button", { 4799 key: 1, 4800 class: "smallbtn secondary", 4801 onClick: $event => (callPlace(x)) 4802 }, "اتصاÙ", 8, _hoisted_146)) 4803 : _createCommentVNode("", true)])], 2)) 4804 }), 128)), (pagination&&pagination.has_more) 4805 ? (_openBlock(), _createElementBlock("div", _hoisted_147, [_createElementVNode("button", { 4806 type: "button", 4807 class: "btn secondary", 4808 disabled: loadingMore, 4809 onClick: loadMoreItems 4810 }, _toDisplayString(loadingMore?'Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙâ¦':'عرض اÙÙ Ø²ÙØ¯ ('+Math.max(0,totalCount-items.length)+')'), 9, _hoisted_148)])) 4811 : _createCommentVNode("", true)], 2)) 4812 : _createCommentVNode("", true), 4813 (loaded && !loadError && filters.hub==='china_guide') 4814 ? (_openBlock(), _createElementBlock("details", _hoisted_149, [ 4815 _cache[34] || (_cache[34] = _createElementVNode("summary", null, "Ø§ÙØªØ±Ø Ø¥Ø¶Ø§ÙØ© Ù ÙØ§Ù أ٠خد٠ة ÙØ§Ùسب ÙÙØ§Ø· Ù Ø´Ø§Ø±ÙØ©", -1)), 4816 _cache[35] || (_cache[35] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØ¯ÙÙÙ Ù ÙØ±Ùض ÙÙÙ٠٠٠اÙÙØ§Ø³ ÙÙÙÙØ§Ø³. Ø§ÙØªØ±Ø Ù Ø·Ø¹Ù Ø Ø³ÙÙØ ٠ستشÙÙØ
4816 Ù ØªØ±Ø¬Ù Ø Ù ÙØªØ¨ Ø´ØÙØ Ø£Ù Ø£Ù Ø®Ø¯Ù Ø© Ù ÙÙØ¯Ø©. Ø§ÙØ¥Ø¯Ø§Ø±Ø© تراجع ÙØ¨Ù اÙÙØ´Ø±. Ø§ÙØ§ÙØªØ±Ø§Ø Ø§ÙÙ ÙØ¨ÙÙ ÙØ¨Ø¯Ø£ Ù Ù +5 ÙÙØ§Ø·.", -1)), 4817 _withDirectives(_createElementVNode("input", { 4818 "onUpdate:modelValue": $event => ((suggestion.title) = $event), 4819 placeholder: "اس٠اÙÙ ÙØ§Ù Ø£Ù Ø§ÙØ®Ø¯Ù Ø©" 4820 }, null, 8, _hoisted_150), [[_vModelText, suggestion.title]]), 4821 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((suggestion.category) = $event) }, [_cache[32] || (_cache[32] = _createElementVNode("option", { value: "" }, "اختر اÙÙØ³Ù اÙÙ ÙØªØ±Ø", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(categories, (c) => { 4822 return (_openBlock(), _createElementBlock("option", { 4823 key: c.id, 4824 value: c.name_ar 4825 }, _toDisplayString(c.icon) + " " + _toDisplayString(c.name_ar), 9, _hoisted_152)) 4826 }), 128)), _cache[33] || (_cache[33] = _createElementVNode("option", { value: "أخرÙ" }, "أخرÙ", -1))], 8, _hoisted_151), [[_vModelSelect, suggestion.category]]), 4827 _withDirectives(_createElementVNode("textarea", { 4828 "onUpdate:modelValue": $event => ((suggestion.details) = $event), 4829 placeholder: "Ø§ÙØªØ¨ اÙ٠دÙÙØ©Ø Ø§ÙØÙØ Ø§ÙØ¹ÙÙØ§ÙØ Ø±ÙÙ Ø§ÙØªÙØ§ØµÙØ WeChatØ Ø±Ø§Ø¨Ø· Ø§ÙØ®Ø±ÙØ·Ø©Ø ÙÙÙ٠اÙÙ ÙØ§Ù Ù ÙÙØ¯." 4830 }, null, 8, _hoisted_153), [[_vModelText, suggestion.details]]), 4831 _createElementVNode("button", { 4832 class: "btn", 4833 onClick: sendSuggestion 4834 }, "Ø¥Ø±Ø³Ø§Ù Ø§ÙØ§ÙتراØ", 8, _hoisted_154) 4835 ])) 4836 : _createCommentVNode("", true) 4837 ]), 4838 _: 1 4839 }, 8, ["title"])) 4840 } 4841} 4842})() 4843 }; 4844 4845 4846 const ChinaGuideDetailPage={ 4847 components:{PublicFrame}, 4848 setup(){ 4849 const store=useGzcStore(); const route=useRoute(); const router=useRouter(); 4850 const item=ref(null); const related=ref([]); const loading=ref(true); const error=ref(''); const reportText=ref(''); const brokenImage=ref(false); 4851 function hubKey(){const p=String(route.path||'');return p.indexOf('/trade-shipping/')===0?'trade_shipping':(p.indexOf('/sudan-digital/')===0?'sudan_digital':'china_guide');} 4852 function hubBase(){return hubKey()==='trade_shipping'?'/trade-shipping':(hubKey()==='sudan_digital'?'/sudan-digital':'/china-guide');} 4853 function pageTitle(){return hubKey()==='trade_shipping'?'ØªÙØ§ØµÙÙ Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ':(hubKey()==='sudan_digital'?'ØªÙØ§ØµÙÙ Ø¨ÙØ§Ø¨Ø© Ø§ÙØ³ÙداÙ':'ØªÙØ§ØµÙ٠دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ');} 4854 function backLabel(){return hubKey()==='trade_shipping'?'Ø±Ø¬ÙØ¹ ÙÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ':(hubKey()==='sudan_digital'?'Ø±Ø¬ÙØ¹ ÙØ¨Ùابة Ø§ÙØ³ÙداÙ':'Ø±Ø¬ÙØ¹ ÙÙØ¯ÙÙÙ');} 4855 function itemTitle(x){return x&& (x.title_ar||x.title_en||x.title_zh) || '٠عÙÙÙ Ø©';} 4856 function itemSummary(x){return x&& (x.summary_ar||x.summary_en||x.description_ar||x.description_en||x.description_zh) || '';} 4857 function addressOf(x){return x&& (x.address_zh||x.address_ar||x.address_en) || '';} 4858 function safeHttpUrl(url){return safeExternalHttpUrl(url);} 4859 function openDetailAmap(){openAmapAppPlace(item.value,message=>{store.state.msg=message;});} 4860 function guideImageUrl(x){return !brokenImage.value&&x&&(x.image_url||x.image_thumb_url)||'';} 4861 async function copyText(text,okMessage){return copySharedText(text,okMessage);} 4862 async function copyAddress(){return copyText(addressOf(item.value),'ØªÙ ÙØ³Ø® Ø§ÙØ¹ÙÙØ§Ù');} 4863 async function copyWechat(){return copyText(item.value&&item.value.wechat_id,'ØªÙ ÙØ³Ø® WeChat ID');} 4864 async function shareItem(){const x=item.value;if(!x)return;return shareDetailContent({title:itemTitle(x),text:[itemTitle(x),itemSummary(x),addressOf(x)].filter(Boolean).join(' â '),url:window.location.href});} 4865 async function sendReport(){const x=item.value;const msg=String(reportText.value||'').trim();if(!x||!msg){store.state.msg='Ø§ÙØªØ¨ Ø§ÙØªØµØÙØ Ø£ÙÙØ§Ù';return;}const r=await api('/api/china-guide/items/'+encodeURIComponent(x.id)+'/report',{method:'POST',body:JSON.stringify({message:msg,hub_key:hubKey()})});store.state.msg=r.message||r.error||'';if(r.ok)reportText.value='';} 4866 function tradeDirection(x){return x&&x.direction==='china_to_arab'?'Ù Ù Ø§ÙØµÙ٠إÙÙ Ø§ÙØ¯ÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ©':(x&&x.direction==='arab_to_china'?'Ù Ù Ø§ÙØ¯ÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ© Ø¥ÙÙ Ø§ÙØµÙÙ':'عا٠');} 4867 async function load(){loading.value=true;error.value='';brokenImage.value=false;item.value=null;related.value=[];const qs=new URLSearchParams({hub:hubKey()});for(const key of ['from_search','search_hub','search_intent','search_city','search_service']){const value=String((route.query||{})[key]||'');if(value)qs.set(key,value);}const r=await api('/api/china-guide/items/'+encodeURIComponent(route.params.id)+'?'+qs.toString());
4867if(r&&r.ok){item.value=r.item;related.value=safeArray(r.related);}else error.value=(r&& (r.message||r.error))||'تعذر تØÙ Ù٠اÙ٠عÙÙÙ Ø©';loading.value=false;} 4868 onMounted(load); watch(()=>route.fullPath,load); 4869 return {store,item,related,loading,error,reportText,brokenImage,hubKey,hubBase,pageTitle,backLabel,itemTitle,itemSummary,addressOf,safeHttpUrl,openDetailAmap,guideImageUrl,copyAddress,copyWechat,shareItem,sendReport,tradeDirection,guideServiceLabel,shortDate,router}; 4870 }, 4871 render:(function(){ 4872const _Vue = Vue 4873const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 4874 4875const _hoisted_1 = { class: "guideDetailBack" } 4876const _hoisted_2 = ["onClick"] 4877const _hoisted_3 = { 4878 key: 0, 4879 class: "card loadingState contentDetailSkeleton", 4880 role: "status" 4881} 4882const _hoisted_4 = { 4883 key: 1, 4884 class: "card errorState", 4885 role: "alert" 4886} 4887const _hoisted_5 = ["onClick"] 4888const _hoisted_6 = { class: "card guideDetailPageCard contentDetailPage" } 4889const _hoisted_7 = { 4890 key: 0, 4891 class: "guideDetailHeroMedia guideDetailMedia" 4892} 4893const _hoisted_8 = ["src", "alt", "onError"] 4894const _hoisted_9 = { 4895 key: 0, 4896 class: "guidePhotoAttribution" 4897} 4898const _hoisted_10 = ["href"] 4899const _hoisted_11 = { key: 1 } 4900const _hoisted_12 = { class: "guideDetailHeroBody" } 4901const _hoisted_13 = { class: "guideDetailBadges" } 4902const _hoisted_14 = { 4903 key: 0, 4904 class: "guideBadge" 4905} 4906const _hoisted_15 = { class: "guideVerifiedBadge" } 4907const _hoisted_16 = { 4908 key: 0, 4909 class: "guideDetailLead" 4910} 4911const _hoisted_17 = { class: "guideDetailPrimaryGrid" } 4912const _hoisted_18 = ["onClick"] 4913const _hoisted_19 = ["onClick"] 4914const _hoisted_20 = ["href"] 4915const _hoisted_21 = ["onClick"] 4916const _hoisted_22 = { 4917 key: 0, 4918 class: "card guideDetailSection exhibitionIntelligenceDetail" 4919} 4920const _hoisted_23 = { class: "guideDetailSectionHead" } 4921const _hoisted_24 = { class: "infoGrid" } 4922const _hoisted_25 = ["href"] 4923const _hoisted_26 = { 4924 key: 1, 4925 class: "card guideDetailSection" 4926} 4927const _hoisted_27 = { class: "guideDetailSectionHead" } 4928const _hoisted_28 = { class: "guideAddressText" } 4929const _hoisted_29 = { class: "row" } 4930const _hoisted_30 = ["onClick"] 4931const _hoisted_31 = ["onClick"] 4932const _hoisted_32 = { 4933 key: 2, 4934 class: "card guideDetailSection" 4935} 4936const _hoisted_33 = { class: "guideDetailSectionHead" } 4937const _hoisted_34 = { class: "guideDetailDescription" } 4938const _hoisted_35 = { 4939 key: 3, 4940 class: "card guideDetailSection" 4941} 4942const _hoisted_36 = { class: "infoGrid" } 4943const _hoisted_37 = { key: 0 } 4944const _hoisted_38 = { class: "row" } 4945const _hoisted_39 = ["href"] 4946const _hoisted_40 = ["onClick"] 4947const _hoisted_41 = { 4948 key: 4, 4949 class: "card guideDetailSection" 4950} 4951const _hoisted_42 = { class: "infoGrid" } 4952const _hoisted_43 = { key: 0 } 4953const _hoisted_44 = { 4954 key: 5, 4955 class: "card guideDetailSection" 4956} 4957const _hoisted_45 = { class: "guideContactList" } 4958const _hoisted_46 = ["href"] 4959const _hoisted_47 = { dir: "ltr" } 4960const _hoisted_48 = ["href"] 4961const _hoisted_49 = { dir: "ltr" } 4962const _hoisted_50 = ["onClick"] 4963const _hoisted_51 = { dir: "ltr" } 4964const _hoisted_52 = ["href"] 4965const _hoisted_53 = { class: "card guideDetailSection guideVerificationCard" } 4966const _hoisted_54 = { class: "guideDetailSectionHead" } 4967const _hoisted_55 = { 4968 key: 6, 4969 class: "card guideDetailSection searchGrowthRelated" 4970} 4971const _hoisted_56 = { class: "guideCategoryGrid searchGrowthRelatedGrid" } 4972const _hoisted_57 = { class: "card guideReport guideDetailReport" } 4973const _hoisted_58 = ["onUpdate:modelValue"] 4974const _hoisted_59 = ["onClick"] 4975 4976return function render(_ctx, _cache) { 4977 with (_ctx) { 4978 const { toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, Fragment: _Fragment, renderList: _renderList, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock, vModelText: _vModelText, withDirectives: _withDirectives } = _Vue 4979 4980 const _component_router_link = _resolveComponent("router-link") 4981 const _component_PublicFrame = _resolveComponent("PublicFrame") 4982 4983 return (_openBlock(), _createBlock(_component_PublicFrame, { title: pageTitle() }, { 4984 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_createElementVNode("button", { 4985 type: "button", 4986 class: "smallbtn secondary", 4987 onClick: $event => (router.push(hubBase())) 4988 }, "â " + _toDisplayString(backLabel()), 9, _hoisted_2)]), loading 4989 ? (_openBlock(), _createElementBlock("section", _hoisted_3, _cache[0] || (_cache[0] = [_createElementVNode("span", { class: "loadingSpinner" }, null, -1), _createElementVNode("h3", null, "جار٠تØÙ Ù٠اÙ٠عÙÙÙ Ø©...", -1), _createElementVNode("p", { class: "hint" }, "ÙØ±Ø¬Ù Ø§ÙØ§Ùتظار ÙÙÙÙØ§Ù.", -1)]))) 4990 : error 4991 ? (_openBlock(), _createElementBlock("section", _hoisted_4, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "تعذر ÙØªØ اÙ٠عÙÙÙ Ø©", -1)), _createElementVNode("p", null, _toDisplayString(error), 1), _createElementVNode("button", { 4992 class: "btn secondary", 4993 onClick: $event => (router.push(hubBase())) 4994 }
4994, _toDisplayString(backLabel()), 9, _hoisted_5)])) 4995 : item 4996 ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [ 4997 _createElementVNode("article", _hoisted_6, [(guideImageUrl(item)) 4998 ? (_openBlock(), _createElementBlock("figure", _hoisted_7, [_createElementVNode("img", { 4999 src: guideImageUrl(item), 5000 alt: 'ØµÙØ±Ø© '+itemTitle(item), 5001 loading: "lazy", 5002 onError: $event => (brokenImage=true) 5003 }, null, 40, _hoisted_8), (item.image_attribution) 5004 ? (_openBlock(), _createElementBlock("figcaption", _hoisted_9, [_cache[2] || (_cache[2] = _createTextVNode("ØµÙØ±Ø©: ")), (safeHttpUrl(item.image_source_url)) 5005 ? (_openBlock(), _createElementBlock("a", { 5006 key: 0, 5007 href: safeHttpUrl(item.image_source_url), 5008 target: "_blank", 5009 rel: "noopener noreferrer" 5010 }, _toDisplayString(item.image_attribution), 9, _hoisted_10)) 5011 : (_openBlock(), _createElementBlock("span", _hoisted_11, _toDisplayString(item.image_attribution), 1))])) 5012 : _createCommentVNode("", true)])) 5013 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_12, [ 5014 _createElementVNode("div", _hoisted_13, [(item.is_recommended) 5015 ? (_openBlock(), _createElementBlock("span", _hoisted_14, "Ù ÙØµÙ بÙ")) 5016 : _createCommentVNode("", true), _createElementVNode("span", _hoisted_15, _toDisplayString(item.verification_status==='verified'?'â Ù ÙØ«Ù':'ÙÙØ¯ Ø§ÙØªØÙÙ'), 1), (hubKey()==='china_guide') 5017 ? (_openBlock(), _createElementBlock("span", { 5018 key: 1, 5019 class: _normalizeClass(["trustBadge", item.trust_tier]) 5020 }, _toDisplayString(item.trust_tier==='official'?'Official':(item.trust_tier==='smt_verified'?'SMT Verified':'Community Listed')), 3)) 5021 : _createCommentVNode("", true)]), 5022 _createElementVNode("h2", null, _toDisplayString(itemTitle(item)), 1), 5023 (itemSummary(item)) 5024 ? (_openBlock(), _createElementBlock("p", _hoisted_16, _toDisplayString(itemSummary(item)), 1)) 5025 : _createCommentVNode("", true), 5026 _createElementVNode("div", _hoisted_17, [(hubKey()==='china_guide' && (addressOf(item)||item.map_url)) 5027 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("button", { 5028 class: "btn guideMapPrimary", 5029 type: "button", 5030 onClick: openDetailAmap 5031 }, "ðºï¸ ÙØªØ ÙÙ AMap", 8, _hoisted_18), (addressOf(item)) 5032 ? (_openBlock(), _createElementBlock("button", { 5033 key: 0, 5034 class: "btn secondary", 5035 type: "button", 5036 onClick: copyAddress 5037 }, "ÙØ³Ø® Ø§ÙØ¹ÙÙØ§Ù", 8, _hoisted_19)) 5038 : _createCommentVNode("", true)], 64)) 5039 : _createCommentVNode("", true), (safeHttpUrl(item.source_url)) 5040 ? (_openBlock(), _createElementBlock("a", { 5041 key: 1, 5042 class: "btn guideMapPrimary", 5043 href: safeHttpUrl(item.source_url), 5044 target: "_blank", 5045 rel: "noopener noreferrer" 5046 }, "ÙØªØ اÙ٠صدر â", 8, _hoisted_20)) 5047 : _createCommentVNode("", true), _createElementVNode("button", { 5048 class: "btn secondary", 5049 type: "button", 5050 onClick: shareItem 5051 }, "Ù Ø´Ø§Ø±ÙØ©", 8, _hoisted_21)]) 5052 ])]), 5053 (hubKey()==='china_guide'&&(item.category_key==='exhibitions'||(!item.category_key&&item.service_type==='exhibitions'))) 5054 ? (_openBlock(), _createElementBlock("section", _hoisted_22, [_createElementVNode("div", _hoisted_23, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "ðï¸", -1)), _createElementVNode("div", null, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, "Ø¨ÙØ§Ùات اÙ٠عرض", -1)), _createElementVNode("small", null, _toDisplayString(item.exhibition_sector||'٠عرض / ٠ؤت٠ر'), 1)])]), _createElementVNode("div", _hoisted_24, [_createElementVNode("span", null, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "Ø§ÙØ¨Ø¯Ø§ÙØ©", -1)), _createElementVNode("small", null, _toDisplayString(item.exhibition_start_date||'ØªØØªØ§Ø¬ ٠راجعة'), 1)]), _createElementVNode("span", null, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "اÙÙÙØ§ÙØ©", -1)), _createElementVNode("small", null, _toDisplayString(item.exhibition_end_date||'ØªØØªØ§Ø¬ ٠راجعة'), 1)])]), (safeHttpUrl(item.registration_url)) 5055 ? (_openBlock(), _createElementBlock("a", { 5056 key: 0, 5057 class: "btn secondary", 5058 href: safeHttpUrl(item.registration_url), 5059 target: "_blank", 5060 rel: "noopener noreferrer" 5061 }, "Ø§ÙØªØ³Ø¬ÙÙ Ø§ÙØ±Ø³Ù Ù â", 8, _hoisted_25)) 5062 : _createCommentVNode("", true)])) 5063 : _createCommentVNode("", true), 5064 (hubKey()==='china_guide' && addressOf(item)) 5065 ? (_openBlock(), _createElementBlock("section", _hoisted_26, [_createElementVNode("div", _hoisted_27, [_cache[8] || (_cache[8] = _createElementVNode("span", null, "ð", -1)), _createElementVNode("div", null, [_cache[7] || (_cache[7] = _
5065createElementVNode("h3", null, "Ø§ÙØ¹ÙÙØ§Ù", -1)), _createElementVNode("small", null, [_createTextVNode(_toDisplayString($cityLabel(item.city)||'China'), 1), (item.district) 5066 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(item.district), 1)], 64)) 5067 : _createCommentVNode("", true)])])]), _createElementVNode("p", _hoisted_28, _toDisplayString(addressOf(item)), 1), _createElementVNode("div", _hoisted_29, [_createElementVNode("button", { 5068 class: "smallbtn secondary", 5069 onClick: copyAddress 5070 }, "ÙØ³Ø® Ø§ÙØ¹ÙÙØ§Ù", 8, _hoisted_30), _createElementVNode("button", { 5071 class: "smallbtn", 5072 type: "button", 5073 onClick: openDetailAmap 5074 }, "ÙØªØ ÙÙ AMap", 8, _hoisted_31)])])) 5075 : _createCommentVNode("", true), 5076 (item.description_ar||item.description_en||item.description_zh) 5077 ? (_openBlock(), _createElementBlock("section", _hoisted_32, [_createElementVNode("div", _hoisted_33, [_cache[10] || (_cache[10] = _createElementVNode("span", null, "â¹ï¸", -1)), _createElementVNode("div", null, [_cache[9] || (_cache[9] = _createElementVNode("h3", null, "Ø§ÙØªÙاصÙÙ", -1)), _createElementVNode("small", null, _toDisplayString(item.category_name_ar||pageTitle()), 1)])]), _createElementVNode("p", _hoisted_34, _toDisplayString(item.description_ar||item.description_en||item.description_zh), 1)])) 5078 : _createCommentVNode("", true), 5079 (hubKey()==='trade_shipping') 5080 ? (_openBlock(), _createElementBlock("section", _hoisted_35, [_cache[15] || (_cache[15] = _createElementVNode("div", { class: "guideDetailSectionHead" }, [_createElementVNode("span", null, "ð¢"), _createElementVNode("div", null, [_createElementVNode("h3", null, "Ø¨ÙØ§Ùات Ø§ÙØ®Ø¯Ù Ø©"), _createElementVNode("small", null, "Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ")])], -1)), _createElementVNode("div", _hoisted_36, [ 5081 _createElementVNode("span", null, [_cache[11] || (_cache[11] = _createElementVNode("b", null, "اÙ٠سار", -1)), _createElementVNode("small", null, _toDisplayString($route.query.route_label||tradeDirection(item)), 1)]), 5082 _createElementVNode("span", null, [_cache[12] || (_cache[12] = _createElementVNode("b", null, "ÙÙØ¹ Ø§ÙØ®Ø¯Ù Ø©", -1)), _createElementVNode("small", null, _toDisplayString(guideServiceLabel(item.service_type)), 1)]), 5083 (item.source_name) 5084 ? (_openBlock(), _createElementBlock("span", _hoisted_37, [_cache[13] || (_cache[13] = _createElementVNode("b", null, "Ø§ÙØ¬ÙØ© / اÙ٠صدر", -1)), _createElementVNode("small", null, _toDisplayString(item.source_name), 1)])) 5085 : _createCommentVNode("", true), 5086 _createElementVNode("span", null, [_cache[14] || (_cache[14] = _createElementVNode("b", null, "آخر تØÙÙ", -1)), _createElementVNode("small", null, _toDisplayString(shortDate(item.last_verified_at||item.updated_at)||'-'), 1)]) 5087 ]), _createElementVNode("div", _hoisted_38, [(safeHttpUrl(item.source_url)) 5088 ? (_openBlock(), _createElementBlock("a", { 5089 key: 0, 5090 class: "btn secondary", 5091 href: safeHttpUrl(item.source_url), 5092 target: "_blank", 5093 rel: "noopener noreferrer" 5094 }, "ÙØªØ اÙ٠صدر Ø§ÙØ±Ø³Ù Ù â", 8, _hoisted_39)) 5095 : _createCommentVNode("", true), _createElementVNode("button", { 5096 class: "btn", 5097 type: "button", 5098 onClick: $event => (router.push({path:'/procurement/new',query:{service_type:'shipping_logistics',route_label:$route.query.route_label||''}})) 5099 }, "Ø§Ø·ÙØ¨ خد٠ة Ø´ØÙ Ù Ù SMT", 8, _hoisted_40)])])) 5100 : _createCommentVNode("", true), 5101 (hubKey()==='sudan_digital') 5102 ? (_openBlock(), _createElementBlock("section", _hoisted_41, [_
5102cache[19] || (_cache[19] = _createElementVNode("div", { class: "guideDetailSectionHead" }, [_createElementVNode("span", null, "ð¸ð©"), _createElementVNode("div", null, [_createElementVNode("h3", null, "Ø¨ÙØ§Ùات Ø§ÙØ®Ø¯Ù Ø©"), _createElementVNode("small", null, "Ø¨ÙØ§Ø¨Ø© Ø§ÙØ³ÙØ¯Ø§Ù Ø§ÙØ±ÙÙ ÙØ©")])], -1)), _createElementVNode("div", _hoisted_42, [_createElementVNode("span", null, [_cache[16] || (_cache[16] = _createElementVNode("b", null, "اÙÙØ³Ù ", -1)), _createElementVNode("small", null, _toDisplayString(item.category_name_ar||'-'), 1)]), (item.source_name) 5103 ? (_openBlock(), _createElementBlock("span", _hoisted_43, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "Ø§ÙØ¬ÙØ©", -1)), _createElementVNode("small", null, _toDisplayString(item.source_name), 1)])) 5104 : _createCommentVNode("", true), _createElementVNode("span", null, [_cache[18] || (_cache[18] = _createElementVNode("b", null, "آخر تØÙÙ", -1)), _createElementVNode("small", null, _toDisplayString(shortDate(item.last_verified_at||item.updated_at)||'-'), 1)])])])) 5105 : _createCommentVNode("", true), 5106 (hubKey()==='china_guide') 5107 ? (_openBlock(), _createElementBlock("section", _hoisted_44, [_cache[24] || (_cache[24] = _createElementVNode("div", { class: "guideDetailSectionHead" }, [_createElementVNode("span", null, "âï¸"), _createElementVNode("div", null, [_createElementVNode("h3", null, "Ø§ÙØªÙØ§ØµÙ ÙØ§ÙØ±ÙØ§Ø¨Ø·"), _createElementVNode("small", null, "Ø§ÙØ±Ùابط ØªÙØªØ خارج اÙÙ ÙØµØ©")])], -1)), _createElementVNode("div", _hoisted_45, [ 5108 (item.phone) 5109 ? (_openBlock(), _createElementBlock("a", { 5110 key: 0, 5111 class: "guideContactRow", 5112 href: 'tel:'+item.phone 5113 }, [_cache[20] || (_cache[20] = _createElementVNode("span", null, "اتصاÙ", -1)), _createElementVNode("b", _hoisted_47, _toDisplayString(item.phone), 1)], 8, _hoisted_46)) 5114 : _createCommentVNode("", true), 5115 (item.whatsapp) 5116 ? (_openBlock(), _createElementBlock("a", { 5117 key: 1, 5118 class: "guideContactRow", 5119 href: 'https://wa.me/'+item.whatsapp, 5120 target: "_blank", 5121 rel: "noopener noreferrer" 5122 }, [_cache[21] || (_cache[21] = _createElementVNode("span", null, "WhatsApp", -1)), _createElementVNode("b", _hoisted_49, _toDisplayString(item.whatsapp), 1)], 8, _hoisted_48)) 5123 : _createCommentVNode("", true), 5124 (item.wechat_id) 5125 ? (_openBlock(), _createElementBlock("button", { 5126 key: 2, 5127 type: "button", 5128 class: "guideContactRow", 5129 onClick: copyWechat 5130 }, [_cache[22] || (_cache[22] = _createElementVNode("span", null, "WeChat · اضغط ÙÙÙØ³Ø®", -1)), _createElementVNode("b", _hoisted_51, _toDisplayString(item.wechat_id), 1)], 8, _hoisted_50)) 5131 : _createCommentVNode("", true), 5132 (safeHttpUrl(item.source_url)) 5133 ? (_openBlock(), _createElementBlock("a", { 5134 key: 3, 5135 class: "guideContactRow", 5136 href: safeHttpUrl(item.source_url), 5137 target: "_blank", 5138 rel: "noopener noreferrer" 5139 }, [_createElementVNode("span", null, _toDisplayString(item.source_name||'اÙ٠صدر Ø§ÙØ±Ø³Ù Ù'), 1), _cache[23] || (_cache[23] = _createElementVNode("b", null, "ÙØªØ Ø§ÙØ±Ø§Ø¨Ø· â", -1))], 8, _hoisted_52)) 5140 : _createCommentVNode("", true) 5141 ])])) 5142 : _createCommentVNode("", true), 5143 _createElementVNode("section", _hoisted_53, [_createElementVNode("div", _hoisted_54, [_cache[26] || (_cache[26] = _createElementVNode("span", null, "â", -1)), _createElementVNode("div", null, [_cache[25] || (_cache[25] = _createElementVNode("h3", null, "ØØ§ÙØ© اÙ٠عÙÙÙ Ø©", -1)), _createElementVNode("small", null, "آخر تØÙÙ: " + _toDisplayString(shortDate(item.last_verified_at||item.updated_at)||'-'), 1)])]), _createElementVNode("p", null, _toDisplayString(item.verification_status==='verified'?'اÙ٠عÙÙÙ Ø© Ù ØØ¯Ø«Ø© ØØ³Ø¨ آخر تØÙÙ. ÙÙØ¶Ù٠تأÙÙØ¯ Ø§ÙØªÙاصÙÙ ÙØ¨Ù اتخاذ ÙØ±Ø§Ø± Ù ÙÙ .':'اÙ٠عÙÙÙ Ø© ØªØØªØ§Ø¬ تأÙÙØ¯Ø§Ù إضاÙÙØ§Ù ÙØ¨Ù Ø§ÙØ§Ø¹ØªÙ اد عÙÙÙØ§.'), 1)]), 5144 (related.length) 5145 ? (_openBlock(), _createElementBlock("section", _hoisted_55, [_cache[27] || (_cache[27] = _
5145createElementVNode("div", { class: "guideDetailSectionHead" }, [_createElementVNode("span", null, "ð"), _createElementVNode("div", null, [_createElementVNode("h3", null, "٠عÙÙ٠ات ٠رتبطة"), _createElementVNode("small", null, "Ø±ÙØ§Ø¨Ø· Ù ÙØ«ÙØ© ÙØ¯ تساعد٠ÙÙ ÙÙØ³ اÙÙ ÙØ¶Ùع أ٠اÙ٠دÙÙØ©")])], -1)), _createElementVNode("div", _hoisted_56, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(related, (x) => { 5146 return (_openBlock(), _createBlock(_component_router_link, { 5147 key: x.id, 5148 to: x.path, 5149 class: "guideCategoryCard searchGrowthRelatedCard" 5150 }, { 5151 default: _withCtx(() => [_createElementVNode("span", null, _toDisplayString((x.category_key==='markets'||(!x.category_key&&x.service_type==='markets'))?'ð¬':((x.category_key==='hotels'||(!x.category_key&&x.service_type==='hotels'))?'ð¨':((x.category_key==='restaurants'||(!x.category_key&&x.service_type==='restaurants'))?'ð½ï¸':'â'))), 1), _createElementVNode("b", null, _toDisplayString(x.title_ar), 1), _createElementVNode("small", null, [(x.city) 5152 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(_toDisplayString($cityLabel(x.city)) + " · ", 1)], 64)) 5153 : _createCommentVNode("", true), _createTextVNode(_toDisplayString(x.category_name_ar||'٠عÙÙÙ Ø© Ù ÙØ«ÙØ©'), 1)])]), 5154 _: 2 5155 }, 1032, ["to"])) 5156 }), 128))])])) 5157 : _createCommentVNode("", true), 5158 _createElementVNode("details", _hoisted_57, [_cache[28] || (_cache[28] = _createElementVNode("summary", null, "ÙÙ ØªÙØ¬Ø¯ ٠عÙÙÙ Ø© ØªØØªØ§Ø¬ تصØÙØØ§ÙØ", -1)), _withDirectives(_createElementVNode("textarea", { 5159 "onUpdate:modelValue": $event => ((reportText) = $event), 5160 placeholder: "Ø§ÙØªØ¨ اÙ٠عÙÙÙ Ø© Ø§ÙØ®Ø·Ø£ Ø£Ù Ø§ÙØªØØ¯ÙØ« اÙÙ Ø·ÙÙØ¨" 5161 }, null, 8, _hoisted_58), [[_vModelText, reportText]]), _createElementVNode("button", { 5162 class: "btn secondary", 5163 onClick: sendReport 5164 }, "Ø¥Ø±Ø³Ø§Ù Ø§ÙØ¨Ùاغ", 8, _hoisted_59)]) 5165 ], 64)) 5166 : _createCommentVNode("", true)]), 5167 _: 1 5168 }, 8, ["title"])) 5169 } 5170} 5171})() 5172 }; 5173 5174 const MemberLoginPage={ 5175 components:{PublicFrame}, 5176 setup(){ 5177 const store=useGzcStore(); const router=useRouter(); const route=useRoute(); 5178 const phone=ref(''); const code=ref(''); const otp=ref(false); const notRegistered=ref(false); 5179 const cooldown=useOtpCooldown(60); 5180 onMounted(()=>{ 5181 if(route.query&&route.query.phone)phone.value=String(route.query.phone||''); 5182 }); 5183 async function requestOtp(){ 5184 if(cooldown.remaining.value>0)return; 5185 notRegistered.value=false;store.state.busy=true;store.state.msg='جار٠إرسا٠ر٠ز Ø§ÙØªØÙÙ...'; 5186 const r=await api('/api/auth/request-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),purpose:'member_login'})}); 5187 store.state.busy=false;store.state.msg=r.message||r.error||'';otp.value=!!r.ok;notRegistered.value=!!r.not_registered;if(r.ok)cooldown.start(); 5188 } 5189 async function verifyOtp(){ 5190 store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø§ÙØªØÙÙ...'; 5191 const r=await api('/api/auth/verify-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),code:code.value,purpose:'member_login'})}); 5192 store.state.busy=false;store.state.msg=r.message||r.error||''; 5193 if(r.ok){ 5194 await store.loadMe(true);const mm=store.state.me&&store.state.me.member; 5195 let saved='';try{saved=sessionStorage.getItem('gzc_vue_next')||'';sessionStorage.removeItem('gzc_vue_next');}catch(e){} 5196 const target=profileNeedsCompletion(mm)?'/complete':safeMemberNext((route.query&&route.query.next)||saved,'/account'); 5197 router.replace(target); 5198 } 5199 } 5200 function openRegister(){router.push({path:'/register',query:phone.value?{phone:norm(phone.value)}:{}});} 5201 function applyPrefix(prefix){phone.value=withCountryCode(phone.value,prefix);} 5202 return {store,phone,code,otp,notRegistered,cooldown,requestOtp,verifyOtp,openRegister,applyPrefix}; 5203 }, 5204 render:(function(){ 5205const _Vue = Vue
5206const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 5207 5208const _hoisted_1 = { class: "card authCard" } 5209const _hoisted_2 = ["onUpdate:modelValue"] 5210const _hoisted_3 = { 5211 class: "countryCodeAssist", 5212 "aria-label": "Ø§Ø®ØªÙØ§Ø± Ù ÙØªØ§Ø Ø§ÙØ¯ÙÙØ©" 5213} 5214const _hoisted_4 = ["onClick"] 5215const _hoisted_5 = ["onClick"] 5216const _hoisted_6 = ["disabled", "onClick"] 5217const _hoisted_7 = ["onUpdate:modelValue"] 5218const _hoisted_8 = ["disabled", "onClick"] 5219const _hoisted_9 = ["onClick"] 5220const _hoisted_10 = { 5221 key: 1, 5222 class: "hint warningText" 5223} 5224 5225return function render(_ctx, _cache) { 5226 with (_ctx) { 5227 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, toDisplayString: _toDisplayString, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 5228 5229 const _component_PublicFrame = _resolveComponent("PublicFrame") 5230 5231 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "دخÙÙ Ø§ÙØ¹Ø¶ÙÙØ©" }, { 5232 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [ 5233 _cache[2] || (_cache[2] = _createElementVNode("h3", null, "Ù Ø±ØØ¨Ø§Ù Ø¨Ø¹ÙØ¯ØªÙ", -1)), 5234 _cache[3] || (_cache[3] = _createElementVNode("p", { class: "hint" }, "أدخ٠رÙÙ ÙØ§ØªØ³Ø§Ø¨ اÙ٠رتبط بعضÙÙØªÙ ÙØ§Ø³ØªÙا٠ر٠ز Ø§ÙØªØÙÙ.", -1)), 5235 _cache[4] || (_cache[4] = _createElementVNode("label", { 5236 class: "fieldLabel", 5237 for: "member-login-phone" 5238 }, "رÙÙ ÙØ§ØªØ³Ø§Ø¨ ٠ع Ù ÙØªØ§Ø Ø§ÙØ¯ÙÙØ©", -1)), 5239 _withDirectives(_createElementVNode("input", { 5240 id: "member-login-phone", 5241 class: "ltr", 5242 "onUpdate:modelValue": $event => ((phone) = $event), 5243 inputmode: "tel", 5244 autocomplete: "tel", 5245 placeholder: "٠ثاÙ: 86138xxxxxxxx" 5246 }, null, 8, _hoisted_2), [[_vModelText, phone]]), 5247 _createElementVNode("div", _hoisted_3, [_createElementVNode("button", { 5248 type: "button", 5249 onClick: $event => (applyPrefix('86')) 5250 }, "+86 Ø§ÙØµÙÙ", 8, _hoisted_4), _createElementVNode("button", { 5251 type: "button", 5252 onClick: $event => (applyPrefix('249')) 5253 }, "+249 Ø§ÙØ³ÙداÙ", 8, _hoisted_5)]), 5254 _createElementVNode("button", { 5255 class: "btn loadMore", 5256 disabled: store.state.busy || cooldown.remaining.value>0, 5257 onClick: requestOtp 5258 }, _toDisplayString(cooldown.remaining.value?'إعادة Ø§ÙØ¥Ø±Ø³Ø§Ù Ø®ÙØ§Ù '+cooldown.remaining.value+' ثاÙÙØ©':(otp?'إعادة Ø¥Ø±Ø³Ø§Ù Ø§ÙØ±Ù ز':'إرسا٠ر٠ز Ø§ÙØªØÙÙ')), 9, _hoisted_6), 5259 otp 5260 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 5261 _cache[0] || (_cache[0] = _createElementVNode("label", { 5262 class: "fieldLabel", 5263 for: "member-login-code" 5264 }, "ر٠ز Ø§ÙØªØÙÙ", -1)), 5265 _withDirectives(_createElementVNode("input", { 5266 id: "member-login-code", 5267 class: "ltr otpInput", 5268 "onUpdate:modelValue": $event => ((code) = $event), 5269 inputmode: "numeric", 5270 autocomplete: "one-time-code", 5271 maxlength: "6", 5272 placeholder: "6 Ø£Ø±ÙØ§Ù " 5273 }, null, 8, _hoisted_7), [[_vModelText, code]]), 5274 _createElementVNode("button", { 5275 class: "btn loadMore", 5276 disabled: store.state.busy, 5277 onClick: verifyOtp 5278 }, "تسجÙÙ Ø§ÙØ¯Ø®ÙÙ", 8, _hoisted_8), 5279 _cache[1] || (_cache[1] = _createElementVNode("p", { class: "hint" }, "ØµÙØ§ØÙØ© Ø§ÙØ±Ù ز 5 Ø¯ÙØ§Ø¦ÙØ ÙØ§ÙØØ¯ Ø§ÙØ£Ùص٠3 Ù ØØ§ÙÙØ§Øª.", -1)) 5280 ], 64)) 5281 : _createCommentVNode("", true), 5282 _cache[5] || (_cache[5] = _createElementVNode("div", { class: "authDivider" }, [_createElementVNode("span", null, "ÙÙØ³ ÙØ¯Ù٠عضÙÙØ©Ø")], -1)), 5283 _createElementVNode("button", { 5284 class: "btn secondary loadMore", 5285 onClick: openRegister 5286 }, "Ø·ÙØ¨ عضÙÙØ© Ø¬Ø¯ÙØ¯Ø©", 8, _hoisted_9), 5287 notRegistered 5288 ? (_openBlock(), _createElementBlock("p", _hoisted_10, "رÙÙ Ù ØºÙØ± ٠سجÙ. ابدأ Ø·ÙØ¨ عضÙÙØ© Ø¬Ø¯ÙØ¯Ø© Ù Ù Ø§ÙØ²Ø± Ø£Ø¹ÙØ§Ù.")) 5289 : _createCommentVNode("", true) 5290 ])]), 5291 _: 1 5292 })) 5293 } 5294} 5295})() 5296 }; 5297 5298 5299 const MemberRegisterPage={ 5300 components:{PublicFrame}, 5301 setup(){ 5302 const store=useGzcStore(); const router=useRouter(); const route=useRoute(); 5303 const phone=ref(String((route.query&&route.query.phone)||'')); const code=ref(''); const otp=ref(false); const existing=ref(false); 5304 const cooldown=useOtpCooldown(60); 5305 async function requestOtp(){ 5306 if(cooldown.remaining.value>0)return; 5307 existing.value=false;store.state.busy=true;store.state.msg='جار٠إرسا٠ر٠ز Ø§ÙØªØÙÙ...'; 5308 const r=await api('/api/auth/request-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),purpose:'member_register'})}); 5309 store.state.busy=false;store.state.msg=r.message||r.error||'';otp.value=!!r.ok;existing.value=!!r.existing;if(r.ok)cooldown.start(); 5310 } 5311 async function verifyOtp(){ 5312 store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø¥ÙØ´Ø§Ø¡ Ø·ÙØ¨ Ø§ÙØ¹Ø¶ÙÙØ©...'; 5313 const r=await api('/api/auth/verify-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),code:code.value,purpose:'member_register'})}); 5314 store.state.busy=false;store.state.msg=r.message||r.error||''; 5315 if(r.ok){await store.loadMe(true);router.replace(r.redirect||'/complete');} 5316 } 5317 function openLogin(){router.push({path:'/login',query:phone.value?{phone:norm(phone.value)}:{}});} 5318 function applyPrefix(prefix){phone.value=withCountryCode(phone.value,prefix);} 5319 return {store,phone,code,otp,existing,cooldown,requestOtp,verifyOtp,openLogin,applyPrefix}; 5320 }, 5321 render:(function(){ 5322const _Vue = Vue
5323const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 5324 5325const _hoisted_1 = { class: "card authCard" } 5326const _hoisted_2 = ["onUpdate:modelValue"] 5327const _hoisted_3 = { 5328 class: "countryCodeAssist", 5329 "aria-label": "Ø§Ø®ØªÙØ§Ø± Ù ÙØªØ§Ø Ø§ÙØ¯ÙÙØ©" 5330} 5331const _hoisted_4 = ["onClick"] 5332const _hoisted_5 = ["onClick"] 5333const _hoisted_6 = ["disabled", "onClick"] 5334const _hoisted_7 = ["onUpdate:modelValue"] 5335const _hoisted_8 = ["disabled", "onClick"] 5336const _hoisted_9 = ["onClick"] 5337const _hoisted_10 = { 5338 key: 1, 5339 class: "hint warningText" 5340} 5341 5342return function render(_ctx, _cache) { 5343 with (_ctx) { 5344 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, toDisplayString: _toDisplayString, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 5345 5346 const _component_PublicFrame = _resolveComponent("PublicFrame") 5347 5348 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø·ÙØ¨ عضÙÙØ© Ø¬Ø¯ÙØ¯Ø©" }, { 5349 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [ 5350 _cache[2] || (_cache[2] = _createElementVNode("h3", null, "ابدأ Ø·ÙØ¨ Ø§ÙØ¹Ø¶ÙÙØ©", -1)), 5351 _cache[3] || (_cache[3] = _createElementVNode("p", { class: "hint" }, "تØÙ٠٠٠رÙÙ ÙØ§ØªØ³Ø§Ø¨ Ø£ÙÙØ§ÙØ Ø«Ù Ø£ÙÙ Ù Ø¨ÙØ§ÙØ§ØªÙ ÙØ£Ø±Ø³Ù Ø§ÙØ·Ùب ÙÙ٠راجعة.", -1)), 5352 _cache[4] || (_cache[4] = _createElementVNode("div", { class: "stepPills" }, [_createElementVNode("span", { class: "active" }, "1 Ø§ÙØªØÙÙ"), _createElementVNode("span", null, "2 Ø§ÙØ¨ÙØ§ÙØ§Øª"), _createElementVNode("span", null, "3 اÙ٠راجعة")], -1)), 5353 _cache[5] || (_cache[5] = _createElementVNode("label", { 5354 class: "fieldLabel", 5355 for: "member-register-phone" 5356 }, "رÙÙ ÙØ§ØªØ³Ø§Ø¨ ٠ع Ù ÙØªØ§Ø Ø§ÙØ¯ÙÙØ©", -1)), 5357 _withDirectives(_createElementVNode("input", { 5358 id: "member-register-phone", 5359 class: "ltr", 5360 "onUpdate:modelValue": $event => ((phone) = $event), 5361 inputmode: "tel", 5362 autocomplete: "tel", 5363 placeholder: "٠ثاÙ: 86138xxxxxxxx" 5364 }, null, 8, _hoisted_2), [[_vModelText, phone]]), 5365 _createElementVNode("div", _hoisted_3, [_createElementVNode("button", { 5366 type: "button", 5367 onClick: $event => (applyPrefix('86')) 5368 }, "+86 Ø§ÙØµÙÙ", 8, _hoisted_4), _createElementVNode("button", { 5369 type: "button", 5370 onClick: $event => (applyPrefix('249')) 5371 }, "+249 Ø§ÙØ³ÙداÙ", 8, _hoisted_5)]), 5372 _createElementVNode("button", { 5373 class: "btn loadMore", 5374 disabled: store.state.busy || cooldown.remaining.value>0, 5375 onClick: requestOtp 5376 }, _toDisplayString(cooldown.remaining.value?'إعادة Ø§ÙØ¥Ø±Ø³Ø§Ù Ø®ÙØ§Ù '+cooldown.remaining.value+' ثاÙÙØ©':(otp?'إعادة Ø¥Ø±Ø³Ø§Ù Ø§ÙØ±Ù ز':'إرسا٠ر٠ز Ø§ÙØªØÙÙ')), 9, _hoisted_6), 5377 otp 5378 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 5379 _cache[0] || (_cache[0] = _createElementVNode("label", { 5380 class: "fieldLabel", 5381 for: "member-register-code" 5382 }, "ر٠ز Ø§ÙØªØÙÙ", -1)), 5383 _withDirectives(_createElementVNode("input", { 5384 id: "member-register-code", 5385 class: "ltr otpInput", 5386 "onUpdate:modelValue": $event => ((code) = $event), 5387 inputmode: "numeric", 5388 autocomplete: "one-time-code", 5389 maxlength: "6", 5390 placeholder: "6 Ø£Ø±ÙØ§Ù " 5391 }, null, 8, _hoisted_7), [[_vModelText, code]]), 5392 _createElementVNode("button", { 5393 class: "btn loadMore", 5394 disabled: store.state.busy, 5395 onClick: verifyOtp 5396 }, "تØÙÙ ÙØ§Ø¨Ø¯Ø£ Ø§ÙØªØ³Ø¬ÙÙ", 8, _hoisted_8), 5397 _cache[1] || (_cache[1] = _createElementVNode("p", { class: "hint" }, "ØµÙØ§ØÙØ© Ø§ÙØ±Ù ز 5 Ø¯ÙØ§Ø¦ÙØ ÙØ§ÙØØ¯ Ø§ÙØ£Ùص٠3 Ù ØØ§ÙÙØ§Øª.", -1)) 5398 ], 64)) 5399 : _createCommentVNode("", true), 5400 _cache[6] || (_cache[6] = _createElementVNode("div", { class: "authDivider" }, [_createElementVNode("span", null, "ÙØ¯Ù٠عضÙÙØ© باÙÙØ¹ÙØ")], -1)), 5401 _createElementVNode("button", { 5402 class: "btn secondary loadMore", 5403 onClick: openLogin 5404 }, "Ø§ÙØ¹Ùدة Ø¥Ù٠تسجÙÙ Ø§ÙØ¯Ø®ÙÙ", 8, _hoisted_9), 5405 existing 5406 ? (_openBlock(), _createElementBlock("p", _hoisted_10, "ÙØ°Ø§ Ø§ÙØ±Ù٠٠سج٠باÙÙØ¹Ù. استخد٠تسجÙÙ Ø§ÙØ¯Ø®ÙÙ.")) 5407 : _createCommentVNode("", true) 5408 ])]), 5409 _: 1 5410 })) 5411 } 5412} 5413})() 5414 }; 5415 5416 const PublicAccountPage={ 5417 components:{PublicFrame}, 5418 setup(){ 5419 const store=useGzcStore();const router=useRouter();const file=ref(null);const fileName=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©');const photo=ref(''); 5420 const m=computed(()=>store.state.me&&store.state.me.member?store.state.me.member:null); 5421 const canComplete=computed(()=>profileNeedsCompletion(m.value)); 5422 const canViewCard=computed(()=>canShowMemberCard(m.value)); 5423 const ordersShortcutVisible=computed(()=>!!(m.value&&m.value.show_orders_navigation)); 5424 const cardSrc=computed(()=>canViewCard.value?'/api/member/card-image?v='+encodeURIComponent(((m.value&&(m.value.photo_card_url||m.value.photo_profile_url||m.value.photo_url))||(m.value&&m.value.gzc_id)||'')+'-'+Date.now()):''); 5425 const cardLink=computed(()=>canViewCard.value&&m.value&&m.value.gzc_id?'/member-card/'+encodeURIComponent(m.value.gzc_id):''); 5426 function saveMyCard(){if(!canViewCard.value){if(canComplete.value){store.state.msg='Ø£ÙÙ Ù Ø¨ÙØ§Ùات٠أÙÙØ§Ù ÙØ¨Ù ØÙظ Ø§ÙØ¨Ø·Ø§ÙØ©';router.push('/complete');}else store.state.msg='Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© ØªØ¸ÙØ± بعد اعت٠اد Ø§ÙØ¹Ø¶ÙÙØ© ÙØ¥ØµØ¯Ø§Ø± Ø§ÙØ±ÙÙ ';return;}saveCardPng(cardSrc.value,m.value.gzc_id,store);} 5427 onMounted(async()=>
5427{if(await store.requireMember(router,'/account')){const [r]=await Promise.all([api('/api/member/engagement'),store.loadMemberNotifications('all',8),store.loadMemberWorkflowSummary()]);if(r&&r.ok)store.state.engagement=r;}}); 5428 function onFile(e){file.value=e.target.files&&e.target.files[0]?e.target.files[0]:null;fileName.value=file.value?file.value.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';photo.value=file.value?URL.createObjectURL(file.value):'';} 5429 async function uploadPhoto(){if(!file.value){store.state.msg='اختر ØµÙØ±Ø© Ø£ÙÙØ§Ù';return;}const fd=new FormData();fd.append('file',file.value);store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø±ÙØ¹ Ø§ÙØµÙرة...';const r=await uploadApi('/api/member/photo',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ØµÙØ±Ø© Ø§ÙØØ³Ø§Ø¨'});store.state.busy=false;store.state.msg=r.message||r.error||'';file.value=null;fileName.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';photo.value='';await store.loadMe();} 5430 async function removePhoto(){if(!m.value||!(m.value.photo_profile_url||m.value.photo_url)){store.state.msg='ÙØ§ ØªÙØ¬Ø¯ ØµÙØ±Ø© Ù ØÙÙØ¸Ø©';return;}if(!confirm('ØØ°Ù ØµÙØ±ØªÙ Ù Ù Ù ÙÙ Ø§ÙØ¹Ø¶ÙÙØ©Ø'))return;store.state.busy=true;const r=await api('/api/member/photo/remove',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await store.loadMe();} 5431 async function openAccountNotification(n){if(!n)return;if(!n.read_at){const r=await api('/api/member/notifications/'+encodeURIComponent(n.id)+'/read',{method:'POST',body:'{}'});if(r&&r.ok){n.read_at=r.notification&&r.notification.read_at||new Date().toISOString();store.state.memberUnread=Math.max(0,Number(store.state.memberUnread||0)-1);}}if(n.order_id)router.push('/orders?order='+encodeURIComponent(n.order_id));else if(n.request_id)router.push('/procurement?request='+encodeURIComponent(n.request_id));else router.push('/notifications');} 5432 async function setOrdersShortcutVisible(value){const next=!!value;const r=await runBusyAction(store,'member-preferences.orders-navigation',()=>api('/api/member/preferences/navigation',{method:'POST',body:JSON.stringify({show_orders_navigation:next})}));store.state.msg=r.message||r.error||'';if(r&&r.ok){if(store.state.me&&store.state.me.member)store.state.me.member.show_orders_navigation=next;await store.loadMe();}} 5433 return {store,router,m,statusName,onFile,uploadPhoto,removePhoto,openAccountNotification,setOrdersShortcutVisible,ordersShortcutVisible,fileName,photo,canComplete,canViewCard,cardSrc,cardLink,saveMyCard,shortDate}; 5434 }, 5435 render:(function(){ 5436const _Vue = Vue 5437const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 5438 5439const _hoisted_1 = { 5440 key: 0, 5441 class: "card accountOperationsHub accountOperationsPrimary" 5442} 5443const _hoisted_2 = { class: "memberSectionHead" } 5444const _hoisted_3 = ["onClick"] 5445const _hoisted_4 = { key: 0 } 5446const _hoisted_5 = { class: "accountOperationsGrid" } 5447const _hoisted_6 = ["onClick"] 5448const _hoisted_7 = ["onClick"] 5449const _hoisted_8 = ["onClick"] 5450const _hoisted_9 = { 5451 key: 1, 5452 class: "card myChinaAccountLaunch" 5453} 5454const _hoisted_10 = { class: "memberSectionHead" } 5455const _hoisted_11 = ["onClick"] 5456const _hoisted_12 = { class: "dailyQuickRow" } 5457const _hoisted_13 = ["onClick"] 5458const _hoisted_14 = ["onClick"] 5459const _hoisted_15 = ["onClick"] 5460const _hoisted_16 = { 5461 key: 2, 5462 class: "card accountNotificationsPreview" 5463} 5464const _hoisted_17 = { class: "memberSectionHead" } 5465const _hoisted_18 = ["onClick"] 5466const _hoisted_19 = ["onClick"] 5467const _hoisted_20 = { 5468 key: 3, 5469 class: "card accountPreferenceCard" 5470} 5471const _hoisted_21 = { class: "memberSectionHead" } 5472const _hoisted_22 = ["aria-pressed", "onClick"] 5473const _hoisted_23 = { class: "accountPreferenceActions" } 5474const _hoisted_24 = ["onClick"] 5475const _hoisted_25 = ["onClick"] 5476const _hoisted_26 = { 5477 key: 4, 5478 class: "card pointsCard compactPointsCard" 5479} 5480const _hoisted_27 = { class: "memberCardTop" } 5481const _hoisted_28 = { class: "miniStats mediaMini" } 5482const _hoisted_29 = ["onClick"] 5483const _hoisted_30 = { 5484 key: 5,
5485 class: "card skeleton" 5486} 5487const _hoisted_31 = { 5488 key: 6, 5489 class: "card profileCard dataProfile" 5490} 5491const _hoisted_32 = { class: "accountPhotoHero" } 5492const _hoisted_33 = ["src"] 5493const _hoisted_34 = { 5494 key: 1, 5495 class: "avatar placeholder" 5496} 5497const _hoisted_35 = { 5498 key: 2, 5499 class: "statusPill" 5500} 5501const _hoisted_36 = { class: "infoGrid" } 5502const _hoisted_37 = { class: "uploadBox uploadBoxPro photoManagerCard" } 5503const _hoisted_38 = { class: "filePicker" } 5504const _hoisted_39 = ["onChange"] 5505const _hoisted_40 = { class: "row" } 5506const _hoisted_41 = ["onClick"] 5507const _hoisted_42 = ["onClick"] 5508const _hoisted_43 = { 5509 key: 0, 5510 class: "accountMembershipCard" 5511} 5512const _hoisted_44 = ["src"] 5513const _hoisted_45 = { class: "cardSaveActions" } 5514const _hoisted_46 = ["onClick"] 5515const _hoisted_47 = ["href"] 5516const _hoisted_48 = { 5517 key: 1, 5518 class: "completeRequiredCard" 5519} 5520const _hoisted_49 = ["onClick"] 5521const _hoisted_50 = { 5522 key: 2, 5523 class: "completeRequiredCard" 5524} 5525const _hoisted_51 = { 5526 key: 3, 5527 class: "completeRequiredCard" 5528} 5529const _hoisted_52 = { class: "row" } 5530const _hoisted_53 = ["onClick"] 5531const _hoisted_54 = ["onClick"] 5532const _hoisted_55 = ["onClick"] 5533 5534return function render(_ctx, _cache) { 5535 with (_ctx) { 5536 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 5537 5538 const _component_PublicFrame = _resolveComponent("PublicFrame") 5539 5540 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "ØØ³Ø§Ø¨Ù" }, { 5541 default: _withCtx(() => [ 5542 (m&&m.status==='approved') 5543 ? (_openBlock(), _createElementBlock("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ù Ø±ÙØ² اÙ٠تابعة"), _createElementVNode("h3", null, "Ø·ÙØ¨Ø§ØªÙ ÙØ¥Ø´Ø¹Ø§Ø±Ø§ØªÙ"), _createElementVNode("p", { class: "hint" }, "Ù٠٠ا ÙØØªØ§Ø¬ Ø§ÙØªØ¨Ø§ÙÙ ÙØ¸Ùر ÙÙØ§ Ø£ÙÙØ§Ù.")], -1)), _createElementVNode("button", { 5544 class: _normalizeClass(["accountBellAction", {attention:store.state.memberUnread}]), 5545 onClick: $event => ($router.push('/notifications')), 5546 "aria-label": "ÙØªØ Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª" 5547 }, [_cache[0] || (_cache[0] = _createElementVNode("span", null, "ð", -1)), (store.state.memberUnread) 5548 ? (_openBlock(), _createElementBlock("b", _hoisted_4, _toDisplayString(store.state.memberUnread>99?'99+':store.state.memberUnread), 1)) 5549 : _createCommentVNode("", true)], 10, _hoisted_3)]), _createElementVNode("div", _hoisted_5, [ordersShortcutVisible 5550 ? (_openBlock(), _createElementBlock("button", { 5551 key: 0, 5552 onClick: $event => ($router.push('/orders')) 5553 }, [_cache[2] || (_cache[2] = _createElementVNode("span", null, "ð§¾", -1)), _cache[3] || (_cache[3] = _createElementVNode("b", null, "Ø·ÙØ¨Ø§ØªÙ", -1)), _createElementVNode("small", null, _toDisplayString(store.state.memberWorkflowSummary.total||0) + " Ø·ÙØ¨ · " + _toDisplayString(store.state.memberWorkflowSummary.needs_action||0) + " ÙØØªØ§Ø¬ إجراء", 1)], 8, _hoisted_6)) 5554 : _createCommentVNode("", true), _createElementVNode("button", { onClick: $event => ($router.push('/procurement/new')) }, _cache[4] || (_cache[4] = [_createElementVNode("span", null, "ï¼", -1), _createElementVNode("b", null, "Ø·ÙØ¨ Ø¬Ø¯ÙØ¯", -1), _createElementVNode("small", null, "Ø·ÙØ¨ Ø¹Ø±Ø¶Ø Ø¨ØØ« Ù ÙØ±Ø¯ أ٠خد٠ة ØªÙØ±Ùد", -1)]), 8, _hoisted_7), _createElementVNode("button", { onClick: $event => ($router.push('/wallet')) }, _cache[5] || (_cache[5] = [_createElementVNode("span", null, "â", -1), _createElementVNode("b", null, "Ù ØÙظتÙ", -1), _createElementVNode("small", null, "Ø±ØµÙØ¯ SMT ٠ستÙ٠ع٠ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©", -1)]), 8, _hoisted_8)])])) 5555 : _createCommentVNode("", true), 5556 (m&&m.status==='approved') 5557 ? (_openBlock(), _createElementBlock("section", _hoisted_9, [_createElementVNode("div", _hoisted_10, [_cache[6] || (_cache[6] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "SMT China ÙÙÙ ÙØ§Ù"), _createElementVNode("h3", null, "My China"), _createElementVNode("p", { class: "hint" }, "٠دÙÙØªÙØ Ø§ÙØªØ¹Ù ÙÙ Ø§ØªØ Ø§ÙÙ Ø¹Ø§Ø±Ø¶Ø Ø§ÙØ£Ø¯Ùات.")
5557], -1)), _createElementVNode("button", { 5558 class: "smallbtn", 5559 onClick: $event => ($router.push('/my-china')) 5560 }, "ÙØªØ My China", 8, _hoisted_11)]), _createElementVNode("div", _hoisted_12, [_createElementVNode("button", { onClick: $event => ($router.push('/new-to-china')) }, "ð§ Ø£Ùا Ø¬Ø¯ÙØ¯", 8, _hoisted_13), _createElementVNode("button", { onClick: $event => ($router.push('/ask')) }, "⦠اسأ٠SMT", 8, _hoisted_14), _createElementVNode("button", { onClick: $event => ($router.push('/notification-settings')) }, "ð Ø§ÙØªÙبÙÙØ§Øª", 8, _hoisted_15)])])) 5561 : _createCommentVNode("", true), 5562 (m&&m.status==='approved'&&store.state.memberNotifications.length) 5563 ? (_openBlock(), _createElementBlock("section", _hoisted_16, [_createElementVNode("div", _hoisted_17, [_cache[7] || (_cache[7] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "آخر Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª"), _createElementVNode("h3", null, "آخر Ø§ÙØªØØ¯Ùثات")], -1)), _createElementVNode("button", { 5564 class: "smallbtn secondary", 5565 onClick: $event => ($router.push('/notifications')) 5566 }, "عرض اÙÙÙ", 8, _hoisted_18)]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.memberNotifications.slice(0,3), (n) => { 5567 return (_openBlock(), _createElementBlock("button", { 5568 class: _normalizeClass(["accountNotificationRow", {unread:!n.read_at}]), 5569 key: n.id, 5570 onClick: $event => (openAccountNotification(n)) 5571 }, [_cache[8] || (_cache[8] = _createElementVNode("span", { class: "accountNotificationDot" }, null, -1)), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(n.title), 1), _createElementVNode("small", null, _toDisplayString(n.order_code||n.request_code) + " · " + _toDisplayString(shortDate(n.created_at)), 1)]), _cache[9] || (_cache[9] = _createElementVNode("strong", null, "ÙØªØ â", -1))], 10, _hoisted_19)) 5572 }), 128))])) 5573 : _createCommentVNode("", true), 5574 (m&&m.status==='approved') 5575 ? (_openBlock(), _createElementBlock("section", _hoisted_20, [_createElementVNode("div", _hoisted_21, [_cache[11] || (_cache[11] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ØªØ®ØµÙØµ اÙÙØ§Ø¬ÙØ©"), _createElementVNode("h3", null, "ظÙÙØ± Â«Ø·ÙØ¨Ø§ØªÙ»"), _createElementVNode("p", { class: "hint" }, "Ù Ø®ÙÙ Ø§ÙØªØ±Ø§Ø¶ÙاÙ. ÙØ¹ÙÙ٠إذا أردت اختصار Â«Ø·ÙØ¨Ø§ØªÙ» ÙÙ Ø§ÙØ±Ø¦ÙØ³ÙØ© ÙØ´Ø±ÙØ· Ø§ÙØªÙÙÙ. Ø§ÙØ¥Ø®Ùاء ÙØ§ ÙØØ°Ù Ø£Ù Ø·ÙØ¨ ÙÙØ§ ÙÙ ÙØ¹ ÙØªØÙ Ù Ù Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª.")], -1)), _createElementVNode("button", { 5576 type: "button", 5577 class: _normalizeClass(["accountPreferenceSwitch", {on:ordersShortcutVisible}]), 5578 "aria-pressed": ordersShortcutVisible?'true':'false', 5579 onClick: $event => (setOrdersShortcutVisible(!ordersShortcutVisible)) 5580 }, [_cache[10] || (_cache[10] = _createElementVNode("span", null, null, -1)), _createElementVNode("b", null, _toDisplayString(ordersShortcutVisible?'Ø¸Ø§ÙØ±':'Ù Ø®ÙÙ'), 1)], 10, _hoisted_22)]), _createElementVNode("div", _hoisted_23, [_createElementVNode("button", { 5581 class: "smallbtn secondary", 5582 onClick: $event => ($router.push('/orders')) 5583 }, "ÙØªØ Ø·ÙØ¨Ø§ØªÙ Ø§ÙØ¢Ù", 8, _hoisted_24), _createElementVNode("button", { 5584 class: "smallbtn", 5585 onClick: $event => (setOrdersShortcutVisible(!ordersShortcutVisible)) 5586 }, _toDisplayString(ordersShortcutVisible?'Ø¥Ø®ÙØ§Ø¡ ٠٠اÙÙØ§Ø¬ÙØ©':'Ø¥Ø¸ÙØ§Ø± Ù٠اÙÙØ§Ø¬ÙØ©'), 9, _hoisted_25)])])) 5587 : _createCommentVNode("", true), 5588 (store.state.engagement) 5589 ? (_openBlock(), _createElementBlock("section", _hoisted_26, [_createElementVNode("div", _hoisted_27, [_createElementVNode("div", null, [_cache[12] || (_cache[12] = _createElementVNode("span", { class: "vueBadge" }, "ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©", -1)), _createElementVNode("h3", null, _toDisplayString(store.state.engagement.total_points || 0) + " ÙÙØ·Ø© Ù Ø´Ø§Ø±ÙØ©", 1), _cache[13] || (_cache[13] = _createElementVNode("p", { class: "hint" }, "ÙÙØ§Ø· ØªÙØ¯ÙØ±ÙØ© ÙÙÙ Ø´Ø§Ø±ÙØ© اÙÙ Ø¬ØªÙ Ø¹ÙØ©Ø ٠ستÙÙØ© ع٠اÙÙ ØÙظة. ÙÙØ³Øª Ù Ø§ÙØ§Ù ÙÙØ§ Ø±ØµÙØ¯Ø§Ù ÙÙØ¯ÙاÙ.", -1))]), _cache[14] || (_cache[14] = _createElementVNode("span", null, "â", -1))]), _createElementVNode("div", _hoisted_28, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(store.state.engagement.suggestions || 0), 1), _cache[15] || (_cache[15] = _createElementVNode("small", null, "Ø§ÙØªØ±Ø§ØØ§Øª", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(store.state.engagement.rank || '-'), 1), _cache[16] || (_cache[16] = _createElementVNode("small", null, "Ø§ÙØªØ±ØªÙب", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString((store.state.engagement.recent||[]).length), 1), _cache[17] || (_cache[17] = _createElementVNode("small", null, "ØØ±Ùات", -1))])]), _createElementVNode("button", { 5590 class: "smallbtn secondary", 5591 onClick: $event => ($router.push('/china-guide')) 5592 }, "Ø§ÙØªØ±Ø Ù ÙØ§Ù Ù٠دÙÙÙ Ø§ÙØµÙÙ", 8, _hoisted_29)])) 5593 : _createCommentVNode("", true), 5594 (!m) 5595 ? (_openBlock(), _createElementBlock("div", _hoisted_30, "جار٠تØÙ ÙÙ Ø§ÙØØ³Ø§Ø¨...")) 5596 : (_openBlock(), _createElementBlock("div", _hoisted_31, [ 5597 _createElementVNode("div", _hoisted_32, [(photo || $memberPhoto(m,'profile')) 5598 ? (_openBlock(), _createElementBlock("img", { 5599 key: 0, 5600 class: "avatar", 5601 src: photo || $memberPhoto(m,'profile'), 5602 alt: "ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù" 5603 }, null, 8, _hoisted_33)) 5604 : (_openBlock(), _createElementBlock("div", _hoisted_34, "ð¤")), photo 5605 ? (_openBlock(), _createElementBlock("span", _hoisted_35, "٠عاÙÙØ© ÙØ¨Ù Ø§ÙØ±Ùع")) 5606 : _createCommentVNode("", true)]), 5607 _createElementVNode("h3", null, _toDisplayString(m.full_name || 'ØØ³Ø§Ø¨ عضÙ'), 1), 5608 _cache[35] || (_cache[35] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ù ØµÙØØ© ØØ³Ø§Ø¨Ù ÙØ¨ÙØ§ÙØ§ØªÙ Ø§ÙØ´Ø®ØµÙØ© ÙØ¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©.", -1)), 5609 _cache[36] || (_cache[36] = _createElementVNode("details", { class: "memberUseDetails" }, [_createElementVNode("summary", null, "ÙÙ٠أستخد٠اÙÙ ÙØµØ©Ø"), _createElementVNode("div", { class: "usageList" }, [ 5610 _createElementVNode("span", null, "ðªª Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© Ù ÙØ¬Ùدة Ø¯Ø§Ø®Ù ØØ³Ø§Ø¨Ù ÙÙÙ ÙÙ ØÙØ¸ÙØ§ ÙØµÙرة."), 5611 _createElementVNode("span", null, "ð£ ØªØ§Ø¨Ø¹ Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª ÙØ§Ùتع٠Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©."), 5612 _createElementVNode("span", null, "ð Ø´Ù٠اÙÙØ¹Ø§ÙÙØ§Øª ÙØ£ÙبÙ٠ات Ø§ÙØµÙر."), 5613 _createElementVNode("span", null, "ð§ Ø§Ø³ØªØ®Ø¯Ù دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ ÙÙØ®Ø¯Ù ات ÙØ§Ù٠عÙÙ٠ات."), 5614 _createElementVNode("span", null, "ð Ø§ÙØªØ Ø·ÙØ¨ ٠ساعدة Ø£Ù Ø·ÙØ§Ø±Ø¦ Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©.") 5615 ])], -1)), 5616 _createElementVNode("div", _hoisted_36, [ 5617 _createElementVNode("p", null, [_cache[18] || (_cache[18] = _createElementVNode("b", null, "Ø§ÙØØ§ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(statusName(m.status)), 1)]), 5618 _createElementVNode("p", null, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "رÙÙ Ø§ÙØ¹Ø¶ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(m.gzc_id || '-'), 1)]), 5619 _createElementVNode("p", null, [_cache[20] || (_cache[20] = _createElementVNode("b", null, "ÙØ§ØªØ³Ø§Ø¨:", -1)), _createTextVNode(" " + _toDisplayString(m.whatsapp || '-'), 1)]), 5620 _createElementVNode("p", null, [_cache[21] || (_cache[21] = _createElementVNode("b", null, "ÙØ§ØªÙ Ø§ÙØµÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(m.china_ph
5620one || '-'), 1)]), 5621 _createElementVNode("p", null, [_cache[22] || (_cache[22] = _createElementVNode("b", null, "اÙ٠دÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString($cityLabel(m.china_city) || '-'), 1)]), 5622 _createElementVNode("p", null, [_cache[23] || (_cache[23] = _createElementVNode("b", null, "Ø§ÙØÙ:", -1)), _createTextVNode(" " + _toDisplayString(m.china_district || '-'), 1)]), 5623 _createElementVNode("p", null, [_cache[24] || (_cache[24] = _createElementVNode("b", null, "ÙØ¦Ø© Ø§ÙØ¹Ø¶ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(m.category || '-'), 1)]), 5624 _createElementVNode("p", null, [_cache[25] || (_cache[25] = _createElementVNode("b", null, "اÙÙ ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(m.profession || '-'), 1)]) 5625 ]), 5626 _createElementVNode("div", _hoisted_37, [ 5627 _cache[27] || (_cache[27] = _createElementVNode("b", null, "ØªØØ¯ÙØ« ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù", -1)), 5628 _cache[28] || (_cache[28] = _createElementVNode("p", { class: "hint" }, "Ø³ÙØªÙ ضبط Ø§ÙØµÙرة تÙÙØ§Ø¦ÙØ§Ù ÙØªÙاسب ØØ³Ø§Ø¨ÙØ Ø¨Ø·Ø§ÙØªÙØ ÙÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ø¶ÙÙØ§Øª Ø¹ÙØ¯ Ø§ÙØ¥Ø¯Ø§Ø±Ø©.", -1)), 5629 _createElementVNode("label", _hoisted_38, [_createElementVNode("input", { 5630 type: "file", 5631 accept: "image/*", 5632 onChange: onFile 5633 }, null, 40, _hoisted_39), _cache[26] || (_cache[26] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©", -1)), _createElementVNode("em", null, _toDisplayString(fileName), 1)]), 5634 _createElementVNode("div", _hoisted_40, [_createElementVNode("button", { 5635 class: "btn secondary", 5636 onClick: uploadPhoto 5637 }, "Ø±ÙØ¹ Ø§ÙØµÙرة", 8, _hoisted_41), ($memberPhoto(m,'profile')) 5638 ? (_openBlock(), _createElementBlock("button", { 5639 key: 0, 5640 class: "btn danger", 5641 onClick: removePhoto 5642 }, "ØØ°Ù Ø§ÙØµÙرة", 8, _hoisted_42)) 5643 : _createCommentVNode("", true)]) 5644 ]), 5645 canViewCard 5646 ? (_openBlock(), _createElementBlock("section", _hoisted_43, [ 5647 _cache[29] || (_cache[29] = _createElementVNode("h3", null, "Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©", -1)), 5648 _createElementVNode("img", { 5649 class: "membershipImageOnly", 5650 src: cardSrc, 5651 alt: "Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©", 5652 loading: "eager" 5653 }, null, 8, _hoisted_44), 5654 _createElementVNode("div", _hoisted_45, [_createElementVNode("button", { 5655 class: "btn wide", 5656 onClick: saveMyCard 5657 }, "ØÙظ Ø§ÙØ¨Ø·Ø§ÙØ© ÙØµÙرة", 8, _hoisted_46), cardLink 5658 ? (_openBlock(), _createElementBlock("a", { 5659 key: 0, 5660 class: "btn secondary wide", 5661 href: cardLink, 5662 target: "_blank" 5663 }, "ÙØªØ Ø§ÙØ¨Ø·Ø§ÙØ©", 8, _hoisted_47)) 5664 : _createCommentVNode("", true)]), 5665 _cache[30] || (_cache[30] = _createElementVNode("p", { class: "hint small cardSaveHint" }, "عÙÙ iPhone استخد٠Save Image / ØÙظ Ø§ÙØµÙرة Ù Ù ÙØ§Ùذة اÙÙ Ø´Ø§Ø±ÙØ©. عÙÙ Android ÙØªÙ Ø§ÙØÙØ¸ أ٠اÙÙ Ø´Ø§Ø±ÙØ© ÙÙ ÙÙ PNG.", -1)) 5666 ])) 5667 : canComplete 5668 ? (_openBlock(), _createElementBlock("div", _hoisted_48, [_cache[31] || (_cache[31] = _createElementVNode("b", null, "Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© ØªØ¸ÙØ± بعد Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ§Ùاعت٠اد", -1)), _cache[32] || (_cache[32] = _createElementVNode("p", { class: "hint" }, "Ø£ÙÙ Ù Ø¨ÙØ§ÙØ§ØªÙ Ø§ÙØ±Ø³Ù ÙØ© Ø£ÙÙØ§ÙØ Ø«Ù ØªØ±Ø§Ø¬Ø¹ÙØ§ ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© ÙØªØµØ¯Ø± Ø§ÙØ±ÙÙ ÙØ§ÙØ¨Ø·Ø§ÙØ©.", -1)), _createElementVNode("button", { 5669 class: "btn", 5670 onClick: $event => ($router.push('/complete')) 5671 }, "Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ¢Ù", 8, _hoisted_49)])) 5672 : (m.status==='suspended') 5673 ? (_openBlock(), _createElementBlock("div", _hoisted_50, _cache[33] || (_cache[33] = [_createElementVNode("b", null, "Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© Ù ÙÙÙÙØ©", -1), _createElementVNode("p", { class: "hint" }, "ت٠تعÙÙÙ Ø§ÙØ¹Ø¶ÙÙØ©Ø ÙØ°ÙÙ ÙØ§ تتÙÙØ± Ø§ÙØ¨Ø·Ø§ÙØ© أ٠رابط Ø§ÙØÙØ¸ ØØ§ÙÙØ§Ù. ØªÙØ§ØµÙ ٠ع ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© ÙÙ٠راجعة.", -1)]))) 5674 : (_openBlock(), _createElementBlock("div", _hoisted_51, _cache[34] || (_cache[34] = [_createElementVNode("b", null, "Ø·ÙØ¨ Ø§ÙØ¹Ø¶ÙÙØ© ÙÙØ¯ اÙ٠راجعة", -1), _createElementVNode("p", { class: "hint" }, "Ø³ØªØ¸ÙØ± Ø§ÙØ¨Ø·Ø§ÙØ© بعد اعت٠اد Ø§ÙØ¹Ø¶ÙÙØ© ÙØ¥ØµØ¯Ø§Ø± رÙÙ GZC. ÙØ§ ØªÙØ¬Ø¯ Ø¨Ø·Ø§ÙØ© ÙØ§Ø¨ÙØ© ÙÙØÙØ¸ ÙØ¨Ù Ø§ÙØ§Ø¹ØªÙ اد.", -1)]))), 5675 _createElementVNode("div", _hoisted_52, [(m.status==='approved'&&ordersShortcutVisible) 5676 ? (_openBlock(), _createElementBlock("button", { 5677 key: 0, 5678 class: "btn", 5679 onClick: $event => ($router.push('/orders')) 5680 }, "Ø·ÙØ¨Ø§ØªÙ", 8, _hoisted_53)) 5681 : _createCommentVNode("", true), (m.status==='approved') 5682 ? (_openBlock(), _createElementBlock("button", { 5683 key: 1, 5684 class: "btn secondary", 5685 onClick: $event => ($router.push('/procurement/new')) 5686 }, "Ø·ÙØ¨ عرض أ٠شراء", 8, _hoisted_54)) 5687 : _createCommentVNode("", true), _createElementVNode("button", { 5688 class: "btn danger", 5689 onClick: $event => (store.logout(router,'/login')) 5690 }, "تسجÙÙ Ø§ÙØ®Ø±Ùج", 8, _hoisted_55)]) 5691 ])) 5692 ]), 5693 _: 1 5694 })) 5695 } 5696} 5697})() 5698 }; 5699 5700 5701 const SMT_WALLET_SYMBOL='â'; const SMT_WALLET_PEG_COPY='1 â = 1 CNY';
5701 function walletMoney(v){const n=Number(v||0);return SMT_WALLET_SYMBOL+' '+(Number.isFinite(n)?n:0).toLocaleString('en-US',{minimumFractionDigits:2,maximumFractionDigits:2});} 5702 function walletTransactionLabel(v){return ({admin_credit:'Ø¥ÙØ¯Ø§Ø¹ إدارÙ',admin_debit:'خص٠إدارÙ'})[String(v||'')]||String(v||'-');} 5703 function walletStatusLabel(v){return ({active:'ÙØ´Ø·Ø©',not_activated:'ØºÙØ± Ù ÙØ¹ÙØ©',not_opened:'ØºÙØ± Ù ÙØ¹ÙØ©',frozen:'Ù ÙÙÙÙØ© Ù Ø¤ÙØªØ§Ù',closed:'٠غÙÙØ©'})[String(v||'')]||'ØºÙØ± Ù ØªØ§ØØ©';} 5704 function walletStatusHint(v){return ({active:'ÙÙ ÙÙ٠٠تابعة Ø§ÙØ±ØµÙد ÙØ§ÙØØ±Ùات اÙ٠عت٠دة ÙÙØ§.',not_activated:'Ù ØÙظة SMT Ø§Ø®ØªÙØ§Ø±ÙØ©. ÙØ¯Ù Ø·ÙØ¨ ØªÙØ¹ÙÙ ÙØ³ÙØªÙ ÙØªØÙا بعد Ù ÙØ§ÙÙØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø©.',not_opened:'Ù ØÙظة SMT Ø§Ø®ØªÙØ§Ø±ÙØ©. ÙØ¯Ù Ø·ÙØ¨ ØªÙØ¹ÙÙ ÙØ³ÙØªÙ ÙØªØÙا بعد Ù ÙØ§ÙÙØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø©.',frozen:'اÙÙ ØÙظة Ù ÙÙÙÙØ© Ù Ø¤ÙØªØ§Ù. ØªÙØ§ØµÙ ٠ع إدارة SMT إذا ÙÙØª ØªØØªØ§Ø¬ ٠راجعة Ø§ÙØØ§ÙØ©.',closed:'اÙÙ ØÙظة ٠غÙÙØ© ÙÙØ§ ØªØ³ØªÙØ¨Ù ع٠ÙÙØ§Øª Ø¬Ø¯ÙØ¯Ø©.'})[String(v||'')]||'ØªÙØ§ØµÙ ٠ع إدارة SMT Ù٠راجعة ØØ§ÙØ© اÙÙ ØÙظة.';} 5705 const MemberWalletPage={ 5706 components:{PublicFrame}, 5707 setup(){ 5708 const store=useGzcStore();const router=useRouter();const wallet=ref(null);const loading=ref(true),loadError=ref(''),activationBusy=ref(false); 5709 async function load(){loading.value=true;loadError.value='';const r=await api('/api/member/wallet');loading.value=false;if(r.status===401)return router.replace('/login');if(!r.ok){loadError.value=r.message||'تعذر تØÙ Ù٠اÙÙ ØÙظة';store.state.msg=loadError.value;return;}wallet.value=r;} 5710 async function requestActivation(){if(!wallet.value||activationBusy.value)return;activationBusy.value=true;const r=await api('/api/member/wallet/activation-request',{method:'POST',feedbackLabel:'Ø¬Ø§Ø±Ù Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨ Ø§ÙØªÙعÙÙ...',body:JSON.stringify({})});activationBusy.value=false;store.state.msg=r.message||r.error||'';if(r.ok)await load();} 5711 onMounted(async()=>{if(await store.requireMember(router,'/wallet'))await load();}); 5712 return{store,wallet,loading,loadError,activationBusy,load,requestActivation,walletMoney,walletTransactionLabel,walletStatusLabel,walletStatusHint,shortDate,safeArray}; 5713 }, 5714 render:(function(){ 5715const _Vue = Vue 5716const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 5717 5718const _hoisted_1 = { 5719 key: 0, 5720 class: "card walletBalanceHero" 5721} 5722const _hoisted_2 = { 5723 key: 1, 5724 class: "card" 5725} 5726const _hoisted_3 = { class: "memberSectionHead" } 5727const _hoisted_4 = { 5728 key: 0, 5729 class: "hint" 5730} 5731const _hoisted_5 = { 5732 key: 1, 5733 class: "hint" 5734} 5735const _hoisted_6 = { key: 0 } 5736const _hoisted_7 = { 5737 key: 2, 5738 class: "hint" 5739} 5740const _hoisted_8 = ["disabled", "onClick"] 5741const _hoisted_9 = ["onClick"] 5742const _hoisted_10 = { 5743 key: 2, 5744 class: "card" 5745} 5746const _hoisted_11 = { class: "memberSectionHead" } 5747const _hoisted_12 = { class: "hint" } 5748const _hoisted_13 = ["onClick"] 5749const _hoisted_14 = { 5750 key: 3, 5751 class: "card walletPolicyCard" 5752} 5753const _hoisted_15 = { 5754 key: 4, 5755 class: "card" 5756} 5757const _hoisted_16 = { class: "memberSectionHead" } 5758const _hoisted_17 = { class: "adminGuideList walletTransactionList" } 5759const _hoisted_18 = { class: "codeToken" } 5760const _hoisted_19 = { 5761 key: 0, 5762 class: "hint" 5763} 5764const _hoisted_20 = { 5765 key: 5, 5766 class: "card skeleton walletInitialLoading", 5767 "aria-live": "polite" 5768} 5769const _hoisted_21 = { 5770 key: 6, 5771 class: "card emptyCard", 5772 role: "alert" 5773} 5774const _hoisted_22 = { class: "hint" } 5775const _hoisted_23 = ["onClick"] 5776 5777return function render(_ctx, _cache) { 5778 with (_ctx) { 5779 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 5780 5781 const _component_PublicFrame = _resolveComponent("PublicFrame") 5782 5783 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ù ØÙظتÙ" }, { 5784 default: _withCtx(() => [ 5785 (wallet&&wallet.access&&wallet.access.activated) 5786 ? (_openBlock(), _createElementBlock("section", _hoisted_1, [_createElementVNode("div", null, [_cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "SMT Wallet", -1)), _createElementVNode("h2", null, _toDisplayString(walletMoney(wallet.balance)), 1), _cache[1] || (_cache[1] = _createElementVNode("p", null, [_createTextVNode("Ø±ØµÙØ¯ SMT ٠ستÙ٠ت٠ا٠ا٠ع٠ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©. "), _createElementVNode("b", null, "1 â = 1 CNY"), _createTextVNode(" دائ٠اÙ.")], -1))]), _cache[2] || (_cache[2] = _createElementVNode("span", null, "â", -1))])) 5787 : _createCommentVNode("", true), 5788 (wallet&&wallet.access&&!wallet.access.activated) 5789 ? (_openBlock(), _createElementBlock("section", _hoisted_2, [_createElementVNode("div", _hoisted_3, [_createElementVNode("div", null, [_cache[4] || (_cache[4] = _createElementVNode("span", { class: "adminEyebrow" }, "Ù ØÙظة SMT", -1)), _createElementVNode("h3", null, _toDisplayString(wallet.access.status==='pending'?'Ø·ÙØ¨ Ø§ÙØªÙعÙÙ ÙÙØ¯ اÙ٠راجعة':wallet.access.status==='rejected'?'Ø·ÙØ¨ Ø§ÙØªÙعÙÙ Ù٠تت٠اÙÙ ÙØ§ÙÙØ© عÙÙÙ':'اÙÙ ØÙظة ØºÙØ± Ù ÙØ¹ÙØ©'), 1), (wallet.access.status==='pending') 5790 ? (_openBlock(), _createElementBlock("p", _hoisted_4, "استÙ٠ت Ø§ÙØ¥Ø¯Ø§Ø±Ø© Ø·ÙØ¨Ù. Ø³ÙØªÙ ØªÙØ¹Ù٠اÙÙ ØÙظة بعد اÙÙ ÙØ§ÙÙØ©.")) 5791 : (wallet.access.status==='rejected') 5792 ? (_openBlock(), _createElementBlock("p", _hoisted_5, [_cache[3] || (_cache[3] = _createTextVNode("ÙÙ ÙÙÙ ØªÙØ¯ÙÙ Ø·ÙØ¨ Ø¬Ø¯ÙØ¯ إذا ÙÙØª ٠ا Ø²ÙØª ØªØØªØ§Ø¬ اÙÙ ØÙظة.")), (wallet.access.request&&wallet.access.request.review_note) 5793 ? (_openBlock(), _createElementBlock("span", _hoisted_6, " · " + _toDisplayString(wallet.access.request.review_note), 1)) 5794 : _createCommentVNode("", true)])) 5795 : (_openBlock(), _createElementBlock("p", _hoisted_7, "Ù ØÙظة SMT Ø§Ø®ØªÙØ§Ø±ÙØ© ÙÙØ§ تÙÙØªØ تÙÙØ§Ø¦ÙاÙ. Ø§Ø·ÙØ¨ Ø§ÙØªÙعÙÙ Ù Ù ÙÙØ§."))]), _cache[5] || (_cache[5] = _createElementVNode("span", { class: "walletActivationSymbol" }, "â", -1))]), (wallet.access.status!=='pending') 5796 ? (_openBlock(), _createElementBlock("button", { 5797 key: 0, 5798 class: "btn", 5799 disabled: activationBusy, 5800 onClick: requestActivation 5801 }, _toDisplayString(activationBusy?'Ø¬Ø§Ø±Ù Ø§ÙØ¥Ø±Ø³Ø§Ù...':'Ø·ÙØ¨ ØªÙØ¹ÙÙ Ù ØÙظة SMT'), 9, _hoisted_8)) 5802 : (_openBlock(), _createElementBlock("button", { 5803 key: 1, 5804 class: "smallbtn secondary", 5805 onClick: load 5806 }, "ØªØØ¯ÙØ« Ø§ÙØØ§ÙØ©", 8, _hoisted_9)), _cache[6] || (_cache[6] = _createElementVNode("p", { class: "hint" }, "بعد Ù ÙØ§ÙÙØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø© ÙØ¨Ø¯Ø£ Ø§ÙØ±ØµÙد Ù Ù â 0.00. Ø§ÙØªØÙÙ٠بÙÙ Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ ÙØ§ÙØ³ØØ¨ ÙØªØÙÙÙ Ø§ÙØ¹Ù ÙØ§Øª ØºÙØ± Ù ØªØ§ØØ© ØØ§ÙÙØ§Ù.", -1))])) 5807 : _createCommentVNode("", true), 5808 (wallet&&wallet.access&&wallet.access.activated) 5809 ? (_openBlock(), _createElementBlock("section", _hoisted_10, [_createElementVNode("div", _hoisted_11, [_createElementVNode("div", null, [_cache[7] || (_cache[7] = _
5809createElementVNode("span", { class: "adminEyebrow" }, "ØØ§ÙØ© اÙÙ ØÙظة", -1)), _createElementVNode("h3", null, _toDisplayString(walletStatusLabel(wallet.account.status)), 1), _createElementVNode("p", _hoisted_12, _toDisplayString(walletStatusHint(wallet.account.status)), 1)]), _createElementVNode("button", { 5810 class: "smallbtn secondary", 5811 onClick: load 5812 }, "ØªØØ¯ÙØ«", 8, _hoisted_13)])])) 5813 : _createCommentVNode("", true), 5814 (wallet&&wallet.access&&wallet.access.activated) 5815 ? (_openBlock(), _createElementBlock("section", _hoisted_14, _cache[8] || (_cache[8] = [_createElementVNode("b", null, "استخدا٠اÙÙ ØÙظة ØØ§ÙÙØ§Ù", -1), _createElementVNode("p", { class: "hint" }, "ØªÙØ³Ø¬ÙÙ Ø§ÙØ¥Ùداعات ÙØ§ÙخصÙ٠ات بعد تØÙ٠إدارة SMT. Ø§ÙØªØÙÙ٠بÙÙ Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ ÙØ§ÙØ³ØØ¨ اÙÙÙØ¯Ù Ø£Ù Ø§ÙØ¨ÙÙÙ ÙØªØÙÙÙ Ø§ÙØ¹Ù ÙØ§Øª ØºÙØ± Ù ØªØ§ØØ© ØØ§ÙÙØ§Ù.", -1)]))) 5816 : _createCommentVNode("", true), 5817 (wallet&&wallet.access&&wallet.access.activated) 5818 ? (_openBlock(), _createElementBlock("section", _hoisted_15, [_
5818createElementVNode("div", _hoisted_16, [_cache[9] || (_cache[9] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ³Ø¬Ù"), _createElementVNode("h3", null, "آخر ØØ±Ùات اÙÙ ØÙظة")], -1)), _createElementVNode("span", null, _toDisplayString(wallet.entries||0) + " ØØ±ÙØ©", 1)]), _createElementVNode("div", _hoisted_17, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(wallet.transactions), (t) => { 5819 return (_openBlock(), _createElementBlock("div", { 5820 class: "guideAdminItem", 5821 key: t.id 5822 }, [_createElementVNode("span", _hoisted_18, _toDisplayString(t.transaction_code), 1), _createElementVNode("b", null, _toDisplayString(walletTransactionLabel(t.transaction_type)) + " · " + _toDisplayString(walletMoney(t.amount)), 1), _createElementVNode("small", null, _toDisplayString(t.reason) + " · " + _toDisplayString(shortDate(t.created_at)), 1)])) 5823 }), 128)), (!safeArray(wallet.transactions).length) 5824 ? (_openBlock(), _createElementBlock("p", _hoisted_19, "ÙØ§ ØªÙØ¬Ø¯ ØØ±Ùات ٠اÙÙØ© Ù٠اÙÙ ØÙظة ØØªÙ Ø§ÙØ¢Ù.")) 5825 : _createCommentVNode("", true)])])) 5826 : _createCommentVNode("", true), 5827 (!wallet&&loading) 5828 ? (_openBlock(), _createElementBlock("section", _hoisted_20, "جار٠تØÙ Ù٠اÙÙ ØÙظة...")) 5829 : (!wallet&&loadError) 5830 ? (_openBlock(), _createElementBlock("section", _hoisted_21, [_cache[10] || (_cache[10] = _createElementVNode("b", null, "تعذر عرض اÙÙ ØÙظة", -1)), _createElementVNode("p", _hoisted_22, _toDisplayString(loadError), 1), _createElementVNode("button", { 5831 class: "smallbtn", 5832 onClick: load 5833 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_23)])) 5834 : _createCommentVNode("", true) 5835 ]), 5836 _: 1 5837 })) 5838 } 5839} 5840})() 5841 }; 5842 5843 const AdminWalletPage={ 5844 components:{AdminFrame}, 5845 setup(){ 5846 const store=useGzcStore();const router=useRouter();const route=useRoute(); 5847 const members=ref([]),stats=ref({}),detail=ref(null),reconciliation=ref(null),detailReconciliation=ref(null),recentTransactions=ref([]),activationRequests=ref([]),activationNotes=reactive({}),search=ref(''),statusFilter=ref('all'),page=ref(1),pagination=ref({page:1,limit:10,total:0,pages:1,has_previous:false,has_next:false}),localBusy=ref(false); 5848 const selectedId=computed(()=>String(route.params.id||''));const workspaceMode=computed(()=>!!selectedId.value);const postingBlocked=computed(()=>['not_activated','frozen','closed'].includes(String(detail.value&&detail.value.account&&detail.value.account.status||''))); 5849 const form=reactive({operation:'credit',amount:'',reason:'',idempotency_key:''}); 5850 function freshKey(){const a=new Uint32Array(4);try{window.crypto.getRandomValues(a)}catch(_){for(let i=0;i<a.length;i++)a[i]=Math.floor(Math.random()*0xffffffff)}return 'wallet-ui-'+Date.now()+'-'+Array.from(a).map(x=>x.toString(16).padStart(8,'0')).join('');} 5851 function resetForm(){form.operation='credit';form.amount='';form.reason='';form.idempotency_key=freshKey();} 5852 async function loadList(resetPage=false){if(resetPage)page.value=1;localBusy.value=true;const qs=new URLSearchParams({search:String(search.value||''),status:String(statusFilter.value||'all'),page:String(page.value||1),limit:'10'});const r=await api('/api/admin/wallet?'+qs.toString(),{feedbackLabel:'جار٠تØÙ Ù٠اÙÙ ØÙظة...'});localBusy.value=false;if(r.status===401)return router.replace('/admin/login');if(r.status===403){store.state.msg=r.message||'ØºÙØ± ٠صرØ';return router.replace('/admin');}if(!r.ok){store.state.msg=r.message||'تعذر تØÙ Ù٠اÙÙ ØÙظة';return;}members.value=safeArray(r.members);recentTransactions.value=safeArray(r.recent_transactions);activationRequests.value=safeArray(r.pending_activation_requests);stats.value=r.stats||{};pagination.value=Object.assign({page:1,limit:10,total:0,pages:1,has_previous:false,has_next:false},r.pagination||{});page.value=Number(pagination.value.page||1);} 5853 async function loadDetail(){if(!selectedId.value){detail.value=null;return;}localBusy.value=true;const r=await api('/api/admin/wallet/'+encodeURIComponent(selectedId.value),{feedbackLabel:'Ø¬Ø§Ø±Ù ÙØªØ ØØ³Ø§Ø¨ اÙÙ ØÙظة...'});localBusy.value=false;if(r.status===401)return router.replace('/admin/login');if(!r.ok){store.state.msg=r.message||'تعذر تØÙ ÙÙ ØØ³Ø§Ø¨ اÙÙ ØÙظة';detail.value=null;return;}detail.value=r;} 5854 async function loadReconciliation(){const r=await api('/api/admin/wallet/reconciliation',{feedbackLabel:'جار٠تدÙÙ٠اÙÙ ØÙظة...'});if(r.status===401)return router.replace('/admin/login');if(r.ok)reconciliation.value=r;} 5855 async function loadDetailReconciliation(){if(!selectedId.value){detailReconciliation.value=null;return;}const r=await api('/api/admin/wallet/'+encodeURIComponent(selectedId.value)+'/reconciliation',{feedbackLabel:'جار٠تدÙÙÙ Ø§ÙØØ³Ø§Ø¨...'});if(r.status===401)return router.replace('/admin/login');detailReconciliation.value=r.ok?r:null;} 5856 async function openMember(m){await router.push('/admin/wallet/'+encodeURIComponent(m.id));} 5857 async function back(){await router.push('/admin/wallet');} 5858 async function changePage(nextPage){const n=Math.max(1,Math.min(Number(pagination.value.pages||1),Number(nextPage||1)));if(n===page.value)return;page.value=n;await loadList(false);} 5859 async function reviewActivation(r,decision){if(!r||localBusy.value)return;const label=decision==='approve'?'اÙÙ ÙØ§ÙÙØ© عÙÙ ØªÙØ¹ÙÙ Ù ØÙظة '+(r.full_name||'Ø§ÙØ¹Ø¶Ù')+'Ø':'Ø±ÙØ¶ Ø·ÙØ¨ ØªÙØ¹ÙÙ Ù ØÙظة '+(r.full_name||'Ø§ÙØ¹Ø¶Ù')+'Ø';if(!window.confirm(label))return;localBusy.value=true;const rs=await api('/api/admin/wallet/activation-requests/'+encodeURIComponent(r.id)+'/review',{method:'POST',feedbackLabel:decision==='approve'?'Ø¬Ø§Ø±Ù ØªÙØ¹Ù٠اÙÙ ØÙظة...':'جار٠تسجÙÙ Ø§ÙØ±Ùض...',body:JSON.stringify({decision,note:String(activationNotes[r.id]||'').trim()})});localBusy.value=false;store.state.msg=rs.message||rs.error||'';if(rs.ok){delete activationNotes[r.id];await loadList();}} 5860 async function adjust(){if(!detail.value||!detail.value.member)return;if(postingBlocked.value){store.state.msg='اÙÙ ØÙظة Ù ÙÙÙÙØ© أ٠٠غÙÙØ© ÙÙØ§ ØªÙØ¨Ù Ù Ø¹Ø§Ù ÙØ§Øª Ø¬Ø¯ÙØ¯Ø©';return;}const amount=String(form.amount||'').trim(),reason=String(form.reason||'').trim();if(!amount||!reason){store.state.msg='أدخ٠اÙÙ Ø¨ÙØº ÙØ³Ø¨Ø¨ Ø§ÙØ¹Ù ÙÙØ©';return;}const action=form.operation==='credit'?'Ø¥ÙØ¯Ø§Ø¹':'خص٠';if(!window.confirm(action+' '+walletMoney(amount)+' ÙÙØ¹Ø¶Ù '+(detail.value.member.full_name||'')+'Ø\nØ³ÙØªÙ Ø¥ÙØ´Ø§Ø¡ Ù Ø¹Ø§Ù ÙØ© ÙÙÙØ¯ÙÙ Ù ØªÙØ§Ø²ÙÙÙ ÙÙØ§ ÙÙ Ù٠تعدÙ٠اÙÙ Ø¹Ø§Ù ÙØ© بعد ترØÙÙÙØ§.'))return;localBusy.value=true;const r=await api('/api/admin/wallet/'+encodeURIComponent(detail.value.member.id)+'/adjust',{method:'POST',feedbackLabel:'جار٠تسجÙ٠اÙÙ Ø¹Ø§Ù ÙØ©...',body:JSON.stringify({operation:form.operation,amount,currency:'CNY',reason,idempotency_key:form.idempotency_key||freshKey()})});localBusy.value=false;store.state.msg=r.message||r.error||'';if(r.ok){resetForm();await Promise.all([loadDetail(),loadList()]);}} 5861 async function load(){await Promise.all([loadList(),loadReconciliation()]);if(selectedId.value)await Promise.all([loadDetail(),loadDetailReconciliation()]);} 5862 onMounted(()=>{resetForm();load();});watch(()=>route.params.id,()=>Promise.all([loadDetail(),loadDetailReconciliation()])); 5863 return{store,members,stats,detail,reconciliation,detailReconciliation,recentTransactions,activationRequests,activationNotes,search,statusFilter,page,pagination,localBusy,workspaceMode,postingBlocked,form,loadList,loadReconciliation,openMember,back,changePage,reviewActivation,adjust,walletMoney,walletTransactionLabel,walletStatusLabel,shortDate,safeArray}; 5864 }, 5865 render:(function(){ 5866const _Vue = Vue
5867const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 5868 5869const _hoisted_1 = { 5870 key: 0, 5871 class: "card dashboardHeaderCard walletAdminHeader" 5872} 5873const _hoisted_2 = ["disabled", "onClick"] 5874const _hoisted_3 = { 5875 key: 1, 5876 class: "walletAdminSummaryGrid" 5877} 5878const _hoisted_4 = { 5879 key: 2, 5880 class: "card walletActivationQueue" 5881} 5882const _hoisted_5 = { class: "adminSectionHead" } 5883const _hoisted_6 = { class: "statusPill" } 5884const _hoisted_7 = { class: "adminGuideList" } 5885const _hoisted_8 = { 5886 key: 0, 5887 class: "hint" 5888} 5889const _hoisted_9 = ["onUpdate:modelValue"] 5890const _hoisted_10 = { class: "inlineActions" } 5891const _hoisted_11 = ["disabled", "onClick"] 5892const _hoisted_12 = ["disabled", "onClick"] 5893const _hoisted_13 = { 5894 key: 3, 5895 class: "card walletReconciliationCard" 5896} 5897const _hoisted_14 = { class: "adminSectionHead" } 5898const _hoisted_15 = ["onClick"] 5899const _hoisted_16 = { class: "walletReconciliationDetails" } 5900const _hoisted_17 = { class: "miniStats" } 5901const _hoisted_18 = { 5902 key: 4, 5903 class: "card walletRecentCard" 5904} 5905const _hoisted_19 = { class: "adminSectionHead" } 5906const _hoisted_20 = { class: "statusPill" } 5907const _hoisted_21 = { class: "walletRecentList" } 5908const _hoisted_22 = ["onClick"] 5909const _hoisted_23 = { class: "walletRecentIdentity" } 5910const _hoisted_24 = { class: "walletRecentReason" } 5911const _hoisted_25 = { 5912 key: 0, 5913 class: "hint" 5914} 5915const _hoisted_26 = { 5916 key: 5, 5917 class: "card walletAccountsCard" 5918} 5919const _hoisted_27 = { class: "adminSectionHead" } 5920const _hoisted_28 = { class: "statusPill" } 5921const _hoisted_29 = { class: "walletAccountFilters" } 5922const _hoisted_30 = ["onUpdate:modelValue", "onKeyup"] 5923const _hoisted_31 = ["onUpdate:modelValue", "onChange"] 5924const _hoisted_32 = ["disabled", "onClick"] 5925const _hoisted_33 = { class: "walletAccountList" } 5926const _hoisted_34 = ["onClick"] 5927const _hoisted_35 = { class: "walletAccountIdentity" } 5928const _hoisted_36 = { class: "walletAccountSide" } 5929const _hoisted_37 = { 5930 key: 0, 5931 class: "hint" 5932} 5933const _hoisted_38 = { 5934 key: 0, 5935 class: "walletPagination" 5936} 5937const _hoisted_39 = ["disabled", "onClick"] 5938const _hoisted_40 = ["disabled", "onClick"] 5939const _hoisted_41 = { 5940 key: 6, 5941 class: "card adminRecordWorkspace" 5942} 5943const _hoisted_42 = { class: "adminWorkspaceBackBar" } 5944const _hoisted_43 = ["onClick"] 5945const _hoisted_44 = { 5946 key: 0, 5947 class: "walletBalanceHero" 5948} 5949const _hoisted_45 = { 5950 key: 1, 5951 class: "card" 5952} 5953const _hoisted_46 = { 5954 key: 2, 5955 class: "card walletReconciliationCard" 5956} 5957const _hoisted_47 = { class: "adminSectionHead" } 5958const _hoisted_48 = { class: "hint" } 5959const _hoisted_49 = { class: "miniStats" } 5960const _hoisted_50 = { 5961 key: 3, 5962 class: "card walletAdjustmentCard" 5963} 5964const _hoisted_51 = ["onUpdate:modelValue"] 5965const _hoisted_52 = ["onUpdate:modelValue"] 5966const _hoisted_53 = ["onUpdate:modelValue"] 5967const _hoisted_54 = { 5968 key: 0, 5969 class: "aiWorkflowError" 5970} 5971const _hoisted_55 = ["disabled", "onClick"] 5972const _hoisted_56 = { 5973 key: 4, 5974 class: "card walletPolicyCard" 5975} 5976const _hoisted_57 = { 5977 key: 5, 5978 class: "card" 5979} 5980const _hoisted_58 = { class: "adminGuideList" } 5981const _hoisted_59 = { class: "codeToken" } 5982const _hoisted_60 = { 5983 key: 0, 5984 class: "hint" 5985} 5986 5987return function render(_ctx, _cache) { 5988 with (_ctx) { 5989 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, vModelText: _vModelText, withDirectives: _withDirectives, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, withKeys: _withKeys, vModelSelect: _vModelSelect, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 5990 5991 const _component_AdminFrame = _resolveComponent("AdminFrame") 5992 5993 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù ØÙظة SMT" }, { 5994 default: _withCtx(() => [ 5995 (!workspaceMode) 5996 ? (_openBlock(), _createElementBlock("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "SMT Wallet"), _createElementVNode("h3", null, "اÙÙ ØÙظة اÙ٠اÙÙØ©"), _createElementVNode("p", { class: "hint" }, "Ù ÙØ®Øµ Ø³Ø±ÙØ¹ ÙÙØØ³Ø§Ø¨Ø§Øª ÙØ§Ùع٠ÙÙØ§Øª. اÙÙ ØÙظة ٠بÙÙØ© عÙÙ Ø¯ÙØªØ± ÙÙÙØ¯ Ù Ø²Ø¯ÙØ¬Ø ÙØ§ÙØªÙØ§ØµÙ٠اÙÙÙÙØ© ÙØ§ÙتدÙÙ٠اÙ٠اÙ٠تبÙ٠داخ٠ÙÙØØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø©.")], -1)), _createElementVNode("button", { 5997 class: "smallbtn", 5998 disabled: localBusy, 5999 onClick: loadList 6000 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)])) 6001 : _createCommentVNode("", true), 6002 (!workspaceMode) 6003 ? (_openBlock(), _createElementBlock("div", _hoisted_3, [ 6004 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(walletMoney(stats.member_balance_total)), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "إج٠اÙ٠أرصدة Ø§ÙØ£Ø¹Ø¶Ø§Ø¡", -1))]), 6005 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(stats.member_accounts||0), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "Ø§ÙØØ³Ø§Ø¨Ø§Øª اÙÙ ÙØ¹ÙØ©", -1))]), 6006 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(stats.pending_activation_requests||0), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "Ø·ÙØ¨Ø§Øª ØªÙØ¹Ù٠٠عÙÙØ©", -1))]), 6007 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(stats.transactions||0), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "إج٠اÙÙ Ø§ÙØ¹Ù ÙÙØ§Øª", -1))]) 6008 ])) 6009 : _createCommentVNode("", true), 6010 (!workspaceMode&&activationRequests.length) 6011 ? (_openBlock(), _createElementBlock("section", _hoisted_4, [_createElementVNode("div", _hoisted_5, [_cache[5] || (_cache[5] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø·ÙØ¨Ø§Øª ØªØØªØ§Ø¬ ÙØ±Ø§Ø±Ø§Ù"), _createElementVNode("h3", null, "Ø·ÙØ¨Ø§Øª ØªÙØ¹ÙÙ Ù ØÙظة SMT")], -1)), _createElementVNode("span", _hoisted_6, _toDisplayString(stats.pending_activation_requests||activationRequests.length), 1)]), _createElementVNode("div", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(activationRequests, (r) => { 6012 return (_openBlock(), _createElementBlock("div", { 6013 class: "guideAdminItem", 6014 key: r.id 6015 }, [ 6016 _createElementVNode("b", null, _toDisplayString(r.full_name||'عضÙ') + " · " + _toDisplayString(r.gzc_id||r.member_id), 1), 6017 _createElementVNode("small", null, _toDisplayString(r.whatsapp||'-') + " · " + _toDisplayString(shortDate(r.requested_at)), 1), 6018 (r.request_note) 6019 ? (_openBlock(), _createElementBlock("p", _hoisted_8, _toDisplayString(r.request_note), 1)) 6020 : _createCommentVNode("", true), 6021 _createElementVNode("label", null, [_cache[6] || (_cache[6] = _createTextVNode("Ù ÙØ§ØØ¸Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø© (Ø§Ø®ØªÙØ§Ø±Ù)")), _withDirectives(_createElementVNode("input", { 6022 "onUpdate:modelValue": $event => ((activationNotes[r.id]) = $event), 6023 maxlength: "500", 6024 placeholder: "٠ثاÙ: ØªÙ Ø§ÙØªØÙÙ ÙØ§ÙÙ ÙØ§ÙÙØ©" 6025 }, null, 8, _hoisted_9), [[_vModelText, activationNotes[r.id]]])]), 6026 _createElementVNode("div", _hoisted_10, [_createElementVNode("button", { 6027 class: "smallbtn", 6028 disabled: localBusy, 6029 onClick: $event => (reviewActivation(r,'approve')) 6030 }, "Ù ÙØ§ÙÙØ© ÙØªÙعÙÙ", 8, _hoisted_11), _createElementVNode("button", { 6031 class: "smallbtn danger", 6032 disabled: localBusy, 6033 onClick: $event => (reviewActivation(r,'reject')) 6034 }, "Ø±ÙØ¶", 8, _hoisted_12)]) 6035 ])) 6036 }), 128))])])) 6037 : _createCommentVNode("", true), 6038 (!workspaceMode&&reconciliation) 6039 ? (_openBlock(), _createElementBlock("section", _hoisted_13, [_createElementVNode("div", _hoisted_14, [_cache[7] || (_cache[7] = _
6039createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "تدÙÙ٠٠اÙÙ ÙÙÙØ±Ø§Ø¡Ø© ÙÙØ·"), _createElementVNode("h3", null, "Ù Ø·Ø§Ø¨ÙØ© اÙÙ ØÙظة ÙØ¯Ùتر اÙÙÙÙØ¯")], -1)), _createElementVNode("button", { 6040 class: "smallbtn secondary", 6041 onClick: loadReconciliation 6042 }, "إعادة Ø§ÙØªØ¯ÙÙÙ", 8, _hoisted_15)]), _createElementVNode("div", { class: _normalizeClass(reconciliation.status==='healthy'?'aiWorkflowSuccess':'aiWorkflowError') }, [_createElementVNode("b", null, _toDisplayString(reconciliation.status==='healthy'?'اÙÙ Ø·Ø§Ø¨ÙØ© سÙÙÙ Ø©':'ØªÙØ¬Ø¯ ÙØ±ÙÙØ§Øª ØªØØªØ§Ø¬ ٠راجعة'), 1), _createElementVNode("small", null, "ØªÙ ÙØØµ " + _toDisplayString(reconciliation.summary.transactions||0) + " Ù Ø¹Ø§Ù ÙØ© · اÙ٠تأثرة " + _toDisplayString(reconciliation.summary.affected_transactions||0) + " · ÙØ§ ÙØªÙ تعدÙÙ Ø£Ù Ø±ØµÙØ¯.", 1)], 2), _createElementVNode("details", _hoisted_16, [_cache[11] || (_cache[11] = _createElementVNode("summary", null, "عرض ØªÙØ§ØµÙÙ Ø§ÙØªØ¯ÙÙÙ", -1)), _createElementVNode("div", _hoisted_17, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(reconciliation.summary.valid_transactions||0), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "سÙÙÙ Ø©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(reconciliation.summary.ledger_count_mismatch||0), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "Ø§Ø®ØªÙØ§Ù اÙÙÙÙØ¯", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(reconciliation.summary.unbalanced_transactions||0), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "ØºÙØ± Ù ØªÙØ§Ø²ÙØ©", -1))])]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(reconciliation.findings), (f) => { 6043 return (_openBlock(), _createElementBlock("p", { 6044 key: f.code, 6045 class: "hint" 6046 }, _toDisplayString(f.message) + " (" + _toDisplayString(f.count) + ")", 1)) 6047 }), 128))])])) 6048 : _createCommentVNode("", true), 6049 (!workspaceMode) 6050 ? (_openBlock(), _createElementBlock("section", _hoisted_18, [_createElementVNode("div", _hoisted_19, [_cache[12] || (_cache[12] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "آخر اÙÙØ´Ø§Ø·"), _createElementVNode("h3", null, "آخر 10 ع٠ÙÙØ§Øª")], -1)), _createElementVNode("span", _hoisted_20, _toDisplayString(recentTransactions.length), 1)]), _createElementVNode("div", _hoisted_21, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(recentTransactions, (t) => { 6051 return (_openBlock(), _createElementBlock("button", { 6052 class: "walletRecentItem", 6053 key: t.id, 6054 onClick: $event => (openMember({id:t.member_id})) 6055 }, [_createElementVNode("span", _hoisted_23, [_createElementVNode("b", null, _toDisplayString(t.full_name||'عضÙ'), 1), _createElementVNode("small", null, _toDisplayString(t.gzc_id||('عض٠#'+t.member_id)) + " · " + _toDisplayString(shortDate(t.created_at)), 1)]), _createElementVNode("span", { class: _normalizeClass(["walletRecentAmount", t.transaction_type==='admin_debit'?'debit':'credit']) }, _toDisplayString(t.transaction_type==='admin_debit'?'-':'+') + _toDisplayString(walletMoney(t.amount)), 3), _createElementVNode("small", _hoisted_24, _toDisplayString(t.reason||walletTransactionLabel(t.transaction_type)) + " · " + _toDisplayString(t.admin_name||'إدارة SMT'), 1)], 8, _hoisted_22)) 6056 }), 128)), (!recentTransactions.length) 6057 ? (_openBlock(), _createElementBlock("p", _hoisted_25, "ÙØ§ ØªÙØ¬Ø¯ ع٠ÙÙØ§Øª ٠اÙÙØ© ØØªÙ Ø§ÙØ¢Ù.")) 6058 : _createCommentVNode("", true)])])) 6059 : _createCommentVNode("", true), 6060 (!workspaceMode) 6061 ? (_openBlock(), _createElementBlock("section", _hoisted_26, [ 6062 _createElementVNode("div", _hoisted_27, [_cache[13] || (_cache[13] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØØ³Ø§Ø¨Ø§Øª"), _createElementVNode("h3", null, "Ø§ÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ£Ø®Ùرة")], -1)), _createElementVNode("span", _hoisted_28, _toDisplayString(pagination.total||0) + " ÙØªÙجة", 1)]), 6063 _createElementVNode("div", _hoisted_29, [_createElementVNode("label", null, [_cache[14] || (_cache[14] = _createTextVNode("Ø¨ØØ«")), _withDirectives(_createElementVNode("input", { 6064 "onUpdate:modelValue": $event => ((search) = $event), 6065 onKeyup: _withKeys($event => (loadList(true)), ["enter"]), 6066 placeholder: "Ø§ÙØ§Ø³Ù أ٠رÙÙ Ø§ÙØ¹Ø¶ÙÙØ© Ø£Ù ÙØ§ØªØ³Ø§Ø¨" 6067 }, null, 40, _hoisted_30), [[_vModelText, search]])]), _createElementVNode("label", null, [_cache[16] || (_cache[16] = _createTextVNode("ØØ§ÙØ© Ø§ÙØØ³Ø§Ø¨")), _withDirectives(_createElementVNode("select", { 6068 "onUpdate:modelValue": $event => ((statusFilter) = $event), 6069 onChange: $event => (loadList(true)) 6070 }, _cache[15] || (_cache[15] = [ 6071 _createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØØ§ÙØ§Øª", -1), 6072 _createElementVNode("option", { value: "opened" }, "Ø§ÙØØ³Ø§Ø¨Ø§Øª اÙÙ ÙØªÙØØ©", -1), 6073 _createElementVNode("option", { value: "active" }, "ÙØ´Ø·Ø©", -1), 6074 _createElementVNode("option", { value: "frozen" }, "Ù ÙÙÙÙØ© Ù Ø¤ÙØªØ§Ù", -1), 6075 _createElementVNode("option", { value: "closed" }, "٠غÙÙØ©", -1), 6076 _createElementVNode("option", { value: "not_opened" }, "ØºÙØ± Ù ÙØ¹ÙØ©", -1) 6077 ]), 40, _hoisted_31), [[_vModelSelect, statusFilter]])]), _createElementVNode("button", { 6078 class: "smallbtn secondary walletSearchBtn", 6079 disabled: localBusy, 6080 onClick: $event => (loadList(true)) 6081 }, "Ø¨ØØ«", 8, _hoisted_32)]), 6082 _createElementVNode("div", _hoisted_33, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(members, (m) => { 6083 return (_openBlock(), _createElementBlock("button", { 6084 class: "walletAccountRow", 6085 key: m.id, 6086 onClick: $event => (openMember(m)) 6087 }, [_createElementVNode("span", _hoisted_35, [_createElementVNode("b", null, _toDisplayString(m.full_name||'عضÙ'), 1), _createElementVNode("small", null, _toDisplayString(m.gzc_id||m.id) + " · " + _toDisplayString(m.whatsapp||'-'), 1), _createElementVNode("small", null, _toDisplayString(m.last_entry_at?'آخر ÙØ´Ø§Ø· '+shortDate(m.last_entry_at):'ÙØ§ ØªÙØ¬Ø¯ ع٠ÙÙØ§Øª بعد'), 1)]), _createElementVNode("span", _hoisted_36, [_createElementVNode("strong", null, _toDisplayString(walletMoney(m.wallet_balance)), 1), _createElementVNode("small", null, _toDisplayString(walletStatusLabel(m.wallet_status)), 1)])], 8, _hoisted_34)) 6088 }), 128)), (!members.length&&!localBusy) 6089 ? (_openBlock(), _createElementBlock("p", _hoisted_37, "ÙØ§ ØªÙØ¬Ø¯ ÙØªØ§Ø¦Ø¬.")) 6090 : _createCommentVNode("", true)]), 6091 (pagination.pages>1) 6092 ? (_openBlock(), _createElementBlock("div", _hoisted_38, [_createElementVNode("button", { 6093 class: "smallbtn secondary", 6094 disabled: !pagination.has_previous||localBusy, 6095 onClick: $event => (changePage(page-1)) 6096 }, "Ø§ÙØ³Ø§Ø¨Ù", 8, _hoisted_39), _createElementVNode("span", null, "ØµÙØØ© " + _toDisplayString(pagination.page) + " Ù Ù " + _toDisplayString(pagination.pages), 1), _createElementVNode("button", { 6097 class: "smallbtn secondary", 6098 disabled: !pagination.has_next||localBusy, 6099 onClick: $event => (changePage(page+1)) 6100 }, "Ø§ÙØªØ§ÙÙ", 8, _hoisted_40)])) 6101 : _createCommentVNode("", true) 6102 ])) 6103 : _createCommentVNode("", true), 6104 (workspaceMode&&detail) 6105 ? (_openBlock(), _createElementBlock("section", _hoisted_41, [ 6106 _createElementVNode("div", _hoisted_42, [_createElementVNode("button", { 6107 class: "smallbtn secondary", 6108 onClick: back 6109 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙÙ ØÙظة", 8, _hoisted_43), _cache[17] || (_cache[17] = _createElementVNode("span", null, "سج٠٠ØÙظة Ø§ÙØ¹Ø¶Ù", -1))]), 6110 (detail.access&&detail.access.activated) 6111 ? (_openBlock(), _createElementBlock("section", _hoisted_44, [_createElementVNode("div", null, [_cache[18] || (_cache[18] = _createElementVNode("span", { class: "vueBadge" }, "Ø§ÙØ±ØµÙد اÙ٠تاØ", -1)), _createElementVNode("h2", null, _toDisplayString(walletMoney(detail.balance)), 1), _createElementVNode("p", null, _toDisplayString(detail.member.full_name) + " · " + _toDisplayString(detail.member.gzc_id||'-') + " · SMT â · " + _toDisplayString(walletStatusLabel(detail.account.status)), 1)]), _cache[19] || (_cache[19] = _createElementVNode("span", null, "â", -1))])) 6112 : (_openBlock(), _createElementBlock("section", _hoisted_45, _cache[20] || (_cache[20] = [_createElementVNode("span", { class: "adminEyebrow" }, "ØØ§ÙØ© اÙÙ ØÙظة", -1), _createElementVNode("h3", null, "ØºÙØ± Ù ÙØ¹ÙØ©", -1), _createElementVNode("p", { class: "hint" }, "ÙØ§ ÙÙ Ù٠تسجÙ٠أ٠ع٠ÙÙØ© ÙÙØ°Ø§ Ø§ÙØ¹Ø¶Ù ÙØ¨Ù Ø£Ù ÙÙØ¯Ù Ø·ÙØ¨ ØªÙØ¹ÙÙ ÙØªÙاÙ٠عÙÙÙ Ø§ÙØ¥Ø¯Ø§Ø±Ø©.", -1)]))), 6113 (detail.access&&detail.access.activated&&detailReconciliation) 6114 ? (_openBlock(), _createElementBlock("section", _hoisted_46, [_createElementVNode("div", _hoisted_47, [_createElementVNode("div", null, [_cache[21] || (_cache[21] = _createElementVNode("span", { class: "adminEyebrow" }, "Ù Ø·Ø§Ø¨ÙØ© ÙØ°Ø§ Ø§ÙØØ³Ø§Ø¨", -1)), _createElementVNode("h3", null, _toDisplayString(detailReconciliation.status==='healthy'?'سÙÙÙ Ù٠تطابÙ':'ÙØ±ÙÙØ§Øª ØªØØªØ§Ø¬ ٠راجعة'), 1)])]), _createElementVNode("p", _hoisted_48, _toDisplayString(detailReconciliation.summary.transactions||0) + " Ù Ø¹Ø§Ù ÙØ© · " + _toDisplayString(detailReconciliation.summary.affected_transactions||0) + " ٠تأثرة · اÙÙØØµ ÙÙÙØ±Ø§Ø¡Ø© ÙÙØ· ÙÙØ§ ÙØµÙØ Ø§ÙØ£Ø±ØµØ¯Ø© تÙÙØ§Ø¦ÙاÙ.", 1), _createElementVNode("div", _hoisted_49, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(walletMoney(detailReconciliation.representation.transaction_net_total)), 1), _cache[22] || (_cache[22] = _createElementVNode("small", null, "صاÙ٠اÙÙ Ø¹Ø§Ù ÙØ§Øª", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(walletMoney(detailReconciliation.representation.member_balance_total)), 1), _cache[23] || (_cache[23] = _createElementVNode("small", null, "Ø§ÙØ±ØµÙد اÙ٠شتÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(detailReconciliation.summary.ledger_count_mismatch||0), 1), _cache[24] || (_cache[24] = _createElementVNode("small", null, "ÙØ±ÙÙØ§Øª اÙÙÙÙØ¯", -1))])])])) 6115 : _createCommentVNode("", true), 6116 (detail.access&&detail.access.activated) 6117 ? (_openBlock(), _createElementBlock("section", _hoisted_50, [ 6118 _cache[30] || (_cache[30] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ù Ø¹Ø§Ù ÙØ© Ø¬Ø¯ÙØ¯Ø©"), _createElementVNode("h3", null, "Ø¥ÙØ¯Ø§Ø¹ أ٠خص٠إدارÙ")])], -1)), 6119 _cache[31] || (_cache[31] = _createElementVNode("p", { class: "hint" }, "Ù٠ع٠ÙÙØ© ØªÙØ´Ø¦ Transaction ثابتة ÙÙÙØ¯ÙÙ Ù ØªÙØ§Ø²ÙÙÙ. ÙØ§ ÙÙ ÙÙ Ø§ÙØ®ØµÙ ب٠ا ÙØªØ¬Ø§Ùز Ø§ÙØ±ØµÙد. 1 â = 1 CNY دائ٠اÙ.", -1)), 6120 _createElementVNode("label", null, [_cache[26] || (_cache[26] = _createTextVNode("ÙÙØ¹ Ø§ÙØ¹Ù ÙÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.operation) = $event) }, _cache[25] || (_cache[25] = [_createElementVNode("option", { value: "credit" }, "Ø¥ÙØ¯Ø§Ø¹", -1), _createElementVNode("option", { value: "debit" }, "خص٠", -1)]), 8, _hoisted_51), [[_vModelSelect, form.operation]])]), 6121 _createElementVNode("label", null, [_cache[27] || (_cache[27] = _
6121createTextVNode("اÙÙ Ø¨ÙØº â")), _withDirectives(_createElementVNode("input", { 6122 type: "text", 6123 inputmode: "decimal", 6124 "onUpdate:modelValue": $event => ((form.amount) = $event), 6125 placeholder: "٠ثاÙ: 198000.00" 6126 }, null, 8, _hoisted_52), [[_vModelText, form.amount]])]), 6127 _createElementVNode("label", null, [_cache[28] || (_cache[28] = _createTextVNode("سبب Ø§ÙØ¹Ù ÙÙØ©")), _withDirectives(_createElementVNode("textarea", { 6128 "onUpdate:modelValue": $event => ((form.reason) = $event), 6129 maxlength: "500", 6130 placeholder: "٠ثاÙ: Ø¥ÙØ¯Ø§Ø¹ بعد تأÙÙØ¯ Ø§Ø³ØªÙØ§Ù Ø§ÙØªØÙÙÙ" 6131 }, null, 8, _hoisted_53), [[_vModelText, form.reason]])]), 6132 postingBlocked 6133 ? (_openBlock(), _createElementBlock("div", _hoisted_54, [_createElementVNode("b", null, "اÙÙ ØÙظة " + _toDisplayString(walletStatusLabel(detail.account.status)), 1), _cache[29] || (_cache[29] = _createElementVNode("small", null, "ÙØ§ ÙÙ Ù٠تسجÙÙ Ø£Ù Ø¥ÙØ¯Ø§Ø¹ Ø£Ù Ø®ØµÙ Ø¬Ø¯ÙØ¯ ØØªÙ ØªØµØ¨Ø ØØ§ÙØ© Ø§ÙØØ³Ø§Ø¨ ÙØ´Ø·Ø©.", -1))])) 6134 : _createCommentVNode("", true), 6135 _createElementVNode("button", { 6136 class: "btn", 6137 disabled: localBusy||postingBlocked, 6138 onClick: adjust 6139 }, "تسجÙ٠اÙÙ Ø¹Ø§Ù ÙØ©", 8, _hoisted_55) 6140 ])) 6141 : _createCommentVNode("", true), 6142 (detail.access&&detail.access.activated) 6143 ? (_openBlock(), _createElementBlock("section", _hoisted_56, _cache[32] || (_cache[32] = [_createElementVNode("b", null, "ØØ¯Ùد اÙÙ ØÙظة Ø§ÙØØ§ÙÙØ©", -1), _createElementVNode("p", null, "Admin credit/debit ÙÙØ·. ÙØ§ Member-to-Member transferØ ÙØ§ Ø³ØØ¨ ÙÙØ¯Ù/بÙÙÙØ ÙØ§ تØÙÙÙ Ø¹Ù ÙØ§ØªØ ÙÙØ§ Ø¯ÙØ¹ Ù ÙØ±Ø¯ ٠٠اÙÙ ØÙظة.", -1)]))) 6144 : _createCommentVNode("", true), 6145 (detail.access&&detail.access.activated) 6146 ? (_openBlock(), _createElementBlock("section", _hoisted_57, [_cache[33] || (_cache[33] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ledger history"), _createElementVNode("h3", null, "Ø§ÙØØ±ÙØ§Øª")])], -1)), _createElementVNode("div", _hoisted_58, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(detail.transactions), (t) => { 6147 return (_openBlock(), _createElementBlock("div", { 6148 class: "guideAdminItem", 6149 key: t.id 6150 }, [_createElementVNode("span", _hoisted_59, _toDisplayString(t.transaction_code), 1), _createElementVNode("b", null, _toDisplayString(walletTransactionLabel(t.transaction_type)) + " · " + _toDisplayString(walletMoney(t.amount)), 1), _createElementVNode("small", null, _toDisplayString(t.reason) + " · " + _toDisplayString(shortDate(t.created_at)), 1)])) 6151 }), 128)), (!safeArray(detail.transactions).length) 6152 ? (_openBlock(), _createElementBlock("p", _hoisted_60, "ÙØ§ ØªÙØ¬Ø¯ Ù Ø¹Ø§Ù ÙØ§Øª ØØªÙ Ø§ÙØ¢Ù.")) 6153 : _createCommentVNode("", true)])])) 6154 : _createCommentVNode("", true) 6155 ])) 6156 : _createCommentVNode("", true) 6157 ]), 6158 _: 1 6159 })) 6160 } 6161} 6162})() 6163 }; 6164 6165 const PROCUREMENT_SERVICE_LABELS={product_sourcing:'Ø§ÙØ¨ØØ« Ø¹Ù Ù ÙØªØ¬ Ø£Ù Ù ØµÙØ¹',supplier_verification:'Ø§ÙØªØÙ٠٠٠اÙÙ ÙØ±Ø¯',quality_inspection:'ÙØØµ Ø§ÙØ¬Ùدة',supplier_payment:'Ø¯ÙØ¹ Ù ØµÙØ¹ Ù ÙØ§Ø¨Ù ÙØ§ØªÙرة',shipping_logistics:'Ø§ÙØ´ØÙ ÙØ§Ùخد٠ات اÙÙÙØ¬Ø³ØªÙØ©'}; 6166 const PROCUREMENT_STATUS_LABELS={draft:'Ù Ø³ÙØ¯Ø©',submitted:'ØªÙ Ø§ÙØ¥Ø±Ø³Ø§Ù',under_review:'ÙÙØ¯ اÙ٠راجعة',quoted:'صدر عرض Ø§ÙØ³Ø¹Ø±',payment_pending:'Ø¨Ø§ÙØªØ¸Ø§Ø± إثبات Ø§ÙØ¯Ùع',processing:'ÙÙØ¯ Ø§ÙØªÙÙÙØ°',completed:'Ù ÙØªÙ Ù',cancelled:'Ù ÙØºÙ'}; 6167 const PROCUREMENT_DOCUMENT_LABELS={proforma_invoice:'Proforma Invoice',quotation:'Quotation',supplier_document:'Ù Ø³ØªÙØ¯ اÙÙ ÙØ±Ø¯',product_specification:'Ù ÙØ§ØµÙات اÙÙ ÙØªØ¬',payment_proof:'إثبات Ø§ÙØ¯Ùع',shipping_document:'Ù Ø³ØªÙØ¯ Ø§ÙØ´ØÙ',other:'Ù Ø³ØªÙØ¯ آخر'}; 6168 const CUSTOMER_ORDER_STATUS_LABELS={confirmed:'Ø·ÙØ¨ Ù Ø¤ÙØ¯',procurement:'ÙÙØ¯ Ø§ÙØ´Ø±Ø§Ø¡ ÙØ§ÙØªÙØ±Ùد',completed:'Ù ÙØªÙ Ù',cancelled:'Ù ÙØºÙ'}; 6169 const CUSTOMER_ORDER_PAYMENT_LABELS={pending:'Ø¨Ø§ÙØªØ¸Ø§Ø± إثبات/تأÙÙØ¯ Ø§ÙØ¯Ùع',confirmed:'ت٠تأÙÙØ¯ Ø§ÙØ¯Ùع',not_required:'ÙØ§ ÙØªØ·Ùب Ø¯ÙØ¹Ø§Ù',refunded:'ت٠رد اÙÙ Ø¨ÙØº'}; 6170 const PURCHASE_MODE_LABELS={request_quote:'Ø·ÙØ¨ Ø¨ØØ« ÙØªØ¬ÙÙØ² عرض',buy_now:'عرض Ù ÙØ±Ø¯ Ø¬Ø§ÙØ² ÙÙØ§Ø¹ØªÙ اد'}; 6171 const PROCUREMENT_CURRENCY_LABELS={CNY:'ÙÙØ§Ù صÙÙ٠¥',USD:'دÙÙØ§Ø± أ٠رÙÙÙ $',SDG:'جÙ
6171ÙÙ Ø³ÙØ¯Ø§ÙÙ SDG',AED:'درÙÙ AED (عرض ÙØ¯ÙÙ )'}; 6172 const PROCUREMENT_CURRENCY_SYMBOLS={CNY:'Â¥',USD:'$',SDG:'SDG',AED:'AED'}; 6173 const PROCUREMENT_PRICING_LABELS={total:'سعر إج٠اÙÙ',unit:'سعر ÙØØ¯Ø© à ÙÙ ÙØ©'}; 6174 const PROCUREMENT_QUOTE_UNIT_LABELS={unit:'ÙØØ¯Ø©',piece:'ÙØ·Ø¹Ø©',set:'Ø·ÙÙ / Set',kg:'ÙØ¬Ù ',ton:'Ø·Ù',meter:'٠تر',sqm:'٠²',cbm:'٠³ / CBM',lot:'Ø¯ÙØ¹Ø© / Lot'}; 6175 const PROCUREMENT_INCOTERM_LABELS={EXW:'EXW â Ø§Ø³ØªÙا٠٠٠اÙÙ ØµÙØ¹',FOB:'FOB â Ø¹ÙÙ Ø¸ÙØ± Ø§ÙØ³ÙÙÙØ©',CIF:'CIF â ØªÙÙÙØ© + تأ٠ÙÙ + Ø´ØÙ'}; 6176 const PROCUREMENT_SHIPPING_LABELS={none:'بدÙÙ Ø´ØÙ Ø¶Ù Ù Ø§ÙØ¹Ø±Ø¶',fcl:'ØØ§ÙÙØ© ÙØ§Ù ÙØ© FCL',lcl:'Ø´ØÙ Ø¨ØØ±Ù ٠جزأ LCL',air_cargo:'Ø´ØÙ جÙÙ Air Cargo'}; 6177 const PROCUREMENT_CONTAINER_LABELS={'20GP':'20GP â ØØ§ÙÙØ© 20 ÙØ¯Ù ','40GP':'40GP â ØØ§ÙÙØ© 40 ÙØ¯Ù ','40HC':'40HC â ØØ§ÙÙØ© 40 ÙØ¯Ù High Cube'}; 6178 const ORDER_MILESTONE_LABELS={supplier_order:'ت٠تأÙÙØ¯ Ø§ÙØ·Ùب ٠ع اÙÙ ÙØ±Ø¯',production:'Ø§ÙØªØµÙÙØ¹',inspection:'اÙÙØØµ ÙØ§ÙØ¬ÙØ¯Ø©',shipping:'Ø§ÙØ´ØÙ',delivery:'Ø§ÙØªØ³ÙÙÙ ',payment:'Ø§ÙØ¯Ùع',note:'ØªØØ¯ÙØ« تشغÙÙÙ'}; 6179 const ORDER_EVIDENCE_LABELS={production_photo:'ØµÙØ± Ø§ÙØªØµÙÙØ¹',production_video:'ÙÙØ¯ÙÙ Ø§ÙØªØµÙÙØ¹',inspection_report:'ØªÙØ±Ùر اÙÙØØµ',supplier_document:'Ù Ø³ØªÙØ¯ اÙÙ ÙØ±Ø¯',shipping_document:'Ù Ø³ØªÙØ¯ Ø§ÙØ´ØÙ',payment_document:'Ù Ø³ØªÙØ¯ Ø§ÙØ¯Ùع',other:'دÙÙ٠آخر'}; 6180 const ORDER_VISIBILITY_LABELS={member:'Ø¸Ø§ÙØ± ÙÙØ¹Ø¶Ù',internal:'داخÙÙ ÙÙØ¥Ø¯Ø§Ø±Ø©',inherit:'ÙØªØ¨Ø¹ اÙ٠رØÙØ©'}; 6181 function procurementServiceLabel(v){return PROCUREMENT_SERVICE_LABELS[String(v||'')]||String(v||'-')} 6182 function procurementStatusLabel(v){return PROCUREMENT_STATUS_LABELS[String(v||'')]||String(v||'-')} 6183 function procurementDocumentLabel(v){return PROCUREMENT_DOCUMENT_LABELS[String(v||'')]||String(v||'-')} 6184 function customerOrderStatusLabel(v){return CUSTOMER_ORDER_STATUS_LABELS[String(v||'')]||String(v||'-')} 6185 function customerOrderPaymentLabel(v){return CUSTOMER_ORDER_PAYMENT_LABELS[String(v||'')]||String(v||'-')} 6186 function purchaseModeLabel(v){return PURCHASE_MODE_LABELS[String(v||'')]||String(v||'-')} 6187 function procurementCurrencyLabel(v){return PROCUREMENT_CURRENCY_LABELS[String(v||'').toUpperCase()]||String(v||'-')} 6188 function procurementCurrencySymbol(v){return PROCUREMENT_CURRENCY_SYMBOLS[String(v||'').toUpperCase()]||String(v||'')} 6189 function procurementMoney(v,currency){const n=Number(v||0);const shown=Number.isFinite(n)?n.toLocaleString('en-US',{minimumFractionDigits:2,maximumFractionDigits:2}):'0.00';const c=String(currency||'').toUpperCase();return (procurementCurrencySymbol(c)?procurementCurrencySymbol(c)+' ':'')+shown+(c==='SDG'?'':'')} 6190 function procurementPricingLabel(v){return PROCUREMENT_PRICING_LABELS[String(v||'')]||String(v||'-')} 6191 function procurementQuoteUnitLabel(v){return PROCUREMENT_QUOTE_UNIT_LABELS[String(v||'')]||String(v||'-')} 6192 function procurementIncotermLabel(v){return PROCUREMENT_INCOTERM_LABELS[String(v||'')]||String(v||'-')} 6193 function procurementShippingLabel(v){return PROCUREMENT_SHIPPING_LABELS[String(v||'')]||String(v||'-')} 6194 function procurementContainerLabel(v){return PROCUREMENT_CONTAINER_LABELS[String(v||'')]||String(v||'-')} 6195 function procurementCommercialSnapshot(order){const raw=safeRecord(order&&order.commercial_snapshot)||{};if(Object.keys(raw).length){const origin=safeRecord(raw.origin)||{},destination=safeRecord(raw.destination)||{};return Object.assign({},raw,{origin_country:raw.origin_country||origin.country||'',origin_city:raw.origin_city||origin.city||'',loading_point:raw.loading_point||origin.loading_point||'',destination_country:raw.destination_country||destination.country||'',destination_city:raw.destination_city||destination.city||'',destination_point:raw.destination_point||destination.point||''});}return{version:Number(order&&order.commercial_model_version||1),currency:order&&order.currency,goods_amount:Number(order&&order.subtotal_amount||0),service_fee_percent:Number(order&&order.service_fee_percent||0),service_fee_amount:Number(order&&order.service_fee_amount||0),shipping_amount:Number(order&&order.shipping_amount||0),insurance_amount:Number(order&&order.insurance_amount||0),discount_amount:Number(order&&order.discount_amount||0),total_amount:Number(order&&order.total_amount||0)}} 6196 function orderMilestoneLabel(v){return ORDER_MILESTONE_LABELS[String(v||'')]||String(v||'-')} 6197 function orderEvidenceLabel(v){return ORDER_EVIDENCE_LABELS[String(v||'')]||String(v||'-')} 6198 function orderVisibilityLabel(v){return ORDER_VISIBILITY_LABELS[String(v||'')]||String(v||'-')} 6199 function procurementQuoteDocuments(payload){return safeArray(payload&&payload.documents).filter(d=>['quotation','proforma_invoice'].includes(String(d&&d.document_type||'')));} 6200 function procurementSupportingDocuments(payload){const docs=safeArray(payload&&payload.documents);return payload&&payload.request&&payload.request.status==='quoted'&&!payload.order?docs.filter(d=>!['quotation','proforma_invoice'].includes(String(d&&d.document_type||''))):docs;} 6201 function procurementNextAction(payload,audience='member'){ 6202 const request=safeRecord(payload&&payload.request)||{};const status=String(request.status||'');const docs=safeArray(payload&&payload.documents);const paymentProof=docs.some(d=>String(d&&d.document_type||'')==='payment_proof'); 6203 const map={ 6204 draft:{owner:audience==='member'?'Ø£ÙØª':'Ø§ÙØ¹Ø¶Ù',title:'Ø¥Ù٠ا٠اÙÙ Ø³ÙØ¯Ø© ÙØ¥Ø±Ø³Ø§ÙÙØ§ ÙÙ٠راجعة',note:'Ù٠تبدأ SMT اÙ٠راجعة ÙØ¨Ù Ø¥Ø±Ø³Ø§Ù Ø§ÙØ·Ùب.',tone:'member'}, 6205 submitted:{owner:'SMT',title:'٠راجعة Ø§ÙØ·Ùب ÙØªØ¹ÙÙ٠٠سؤÙÙ',note:'ØªÙ Ø§Ø³ØªÙØ§Ù Ø§ÙØ·Ùب ÙÙÙ ÙÙ Ø·Ø§Ø¨ÙØ± اÙ٠راجعة.',tone:'smt'}, 6206 under_review:{owner:'SMT',title:'Ø§ÙØ¨ØØ« ÙØ§ÙتØÙÙ ÙØªØ¬ÙÙØ² Ø§ÙØ¹Ø±Ø¶',note:'ÙØ¬Ø±Ù تجÙ
6206ÙØ² Ø§ÙØ¹Ø±Ø¶ ÙØ³ÙصÙÙ Ø¹ÙØ¯ Ø§ÙØªÙ اÙÙ.',tone:'smt'}, 6207 quoted:{owner:'Ø§ÙØ¹Ø¶Ù',title:'٠راجعة عرض Ø§ÙØ³Ø¹Ø± ÙØ§ØªØ®Ø§Ø° اÙÙØ±Ø§Ø±',note:'ÙÙ ÙÙÙ ÙØ¨ÙÙ Ø§ÙØ¹Ø±Ø¶ Ø£Ù Ø·ÙØ¨ تعدÙÙ ÙØ¨Ù Ø§ÙØ§Ø¹ØªÙ اد.',tone:'member'}, 6208 payment_pending:paymentProof?{owner:'SMT',title:'٠راجعة إثبات Ø§ÙØ¯Ùع ÙØ¨Ø¯Ø¡ Ø§ÙØªÙÙÙØ°',note:'إثبات Ø§ÙØ¯Ùع ٠رÙÙØ¹ ÙÙÙØªØ¸Ø± إجراء Ø§ÙØ¥Ø¯Ø§Ø±Ø©.',tone:'smt'}:{owner:'Ø§ÙØ¹Ø¶Ù',title:'استÙÙ Ø§Ù Ø§ÙØ¯Ùع ÙØ±Ùع Ø§ÙØ¥Ø«Ø¨Ø§Øª',note:'بعد تأÙÙØ¯ Ø§ÙØ¯Ùع ØªÙØªÙÙ Ø§ÙØ¹Ù ÙÙØ© Ø¥ÙÙ Ø§ÙØªÙÙÙØ°.',tone:'member'}, 6209 processing:{owner:'SMT',title:'Ø§ÙØ´Ø±Ø§Ø¡ ÙØ§ÙÙØØµ ÙØ§ÙØ´ØÙ',note:'Ø§ÙØªÙÙÙØ° Ø¬Ø§Ø±Ù ØØ³Ø¨ Ø§ÙØ¹Ø±Ø¶ Ø§ÙØ°Ù ÙØ§Ù٠عÙÙÙ Ø§ÙØ¹Ø¶Ù.',tone:'smt'}, 6210 completed:{owner:'Ù ÙØªÙ Ù',title:'Ø§ÙØªÙ ٠تÙÙÙØ° Ø§ÙØ·Ùب',note:'ÙÙ Ù٠٠راجعة Ø§ÙØ³Ø¬Ù ÙØ§ÙÙ Ø³ØªÙØ¯Ø§Øª Ù٠أ٠ÙÙØª.',tone:'done'}, 6211 cancelled:{owner:'٠تÙÙÙ',title:'Ø§ÙØ·Ùب Ù ÙØºÙ',note:'راجع Ø³Ø¬Ù Ø§ÙØØ§ÙØ© ÙÙ Ø¹Ø±ÙØ© سبب Ø§ÙØ¥Ùغاء.',tone:'danger'} 6212 }; 6213 return map[status]||{owner:'SMT',title:'٠تابعة Ø§ÙØ·Ùب',note:'راجع Ø§ÙØØ§ÙØ© Ø§ÙØØ§ÙÙØ© ÙØ§ÙسجÙ.',tone:'smt'}; 6214 } 6215 function customerOrderNextAction(payload,audience='member'){ 6216 const order=safeRecord(payload&&payload.order)||{};const status=String(order.status||'');const procurement=String(order.procurement_status||'');const payment=String(order.payment_status||''); 6217 if(status==='cancelled'||procurement==='cancelled')return{owner:'٠تÙÙÙ',title:'Ø§ÙØ·Ùب Ù ÙØºÙ',note:'راجع Ø§ÙØ³Ø¬Ù Ø§ÙØ²Ù ÙÙ ÙÙ Ø¹Ø±ÙØ© آخر إجراء.',tone:'danger'}; 6218 if(status==='completed'||procurement==='completed')return{owner:'Ù ÙØªÙ Ù',title:'Ø§ÙØªÙ Ù Ø§ÙØ·Ùب',note:'Ø¬Ù ÙØ¹ ٠راØÙ Ø§ÙØ·Ùب Ø§ÙØ£Ø³Ø§Ø³ÙØ© Ù ÙØªÙ ÙØ©.',tone:'done'}; 6219 if(procurement==='payment_pending'||(status==='confirmed'&&payment==='pending'))return{owner:audience==='member'?'Ø£ÙØª':'Ø§ÙØ¹Ø¶Ù / SMT',title:'استÙÙ Ø§Ù Ø§ÙØ¯Ùع ÙØªØ£ÙÙØ¯Ù',note:'بعد تأÙÙØ¯ Ø§ÙØ¯Ùع ÙØ¨Ø¯Ø£ Ø§ÙØ´Ø±Ø§Ø¡ ÙØ§ÙتÙÙÙØ°.',tone:'member'}; 6220 if(status==='procurement'||procurement==='processing')return{owner:'SMT',title:'Ø§ÙØ´Ø±Ø§Ø¡ ÙØ§ÙÙØØµ ÙØ§ÙØ´ØÙ',note:'ÙØ±ÙÙ SMT ÙÙÙØ° Ø§ÙØ·Ùب ØØ³Ø¨ اÙÙØ³Ø®Ø© اÙ٠عت٠دة Ù Ù Ø§ÙØ¹Ø±Ø¶.',tone:'smt'}; 6221 return{owner:'SMT',title:'تجÙÙØ² Ø§ÙØ·Ùب ÙÙØªÙÙÙØ°',note:'ت٠تأÙÙØ¯ Ø§ÙØ·Ùب ÙØ³ÙØ¸ÙØ± ÙÙ ØªÙØ¯Ù ÙÙ Ø§ÙØ³Ø¬Ù Ø§ÙØ²Ù ÙÙ.',tone:'smt'}; 6222 } 6223 6224 function adminRecordUpdatedAt(row){const r=row||{};return shortDate(r.updated_at||r.last_activity_at||r.last_update_at||r.reviewed_at||r.accepted_at||r.created_at)||'-';} 6225 function adminQueueOwner(domain,row){const r=row||{};if(String(r.assigned_admin_name||'').trim())return r.assigned_admin_name;return ({members:'ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©',arrival:'٠تابعة اÙÙØµÙÙ',help:'٠تابعة اÙ٠ساعدة',emergency:'٠تابعة Ø§ÙØ·Ùارئ',events:'إدارة اÙÙØ¹Ø§ÙÙØ§Øª',announcements:'إدارة اÙÙ ØØªÙÙ',procurement:'SMT',orders:'SMT'}[String(domain||'')])||'Ø§ÙØ¥Ø¯Ø§Ø±Ø©';} 6226 function memberQueueNextAction(row){const s=String(row&&row.status||'');return ({pre_registered:'Ø¥ÙÙ Ø§Ù Ø§ÙØªØ³Ø¬ÙÙ',profile_pending:'Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª',pending:'٠راجعة ÙØ§Ø¹ØªÙ اد',approved:'ÙØ§ إجراء',suspended:'٠راجعة Ø§ÙØªØ¹ÙÙÙ',archived:'٠ؤرشÙ'}[s])||'٠راجعة Ø§ÙØ³Ø¬Ù';} 6227 function caseQueueNextAction(row){const s=String(row&&row.status||'');return ({new:'ÙØªØ Ø§ÙØØ§ÙØ©',open:'بدء اÙ٠تابعة',pending:'٠راجعة Ø§ÙØØ§ÙØ©',in_progress:'٠تابعة Ø£Ù Ø¥ØºÙØ§Ù',resolved:'Ù ÙØªÙ ÙØ©',closed:'٠غÙÙØ©'}[s])||'٠راجعة Ø§ÙØØ§ÙØ©';} 6228 function emergencyQueueNextAction(row){const s=String(row&&row.status||'');const p=String(row&&row.priority||'');if(['closed','resolved'].includes(s))return '٠غÙÙ';if(['critical','high'].includes(p)&&s!=='in_progress')return 'بدء اÙ٠تابعة ÙÙØ±Ø§Ù';if(s==='in_progress')return '٠تابعة Ø£Ù Ø¥ØºÙØ§Ù';return '٠راجعة Ø§ÙØ¨Ùاغ';} 6229 function eventQueueNextAction(row){const s=String(row&&row.status||'');return ({draft:'٠راجعة Ø«Ù ÙØ´Ø±',published:'٠تابعة اÙÙØ¹Ø§ÙÙØ©',completed:'Ø£Ø±Ø´ÙØ© Ø¹ÙØ¯ Ø§ÙØ§ÙØªÙØ§Ø¡',archived:'ÙØ§ إجراء',cancelled:'ÙØ§ إجراء'}[s])||'٠راجعة اÙÙØ¹Ø§ÙÙØ©';} 6230 function announcementQueueNextAction(row){const r=row||{},s=String(r.status||''),verified=isVerifiedAnnouncement(r);if(['archived','expired'].includes(s))return 'ÙØ§ إجراء';if(!verified)return '٠راجعة ÙØ§Ø¹ØªÙ اد';return '٠تابعة اÙÙØ´Ø±';} 6231 function procurementQueueNextAction(row){return procurementNextAction({request:row,documents:[]},'admin').title;} 6232 function orderQueueNextAction(row){return customerOrderNextAction({order:row},'admin').title;} 6233 6234 const MemberNotificationsPage={ 6235 components:{PublicFrame}, 6236 setup(){ 6237 const store=useGzcStore();const router=useRouter();const filter=ref('all'); 6238 const items=computed(()=>safeArray(store.state.memberNotifications)); 6239 const unread=computed(()=>Number(store.state.memberUnread||0)); 6240 async function load(){if(!(await store.requireMember(router,'/notifications')))return;await runBusyAction(store,'member-notifications.load',()=>store.loadMemberNotifications(filter.value,100));} 6241 async function openNotification(n){if(!n)return;if(!n.read_at){const r=await api('/api/member/notifications/'+encodeURIComponent(n.id)+'/read',{method:'POST',body:'{}'});if(r&&r.ok){n.read_at=r.notification&&r.notification.read_at||new Date().toISOString();store.state.memberUnread=Math.max(0,Number(store.state.memberUnread||0)-1);}}if(n.order_id)router.push('/orders?order='+encodeURIComponent(n.order_id));else if(n.request_id)router.push('/procurement?request='+encodeURIComponent(n.request_id));} 6242 async function markAll(){if(!unread.value)return;const r=await runBusyAction(store,'member-notifications.read-all',()=>api('/api/member/notifications/read-all',{method:'POST',body:'{}'}));store.state.msg=r.message||r.error||(r.ok?'ت٠تعÙÙÙ Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª ÙÙ ÙØ±Ùءة':'');if(r.ok)await load();} 6243 onMounted(load);watch(filter,load); 6244 return{store,filter,items,unread,load,openNotification,markAll,procurementStatusLabel,shortDate}; 6245 }, 6246 render:(function(){ 6247const _Vue = Vue
6248const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 6249 6250const _hoisted_1 = { class: "card memberNotificationsHero" } 6251const _hoisted_2 = { class: "memberNotificationCount" } 6252const _hoisted_3 = { class: "memberNotificationToolbar" } 6253const _hoisted_4 = { class: "segmented compactSegments" } 6254const _hoisted_5 = ["onClick"] 6255const _hoisted_6 = ["onClick"] 6256const _hoisted_7 = ["disabled", "onClick"] 6257const _hoisted_8 = { class: "memberNotificationList" } 6258const _hoisted_9 = ["onClick"] 6259const _hoisted_10 = { class: "memberNotificationMeta" } 6260const _hoisted_11 = { class: "memberNotificationTarget" } 6261const _hoisted_12 = { 6262 key: 0, 6263 class: "card emptyCard" 6264} 6265 6266return function render(_ctx, _cache) { 6267 with (_ctx) { 6268 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 6269 6270 const _component_PublicFrame = _resolveComponent("PublicFrame") 6271 6272 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "إشعاراتÙ" }, { 6273 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù Ø±ÙØ² اÙ٠تابعة"), _createElementVNode("h2", null, "Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª اÙÙ ÙÙ Ø©"), _createElementVNode("p", null, "ØªØØ¯Ùثات Ø·ÙØ¨Ø§Øª Ø§ÙØªÙØ±ÙØ¯ ÙØ¹Ø±Ùض Ø§ÙØ³Ø¹Ø± ÙØ§ÙتÙÙÙØ° ØªØ¸ÙØ± ÙÙØ§ ÙØªÙØªØ Ø§ÙØ³Ø¬Ù Ø§ÙØµØÙØ Ù Ø¨Ø§Ø´Ø±Ø©.")], -1)), _createElementVNode("div", _hoisted_2, [_createElementVNode("b", null, _toDisplayString(unread), 1), _cache[0] || (_cache[0] = _createElementVNode("span", null, "ØºÙØ± Ù ÙØ±ÙØ¡", -1))])]), _createElementVNode("section", _hoisted_3, [_createElementVNode("div", _hoisted_4, [_createElementVNode("button", { 6274 class: _normalizeClass({active:filter==='all'}), 6275 onClick: $event => (filter='all') 6276 }, "اÙÙÙ", 10, _hoisted_5), _createElementVNode("button", { 6277 class: _normalizeClass({active:filter==='unread'}), 6278 onClick: $event => (filter='unread') 6279 }, "ØºÙØ± اÙÙ ÙØ±ÙØ¡", 10, _hoisted_6)]), _createElementVNode("button", { 6280 class: "smallbtn secondary", 6281 disabled: !unread, 6282 onClick: markAll 6283 }, "تعÙÙ٠اÙÙÙ ÙÙ ÙØ±ÙØ¡", 8, _hoisted_7)]), _createElementVNode("section", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (n) => { 6284 return (_openBlock(), _createElementBlock("button", { 6285 key: n.id, 6286 class: _normalizeClass(["memberNotificationItem", {unread:!n.read_at}]), 6287 onClick: $event => (openNotification(n)) 6288 }, [_cache[2] || (_cache[2] = _createElementVNode("span", { class: "memberNotificationDot" }, null, -1)), _createElementVNode("div", null, [ 6289 _createElementVNode("div", _hoisted_10, [_createElementVNode("b", null, _toDisplayString(n.order_code||n.request_code), 1), _createElementVNode("small", null, _toDisplayString(shortDate(n.created_at)), 1)]), 6290 _createElementVNode("h3", null, _toDisplayString(n.title), 1), 6291 _createElementVNode("p", null, _toDisplayString(n.body), 1), 6292 _createElementVNode("span", _hoisted_11, _toDisplayString(n.order_id?'ÙØªØ Ø§ÙØ·Ùب اÙÙ Ø¤ÙØ¯':'ÙØªØ Ø·ÙØ¨ Ø§ÙØªÙØ±ÙØ¯') + " â", 1) 6293 ])], 10, _hoisted_9)) 6294 }), 128)), (!items.length&&!store.state.busy) 6295 ? (_openBlock(), _createElementBlock("div", _hoisted_12, _cache[3] || (_cache[3] = [_createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ إشعارات ÙÙ ÙØ°Ø§ اÙÙØ³Ù .", -1), _createElementVNode("p", { class: "hint" }, "Ø¹ÙØ¯ ØªØØ¯ÙØ« Ø·ÙØ¨ Ø£Ù ÙØ´Ø± عرض سعر Ø³ÙØ¸Ùر ÙÙØ§ ٠باشرة.", -1)]))) 6296 : _createCommentVNode("", true)])]), 6297 _: 1 6298 })) 6299 } 6300} 6301})() 6302 }; 6303 6304 const MemberProcurementPage={ 6305 components:{PublicFrame}, 6306 setup(){ 6307 const store=useGzcStore();const router=useRouter();const route=useRoute();const requests=ref([]);const detail=ref(null);const file=ref(null);const documentType=ref('proforma_invoice');const acceptTerms=ref(false);const revisionNote=ref('');const createMode=computed(()=>route.path==='/procurement/new'); 6308 const requestedService=['product_sourcing','supplier_verification','quality_inspection','supplier_payment','shipping_logistics'].includes(String((route.query||{}).service_type||''))?String(route.query.service_type):'product_sourcing';const requestedRoute=String((route.query||{}).route_label||'').trim().slice(0,160);const form=reactive({service_type:requestedService,title:'',description:requestedRoute?('٠سار Ø§ÙØ´ØÙØ©: '+requestedRoute):'',supplier_name:'',supplier_contact:'',proforma_number:'',quoted_currency:'CNY',member_note:''}); 6309 const editForm=reactive({service_type:'product_sourcing',title:'',description:'',supplier_name:'',supplier_contact:'',proforma_number:'',quoted_currency:'CNY',member_note:''}); 6310 const fileLabel=computed(()=>file.value?file.value.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± Ù Ø³ØªÙØ¯'); 6311 const nextAction=computed(()=>procurementNextAction(detail.value,'member')); 6312 async function load(){if(!(await store.requireMember(router,route.fullPath||'/orders')))return;if(createMode.value){detail.value=null;requests.value=[];return;}const requested=String(route.query.request||'');if(!requested){router.replace('/orders').catch(()=>{});return;}await open({id:requested});} 6313 async function open(x){const r=await runBusyAction(store,'member-procurement.open',()=>api('/api/member/procurement/'+encodeURIComponent(x.id)));const request=safeRecord(r.request);if(r.ok&&request&&request.id){r.request=request;detail.value=r;acceptTerms.value=false;revisionNote.value='';if(r.request.status==='draft')Object.assign(editForm,{service_type:r.request.service_type,title:r.request.title,de
6313scription:r.request.description,supplier_name:r.request.supplier_name||'',supplier_contact:r.request.supplier_contact||'',proforma_number:r.request.proforma_number||'',quoted_currency:r.request.quoted_currency||'CNY',member_note:r.request.member_note||''});if(r.request.status==='quoted'&&Number(r.request.offer_version||0)>0)await api('/api/member/procurement/'+r.request.id+'/offer/open',{method:'POST',body:'{}'});if(safeArray(r.updates).some(u=>!u.read_at)){const ack=await api('/api/member/procurement/'+r.request.id+'/updates/read',{method:'POST',body:'{}'});if(ack&&ack.ok&&Number(ack.read||0)>0){store.state.memberUnread=Math.max(0,Number(store.state.memberUnread||0)-Number(ack.read||0));store.state.memberNotifications=safeArray(store.state.memberNotifications).map(n=>String(n.request_id)===String(r.request.id)?Object.assign({},n,{read_at:n.read_at||new Date().toISOString()}):n);}const row=requests.value.find(y=>String(y.id)===String(r.request.id));if(row)row.unread_updates=0;}}else store.state.msg=r.message||r.error||(r.ok?'تعذر عرض Ø§ÙØ·Ùب ÙØ£Ù استجابة Ø§ÙØ³ÙØ±ÙØ± ØºÙØ± Ù ÙØªÙ ÙØ©':'');} 6314 async function create(submitNow=false){if(!form.title||!form.description){store.state.msg='Ø§ÙØ¹ÙÙØ§Ù ÙØ§ÙØªÙØ§ØµÙÙ Ù Ø·ÙÙØ¨Ø©';return;}const r=await runBusyAction(store,'member-procurement.create',()=>api('/api/member/procurement',{method:'POST',body:JSON.stringify(form)}));if(!r.ok){store.state.msg=r.message||r.error||'تعذر Ø¥ÙØ´Ø§Ø¡ Ø§ÙØ·Ùب';return;}let current=r.request;if(submitNow){const sent=await runBusyAction(store,'member-procurement.create-submit',()=>api('/api/member/procurement/'+encodeURIComponent(current.id)+'/submit',{method:'POST',body:JSON.stringify({note:'ØªÙ Ø¥ÙØ´Ø§Ø¡ Ø§ÙØ·Ùب ÙØ¥Ø±Ø³Ø§ÙÙ ÙÙ٠راجعة Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØ¹Ø¶Ù'})}));if(sent&&sent.ok)current=sent.request;else store.state.msg=sent.message||sent.error||'ت٠ØÙظ Ø§ÙØ·Ùب ÙÙ Ø³ÙØ¯Ø© ÙØªØ¹Ø°Ø± إرساÙÙ ÙÙ٠راجعة';}Object.assign(form,{service_type:'product_sourcing',title:'',description:'',supplier_name:'',supplier_contact:'',proforma_number:'',quoted_currency:'CNY',member_note:''});await store.loadMemberWorkflowSummary();await router.replace('/procurement?request='+encodeURIComponent(current.id)).catch(()=>{});await open(current);if(!store.state.msg)store.state.msg=submitNow?'ØªÙ Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨Ù Ø¥ÙÙ SMT ÙÙ٠راجعة':'ت٠ØÙظ Ø§ÙØ·Ùب ÙÙ Ø³ÙØ¯Ø©';} 6315 async function saveDraft(){if(!detail.value||detail.value.request.status!=='draft')return;const r=await api('/api/member/procurement/'+detail.value.request.id+'/update',{method:'POST',body:JSON.stringify(editForm)});store.state.msg=r.message||r.error||'';if(r.ok){await load();await open(r.request);}} 6316 async function submit(){if(!detail.value)return;const r=await api('/api/member/procurement/'+detail.value.request.id+'/submit',{method:'POST',body:JSON.stringify({note:'ت٠ت اÙ٠راجعة ÙØ§ÙØ¥Ø±Ø³Ø§Ù Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØ¹Ø¶Ù'})});store.state.msg=r.message||r.error||'';if(r.ok){await load();await open(r.request);}} 6317 async function cancel(){if(!detail.value||!confirm('Ø¥ÙØºØ§Ø¡ ÙØ°Ø§ Ø§ÙØ·ÙبØ'))return;const r=await api('/api/member/procurement/'+detail.value.request.id+'/cancel',{method:'POST',body:JSON.stringify({note:'Ø¥ÙØºØ§Ø¡ Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØ¹Ø¶Ù'})});store.state.msg=r.message||r.error||'';if(r.ok){await load();detail.value=null;}} 6318 function onFile(e){file.value=e.target.files&&e.target.files[0]?e.target.files[0]:null;} 6319 async function upload(){if(!detail.value||!file.value){store.state.msg='اختر اÙÙ Ø³ØªÙØ¯ Ø£ÙÙØ§Ù';return;}const fd=new FormData();fd.append('document_type',documentType.value);fd.append('file',file.value);const r=await runBusyAction(store,'member-procurement.upload',()=>uploadApi('/api/member/procurement/'+detail.value.request.id+'/documents',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ Ù Ø³ØªÙØ¯ Ø§ÙØ·Ùب'}));store.state.msg=r.message||r.error||'';if(r.ok){file.value=null;await open(detail.value.request);}} 6320 async function archiveDocument(d){if(!detail.value||!confirm('ØØ°Ù ÙØ°Ø§ اÙÙ Ø³ØªÙØ¯ ٠٠اÙÙ Ø³ÙØ¯Ø©Ø'))return;const r=await api('/api/member/procurement/'+detail.value.request.id+'/documents/'+d.id+'/archive',{method:'POST',body:'{}'});store.state.msg=r.message||r.error||'';if(r.ok)await open(detail.value.request);} 6321 async function acceptOffer(){if(!detail.value||detail.value.request.status!=='quoted')return;if(!acceptTerms.value){store.state.msg='Ø£ÙØ¯ ÙØ±Ø§Ø¡Ø© Ø§ÙØ³Ø¹Ø± ÙØ§ÙØ´Ø±ÙØ· Ø£ÙÙØ§Ù';return;}if(!confirm('اعت٠اد Ø§ÙØ¹Ø±Ø¶ ÙØ¥Ùشاء Ø·ÙØ¨ Ù Ø¤ÙØ¯ Ø¨ÙØ°Ù اÙÙÙÙ Ø'))return;const r=await runBusyAction(store,'member-procurement.accept-offer',()=>api('/api/member/procurement/'+detail.value.request.id+'/accept-offer',{method:'POST',body:JSON.stringify({accept_terms:true})}));store.state.msg=r.message||r.error||'';if(r.ok&&r.order)router.push('/orders?order='+encodeURIComponent(r.order.id));} 6322 async function requestRevision(){if(!detail.value||!String(revisionNote.value||'').trim()){store.state.msg='Ø§ÙØªØ¨ Ø§ÙØªØ¹Ø¯Ù٠اÙÙ Ø·ÙÙØ¨ عÙÙ Ø§ÙØ¹Ø±Ø¶';return;}const r=await api('/api/member/procurement/'+detail.value.request.id+'/request-offer-revision',{method:'POST',body:JSON.stringify({note:revisionNote.value})});store.state.msg=r.message||r.error||'';if(r.ok){await load();await open(detail.value.request);}} 6323 function closeDetail(){detail.value=null;router.push('/orders').catch(()=>{});} 6324 onMounted(load); 6325 return{store,requests,detail,form,editForm,file,fileLabel,documentType,acceptTerms,revisionNote,nextAction,createMode,PROCUREMENT_DOCUMENT_LABELS,load,open,closeDetail,create,saveDraft,submit,cancel,onFile,upload,archiveDocument,acceptOffer,requestRevision,procurementQuoteDocuments,procurementSupportingDocuments,procurementServiceLabel,procurementStatusLabel,procurementDocumentLabel,purchaseModeLabel,procurementCurrencyLabel,procurementMoney,procurementPricingLabel,procurementQuoteUnitLabel,procurementIncotermLabel,procurementShippingLabel,procurementContainerLabel,shortDate,adminRecordUpdatedAt,adminQueueOwner,procurementQueueNextAction}; 6326 }, 6327 render:(function(){ 6328const _Vue = Vue
6329const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 6330 6331const _hoisted_1 = { 6332 key: 0, 6333 class: "memberNewRequestPage" 6334} 6335const _hoisted_2 = { class: "memberNewRequestHero" } 6336const _hoisted_3 = ["onClick"] 6337const _hoisted_4 = { class: "card memberNewRequestForm" } 6338const _hoisted_5 = { class: "fieldLabel" } 6339const _hoisted_6 = ["onUpdate:modelValue"] 6340const _hoisted_7 = { class: "fieldLabel" } 6341const _hoisted_8 = ["onUpdate:modelValue"] 6342const _hoisted_9 = { class: "fieldLabel" } 6343const _hoisted_10 = ["onUpdate:modelValue"] 6344const _hoisted_11 = { class: "formTwo" } 6345const _hoisted_12 = { class: "fieldLabel" } 6346const _hoisted_13 = ["onUpdate:modelValue"] 6347const _hoisted_14 = { class: "fieldLabel" } 6348const _hoisted_15 = ["onUpdate:modelValue"] 6349const _hoisted_16 = { class: "formTwo" } 6350const _hoisted_17 = { class: "fieldLabel" } 6351const _hoisted_18 = ["onUpdate:modelValue"] 6352const _hoisted_19 = { class: "fieldLabel" } 6353const _hoisted_20 = ["onUpdate:modelValue"] 6354const _hoisted_21 = { class: "fieldLabel" } 6355const _hoisted_22 = ["onUpdate:modelValue"] 6356const _hoisted_23 = { class: "newRequestActions" } 6357const _hoisted_24 = ["disabled", "onClick"] 6358const _hoisted_25 = ["disabled", "onClick"] 6359const _hoisted_26 = { 6360 key: 1, 6361 class: "card skeleton" 6362} 6363const _hoisted_27 = { 6364 key: 2, 6365 class: "card adminRecordWorkspace procurementWorkspace memberProcurementWorkspace" 6366} 6367const _hoisted_28 = { class: "adminRecordWorkspaceTop" } 6368const _hoisted_29 = ["onClick"] 6369const _hoisted_30 = { class: "memberCardTop" } 6370const _hoisted_31 = { class: "codeToken requestCode" } 6371const _hoisted_32 = { class: "workspaceTitle" } 6372const _hoisted_33 = { class: "statusPill" } 6373const _hoisted_34 = { class: "workflowActionMeta" } 6374const _hoisted_35 = { class: "recordNarrative" } 6375const _hoisted_36 = { class: "infoGrid" } 6376const _hoisted_37 = { 6377 key: 0, 6378 class: "offerDecisionCard commercialOfferCard commercialDecisionWorkspace" 6379} 6380const _hoisted_38 = { class: "offerDecisionHead commercialDecisionHero" } 6381const _hoisted_39 = { class: "vueBadge" } 6382const _hoisted_40 = { key: 0 } 6383const _hoisted_41 = { class: "commercialHeroTotal" } 6384const _hoisted_42 = { class: "offerTotal" } 6385const _hoisted_43 = { class: "commercialDecisionHighlights" } 6386const _hoisted_44 = { class: "offerBreakdown commercialMoneySummary" } 6387const _hoisted_45 = { key: 0 } 6388const _hoisted_46 = { key: 1 } 6389const _hoisted_47 = { 6390 key: 0, 6391 class: "commercialDisclosure", 6392 open: "" 6393} 6394const _hoisted_48 = { class: "commercialDisclosureBody commercialQuoteGrid" } 6395const _hoisted_49 = { key: 0 } 6396const _hoisted_50 = { key: 1 } 6397const _hoisted_51 = { 6398 key: 1, 6399 class: "commercialDisclosure" 6400} 6401const _hoisted_52 = { class: "commercialDisclosureBody commercialQuoteGrid" } 6402const _hoisted_53 = { key: 0 } 6403const _hoisted_54 = { key: 1 } 6404const _hoisted_55 = { key: 2 } 6405const _hoisted_56 = { key: 3 } 6406const _hoisted_57 = { key: 4 } 6407const _hoisted_58 = { key: 5 } 6408const _hoisted_59 = { key: 6 } 6409const _hoisted_60 = { key: 7 } 6410const _hoisted_61 = { key: 8 } 6411const _hoisted_62 = { key: 9 } 6412const _hoisted_63 = { key: 10 } 6413const _hoisted_64 = { key: 11 } 6414const _hoisted_65 = { 6415 key: 12, 6416 class: "commercialWide" 6417} 6418const _hoisted_66 = { class: "commercialDisclosure" } 6419const _hoisted_67 = { class: "commercialDisclosureBody offerTermsGrid" } 6420const _hoisted_68 = { class: "decisionDocumentList commercialDocuments" } 6421const _hoisted_69 = ["href"] 6422const _hoisted_70 = { class: "commercialDecisionActions" } 6423const _hoisted_71 = { class: "approvalCheck offerAcceptCheck" } 6424const _hoisted_72 = ["onUpdate:modelValue"] 6425const _hoisted_73 = ["disabled", "onClick"] 6426const _hoisted_74 = { class: "offerRevision commercialRevision" } 6427const _hoisted_75 = ["onUpdate:modelValue"] 6428const _hoisted_76 = ["onClick"] 6429const _hoisted_77 = { 6430 key: 1, 6431 class: "orderCreatedBanner" 6432} 6433const _hoisted_78 = ["onClick"] 6434const _hoisted_79 = { 6435 key: 2, 6436 class: "collapseSection procurementEditBox", 6437 open: "" 6438} 6439const _hoisted_80 = { class: "collapseBody formCard" } 6440const _hoisted_81 = ["onUpdate:modelValue"] 6441const _hoisted_82 = ["onUpdate:modelValue"] 6442const _hoisted_83 = ["onUpdate:modelValue"] 6443const _hoisted_84 = { class: "formTwo" } 6444const _hoisted_85 = ["onUpdate:modelValue"] 6445const _hoisted_86 = ["onUpdate:modelValue"] 6446const _hoisted_87 = { class: "formTwo" } 6447const _hoisted_88 = ["onUpdate:modelValue"] 6448const _hoisted_89 = ["onUpdate:modelValue"] 6449const _hoisted_90 = ["onUpdate:modelValue"] 6450const _hoisted_91 = ["onClick"] 6451const _hoisted_92 = { 6452 key: 3, 6453 class: "uploadBox procurementUploadBox memberProcurementUpload" 6454} 6455const _hoisted_93 = { class: "fieldLabel" } 6456const _hoisted_94 = ["onUpdate:modelValue"] 6457const _hoisted_95 = ["value"] 6458const _hoisted_96 = { class: "filePicker wide procurementMemberFilePicker" } 6459const _hoisted_97 = ["onChange"] 6460const _hoisted_98 = ["disabled", "onClick"] 6461const _hoisted_99 = { class: "row" } 6462const _hoisted_100 = ["href"] 6463const _hoisted_101 = ["onClick"] 6464const _hoisted_102 = { 6465 key: 4, 6466 class: "procurementUpdates", 6467 open: "" 6468} 6469const _hoisted_103 = { class: "row" } 6470const _hoisted_104 = ["onClick"] 6471const _hoisted_105 = ["onClick"] 6472 6473return function render(_ctx, _cache) { 6474 with (_ctx) {
6475 const { createElementVNode: _createElementVNode, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, vModelCheckbox: _vModelCheckbox, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 6476 6477 const _component_PublicFrame = _resolveComponent("PublicFrame") 6478 6479 return (_openBlock(), _createBlock(_component_PublicFrame, { title: createMode?'Ø·ÙØ¨ Ø¬Ø¯ÙØ¯':'ØªÙØ§ØµÙÙ Ø·ÙØ¨ Ø§ÙØªÙØ±ÙØ¯' }, { 6480 default: _withCtx(() => [createMode 6481 ? (_openBlock(), _createElementBlock("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [ 6482 _createElementVNode("button", { 6483 class: "smallbtn secondary", 6484 onClick: $event => ($router.push('/orders')) 6485 }, "â Ø·ÙباتÙ", 8, _hoisted_3), 6486 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "Ø·ÙØ¨ ØªÙØ±Ùد Ø¬Ø¯ÙØ¯", -1)), 6487 _cache[1] || (_cache[1] = _createElementVNode("h2", null, "Ø£Ø±Ø³Ù Ø§ØØªÙاج٠إÙÙ SMT", -1)), 6488 _cache[2] || (_cache[2] = _createElementVNode("p", null, "Ø§ÙØªØ¨ اÙÙ Ø·ÙÙØ¨ Ø¨ÙØ¶ÙØ. بعد Ø§ÙØ¥Ø±Ø³Ø§Ù تراجع SMT Ø§ÙØ·ÙØ¨Ø ØªØ¨ØØ« أ٠تتØÙ٠٠٠اÙÙ ÙØ±Ø¯Ø Ø«Ù ØªÙØ´Ø± عرض Ø§ÙØ³Ø¹Ø± ÙÙ ÙÙÙ ÙØ§ÙÙØ©.", -1)) 6489 ]), _cache[14] || (_cache[14] = _createElementVNode("div", { class: "requestJourneyMini" }, [ 6490 _createElementVNode("span", null, [_createElementVNode("i", null, "1"), _createElementVNode("b", null, "Ø·ÙØ¨Ù")]), 6491 _createElementVNode("span", null, [_createElementVNode("i", null, "2"), _createElementVNode("b", null, "٠راجعة SMT")]), 6492 _createElementVNode("span", null, [_createElementVNode("i", null, "3"), _createElementVNode("b", null, "عرض Ø§ÙØ³Ø¹Ø±")]), 6493 _createElementVNode("span", null, [_createElementVNode("i", null, "4"), _createElementVNode("b", null, "ÙØ±Ø§Ø±Ù")]), 6494 _createElementVNode("span", null, [_createElementVNode("i", null, "5"), _createElementVNode("b", null, "Ø§ÙØªÙÙÙØ°")]) 6495 ], -1)), _createElementVNode("section", _hoisted_4, [ 6496 _createElementVNode("label", _hoisted_5, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "ÙÙØ¹ Ø§ÙØ®Ø¯Ù Ø©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.service_type) = $event) }, _cache[3] || (_cache[3] = [ 6497 _createElementVNode("option", { value: "product_sourcing" }, "Ø§ÙØ¨ØØ« Ø¹Ù Ù ÙØªØ¬ Ø£Ù Ù ØµÙØ¹", -1), 6498 _createElementVNode("option", { value: "supplier_verification" }, "Ø§ÙØªØÙ٠٠٠اÙÙ ÙØ±Ø¯", -1), 6499 _createElementVNode("option", { value: "quality_inspection" }, "ÙØØµ Ø§ÙØ¬Ùدة", -1), 6500 _createElementVNode("option", { value: "supplier_payment" }, "Ø¯ÙØ¹ Ù ØµÙØ¹ Ù ÙØ§Ø¨Ù ÙØ§ØªÙرة", -1), 6501 _createElementVNode("option", { value: "shipping_logistics" }, "Ø§ÙØ´ØÙ ÙØ§Ùخد٠ات اÙÙÙØ¬Ø³ØªÙØ©", -1) 6502 ]), 8, _hoisted_6), [[_vModelSelect, form.service_type]])]), 6503 _createElementVNode("label", _hoisted_7, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "عÙÙØ§Ù Ø§ÙØ·Ùب", -1)), _withDirectives(_createElementVNode("input", { 6504 "onUpdate:modelValue": $event => ((form.title) = $event), 6505 placeholder: "٠ثاÙ: خط Ø¥ÙØªØ§Ø¬ Ø§ÙØ¯ÙÙ Ù 10,000 باÙÙØª/ساعة" 6506 }, null, 8, _hoisted_8), [[_vModelText, form.title]])]), 6507 _createElementVNode("label", _hoisted_9, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "Ø§ÙØªÙاصÙÙ ÙØ§ÙÙ ÙØ§ØµÙات", -1)), _withDirectives(_createElementVNode("textarea", { 6508 "onUpdate:modelValue": $event => ((form.description) = $event), 6509 placeholder: "اÙÙÙ ÙØ©Ø اÙÙ ÙØ§ØµÙØ§ØªØ Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù Ø Ù Ø¯ÙÙØ© Ø§ÙØªØ³ÙÙÙ ÙØ£Ù Ø´Ø±ÙØ· Ù ÙÙ Ø©" 6510 }, null, 8, _hoisted_10), [[_vModelText, form.description]])]), 6511 _createElementVNode("div", _hoisted_11, [_createElementVNode("label", _hoisted_12, [_cache[7] || (_cache[7] = _
6511createElementVNode("span", null, [_createTextVNode("اس٠اÙÙ ÙØ±Ø¯ / اÙÙ ØµÙØ¹ "), _createElementVNode("small", null, "Ø§Ø®ØªÙØ§Ø±Ù")], -1)), _withDirectives(_createElementVNode("input", { 6512 "onUpdate:modelValue": $event => ((form.supplier_name) = $event), 6513 placeholder: "إذا ÙØ§Ù ÙØ¯ÙÙ Ù ÙØ±Ø¯ Ù ØØ¯Ø¯" 6514 }, null, 8, _hoisted_13), [[_vModelText, form.supplier_name]])]), _createElementVNode("label", _hoisted_14, [_cache[8] || (_cache[8] = _createElementVNode("span", null, [_createTextVNode("ØªÙØ§ØµÙ اÙÙ ÙØ±Ø¯ "), _createElementVNode("small", null, "Ø§Ø®ØªÙØ§Ø±Ù")], -1)), _withDirectives(_createElementVNode("input", { 6515 "onUpdate:modelValue": $event => ((form.supplier_contact) = $event), 6516 placeholder: "WeChat / ÙØ§ØªÙ / Ø¨Ø±ÙØ¯" 6517 }, null, 8, _hoisted_15), [[_vModelText, form.supplier_contact]])])]), 6518 _createElementVNode("div", _hoisted_16, [_createElementVNode("label", _hoisted_17, [_cache[9] || (_cache[9] = _createElementVNode("span", null, [_createTextVNode("رÙÙ Proforma "), _createElementVNode("small", null, "Ø§Ø®ØªÙØ§Ø±Ù")], -1)), _withDirectives(_createElementVNode("input", { 6519 "onUpdate:modelValue": $event => ((form.proforma_number) = $event), 6520 placeholder: "إذا ÙØ§Ù ÙØ¯Ù٠عرض Ø¬Ø§ÙØ²" 6521 }, null, 8, _hoisted_18), [[_vModelText, form.proforma_number]])]), _createElementVNode("label", _hoisted_19, [_cache[11] || (_cache[11] = _createElementVNode("span", null, "Ø¹Ù ÙØ© Ø§ÙØ¹Ø±Ø¶ اÙÙ Ø·ÙÙØ¨Ø©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.quoted_currency) = $event) }, _cache[10] || (_cache[10] = [_createElementVNode("option", { value: "CNY" }, "ÙÙØ§Ù صÙÙ٠¥ (CNY)", -1), _createElementVNode("option", { value: "USD" }, "دÙÙØ§Ø± أ٠رÙÙÙ $ (USD)", -1), _createElementVNode("option", { value: "SDG" }, "جÙÙÙ Ø³ÙØ¯Ø§ÙÙ (SDG)", -1)]), 8, _hoisted_20), [[_vModelSelect, form.quoted_currency]])])]), 6522 _createElementVNode("label", _hoisted_21, [_cache[12] || (_cache[12] = _createElementVNode("span", null, [_createTextVNode("Ù ÙØ§ØØ¸Ø© إضاÙÙØ© "), _createElementVNode("small", null, "Ø§Ø®ØªÙØ§Ø±Ù")], -1)), _withDirectives(_createElementVNode("textarea", { 6523 "onUpdate:modelValue": $event => ((form.member_note) = $event), 6524 placeholder: "أ٠٠عÙÙÙ Ø© تساعد ÙØ±ÙÙ SMT" 6525 }, null, 8, _hoisted_22), [[_vModelText, form.member_note]])]), 6526 _createElementVNode("div", _hoisted_23, [_createElementVNode("button", { 6527 class: "btn", 6528 disabled: store.state.busy, 6529 onClick: $event => (create(true)) 6530 }, "Ø¥Ø±Ø³Ø§Ù Ø§ÙØ·Ùب ÙÙ٠راجعة", 8, _hoisted_24), _createElementVNode("button", { 6531 class: "btn secondary", 6532 disabled: store.state.busy, 6533 onClick: $event => (create(false)) 6534 }, "ØÙظ ÙÙ Ø³ÙØ¯Ø©", 8, _hoisted_25)]), 6535 _cache[13] || (_cache[13] = _createElementVNode("p", { class: "hint requestFormHint" }, "ÙÙ ÙØªÙ Ø¥ÙØ´Ø§Ø¡ Ø·ÙØ¨ شراء Ù Ø¤ÙØ¯ Ø£Ù Ø§ÙØªØ²Ø§Ù ٠اÙÙ Ø¥ÙØ§ بعد Ø£Ù ØªÙØ´Ø± SMT عرض Ø§ÙØ³Ø¹Ø± ÙØªÙÙÙ Ø£ÙØª Ø¨ÙØ¨ÙÙÙ ØµØ±Ø§ØØ©.", -1)) 6536 ])])) 6537 : _createCommentVNode("", true), (!createMode&&!detail&&store.state.busy) 6538 ? (_openBlock(), _createElementBlock("div", _hoisted_26, "جار٠تØÙ ÙÙ Ø§ÙØ·Ùب...")) 6539 : _createCommentVNode("", true), (!createMode&&detail) 6540 ? (_openBlock(), _createElementBlock("section", _hoisted_27, [ 6541 _createElementVNode("div", _hoisted_28, [_createElementVNode("button", { 6542 class: "smallbtn secondary", 6543 onClick: closeDetail 6544 }, "Ø¥ØºÙØ§Ù Ø§ÙØªÙاصÙÙ", 8, _hoisted_29)]), 6545 _createElementVNode("div", _hoisted_30, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_31, _toDisplayString(detail.request.request_code), 1), _createElementVNode("h3", _hoisted_32, _toDisplayString(detail.request.title), 1)]), _createElementVNode("span", _hoisted_33, _toDisplayString(procurementStatusLabel(detail.request.status)), 1)]), 6546 _createElementVNode("section", { class: _normalizeClass('workflowActionCard adminWorkflowActionV4 '+nextAction.tone) }, [ 6547 _cache[15] || (_cache[15] = _createElementVNode("span", { class: "workflowActionKicker" }, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ اÙÙ Ø·ÙÙØ¨ Ø§ÙØ¢Ù", -1)), 6548 _createElementVNode("h3", null, _toDisplayString(nextAction.title), 1), 6549 _createElementVNode("div", _hoisted_34, [_createElementVNode("b", null, "Ø§ÙØ¯Ùر Ø§ÙØ¢Ù: " + _toDisplayString(nextAction.owner), 1)]), 6550 _createElementVNode("p", null, _toDisplayString(nextAction.note), 1) 6551 ], 2), 6552 _createElementVNode("p", _hoisted_35, _toDisplayString(detail.request.description), 1), 6553 _createElementVNode("div", _hoisted_36, [ 6554 _createElementVNode("p", null, [_cache[16] || (_cache[16] = _createElementVNode("b", null, "Ø§ÙØ®Ø¯Ù Ø©:", -1)), _createTextVNode(" " + _toDisplayString(procurementServiceLabel(detail.request.service_type)), 1
6554)]), 6555 _createElementVNode("p", null, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "اÙÙ ÙØ±Ø¯:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.supplier_name||'-'), 1)]), 6556 _createElementVNode("p", null, [_cache[18] || (_cache[18] = _createElementVNode("b", null, "عرض Ø§ÙØ³Ø¹Ø±:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.quoted_amount?detail.request.quoted_amount+' '+detail.request.quoted_currency:'ÙÙ ÙØµØ¯Ø±'), 1)]), 6557 _createElementVNode("p", null, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "Proforma:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.proforma_number||'-'), 1)]) 6558 ]), 6559 (detail.request.status==='quoted'&&!detail.order) 6560 ? (_openBlock(), _createElementBlock("section", _hoisted_37, [ 6561 _createElementVNode("div", _hoisted_38, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_39, "Ø§ÙØ¹Ø±Ø¶ رÙÙ " + _toDisplayString(detail.request.offer_version), 1), _cache[20] || (_cache[20] = _createElementVNode("h3", null, "راجع Ø¹Ø±Ø¶Ù ÙØ¨Ù Ø§ÙØ§Ø¹ØªÙ اد", -1)), (Number(detail.request.commercial_model_version||1)>=2) 6562 ? (_openBlock(), _createElementBlock("small", _hoisted_40, "Ø§ÙØ³Ø¹Ø± ÙØ§ÙØ´ØÙ ÙØ§ÙØ´Ø±ÙØ· Ù ØÙÙØ¸Ø© ÙÙØ³Ø®Ø© ÙØ§ØØ¯Ø© Ø¹ÙØ¯ اÙÙØ¨ÙÙ")) 6563 : _createCommentVNode("", true)]), _createElementVNode("div", _hoisted_41, [_cache[21] || (_cache[21] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙ٠اÙÙÙØ§Ø¦Ù", -1)), _createElementVNode("b", _hoisted_42, _toDisplayString(procurementMoney(detail.request.quoted_amount,detail.request.quoted_currency)), 1)])]), 6564 _createElementVNode("div", _hoisted_43, [ 6565 _createElementVNode("span", null, [_cache[22] || (_cache[22] = _createElementVNode("small", null, "Ø§ÙØ¹Ù ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(procurementCurrencyLabel(detail.request.quoted_currency)), 1)]), 6566 _createElementVNode("span", null, [_cache[23] || (_cache[23] = _createElementVNode("small", null, "Ø§ÙØªØ³ÙÙÙ ", -1)), _createElementVNode("b", null, _toDisplayString(detail.request.incoterm?procurementIncotermLabel(detail.request.incoterm):'بدÙÙ Incoterm'), 1)]), 6567 _createElementVNode("span", null, [_cache[24] || (_cache[24] = _createElementVNode("small", null, "Ø§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementShippingLabel(detail.request.shipping_mode)), 1)]), 6568 _createElementVNode("span", null, [_cache[25] || (_cache[25] = _createElementVNode("small", null, "ØµÙØ§ØÙØ© Ø§ÙØ¹Ø±Ø¶", -1)), _createElementVNode("b", null, _toDisplayString(shortDate(detail.request.offer_valid_until)), 1)]) 6569 ]), 6570 _createElementVNode("div", _hoisted_44, [ 6571 _createElementVNode("span", null, [_cache[26] || (_cache[26] = _createElementVNode("small", null, "ÙÙÙ Ø© اÙÙ ÙØªØ¬Ø§Øª / Ø§ÙØ®Ø¯Ù Ø©", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.request.goods_amount||detail.request.quoted_amount-detail.request.service_fee_amount-detail.request.shipping_amount+detail.request.discount_amount,detail.request.quoted_currency)), 1)]), 6572 _createElementVNode("span", null, [_createElementVNode("small", null, "رسÙÙ Ø§ÙØ®Ø¯Ù Ø© " + _toDisplayString(Number(detail.request.commercial_model_version||1)>=2?'('+Number(detail.request.service_fee_percent||0)+'%)':''), 1), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.request.service_fee_amount,detail.request.quoted_currency)), 1)]), 6573 _createElementVNode("span", null, [_cache[27] || (_cache[27] = _createElementVNode("small", null, "Ø§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.request.shipping_amount,detail.request.quoted_currency)), 1)]), 6574 (Number(detail.request.insurance_amount||0)>0) 6575 ? (_openBlock(), _createElementBlock("span", _hoisted_45, [_cache[28] || (_cache[28] = _createElementVNode("small", null, "Ø§ÙØªØ£Ù ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.request.insurance_amount,detail.request.quoted_currency)), 1)])) 6576 : _createCommentVNode("", true), 6577 (Number(detail.request.discount_amount||0)>0) 6578 ? (_openBlock(), _createElementBlock("span", _hoisted_46, [_cache[29] || (_cache[29] = _createElementVNode("small", null, "Ø§ÙØ®ØµÙ ", -1)), _createElementVNode("b", null, "- " + _toDisplayString(procurementMoney(detail.request.discount_amount,detail.request.quoted_currency)), 1)])) 6579 : _createCommentVNode("", true) 6580 ]), 6581 (Number(detail.request.commercial_model_version||
65811)>=2) 6582 ? (_openBlock(), _createElementBlock("details", _hoisted_47, [_createElementVNode("summary", null, [_cache[30] || (_cache[30] = _createElementVNode("span", null, "ØªÙØ§ØµÙÙ Ø§ÙØ³Ø¹Ø±", -1)), _createElementVNode("strong", null, _toDisplayString(procurementPricingLabel(detail.request.pricing_mode)), 1)]), _createElementVNode("div", _hoisted_48, [ 6583 _createElementVNode("p", null, [_cache[31] || (_cache[31] = _createElementVNode("b", null, "طرÙÙØ© Ø§ÙØªØ³Ø¹Ùر:", -1)), _createTextVNode(" " + _toDisplayString(procurementPricingLabel(detail.request.pricing_mode)), 1)]), 6584 (detail.request.pricing_mode==='unit') 6585 ? (_openBlock(), _createElementBlock("p", _hoisted_49, [_cache[32] || (_cache[32] = _createElementVNode("b", null, "اÙÙÙ ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.quote_quantity) + " " + _toDisplayString(procurementQuoteUnitLabel(detail.request.quote_unit)), 1)])) 6586 : _createCommentVNode("", true), 6587 (detail.request.pricing_mode==='unit') 6588 ? (_openBlock(), _createElementBlock("p", _hoisted_50, [_cache[33] || (_cache[33] = _createElementVNode("b", null, "سعر اÙÙØØ¯Ø©:", -1)), _createTextVNode(" " + _toDisplayString(procurementMoney(detail.request.unit_price,detail.request.quoted_currency)), 1)])) 6589 : _createCommentVNode("", true), 6590 _createElementVNode("p", null, [_cache[34] || (_cache[34] = _createElementVNode("b", null, "ÙÙØ¹ Ø§ÙØ¹Ø±Ø¶:", -1)), _createTextVNode(" " + _toDisplayString(purchaseModeLabel(detail.request.purchase_mode)), 1)]) 6591 ])])) 6592 : _createCommentVNode("", true), 6593 (Number(detail.request.commercial_model_version||1)>=2) 6594 ? (_openBlock(), _createElementBlock("details", _hoisted_51, [_createElementVNode("summary", null, [_cache[35] || (_cache[35] = _createElementVNode("span", null, "Ø§ÙØ´ØÙ ÙØ§ÙتسÙÙÙ ", -1)), _createElementVNode("strong", null, _toDisplayString(procurementShippingLabel(detail.request.shipping_mode)), 1)]), _createElementVNode("div", _hoisted_52, [ 6595 _createElementVNode("p", null, [_cache[36] || (_cache[36] = _createElementVNode("b", null, "Incoterm:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.incoterm?procurementIncotermLabel(detail.request.incoterm):'بدÙÙ Incoterm'), 1)]), 6596 (detail.request.container_type) 6597 ? (_openBlock(), _createElementBlock("p", _hoisted_53, [_cache[37] || (_cache[37] = _createElementVNode("b", null, "Ø§ÙØØ§ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(procurementContainerLabel(detail.request.container_type)), 1)])) 6598 : _createCommentVNode("", true), 6599 (Number(detail.request.gross_weight_kg||0)) 6600 ? (_openBlock(), _createElementBlock("p", _hoisted_54, [_cache[38] || (_cache[38] = _createElementVNode("b", null, "اÙÙØ²Ù Ø§ÙØ¥Ø¬Ù اÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.gross_weight_kg) + " ÙØ¬Ù ", 1)])) 6601 : _createCommentVNode("", true), 6602 (Number(detail.request.net_weight_kg||0)) 6603 ? (_openBlock(), _createElementBlock("p", _hoisted_55, [_cache[39] || (_cache[39] = _createElementVNode("b", null, "اÙÙØ²Ù Ø§ÙØµØ§ÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.net_weight_kg) + " ÙØ¬Ù ", 1)])) 6604 : _createCommentVNode("", true), 6605 (Number(detail.request.total_cbm||0)) 6606 ? (_openBlock(), _createElementBlock("p", _hoisted_56, [_cache[40] || (_cache[40] = _createElementVNode("b", null, "Ø§ÙØØ¬Ù :", -1)), _createTextVNode(" " + _toDisplayString(detail.request.total_cbm) + " CBM", 1)])) 6607 : _createCommentVNode("", true), 6608 (Number(detail.request.packages_count||0)) 6609 ? (_openBlock(), _createElementBlock("p", _hoisted_57, [_cache[41] || (_cache[41] = _createElementVNode("b", null, "Ø§ÙØ·Ø±Ùد:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.packages_count), 1)])) 6610 : _createCommentVNode("", true), 6611 (detail.request.origin_country||detail.request.origin_city) 6612 ? (_openBlock(), _createElementBlock("p", _hoisted_58, [_cache[42] || (_cache[42] = _createElementVNode("b", null, "اÙÙ ÙØ´Ø£:", -1)), _createTextVNode(" " + _toDisplayString([$cityLabel(detail.request.origin_city),detail.request.origin_country].filter(
6612Boolean).join(' â ')), 1)])) 6613 : _createCommentVNode("", true), 6614 (detail.request.loading_point) 6615 ? (_openBlock(), _createElementBlock("p", _hoisted_59, [_cache[43] || (_cache[43] = _createElementVNode("b", null, "ÙÙØ·Ø© Ø§ÙØªØÙ ÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.loading_point), 1)])) 6616 : _createCommentVNode("", true), 6617 (detail.request.destination_country||detail.request.destination_city) 6618 ? (_openBlock(), _createElementBlock("p", _hoisted_60, [_cache[44] || (_cache[44] = _createElementVNode("b", null, "اÙÙØ¬ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString([$cityLabel(detail.request.destination_city),detail.request.destination_country].filter(Boolean).join(' â ')), 1)])) 6619 : _createCommentVNode("", true), 6620 (detail.request.destination_point) 6621 ? (_openBlock(), _createElementBlock("p", _hoisted_61, [_cache[45] || (_cache[45] = _createElementVNode("b", null, "ÙÙØ·Ø© اÙÙØµÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.destination_point), 1)])) 6622 : _createCommentVNode("", true), 6623 (Number(detail.request.production_lead_days||0)) 6624 ? (_openBlock(), _createElementBlock("p", _hoisted_62, [_cache[46] || (_cache[46] = _createElementVNode("b", null, "Ø§ÙØªØ¬ÙÙØ²/Ø§ÙØ¥Ùتاج:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.production_lead_days) + " ÙÙÙ ", 1)])) 6625 : _createCommentVNode("", true), 6626 (Number(detail.request.transit_days||0)) 6627 ? (_openBlock(), _createElementBlock("p", _hoisted_63, [_cache[47] || (_cache[47] = _createElementVNode("b", null, "Ø²Ù Ù Ø§ÙØ´ØÙ:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.transit_days) + " ÙÙÙ ", 1)])) 6628 : _createCommentVNode("", true), 6629 (detail.request.hs_code) 6630 ? (_openBlock(), _createElementBlock("p", _hoisted_64, [_cache[48] || (_cache[48] = _createElementVNode("b", null, "HS Code:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.hs_code), 1)])) 6631 : _createCommentVNode("", true), 6632 (detail.request.packing_notes) 6633 ? (_openBlock(), _createElementBlock("p", _hoisted_65, [_cache[49] || (_cache[49] = _createElementVNode("b", null, "Ø§ÙØªØ¹Ø¨Ø¦Ø©:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.packing_notes), 1)])) 6634 : _createCommentVNode("", true) 6635 ])])) 6636 : _createCommentVNode("", true), 6637 _createElementVNode("details", _hoisted_66, [_cache[55] || (_cache[55] = _createElementVNode("summary", null, [_createElementVNode("span", null, "Ø§ÙØ´Ø±ÙØ·"), _createElementVNode("strong", null, "Ø§ÙØ¯Ùع ÙØ§ÙتسÙÙÙ ")], -1)), _createElementVNode("div", _hoisted_67, [_createElementVNode("p", null, [_cache[50] || (_cache[50] = _createElementVNode("b", null, "ØµØ§ÙØ ØØªÙ:", -1)), _createTextVNode(" " + _toDisplayString(shortDate(detail.request.offer_valid_until)), 1)]), _createElementVNode("p", null, [_cache[51] || (_cache[51] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØ¯Ùع ÙØ§Ùعرض:", -1)), _cache[52] || (_cache[52] = _createElementVNode("br", null, null, -1)), _createTextVNode(_toDisplayString(detail.request.offer_terms), 1)]), _createElementVNode("p", null, [_cache[53] || (_cache[53] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØªØ³ÙÙÙ :", -1)), _cache[54] || (_cache[54] = _createElementVNode("br", null, null, -1)), _createTextVNode(_toDisplayString(detail.request.delivery_terms), 1)])])]), 6638 _createElementVNode("div", _hoisted_68, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(procurementQuoteDocuments(detail), (d) => { 6639 return (_openBlock(), _createElementBlock("div", { 6640 class: "decisionDocument", 6641 key: d.id 6642 }, [_createElementVNode("div", null, [_cache[56] || (_cache[56] = _
6642createElementVNode("span", { class: "adminEyebrow" }, "Ù Ø³ØªÙØ¯ Ø§ÙØ¹Ø±Ø¶", -1)), _createElementVNode("b", null, _toDisplayString(procurementDocumentLabel(d.document_type)), 1), _createElementVNode("small", null, _toDisplayString(d.original_name), 1)]), _createElementVNode("a", { 6643 class: "smallbtn secondary", 6644 href: d.file_url, 6645 target: "_blank", 6646 rel: "noopener" 6647 }, "ÙØªØ اÙÙ Ø³ØªÙØ¯", 8, _hoisted_69)])) 6648 }), 128))]), 6649 _createElementVNode("div", _hoisted_70, [_createElementVNode("label", _hoisted_71, [_withDirectives(_createElementVNode("input", { 6650 type: "checkbox", 6651 "onUpdate:modelValue": $event => ((acceptTerms) = $event) 6652 }, null, 8, _hoisted_72), [[_vModelCheckbox, acceptTerms]]), _cache[57] || (_cache[57] = _createElementVNode("span", null, "راجعت Ø§ÙØ¥Ø¬Ù اÙÙ ÙØ§ÙØ¹Ù ÙØ© ÙØ§ÙØ´ØÙ ÙØ´Ø±ÙØ· Ø§ÙØ¯Ùع ÙØ§ÙتسÙÙÙ Ø ÙØ£ÙاÙ٠عÙÙ Ø¥ÙØ´Ø§Ø¡ Ø·ÙØ¨ Ø¨ÙØ°Ù اÙÙØ³Ø®Ø©.", -1))]), _createElementVNode("button", { 6653 class: "btn wide commercialAcceptButton", 6654 disabled: !acceptTerms||store.state.busy, 6655 onClick: acceptOffer 6656 }, "ÙØ¨ÙÙ Ø§ÙØ¹Ø±Ø¶ ÙØ¥Ùشاء Ø§ÙØ·Ùب", 8, _hoisted_73), _createElementVNode("details", _hoisted_74, [_cache[58] || (_cache[58] = _createElementVNode("summary", null, "Ø£ØØªØ§Ø¬ تعدÙÙ Ø§ÙØ¹Ø±Ø¶", -1)), _withDirectives(_createElementVNode("textarea", { 6657 "onUpdate:modelValue": $event => ((revisionNote) = $event), 6658 placeholder: "Ø§ÙØªØ¨ Ø§ÙØªØ¹Ø¯Ù٠اÙÙ Ø·ÙÙØ¨ Ø¨ÙØ¶ÙØ" 6659 }, null, 8, _hoisted_75), [[_vModelText, revisionNote]]), _createElementVNode("button", { 6660 class: "smallbtn secondary", 6661 onClick: requestRevision 6662 }, "Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨ Ø§ÙØªØ¹Ø¯ÙÙ", 8, _hoisted_76)])]) 6663 ])) 6664 : _createCommentVNode("", true), 6665 (detail.order) 6666 ? (_openBlock(), _createElementBlock("div", _hoisted_77, [_createElementVNode("div", null, [_createElementVNode("b", null, "ØªÙ Ø¥ÙØ´Ø§Ø¡ Ø§ÙØ·Ùب " + _toDisplayString(detail.order.order_code), 1), _cache[59] || (_cache[59] = _createElementVNode("span", null, "Ø§ÙØ³Ø¹Ø± ÙØ§ÙØ´Ø±ÙØ· Ù ØÙÙØ¸Ø© Ø¯Ø§Ø®Ù Ø§ÙØ·Ùب.", -1))]), _createElementVNode("button", { 6667 class: "smallbtn", 6668 onClick: $event => ($router.push('/orders?order='+detail.order.id)) 6669 }, "ÙØªØ Ø§ÙØ·Ùب", 8, _hoisted_78)])) 6670 : _createCommentVNode("", true), 6671 (detail.request.status==='draft') 6672 ? (_openBlock(), _createElementBlock("details", _hoisted_79, [_cache[62] || (_cache[62] = _createElementVNode("summary", null, [_createElementVNode("b", null, "تعدÙ٠اÙÙ Ø³ÙØ¯Ø©"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_80, [ 6673 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((editForm.service_type) = $event) }, _cache[60] || (_cache[60] = [ 6674 _createElementVNode("option", { value: "product_sourcing" }, "Ø§ÙØ¨ØØ« Ø¹Ù Ù ÙØªØ¬ Ø£Ù Ù ØµÙØ¹", -1), 6675 _createElementVNode("option", { value: "supplier_verification" }, "Ø§ÙØªØÙ٠٠٠اÙÙ ÙØ±Ø¯", -1), 6676 _createElementVNode("option", { value: "quality_inspection" }, "ÙØØµ Ø§ÙØ¬Ùدة", -1), 6677 _createElementVNode("option", { value: "supplier_payment" }, "Ø¯ÙØ¹ Ù ØµÙØ¹ Ù ÙØ§Ø¨Ù ÙØ§ØªÙرة", -1), 6678 _createElementVNode("option", { value: "shipping_logistics" }, "Ø§ÙØ´ØÙ ÙØ§Ùخد٠ات اÙÙÙØ¬Ø³ØªÙØ©", -1) 6679 ]), 8, _hoisted_81), [[_vModelSelect, editForm.service_type]]), 6680 _withDirectives(_createElementVNode("input", { 6681 "onUpdate:modelValue": $event => ((editForm.title) = $event), 6682 placeholder: "عÙÙØ§Ù Ø§ÙØ·Ùب" 6683 }, null, 8, _hoisted_82), [[_vModelText, editForm.title]]), 6684 _withDirectives(_createElementVNode("textarea", { 6685 "onUpdate:modelValue": $event => ((editForm.description) = $event), 6686 placeholder: "Ø§ÙØªÙاصÙÙ ÙØ§ÙÙ ÙØ§ØµÙات" 6687 }, null, 8, _hoisted_83), [[_vModelText, editForm.description]]), 6688 _createElementVNode("div", _hoisted_84, [_withDirectives(_createElementVNode("input", { 6689 "onUpdate:modelValue": $event => ((editForm.supplier_name) = $event), 6690 placeholder: "اس٠اÙÙ ÙØ±Ø¯ / اÙÙ ØµÙØ¹" 6691 }, null, 8, _hoisted_85), [[_vModelText, editForm.supplier_name]]), _withDirectives(_createElementVNode("input", { 6692 "onUpdate:modelValue": $event => ((editForm.supplier_contact) = $event), 6693 placeholder: "Ø¨ÙØ§Ùات ØªÙØ§ØµÙ اÙÙ ÙØ±Ø¯" 6694 }, null, 8, _hoisted_86), [[_vModelText, editForm.supplier_contact]])]), 6695 _createElementVNode("div", _hoisted_87, [_withDirectives(_createElementVNode("input", { 6696 "onUpdate:modelValue": $event => ((editForm.proforma_number) = $event), 6697 placeholder: "رÙÙ Proforma" 6698 }, null, 8, _hoisted_88), [[_vModelText, editForm.proforma_number]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((editForm.quoted_currency) = $event) }, _cache[61] || (_cache[61] = [_createElementVNode("option", { value: "CNY" }, "ÙÙØ§Ù صÙÙ٠¥ (CNY)", -1), _createElementVNode("option", { value: "USD" }, "دÙÙØ§Ø± أ٠رÙÙÙ $ (USD)", -1), _createElementVNode("option", { value: "SDG" }, "جÙÙÙ Ø³ÙØ¯Ø§ÙÙ (SDG)", -1)]), 8, _hoisted_89), [[_vModelSelect, editForm.quoted_currency]])]), 6699 _withDirectives(_createElementVNode("textarea", { 6700 "onUpdate:modelValue": $event => ((editForm.member_note) = $event), 6701 placeholder: "Ù ÙØ§ØØ¸Ø© إضاÙÙØ©" 6702 }, null, 8, _hoisted_90), [[_vModelText, editForm.member_note]]), 6703 _createElementVNode("button", { 6704 class: "smallbtn", 6705 onClick: saveDraft 6706 }, "ØÙظ Ø§ÙØªØ¹Ø¯ÙÙØ§Øª", 8, _hoisted_91) 6707 ])])) 6708 : _createCommentVNode("", true), 6709 (['draft','submitted','under_review','quoted','payment_pending'].includes(detail.request.status)) 6710 ? (_openBlock(), _createElementBlock("div", _hoisted_92, [ 6711 _cache[65] || (_cache[65] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ù Ø³ØªÙØ¯Ø§ØªÙ"), _createElementVNode("h3", null, "Ø±ÙØ¹ Ù Ø³ØªÙØ¯ ÙÙØ·Ùب")])], -1)), 6712 _cache[66] || (_cache[66] = _createElementVNode("p", { class: "hint" }, "PDF Ø£Ù JPG Ø£Ù PNG Ø£Ù WEBPØ Ø¨ØØ¯ Ø£ÙØµÙ 12MB.", -1)), 6713 _createElementVNode("label", _hoisted_93, [_cache[63] || (_cache[63] = _createElementVNode("span", null, "ÙÙØ¹ اÙÙ Ø³ØªÙØ¯", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((documentType) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(PROCUREMENT_DOCUMENT_LABELS, (label, key) => { 6714 return (_openBlock(), _createElementBlock("option", { 6715 key: key, 6716 value: key 6717 }, _toDisplayString(label), 9, _hoisted_95)) 6718 }), 128))], 8, _hoisted_94), [[_vModelSelect, documentType]])]), 6719 _createElementVNode("label", _hoisted_96, [_createElementVNode("input", { 6720 type: "file", 6721 accept: "application/pdf,image/jpeg,image/png,image/webp", 6722 onChange: onFile 6723 }, null, 40, _hoisted_97), _cache[64] || (_cache[64] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± Ù Ø³ØªÙØ¯", -1)), _createElementVNode("em", null, _toDisplayString(fileLabel), 1)]), 6724 _createElementVNode("button", { 6725 class: "btn loadMore", 6726 disabled: store.state.upload&&store.state.upload.active, 6727 onClick: upload 6728 }, _toDisplayString(store.state.upload&&store.state.upload.active?'Ø¬Ø§Ø±Ù Ø§ÙØ±Ùع...':'Ø±ÙØ¹ اÙÙ Ø³ØªÙØ¯'), 9, _hoisted_98) 6729 ])) 6730 : _createCommentVNode("", true), 6731 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(procurementSupportingDocuments(detail), (d) => { 6732 return (_openBlock(), _createElementBlock("div", { 6733 class: "relatedItem procurementDocumentRow", 6734 key: d.id 6735 }, [_createElementVNode("b", null, _toDisplayString(procurementDocumentLabel(d.document_type)), 1
6735), _createElementVNode("span", null, _toDisplayString(d.original_name), 1), _createElementVNode("div", _hoisted_99, [_createElementVNode("a", { 6736 class: "smallbtn secondary", 6737 href: d.file_url, 6738 target: "_blank", 6739 rel: "noopener" 6740 }, "ÙØªØ", 8, _hoisted_100), (detail.request.status==='draft'&&d.uploaded_by_type==='member') 6741 ? (_openBlock(), _createElementBlock("button", { 6742 key: 0, 6743 class: "smallbtn danger", 6744 onClick: $event => (archiveDocument(d)) 6745 }, "ØØ°Ù", 8, _hoisted_101)) 6746 : _createCommentVNode("", true)])])) 6747 }), 128)), 6748 (detail.updates&&detail.updates.length) 6749 ? (_openBlock(), _createElementBlock("details", _hoisted_102, [_createElementVNode("summary", null, [_cache[67] || (_cache[67] = _createElementVNode("b", null, "ØªØØ¯Ùثات Ø§ÙØ·Ùب", -1)), _createElementVNode("span", null, _toDisplayString(detail.updates.length), 1)]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(detail.updates, (u) => { 6750 return (_openBlock(), _createElementBlock("div", { 6751 class: "relatedItem", 6752 key: u.id 6753 }, [_createElementVNode("b", null, _toDisplayString(u.title), 1), _createElementVNode("span", null, _toDisplayString(u.body), 1), _createElementVNode("small", null, _toDisplayString(shortDate(u.created_at)), 1)])) 6754 }), 128))])) 6755 : _createCommentVNode("", true), 6756 _createElementVNode("div", _hoisted_103, [(detail.request.status==='draft') 6757 ? (_openBlock(), _createElementBlock("button", { 6758 key: 0, 6759 class: "btn", 6760 onClick: submit 6761 }, "إرسا٠ÙÙ٠راجعة", 8, _hoisted_104)) 6762 : _createCommentVNode("", true), (['draft','submitted'].includes(detail.request.status)) 6763 ? (_openBlock(), _createElementBlock("button", { 6764 key: 1, 6765 class: "btn danger", 6766 onClick: cancel 6767 }, "Ø¥ÙØºØ§Ø¡ Ø§ÙØ·Ùب", 8, _hoisted_105)) 6768 : _createCommentVNode("", true)]) 6769 ])) 6770 : _createCommentVNode("", true)]), 6771 _: 1 6772 }, 8, ["title"])) 6773 } 6774} 6775})() 6776 }; 6777 6778 const MemberOrdersPage={ 6779 components:{PublicFrame}, 6780 setup(){ 6781 const store=useGzcStore();const router=useRouter();const route=useRoute();const orders=ref([]);const workflow=ref([]);const summary=ref({total:0,needs_action:0,in_progress:0,quoted:0,confirmed:0,completed:0,unread:0});const filter=ref('all');const detail=ref(null);const nextAction=computed(()=>customerOrderNextAction(detail.value,'member'));const commercialSnapshot=computed(()=>procurementCommercialSnapshot(detail.value&&detail.value.order)); 6782 const visibleItems=computed(()=>workflow.value.filter(x=>{if(filter.value==='action')return memberNeedsAction(x);if(filter.value==='active')return !memberWorkflowDone(x);if(filter.value==='quotes')return x.kind==='procurement'&&String(x.procurement_status||x.status||'')==='quoted';if(filter.value==='confirmed')return x.kind==='order'&&!memberWorkflowDone(x);if(filter.value==='completed')return memberWorkflowDone(x);return true;})); 6783 function progress(status){return({confirmed:1,procurement:2,completed:3,cancelled:0})[String(status||'')]||0} 6784 function memberWorkflowDone(x){return ['completed','cancelled'].includes(String(x.procurement_status||x.status||''))||['completed','cancelled'].includes(String(x.status||''));} 6785 function memberNeedsAction(x){const status=String(x.procurement_status||x.status||'');if(x.kind==='procurement')return ['draft','quoted','payment_pending'].includes(status);return x.kind==='order'&&status==='payment_pending'&&String(x.payment_status||'')==='pending'&&!x.has_payment_proof;} 6786 function workflowStatus(x){if(x.kind==='order')return customerOrderStatusLabel(x.status);return procurementStatusLabel(x.procurement_status||x.status);} 6787 function workflowKind(x){return x.kind==='order'?'Ø·ÙØ¨ Ù Ø¤ÙØ¯':'Ø·ÙØ¨ ØªÙØ±Ùد';} 6788 function workflowAction(x){const s=String(x.procurement_status||x.status||'');if(x.kind==='order'){if(s==='payment_pending'&&String(x.payment_status||'')==='pending')return x.has_payment_proof?'إثبات Ø§ÙØ¯Ùع ٠رÙÙØ¹ â Ø¨Ø§Ùتظار ٠راجعة SMT':'Ø§Ø±ÙØ¹ إثبات Ø§ÙØ¯Ùع ÙØ§Ø³ØªÙÙ Ø§Ù Ø§ÙØ·Ùب';if(s==='processing'||String(x.status||'')==='procurement')return 'Ø§ÙØªÙÙÙØ° ÙØ¯Ù SMT';if(s==='completed'||String(x.status||'')==='completed')return 'Ù ÙØªÙ Ù';if(s==='cancelled'||String(x.status||'')==='cancelled')return 'Ù ÙØºÙ';return '٠تابعة Ø§ÙØ·Ùب اÙÙ Ø¤ÙØ¯';}if(s==='draft')return 'Ø£ÙÙ Ù Ø§ÙØ·Ùب ÙØ£Ø±Ø³ÙÙ';if(s==='submitted'||s==='under_review')return 'ÙÙØ¯ ٠تابعة SMT';if(s==='quoted')return 'راجع عرض Ø§ÙØ³Ø¹Ø± ÙØ§ØªØ®Ø° ÙØ±Ø§Ø±Ù';if(s==='payment_pending')return 'استÙÙ Ù Ø§ÙØ¯Ùع / Ø§ÙØ¥Ø«Ø¨Ø§Øª';if(s==='processing')return 'ÙÙØ¯ Ø§ÙØªÙÙÙØ° ÙØ¯Ù SMT';if(s==='completed')return 'Ù ÙØªÙ Ù';if(s==='cancelled')return 'Ù ÙØºÙ';return '٠تابعة Ø§ÙØ·Ùب';} 6789 function workflowAmount(x){const amount=x.total_amount||x.quoted_amount;const currency=x.currency||x.quoted_currency;return amount?procurementMoney(amount,currency):'';} 6790 function workflowUpdated(x){return shortDate(x.updated_at||x.accepted_at||'');} 6791 async function open(order){const r=await runBusyAction(store,'member-orders.open',()=>api('/api/member/orders/'+encodeURIComponent(order.id||order.order_id)));const record=safeRecord(r.order);
6791if(r.ok&&record&&record.id){r.order=record;detail.value=r;const requestId=record.procurement_request_id;if(requestId){const ack=await api('/api/member/procurement/'+encodeURIComponent(requestId)+'/updates/read',{method:'POST',body:'{}'});if(ack&&ack.ok&&Number(ack.read||0)>0){store.state.memberUnread=Math.max(0,Number(store.state.memberUnread||0)-Number(ack.read||0));store.state.memberNotifications=safeArray(store.state.memberNotifications).map(n=>String(n.request_id)===String(requestId)?Object.assign({},n,{read_at:n.read_at||new Date().toISOString()}):n);const row=workflow.value.find(x=>String(x.request_id)===String(requestId));if(row)row.unread_updates=0;}}}else store.state.msg=r.message||r.error||(r.ok?'تعذر عرض Ø§ÙØ·Ùب ÙØ£Ù استجابة Ø§ÙØ³ÙØ±ÙØ± ØºÙØ± Ù ÙØªÙ ÙØ©':'');} 6792 function openWorkflow(x){if(!x)return;if(x.kind==='order')open({id:x.order_id||x.id});else router.push('/procurement?request='+encodeURIComponent(x.request_id||x.id));} 6793 async function load(){if(!(await store.requireMember(router,'/orders')))return;const r=await runBusyAction(store,'member-orders.load',()=>api('/api/member/orders'));orders.value=safeArray(r.orders);workflow.value=safeArray(r.workflow_items);summary.value=Object.assign({total:0,needs_action:0,in_progress:0,quoted:0,confirmed:0,completed:0,unread:0},r.summary||{});store.state.memberWorkflowSummary=summary.value;const requested=String(route.query.order||'');if(requested){const row=orders.value.find(x=>String(x.id)===requested)||{id:requested};await open(row);}} 6794 function closeDetail(){detail.value=null;router.push('/orders').catch(()=>{});} 6795 onMounted(load); 6796 return{store,orders,workflow,summary,filter,visibleItems,detail,nextAction,commercialSnapshot,load,open,openWorkflow,closeDetail,progress,memberNeedsAction,memberWorkflowDone,workflowStatus,workflowKind,workflowAction,workflowAmount,workflowUpdated,customerOrderStatusLabel,customerOrderPaymentLabel,purchaseModeLabel,procurementDocumentLabel,procurementServiceLabel,procurementMoney,procurementCurrencyLabel,procurementPricingLabel,procurementQuoteUnitLabel,procurementIncotermLabel,procurementShippingLabel,procurementContainerLabel,orderMilestoneLabel,orderEvidenceLabel,orderVisibilityLabel,shortDate,safeArray,adminRecordUpdatedAt,adminQueueOwner,orderQueueNextAction}; 6797 }, 6798 render:(function(){ 6799const _Vue = Vue 6800const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 6801 6802const _hoisted_1 = { class: "memberOrdersCommand" } 6803const _hoisted_2 = ["onClick"] 6804const _hoisted_3 = ["onClick"] 6805const _hoisted_4 = { 6806 class: "memberOrderFilterRail", 6807 "aria-label": "تصÙÙÙ Ø§ÙØ·Ùبات" 6808} 6809const _hoisted_5 = ["onClick"] 6810const _hoisted_6 = ["onClick"] 6811const _hoisted_7 = ["onClick"] 6812const _hoisted_8 = ["onClick"] 6813const _hoisted_9 = ["onClick"] 6814const _hoisted_10 = ["onClick"] 6815const _hoisted_11 = { class: "memberWorkflowList" } 6816const _hoisted_12 = ["onClick"] 6817const _hoisted_13 = { class: "memberWorkflowCardTop" } 6818const _hoisted_14 = { class: "workflowType" } 6819const _hoisted_15 = { 6820 key: 0, 6821 class: "workflowUnread" 6822} 6823const _hoisted_16 = { class: "workflowState" } 6824const _hoisted_17 = { class: "memberWorkflowIdentity" } 6825const _hoisted_18 = { class: "codeToken" } 6826const _hoisted_19 = { class: "memberWorkflowAction" } 6827const _hoisted_20 = { key: 0 } 6828const _hoisted_21 = { 6829 key: 0, 6830 class: "card emptyCard memberWorkflowEmpty" 6831} 6832const _hoisted_22 = { class: "hint" } 6833const _hoisted_23 = ["onClick"] 6834const _hoisted_24 = { 6835 key: 1, 6836 class: "card customerOrderDetail operationsOrderWorkspace" 6837} 6838const _hoisted_25 = { class: "memberDetailBack" } 6839const _hoisted_26 = ["onClick"] 6840const _hoisted_27 = { class: "memberCardTop" } 6841const _hoisted_28 = { class: "codeToken orderCode" } 6842const _hoisted_29 = { class: "codeToken requestCode" } 6843const _hoisted_30 = { class: "statusPill" } 6844const _hoisted_31 = { class: "orderProgress" } 6845const _hoisted_32 = { 6846 key: 0, 6847 class: "warningBox" 6848} 6849const _hoisted_33 = { class: "orderMoneyCard commercialOrderSnapshot" } 6850const _hoisted_34 = { class: "orderGrandTotal" } 6851const _hoisted_35 = { class: "offerBreakdown commercialMoneySummary" } 6852const _hoisted_36 = { key: 0 } 6853const _hoisted_37 = { class: "infoGrid orderSnapshotGrid" } 6854const _hoisted_38 = { 6855 key: 1, 6856 class: "commercialSnapshotCard commercialAcceptedSnapshot" 6857} 6858const _hoisted_39 = { class: "commercialDecisionHighlights acceptedCommercialHighlights" } 6859const _hoisted_40 = { key: 0 } 6860const _hoisted_41 = { key: 1 } 6861const _hoisted_42 = { class: "commercialDisclosure" } 6862const _hoisted_43 = { class: "commercialDisclosureBody commercialQuoteGrid" } 6863const _hoisted_44 = { key: 0 } 6864const _hoisted_45 = { key: 1 } 6865const _hoisted_46 = { key: 2 } 6866const _hoisted_47 = { key: 3 } 6867const _hoisted_48 = { key: 4 } 6868const _hoisted_49 = { key: 5 } 6869const _hoisted_50 = { key: 6 } 6870const _hoisted_51 = { key: 7 } 6871const _hoisted_52 = { key: 8 } 6872const _hoisted_53 = { key: 9 } 6873const _hoisted_54 = { key: 10 } 6874const _hoisted_55 = { key: 11 } 6875const _hoisted_56 = { key: 12 } 6876const _hoisted_57 = { key: 13 } 6877const _hoisted_58 = { 6878 key: 14, 6879 class: "commercialWide" 6880} 6881const _hoisted_59 = { 6882 key: 2, 6883 class: "collapseSection", 6884 open: "" 6885} 6886const _hoisted_60 = { class: "collapseBody" } 6887const _hoisted_61 = ["href"] 6888const _hoisted_62 = { class: "orderTimeline orderEvidenceTimeline" } 6889const _hoisted_63 = { class: "orderTimelineBody" } 6890const _hoisted_64 = { class: "orderTimelineTitle" } 6891const _hoisted_65 = { 6892 key: 0, 6893 class: "evidenceBadge" 6894} 6895const _hoisted_66 = { 6896 key: 0, 6897 class: "orderEvidenceGrid" 6898} 6899const _hoisted_67 = ["href"] 6900const _hoisted_68 = ["src"] 6901const _hoisted_69 = ["src"] 6902const _hoisted_70 = { 6903 key: 2, 6904 class: "orderEvidenceIcon" 6905} 6906const _hoisted_71 = ["onClick"] 6907 6908return function render(_ctx, _cache) { 6909 with (_ctx) {
6910 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 6911 6912 const _component_PublicFrame = _resolveComponent("PublicFrame") 6913 6914 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø·ÙØ¨Ø§ØªÙ" }, { 6915 default: _withCtx(() => [ 6916 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù٠رØÙØ© Ø§ÙØªÙØ±ÙØ¯"), _createElementVNode("h2", null, "Ø·ÙØ¨Ø§ØªÙ"), _createElementVNode("p", null, "٠٠أÙÙ Ø·ÙØ¨Ù ÙØØªÙ Ø§ÙØ¹Ø±Ø¶ ÙØ§Ùشراء ÙØ§ÙØ´ØÙ â Ø³Ø¬Ù ÙØ§ØØ¯ ÙØ§Ø¶Ø ÙØ§ ÙØ®ØªÙ٠بÙ٠اÙ٠راØÙ.")], -1)), _createElementVNode("button", { 6917 class: "btn memberOrderCreate", 6918 onClick: $event => ($router.push('/procurement/new')) 6919 }, "ï¼ Ø·ÙØ¨ Ø¬Ø¯ÙØ¯", 8, _hoisted_2)]), 6920 (store.state.memberUnread) 6921 ? (_openBlock(), _createElementBlock("section", { 6922 key: 0, 6923 class: "memberOpsNotice", 6924 onClick: $event => ($router.push('/notifications')) 6925 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(store.state.memberUnread) + " إشعار ÙØØªØ§Ø¬ ٠راجعتÙ", 1), _cache[1] || (_cache[1] = _createElementVNode("span", null, "Ø§ÙØªØ Ø§ÙØªØØ¯ÙØ« ث٠ارجع ÙÙØ·Ùب ٠باشرة.", -1))]), _cache[2] || (_cache[2] = _createElementVNode("strong", null, "Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª â", -1))], 8, _hoisted_3)) 6926 : _createCommentVNode("", true), 6927 _createElementVNode("section", _hoisted_4, [ 6928 _createElementVNode("button", { 6929 onClick: $event => (filter='all'), 6930 class: _normalizeClass({active:filter==='all'}) 6931 }, [_createElementVNode("b", null, _toDisplayString(summary.total), 1), _cache[3] || (_cache[3] = _createElementVNode("span", null, "اÙÙÙ", -1))], 10, _hoisted_5), 6932 _createElementVNode("button", { 6933 onClick: $event => (filter='action'), 6934 class: _normalizeClass({active:filter==='action',attention:summary.needs_action}) 6935 }, [_createElementVNode("b", null, _toDisplayString(summary.needs_action), 1), _cache[4] || (_cache[4] = _createElementVNode("span", null, "Ù Ø·ÙÙØ¨ Ù ÙÙ", -1))], 10, _hoisted_6), 6936 _createElementVNode("button", { 6937 onClick: $event => (filter='active'), 6938 class: _normalizeClass({active:filter==='active'}) 6939 }, [_createElementVNode("b", null, _toDisplayString(summary.in_progress), 1), _cache[5] || (_cache[5] = _createElementVNode("span", null, "ÙÙØ¯ اÙ٠تابعة", -1))], 10, _hoisted_7), 6940 _createElementVNode("button", { 6941 onClick: $event => (filter='quotes'), 6942 class: _normalizeClass({active:filter==='quotes'}) 6943 }, [_createElementVNode("b", null, _toDisplayString(summary.quoted||0), 1), _cache[6] || (_cache[6] = _createElementVNode("span", null, "Ø¹Ø±ÙØ¶ Ø§ÙØ³Ø¹Ø±", -1))], 10, _hoisted_8), 6944 _createElementVNode("button", { 6945 onClick: $event => (filter='confirmed'), 6946 class: _normalizeClass({active:filter==='confirmed'}) 6947 }, [_createElementVNode("b", null, _toDisplayString(summary.confirmed), 1), _cache[7] || (_cache[7] = _createElementVNode("span", null, "Ù Ø¤ÙØ¯Ø©", -1))], 10, _hoisted_9), 6948 _createElementVNode("button", { 6949 onClick: $event => (filter='completed'), 6950 class: _normalizeClass({active:filter==='completed'}) 6951 }, [_createElementVNode("b", null, _toDisplayString(summary.completed), 1), _cache[8] || (_cache[8] = _createElementVNode("span", null, "Ù ÙØªÙ ÙØ©", -1))], 10, _hoisted_10) 6952 ]), 6953 _createElementVNode("section", _hoisted_11, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleItems, (x) => { 6954 return (_openBlock(), _createElementBlock("button", { 6955 class: _normalizeClass(["memberWorkflowCard", {needsAction:memberNeedsAction(x),done:memberWorkflowDone(x)}]), 6956 key: x.kind+'-'+x.id, 6957 onClick: $event => (openWorkflow(x)) 6958 }, [_createElementVNode("div", _hoisted_13, [_createElementVNode("span", _hoisted_14, _toDisplayString(workflowKind(x)), 1), (x.unread_updates) 6959 ? (_openBlock(), _createElementBlock("span", _hoisted_15, _toDisplayString(x.unread_updates) + " Ø¬Ø¯ÙØ¯", 1)) 6960 : _createCommentVNode("", true), _createElementVNode("span", _hoisted_16, _toDisplayString(workflowStatus(x)), 1)]), _createElementVNode("div", _hoisted_17, [_createElementVNode("span", _hoisted_18, _toDisplayString(x.order_code||x.request_code), 1), _createElementVNode("h3", null, _toDisplayString(x.title), 1), _createElementVNode("small", null, _toDisplayString(procurementServiceLabel(x.service_type)) + " · آخر ØªØØ¯ÙØ« " + _toDisplayString(workflowUpdated(x)), 1)]), _createElementVNode("div", _hoisted_19, [ 6961 _cache[9] || (_cache[9] = _createElementVNode("small", null, "اÙÙ Ø·ÙÙØ¨ Ø§ÙØ¢Ù", -1)), 6962 _createElementVNode("span", null, _toDisplayString(workflowAction(x)), 1), 6963 (workflowAmount(x)) 6964 ? (_openBlock(), _createElementBlock("b", _hoisted_20, _toDisplayString(workflowAmount(x)), 1)) 6965 : _createCommentVNode("", true), 6966 _cache[10] || (_cache[10] = _createElementVNode("strong", null, "ÙØªØ Ø§ÙØªÙاصÙÙ â", -1)) 6967 ])], 10, _hoisted_12)) 6968 }), 128)), (!visibleItems.length&&!store.state.busy) 6969 ? (_openBlock(), _createElementBlock("div", _hoisted_21, [_createElementVNode("b", null, _toDisplayString(workflow.length?'ÙØ§ ØªÙØ¬Ø¯ Ø·ÙØ¨Ø§Øª ÙÙ ÙØ°Ø§ Ø§ÙØªØµÙÙÙ':'ÙØ§ ØªÙØ¬Ø¯ Ø·ÙØ¨Ø§Øª ØØªÙ Ø§ÙØ¢Ù'), 1), _createElementVNode("p", _hoisted_22, _toDisplayString(workflow.length?'Ø¬Ø±ÙØ¨ تصÙÙÙØ§Ù آخر.':'ابدأ Ø¨Ø·ÙØ¨ عرض أ٠خد٠ة ØªÙØ±ÙØ¯Ø ÙØ³ÙØ¸ÙØ± ÙÙØ§ ÙÙØ± Ø§ÙØ¥Ø±Ø³Ø§Ù.'), 1), (!workflow.length) 6970 ? (_openBlock(), _createElementBlock("button", { 6971 key: 0, 6972 class: "btn", 6973 onClick: $event => ($router.push('/procurement/new')) 6974 }, "Ø¥ÙØ´Ø§Ø¡ Ø£ÙÙ Ø·ÙØ¨", 8, _hoisted_23)) 6975 : _createCommentVNode("", true)])) 6976 : _createCommentVNode("", true)]), 6977 detail 6978 ? (_openBlock(), _createElementBlock("section", _hoisted_24, [ 6979 _createElementVNode("div", _hoisted_25, [_createElementVNode("button", { 6980 class: "smallbtn secondary", 6981 onClick: closeDetail 6982 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙÙ Ø§ÙØ·Ùبات", 8, _hoisted_26)]), 6983 _createElementVNode("div", _hoisted_27, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_28, _toDisplayString(detail.order.order_code), 1), _createElementVNode("h3", null, _toDisplayString(detail.order.title_snapshot), 1), _createElementVNode("span", _hoisted_29, _toDisplayString(detail.order.request_code), 1)]), _createElementVNode("span", _hoisted_30, _toDisplayString(customerOrderStatusLabel(detail.order.status)), 1)]), 6984 _createElementVNode("section", { class: _normalizeClass('workflowActionCard '+nextAction.tone) }, [ 6985 _cache[11] || (_cache[11] = _createElementVNode("span", { class: "workflowActionKicker" }, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØØ§ÙÙ", -1)), 6986 _createElementVNode("h3", null, _toDisplayString(nextAction.title), 1), 6987 _createElementVNode("b", null, "Ø§ÙØ¯Ùر Ø§ÙØ¢Ù: " + _toDisplayString(nextAction.owner), 1), 6988 _createElementVNode("p", null, _toDisplayString(nextAction.note), 1) 6989 ], 2), 6990 _createElementVNode("div", _hoisted_31, [_createElementVNode("span", { class: _normalizeClass({done:progress(detail.order.status)>=1}) }, _cache[12] || (_cache[12] = [_createElementVNode("i", null, "1", -1), _createElementVNode("b", null, "Ø·ÙØ¨ Ù Ø¤ÙØ¯", -1)]), 2), _createElementVNode("span", { class: _normalizeClass({done:progress(detail.order.status)>=2}) }, _cache[13] || (_cache[13] = [_createElementVNode("i", null, "2", -1), _createElementVNode("b", null, "Ø§ÙØ´Ø±Ø§Ø¡ ÙØ§ÙØªÙØ±Ùد", -1)]), 2), _createElementVNode("span", { class: _normalizeClass({done:progress(detail.order.status)>=3}) }, _cache[14] || (_cache[14] = [_createElementVNode("i", null, "3", -1), _createElementVNode("b", null, "Ù ÙØªÙ Ù", -1)]), 2)]), 6991 (detail.order.status==='cancelled') 6992 ? (_openBlock(), _createElementBlock("div", _hoisted_32, "ØªÙ Ø¥ÙØºØ§Ø¡ ÙØ°Ø§ Ø§ÙØ·Ùب. راجع Ø§ÙØ³Ø¬Ù Ø§ÙØ²Ù ÙÙ Ø£Ø¯ÙØ§Ù ÙÙ Ø¹Ø±ÙØ© آخر إجراء.")) 6993 : _createCommentVNode("", true), 6994 _createElementVNode("section", _hoisted_33, [_createElementVNode("div", _hoisted_34, [_cache[15] || (_cache[15] = _createElementVNode("span", null, "Ø§ÙØ¥Ø¬Ù اÙ٠اÙ٠عت٠د", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.total_amount,detail.order.currency)), 1)]), _createElementVNode("div", _hoisted_35, [ 6995 _createElementVNode("span", null, [_cache[16] || (_cache[16] = _createElementVNode("small", null, "ÙÙÙ Ø© اÙÙ ÙØªØ¬Ø§Øª / Ø§ÙØ®Ø¯Ù Ø©", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.subtotal_amount,detail.order.currency)), 1)]), 6996 _createElementVNode("span", null, [_createElementVNode("small", null, "رسÙÙ Ø§ÙØ®Ø¯Ù Ø© " + _toDisplayString(Number(detail.order.commercial_model_version||
69961)>=2?'('+Number(detail.order.service_fee_percent||0)+'%)':''), 1), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.service_fee_amount,detail.order.currency)), 1)]), 6997 _createElementVNode("span", null, [_cache[17] || (_cache[17] = _createElementVNode("small", null, "Ø§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.shipping_amount,detail.order.currency)), 1)]), 6998 (Number(detail.order.insurance_amount||0)>0) 6999 ? (_openBlock(), _createElementBlock("span", _hoisted_36, [_cache[18] || (_cache[18] = _createElementVNode("small", null, "Ø§ÙØªØ£Ù ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.insurance_amount,detail.order.currency)), 1)])) 7000 : _createCommentVNode("", true), 7001 _createElementVNode("span", null, [_cache[19] || (_cache[19] = _createElementVNode("small", null, "Ø§ÙØ®ØµÙ ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.discount_amount,detail.order.currency)), 1)]) 7002 ])]), 7003 _createElementVNode("div", _hoisted_37, [ 7004 _createElementVNode("p", null, [_cache[20] || (_cache[20] = _createElementVNode("b", null, "طرÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡:", -1)), _createTextVNode(" " + _toDisplayString(purchaseModeLabel(detail.order.purchase_mode)), 1)]), 7005 _createElementVNode("p", null, [_cache[21] || (_cache[21] = _createElementVNode("b", null, "Ø§ÙØ¯Ùع:", -1)), _createTextVNode(" " + _toDisplayString(customerOrderPaymentLabel(detail.order.payment_status)), 1)]), 7006 _createElementVNode("p", null, [_cache[22] || (_cache[22] = _createElementVNode("b", null, "Ø§ÙØ¹Ù ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(procurementCurrencyLabel(detail.order.currency)), 1)]), 7007 _createElementVNode("p", null, [_cache[23] || (_cache[23] = _createElementVNode("b", null, "اÙÙ ÙØ±Ø¯:", -1)), _createTextVNode(" " + _toDisplayString(detail.order.supplier_snapshot||'-'), 1)]), 7008 _createElementVNode("p", null, [_cache[24] || (_cache[24] = _createElementVNode("b", null, "Proforma:", -1)), _createTextVNode(" " + _toDisplayString(detail.order.proforma_snapshot||'-'), 1)]), 7009 _createElementVNode("p", null, [_cache[25] || (_cache[25] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØ¹Ø±Ø¶:", -1)), _cache[26] || (_cache[26] = _createElementVNode("br", null, null, -1)), _createTextVNode(_toDisplayString(detail.order.offer_terms_snapshot), 1)]), 7010 _createElementVNode("p", null, [_cache[27] || (_cache[27] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØªØ³ÙÙÙ :", -1)), _cache[28] || (_cache[28] = _createElementVNode("br", null, null, -1)), _createTextVNode(_toDisplayString(detail.order.delivery_terms_snapshot), 1)]) 7011 ]), 7012 (Number(detail.order.commercial_model_version||1)>=2) 7013 ? (_openBlock(), _createElementBlock("section", _hoisted_38, [_cache[52] || (_cache[52] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙØ³Ø®Ø© اÙ٠عت٠دة"), _createElementVNode("h3", null, "Ø§ÙØ´ØÙ ÙØ§ÙتسÙÙÙ "), _createElementVNode("p", { class: "hint" }, "ÙØ°Ù Ø§ÙØ¨ÙØ§ÙØ§Øª Ù ØÙÙØ¸Ø© ٠ع Ø§ÙØ¹Ø±Ø¶ اÙÙ ÙØ¨ÙÙ ÙÙØ§ ØªØªØºÙØ± ÙØ§ØÙاÙ.")])], -1)), _createElementVNode("div", _hoisted_39, [ 7014 _createElementVNode("span", null, [_cache[29] || (_cache[29] = _createElementVNode("small", null, "Incoterm", -1)), _createElementVNode("b", null, _toDisplayString(commercialSnapshot.incoterm?procurementIncotermLabel(commercialSnapshot.incoterm):'-'), 1)]), 7015 _createElementVNode("span", null, [_cache[30] || (_cache[30] = _createElementVNode("small", null, "Ø§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementShippingLabel(commercialSnapshot.shipping_mode)), 1)]), 7016 (Number(commercialSnapshot.total_cbm||0)) 7017 ? (_openBlock(), _createElementBlock("span", _hoisted_40, [_
7017cache[31] || (_cache[31] = _createElementVNode("small", null, "Ø§ÙØØ¬Ù ", -1)), _createElementVNode("b", null, _toDisplayString(commercialSnapshot.total_cbm) + " CBM", 1)])) 7018 : _createCommentVNode("", true), 7019 (Number(commercialSnapshot.gross_weight_kg||0)) 7020 ? (_openBlock(), _createElementBlock("span", _hoisted_41, [_cache[32] || (_cache[32] = _createElementVNode("small", null, "Gross", -1)), _createElementVNode("b", null, _toDisplayString(commercialSnapshot.gross_weight_kg) + " kg", 1)])) 7021 : _createCommentVNode("", true) 7022 ]), _createElementVNode("details", _hoisted_42, [_cache[51] || (_cache[51] = _createElementVNode("summary", null, [_createElementVNode("span", null, "ÙÙ ØªÙØ§ØµÙ٠اÙÙØ³Ø®Ø© اÙÙÙØ¬Ø³ØªÙØ©"), _createElementVNode("strong", null, "عرض")], -1)), _createElementVNode("div", _hoisted_43, [ 7023 _createElementVNode("p", null, [_cache[33] || (_cache[33] = _createElementVNode("b", null, "Ø§ÙØªØ³Ø¹Ùر:", -1)), _createTextVNode(" " + _toDisplayString(procurementPricingLabel(commercialSnapshot.pricing_mode)), 1)]), 7024 (commercialSnapshot.pricing_mode==='unit') 7025 ? (_openBlock(), _createElementBlock("p", _hoisted_44, [_cache[34] || (_cache[34] = _createElementVNode("b", null, "اÙÙÙ ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.quote_quantity) + " " + _toDisplayString(procurementQuoteUnitLabel(commercialSnapshot.quote_unit)), 1)])) 7026 : _createCommentVNode("", true), 7027 (commercialSnapshot.pricing_mode==='unit') 7028 ? (_openBlock(), _createElementBlock("p", _hoisted_45, [_cache[35] || (_cache[35] = _createElementVNode("b", null, "سعر اÙÙØØ¯Ø©:", -1)), _createTextVNode(" " + _toDisplayString(procurementMoney(commercialSnapshot.unit_price,detail.order.currency)), 1)])) 7029 : _createCommentVNode("", true), 7030 _createElementVNode("p", null, [_cache[36] || (_cache[36] = _createElementVNode("b", null, "Incoterm:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.incoterm?procurementIncotermLabel(commercialSnapshot.incoterm):'-'), 1)]), 7031 _createElementVNode("p", null, [_cache[37] || (_cache[37] = _createElementVNode("b", null, "ÙÙØ¹ Ø§ÙØ´ØÙ:", -1)), _createTextVNode(" " + _toDisplayString(procurementShippingLabel(commercialSnapshot.shipping_mode)), 1)]), 7032 (commercialSnapshot.container_type) 7033 ? (_openBlock(), _createElementBlock("p", _hoisted_46, [_cache[38] || (_cache[38] = _createElementVNode("b", null, "Ø§ÙØØ§ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(procurementContainerLabel(commercialSnapshot.container_type)), 1)])) 7034 : _createCommentVNode("", true), 7035 (Number(commercialSnapshot.gross_weight_kg||0)) 7036 ? (_openBlock(), _createElementBlock("p", _hoisted_47, [_cache[39] || (_cache[39] = _createElementVNode("b", null, "اÙÙØ²Ù Ø§ÙØ¥Ø¬Ù اÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.gross_weight_kg) + " ÙØ¬Ù ", 1)])) 7037 : _createCommentVNode("", true), 7038 (Number(commercialSnapshot.net_weight_kg||0)) 7039 ? (_openBlock(), _createElementBlock("p", _hoisted_48, [_cache[40] || (_cache[40] = _createElementVNode("b", null, "اÙÙØ²Ù Ø§ÙØµØ§ÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.net_weight_kg) + " ÙØ¬Ù ", 1)])) 7040 : _createCommentVNode("", true), 7041 (Number(commercialSnapshot.total_cbm||0)) 7042 ? (_openBlock(), _createElementBlock("p", _hoisted_49, [_cache[41] || (_cache[41] = _createElementVNode("b", null, "Ø§ÙØØ¬Ù :", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.total_cbm) + " CBM", 1)])) 7043 : _createCommentVNode("", true), 7044 (Number(commercialSnapshot.packages_count||0)) 7045 ? (_openBlock(), _createElementBlock("p", _hoisted_50, [_cache[42] || (_cache[42] = _createElementVNode("b", null, "Ø§ÙØ·Ø±Ùد:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.packages_count), 1)])) 7046 : _createCommentVNode("", true), 7047 (commercialSnapshot.origin_country||commercialSnapshot.origin_city) 7048 ? (_openBlock(), _createElementBlock("p", _hoisted_51, [_cache[43] || (_cache[43] = _createElementVNode("b", null, "اÙÙ ÙØ´Ø£:", -1)), _createTextVNode(" " + _toDisplayString([$cityLabel(commercialSnapshot.origin_city),commercialSnapshot.origin_country].filter(
7048Boolean).join(' â ')), 1)])) 7049 : _createCommentVNode("", true), 7050 (commercialSnapshot.loading_point) 7051 ? (_openBlock(), _createElementBlock("p", _hoisted_52, [_cache[44] || (_cache[44] = _createElementVNode("b", null, "ÙÙØ·Ø© Ø§ÙØªØÙ ÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.loading_point), 1)])) 7052 : _createCommentVNode("", true), 7053 (commercialSnapshot.destination_country||commercialSnapshot.destination_city) 7054 ? (_openBlock(), _createElementBlock("p", _hoisted_53, [_cache[45] || (_cache[45] = _createElementVNode("b", null, "اÙÙØ¬ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString([$cityLabel(commercialSnapshot.destination_city),commercialSnapshot.destination_country].filter(Boolean).join(' â ')), 1)])) 7055 : _createCommentVNode("", true), 7056 (commercialSnapshot.destination_point) 7057 ? (_openBlock(), _createElementBlock("p", _hoisted_54, [_cache[46] || (_cache[46] = _createElementVNode("b", null, "ÙÙØ·Ø© اÙÙØµÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.destination_point), 1)])) 7058 : _createCommentVNode("", true), 7059 (Number(commercialSnapshot.production_lead_days||0)) 7060 ? (_openBlock(), _createElementBlock("p", _hoisted_55, [_cache[47] || (_cache[47] = _createElementVNode("b", null, "Ø§ÙØªØ¬ÙÙØ²/Ø§ÙØ¥Ùتاج:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.production_lead_days) + " ÙÙÙ ", 1)])) 7061 : _createCommentVNode("", true), 7062 (Number(commercialSnapshot.transit_days||0)) 7063 ? (_openBlock(), _createElementBlock("p", _hoisted_56, [_cache[48] || (_cache[48] = _createElementVNode("b", null, "Ø²Ù Ù Ø§ÙØ´ØÙ:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.transit_days) + " ÙÙÙ ", 1)])) 7064 : _createCommentVNode("", true), 7065 (commercialSnapshot.hs_code) 7066 ? (_openBlock(), _createElementBlock("p", _hoisted_57, [_cache[49] || (_cache[49] = _createElementVNode("b", null, "HS Code:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.hs_code), 1)])) 7067 : _createCommentVNode("", true), 7068 (commercialSnapshot.packing_notes) 7069 ? (_openBlock(), _createElementBlock("p", _hoisted_58, [_cache[50] || (_cache[50] = _createElementVNode("b", null, "Ø§ÙØªØ¹Ø¨Ø¦Ø©:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.packing_notes), 1)])) 7070 : _createCommentVNode("", true) 7071 ])])])) 7072 : _createCommentVNode("", true), 7073 (safeArray(detail.order.quote_document_snapshot).length) 7074 ? (_openBlock(), _createElementBlock("details", _hoisted_59, [_createElementVNode("summary", null, [_cache[53] || (_cache[53] = _createElementVNode("b", null, "Ù Ø³ØªÙØ¯Ø§Øª Ø§ÙØ¹Ø±Ø¶ اÙÙ ÙØ¨ÙÙ", -1)), _createElementVNode("span", null, _toDisplayString(safeArray(detail.order.quote_document_snapshot).length), 1)]), _createElementVNode("div", _hoisted_60, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(detail.order.quote_document_snapshot), (d) => { 7075 return (_openBlock(), _createElementBlock("div", { 7076 class: "relatedItem", 7077 key: d.id||d.file_url 7078 }, [_createElementVNode("b", null, _toDisplayString(procurementDocumentLabel(d.document_type)), 1
7078), _createElementVNode("span", null, _toDisplayString(d.original_name), 1), _createElementVNode("a", { 7079 class: "smallbtn secondary", 7080 href: d.file_url, 7081 target: "_blank", 7082 rel: "noopener" 7083 }, "ÙØªØ اÙÙ Ø³ØªÙØ¯", 8, _hoisted_61)])) 7084 }), 128))])])) 7085 : _createCommentVNode("", true), 7086 _createElementVNode("section", _hoisted_62, [_cache[55] || (_cache[55] = _createElementVNode("h3", null, "ØªØØ¯Ùثات Ø§ÙØªÙÙÙØ°", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(detail.timeline).length?safeArray(detail.timeline):safeArray(detail.events), (e) => { 7087 return (_openBlock(), _createElementBlock("div", { 7088 class: "orderTimelineItem", 7089 key: e.id 7090 }, [_cache[54] || (_cache[54] = _createElementVNode("i", null, null, -1)), _createElementVNode("div", _hoisted_63, [ 7091 _createElementVNode("div", _hoisted_64, [_createElementVNode("b", null, _toDisplayString(e.title), 1), (e.source==='milestone') 7092 ? (_openBlock(), _createElementBlock("span", _hoisted_65, _toDisplayString(orderMilestoneLabel(e.milestone_type)), 1)) 7093 : _createCommentVNode("", true)]), 7094 _createElementVNode("p", null, _toDisplayString(e.body||customerOrderStatusLabel(e.to_status)), 1), 7095 _createElementVNode("small", null, _toDisplayString(shortDate(e.occurred_at||e.created_at)), 1), 7096 (safeArray(e.evidence).length) 7097 ? (_openBlock(), _createElementBlock("div", _hoisted_66, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(e.evidence), (x) => { 7098 return (_openBlock(), _createElementBlock("a", { 7099 key: x.id, 7100 class: "orderEvidenceCard", 7101 href: x.file_url, 7102 target: "_blank", 7103 rel: "noopener" 7104 }, [(x.kind==='image') 7105 ? (_openBlock(), _createElementBlock("img", { 7106 key: 0, 7107 src: x.thumb_url||x.file_url, 7108 loading: "lazy", 7109 alt: "" 7110 }, null, 8, _hoisted_68)) 7111 : (x.kind==='video'&&x.thumb_url) 7112 ? (_openBlock(), _createElementBlock("img", { 7113 key: 1, 7114 src: x.thumb_url, 7115 loading: "lazy", 7116 alt: "" 7117 }, null, 8, _hoisted_69)) 7118 : (_openBlock(), _createElementBlock("span", _hoisted_70, _toDisplayString(x.kind==='video'?'â¶':'PDF'), 1)), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(orderEvidenceLabel(x.evidence_type)), 1), _createElementVNode("small", null, _toDisplayString(x.original_name), 1)])], 8, _hoisted_67)) 7119 }), 128))])) 7120 : _createCommentVNode("", true) 7121 ])])) 7122 }), 128))]), 7123 _createElementVNode("button", { 7124 class: "smallbtn secondary", 7125 onClick: $event => ($router.push('/procurement?request='+detail.order.procurement_request_id)) 7126 }, "ÙØªØ Ù ÙÙ Ø§ÙØªÙØ±ÙØ¯ ÙØ§ÙÙ Ø³ØªÙØ¯Ø§Øª", 8, _hoisted_71) 7127 ])) 7128 : _createCommentVNode("", true) 7129 ]), 7130 _: 1 7131 })) 7132 } 7133} 7134})() 7135 }; 7136 7137 const AdminParticipationPointsPage={ 7138 components:{AdminFrame}, 7139 setup(){ 7140 const store=useGzcStore();const router=useRouter();const route=useRoute(); 7141 const members=ref([]),stats=ref({}),policy=ref({}),search=ref(''),detail=ref(null),localBusy=ref(false); 7142 const form=reactive({operation:'credit',amount:'',reason:'',idempotency_key:''}); 7143 const selectedId=computed(()=>String(route.params&&route.params.id||'')); 7144 function freshKey(){try{return 'cp-'+crypto.randomUUID()}catch(e){return 'cp-'+Date.now()+'-'+Math.random().toString(36).slice(2)}} 7145 function resetForm(){form.operation='credit';form.amount='';form.reason='';form.idempotency_key=freshKey();} 7146 function entryTypeLabel(v){return ({reward:'Ù ÙØ§Ùأة تÙÙØ§Ø¦ÙØ©',admin_credit:'Ø¥Ø¶Ø§ÙØ© Ø¥Ø¯Ø§Ø±ÙØ©',admin_debit:'خص٠إدارÙ',migration:'ترØÙ٠سابÙ'}[String(v||'')])||String(v||'-');} 7147 async function loadList(){localBusy.value=true;const r=await api('/api/admin/participation-points?search='+encodeURIComponent(search.value||'')+'&limit=100');if(r.status===401){localBusy.value=false;return router.replace('/admin/login')}if(r.status===403){store.state.msg=r.message||'ØºÙØ± ٠صرØ';localBusy.value=false;return router.replace('/admin')}members.value=safeArray(r.members);stats.value=r.stats||{};policy.value=r.policy||{};localBusy.value=false;} 7148 async function loadDetail(){if(!selectedId.value){detail.value=null;return;}localBusy.value=true;const r=await api('/api/admin/participation-points/'+encodeURIComponent(selectedId.value));if(r.status===401){localBusy.value=false;return router.replace('/admin/login')}if(!r.ok){store.state.msg=r.message||'تعذر تØÙ Ù٠سج٠اÙÙÙØ§Ø·';detail.value=null;localBusy.value=false;return;}detail.value=r;policy.value=r.policy||policy.value;localBusy.value=false;} 7149 async function openMember(m){await router.push('/admin/participation-points/'+encodeURIComponent(m.id));} 7150 async function back(){await router.push('/admin/participation-points');} 7151 async function adjust(){ 7152 if(!detail.value||!detail.value.member)return;const amount=Number(form.amount||0);if(!Number.isInteger(amount)||amount<=0){store.state.msg='Ø§ÙØªØ¨ عدد ÙÙØ§Ø· صØÙØØ§Ù Ø£ÙØ¨Ø± Ù Ù ØµÙØ±';return;}if(String(form.reason||'').trim().length<3){store.state.msg='Ø§ÙØªØ¨ Ø³Ø¨Ø¨Ø§Ù ÙØ§Ø¶ØØ§Ù ÙÙØ¹Ù ÙÙØ©';return;} 7153 const action=form.operation==='credit'?'Ø¥Ø¶Ø§ÙØ©':'خص٠';if(!window.confirm(action+' '+amount+' ÙÙØ·Ø© ÙÙØ¹Ø¶Ù '+(detail.value.member.full_name||'')+'Ø\nØ³ÙØªÙ Ø¥ÙØ´Ø§Ø¡ ØØ±ÙØ© Ø¬Ø¯ÙØ¯Ø© Ù٠سج٠ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ© ÙÙÙ ÙØªÙ تعدÙÙ Ø§ÙØ¥Ø¬Ù اÙ٠٠باشرة.'))return; 7154 localBusy.value=true;const r=await api('/api/admin/participation-points/'+encodeURIComponent(detail.value.member.id)+'/adjust',{method:'POST',body:JSON.stringify({operation:form.operation,amount,reason:String(form.reason||'').trim(),idempotency_key:form.idempotency_key||freshKey()})});localBusy.value=false;store.state.msg=r.message||'';if(r.ok){resetForm();await Promise.all([loadDetail(),loadList()]);} 7155 } 7156 watch(()=>route.params&&route.params.id,()=>{resetForm();loadDetail();}); 7157 onMounted(async()=>
7157{if(!(await store.requireAdmin(router)))return;resetForm();await loadList();await loadDetail();}); 7158 return {store,members,stats,policy,search,detail,form,localBusy,selectedId,entryTypeLabel,loadList,openMember,back,adjust,shortDate}; 7159 }, 7160 render:(function(){ 7161const _Vue = Vue 7162const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 7163 7164const _hoisted_1 = { 7165 key: 0, 7166 class: "participationPointsAdmin" 7167} 7168const _hoisted_2 = { class: "pointsAdminStats" } 7169const _hoisted_3 = { class: "card pointsSearchBar" } 7170const _hoisted_4 = ["onUpdate:modelValue", "onKeyup"] 7171const _hoisted_5 = ["onClick"] 7172const _hoisted_6 = { class: "pointsMemberList" } 7173const _hoisted_7 = ["onClick"] 7174const _hoisted_8 = { 7175 key: 0, 7176 class: "card emptyCard" 7177} 7178const _hoisted_9 = { 7179 key: 1, 7180 class: "participationPointsAdmin pointsRecordWorkspace" 7181} 7182const _hoisted_10 = ["onClick"] 7183const _hoisted_11 = { class: "card pointsBalanceHero" } 7184const _hoisted_12 = { class: "card pointsAdjustmentCard" } 7185const _hoisted_13 = ["onUpdate:modelValue"] 7186const _hoisted_14 = ["onUpdate:modelValue"] 7187const _hoisted_15 = ["onUpdate:modelValue"] 7188const _hoisted_16 = ["disabled", "onClick"] 7189const _hoisted_17 = { class: "card" } 7190const _hoisted_18 = { class: "adminSectionHead" } 7191const _hoisted_19 = { class: "pointsLedger" } 7192const _hoisted_20 = { 7193 key: 0, 7194 class: "adminEmptyState compact" 7195} 7196 7197return function render(_ctx, _cache) { 7198 with (_ctx) { 7199 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, vModelText: _vModelText, withKeys: _withKeys, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, vModelSelect: _vModelSelect, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 7200 7201 const _component_AdminFrame = _resolveComponent("AdminFrame") 7202 7203 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©" }, { 7204 default: _withCtx(() => [(!selectedId) 7205 ? (_openBlock(), _createElementBlock("section", _hoisted_1, [ 7206 _cache[5] || (_cache[5] = _createElementVNode("section", { class: "card dashboardHeaderCard" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Participation Points"), _createElementVNode("h3", null, "سج٠ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©"), _createElementVNode("p", { class: "hint" }, "ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ© ÙØ¸Ø§Ù ØªÙØ¯Ùر ٠جت٠ع٠٠ستÙ٠ت٠ا٠ا٠ع٠اÙÙ ØÙظة. Ø§ÙØ¥Ø¬Ù اÙÙ Ù Ø´ØªÙ Ù Ù Ø³Ø¬Ù Ø¯Ø§Ø¦Ù ØºÙØ± ÙØ§Ø¨Ù ÙÙØªØ¹Ø¯Ù٠اÙ٠باشر.")])], -1)), 7207 _createElementVNode("section", _hoisted_2, [_createElementVNode("article", null, [_createElementVNode("b", null, _toDisplayString(stats.net_points||0), 1), _cache[0] || (_cache[0] = _createElementVNode("small", null, "صاÙ٠اÙÙÙØ§Ø·", -1))]), _createElementVNode("article", null, [_createElementVNode("b", null, _toDisplayString(stats.members_with_entries||0), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "أعضاء ÙØ¯ÙÙÙ ØØ±Ùات", -1))]), _createElementVNode("article", null, [_createElementVNode("b", null, _toDisplayString(stats.ledger_entries||0), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "إج٠اÙÙ Ø§ÙØØ±ÙØ§Øª", -1))])]), 7208 _createElementVNode("section", _hoisted_3, [_withDirectives(_createElementVNode("input", { 7209 "onUpdate:modelValue": $event => ((search) = $event), 7210 onKeyup: _withKeys(loadList, ["enter"]), 7211 placeholder: "Ø§Ø¨ØØ« Ø¨Ø§ÙØ§Ø³Ù أ٠رÙÙ Ø§ÙØ¹Ø¶ÙÙØ© Ø£Ù ÙØ§ØªØ³Ø§Ø¨" 7212 }, null, 40, _hoisted_4), [[_vModelText, search]]), _createElementVNode("button", { 7213 class: "smallbtn", 7214 onClick: loadList 7215 }, "Ø¨ØØ«", 8, _hoisted_5)]), 7216 _createElementVNode("section", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(members, (m) => { 7217 return (_openBlock(), _createElementBlock("button", { 7218 key: m.id, 7219 class: "card pointsMemberRow", 7220 onClick: $event => (openMember(m)) 7221 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(m.full_name||'-'), 1), _createElementVNode("small", null, _toDisplayString(m.gzc_id||'-') + " · " + _toDisplayString(m.whatsapp||'-') + " · " + _toDisplayString($cityLabel(m.china_city)||'-'), 1)]), _createElementVNode("span", null, [_createElementVNode("strong", null, _toDisplayString(m.points_total||0), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "ÙÙØ·Ø©", -1))]), _cache[4] || (_cache[4] = _createElementVNode("em", null, "ÙØªØ", -1))], 8, _hoisted_7)) 7222 }), 128)), (!members.length&&!localBusy) 7223 ? (_openBlock(), _createElementBlock("div", _hoisted_8, "ÙØ§ ØªÙØ¬Ø¯ ÙØªØ§Ø¦Ø¬.")) 7224 : _createCommentVNode("", true)]) 7225 ])) 7226 : (_openBlock(), _createElementBlock("section", _hoisted_9, [_createElementVNode("button", { 7227 class: "smallbtn secondary", 7228 onClick: back 7229 }, "â Ø±Ø¬Ùع ÙÙÙØ§Ø¦Ù Ø©", 8, _hoisted_10), (detail&&detail.member) 7230 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 7231 _createElementVNode("section", _hoisted_11, [_createElementVNode("div", null, [_cache[6] || (_cache[6] = _createElementVNode("span", { class: "vueBadge" }, "إج٠اÙÙ ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©", -1)), _createElementVNode("h2", null, _toDisplayString(detail.points_total||0) + " ÙÙØ·Ø©", 1), _createElementVNode("p", null, _toDisplayString(detail.member.full_name) + " · " + _toDisplayString(detail.member.gzc_id||'-'), 1)]), _cache[7] || (_cache[7] = _
7231createElementVNode("span", null, "â", -1))]), 7232 _createElementVNode("section", _hoisted_12, [ 7233 _cache[12] || (_cache[12] = _createElementVNode("div", { class: "adminSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ØØ±ÙØ© Ø¬Ø¯ÙØ¯Ø©"), _createElementVNode("h3", null, "Ø¥Ø¶Ø§ÙØ© أ٠خص٠إدارÙ")])], -1)), 7234 _cache[13] || (_cache[13] = _createElementVNode("p", { class: "hint" }, "Ù٠تعدÙÙ ÙÙØ³Ø¬Ù ÙØØ±ÙØ© Ø¬Ø¯ÙØ¯Ø©. Ø§ÙØ®ØµÙ ÙØ§ ÙÙ ÙÙ Ø£Ù ÙØ¬Ø¹Ù إج٠اÙÙ ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ© Ø³Ø§ÙØ¨Ø§Ù.", -1)), 7235 _createElementVNode("label", null, [_cache[9] || (_cache[9] = _createTextVNode("ÙÙØ¹ Ø§ÙØ¹Ù ÙÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.operation) = $event) }, _cache[8] || (_cache[8] = [_createElementVNode("option", { value: "credit" }, "Ø¥Ø¶Ø§ÙØ© ÙÙØ§Ø·", -1), _createElementVNode("option", { value: "debit" }, "خص٠ÙÙØ§Ø·", -1)]), 8, _hoisted_13), [[_vModelSelect, form.operation]])]), 7236 _createElementVNode("label", null, [_cache[10] || (_cache[10] = _createTextVNode("عدد اÙÙÙØ§Ø·")), _withDirectives(_createElementVNode("input", { 7237 type: "number", 7238 min: "1", 7239 step: "1", 7240 inputmode: "numeric", 7241 "onUpdate:modelValue": $event => ((form.amount) = $event), 7242 placeholder: "٠ثاÙ: 50" 7243 }, null, 8, _hoisted_14), [[_vModelText, form.amount]])]), 7244 _createElementVNode("label", null, [_cache[11] || (_cache[11] = _createTextVNode("سبب Ø§ÙØ¹Ù ÙÙØ©")), _withDirectives(_createElementVNode("textarea", { 7245 "onUpdate:modelValue": $event => ((form.reason) = $event), 7246 maxlength: "500", 7247 placeholder: "سبب ÙØ§Ø¶Ø ÙØ¸Ùر ÙÙ Ø³Ø¬Ù Ø§ÙØªØ¯ÙÙÙ" 7248 }, null, 8, _hoisted_15), [[_vModelText, form.reason]])]), 7249 _createElementVNode("button", { 7250 class: "btn", 7251 disabled: localBusy, 7252 onClick: adjust 7253 }, "تسجÙÙ Ø§ÙØØ±ÙØ©", 8, _hoisted_16) 7254 ]), 7255 _createElementVNode("section", _hoisted_17, [_createElementVNode("div", _hoisted_18, [_cache[14] || (_cache[14] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Append-only Ledger"), _createElementVNode("h3", null, "Ø³Ø¬Ù Ø§ÙØØ±ÙØ§Øª")], -1)), _createElementVNode("small", null, _toDisplayString(detail.entries||0) + " ØØ±ÙØ©", 1)]), _createElementVNode("div", _hoisted_19, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(detail.ledger, (x) => { 7256 return (_openBlock(), _createElementBlock("article", { 7257 key: x.id, 7258 class: _normalizeClass(['pointsLedgerRow',Number(x.points_delta)>0?'credit':'debit']) 7259 }, [_createElementVNode("span", null, _toDisplayString(Number(x.points_delta)>
72590?'+':'') + _toDisplayString(x.points_delta), 1), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(entryTypeLabel(x.entry_type)), 1), _createElementVNode("p", null, _toDisplayString(x.reason), 1), _createElementVNode("small", null, _toDisplayString(x.admin_name||'اÙÙØ¸Ø§Ù ') + " · " + _toDisplayString(shortDate(x.created_at)), 1)])], 2)) 7260 }), 128)), (!detail.ledger.length) 7261 ? (_openBlock(), _createElementBlock("div", _hoisted_20, _cache[15] || (_cache[15] = [_createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ ØØ±Ùات", -1)]))) 7262 : _createCommentVNode("", true)])]), 7263 _cache[16] || (_cache[16] = _createElementVNode("section", { class: "card pointsPolicyCard" }, [_createElementVNode("b", null, "ØØ¯Ùد اÙÙØ¸Ø§Ù "), _createElementVNode("p", null, "ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ© ÙØ¸Ø§Ù Ù Ø¬ØªÙ Ø¹Ù ØºÙØ± ÙÙØ¯Ù Ù٠ستÙ٠ع٠SMT Wallet. ÙØ§ شراء ÙÙÙÙØ§Ø·Ø ÙØ§ Ø³ØØ¨ ÙÙØ¯Ù أ٠بÙÙÙØ ÙØ§ تØÙÙ٠٠اÙÙØ ÙÙØ§ ÙÙÙ Ø© ثابتة Ø¨Ø¹Ù ÙØ©.")], -1)) 7264 ], 64)) 7265 : _createCommentVNode("", true)]))]), 7266 _: 1 7267 })) 7268 } 7269} 7270})() 7271 }; 7272 7273 const AdminOrdersPage={ 7274 components:{AdminFrame}, 7275 setup(){ 7276 const store=useGzcStore();const router=useRouter();const route=useRoute();const status=ref('all');const orders=ref([]);const counts=ref({});const detail=ref(null);const workspaceMode=computed(()=>!!route.params.id);const nextAction=computed(()=>customerOrderNextAction(detail.value,'admin'));const commercialSnapshot=computed(()=>procurementCommercialSnapshot(detail.value&&detail.value.order)); 7277 const milestoneForm=reactive({milestone_type:'supplier_order',visibility:'member',title:'',body:''});const evidenceFile=ref(null);const evidenceMilestoneId=ref('');const evidenceType=ref('production_photo');const evidenceVisibility=ref('inherit');const evidenceFileLabel=computed(()=>evidenceFile.value?evidenceFile.value.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± Ù ÙÙ'); 7278 async function open(order){const r=await runBusyAction(store,'admin-orders.open',()=>api('/api/admin/orders/'+encodeURIComponent(order.id)));const record=safeRecord(r.order);if(r.ok&&record&&record.id){r.order=record;detail.value=r;const target='/admin/orders/'+encodeURIComponent(order.id);if(route.path!==target)router.push(target).catch(()=>{});}else store.state.msg=r.message||r.error||(r.ok?'تعذر عرض Ø§ÙØ·Ùب ÙØ£Ù استجابة Ø§ÙØ³ÙØ±ÙØ± ØºÙØ± Ù ÙØªÙ ÙØ©':'');} 7279 function closeDetail(){detail.value=null;router.push('/admin/orders').catch(()=>{});} 7280 async function load(){if(!(await store.requireAdmin(router)))return;store.state.busy=true;const r=await api('/api/admin/orders?status='+encodeURIComponent(status.value));store.state.busy=false;if(r.status===403){store.state.msg=r.message||'Ø§ÙØµÙاØÙØ© ØºÙØ± Ù ØªØ§ØØ©';router.push('/admin');return;}orders.value=safeArray(r.orders);counts.value=r.counts||{};const requested=String(route.params.id||route.query.order||'');if(requested){const row=orders.value.find(x=>String(x.id)===requested)||{id:requested};await open(row);}} 7281 async function createMilestone(){if(!detail.value)return;const title=String(milestoneForm.title||orderMilestoneLabel(milestoneForm.milestone_type)).trim();const r=await runBusyAction(store,'admin-orders.milestone-create',()=>api('/api/admin/orders/'+detail.value.order.id+'/milestones',{method:'POST',body:JSON.stringify({...milestoneForm,title})}));store.state.msg=r.message||r.error||'';if(r.ok){detail.value=r.order_payload||detail.value;evidenceMilestoneId.value=r.milestone&&r.milestone.id||'';milestoneForm.title='';milestoneForm.body='';}} 7282 function onEvidenceFile(e){evidenceFile.value=e.target.files&&e.target.files[0]?e.target.files[0]:null;if(evidenceFile.value){const n=String(evidenceFile.value.name||'').toLowerCase();if(/\.(mp4|mov|webm)$/.test(n))evidenceType.value='production_video';else if(/\.(jpe?g|png|webp)$/.test(n)&&evidenceType.value==='production_video')evidenceType.value='production_photo';}} 7283 async function uploadEvidence(){if(!detail.value||!evidenceMilestoneId.value||!evidenceFile.value){store.state.msg='اختر اÙ٠رØÙØ© ÙÙ ÙÙ Ø§ÙØ¯ÙÙÙ';return;}const fd=new FormData();fd.append('evidence_type',evidenceType.value);fd.append('visibility',evidenceVisibility.value);fd.append('file',evidenceFile.value);const r=await uploadApi('/api/admin/orders/'+detail.value.order.id+'/milestones/'+evidenceMilestoneId.value+'/evidence',{method:'POST',body:fd,headers:{Accept:'application/json'},uploadLabel:'Ø±ÙØ¹ دÙÙ٠٠رØÙØ© Ø§ÙØ·Ùب'});store.state.msg=r.message||r.error||'';if(r.ok){detail.value=r.order_payload||detail.value;evidenceFile.value=null;}} 7284 async function archiveMilestone(m){if(!detail.value||!m)return;const reason=String(window.prompt('سبب Ø£Ø±Ø´ÙØ© اÙ٠رØÙØ©Ø')||'').trim();if(!reason)return;const r=await api('/api/admin/orders/'+detail.value.order.id+'/milestones/'+m.id+'/archive',{method:'POST',body:JSON.stringify({reason})});store.state.msg=r.message||r.error||'';if(r.ok)detail.value=r.order_payload||detail.value;}
7285 async function archiveEvidence(x){if(!detail.value||!x)return;const reason=String(window.prompt('سبب Ø£Ø±Ø´ÙØ© Ø§ÙØ¯ÙÙÙØ')||'').trim();if(!reason)return;const r=await api('/api/admin/orders/'+detail.value.order.id+'/evidence/'+x.id+'/archive',{method:'POST',body:JSON.stringify({reason})});store.state.msg=r.message||r.error||'';if(r.ok)detail.value=r.order_payload||detail.value;} 7286 onMounted(load);watch(status,load); 7287 return{store,status,orders,counts,detail,workspaceMode,nextAction,commercialSnapshot,milestoneForm,evidenceFile,evidenceMilestoneId,evidenceType,evidenceVisibility,evidenceFileLabel,ORDER_MILESTONE_LABELS,ORDER_EVIDENCE_LABELS,ORDER_VISIBILITY_LABELS,load,open,closeDetail,createMilestone,onEvidenceFile,uploadEvidence,archiveMilestone,archiveEvidence,customerOrderStatusLabel,customerOrderPaymentLabel,purchaseModeLabel,procurementStatusLabel,procurementMoney,procurementCurrencyLabel,procurementPricingLabel,procurementQuoteUnitLabel,procurementIncotermLabel,procurementShippingLabel,procurementContainerLabel,orderMilestoneLabel,orderEvidenceLabel,orderVisibilityLabel,shortDate,safeArray,adminRecordUpdatedAt,adminQueueOwner,orderQueueNextAction}; 7288 }, 7289 render:(function(){ 7290const _Vue = Vue 7291const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 7292 7293const _hoisted_1 = { 7294 key: 0, 7295 class: "card dashboardHeaderCard" 7296} 7297const _hoisted_2 = ["onClick"] 7298const _hoisted_3 = { 7299 key: 1, 7300 class: "miniStats orderStats" 7301} 7302const _hoisted_4 = { 7303 key: 2, 7304 class: "segmented operationsFilters" 7305} 7306const _hoisted_5 = ["onClick"] 7307const _hoisted_6 = { 7308 key: 3, 7309 class: "card" 7310} 7311const _hoisted_7 = { 7312 key: 0, 7313 class: "adminQueueState adminQueueLoading" 7314} 7315const _hoisted_8 = { 7316 key: 1, 7317 class: "emptyCard adminQueueState" 7318} 7319const _hoisted_9 = { class: "customerOrderList adminOrdersList" } 7320const _hoisted_10 = ["onClick"] 7321const _hoisted_11 = { class: "codeToken orderCode" } 7322const _hoisted_12 = { class: "codeToken inlineCode" } 7323const _hoisted_13 = { class: "adminInlineWorkflowFacts" } 7324const _hoisted_14 = { class: "adminQueueNextAction" } 7325const _hoisted_15 = { 7326 key: 4, 7327 class: "card customerOrderDetail adminOrderDetail adminRecordWorkspace recordWorkspaceOnly" 7328} 7329const _hoisted_16 = { class: "adminWorkspaceBackBar" } 7330const _hoisted_17 = ["onClick"] 7331const _hoisted_18 = { class: "memberCardTop" } 7332const _hoisted_19 = { class: "codeToken orderCode" } 7333const _hoisted_20 = { class: "codeToken inlineCode" } 7334const _hoisted_21 = { class: "statusPill" } 7335const _hoisted_22 = { class: "orderAdminActions" } 7336const _hoisted_23 = ["onClick"] 7337const _hoisted_24 = { class: "orderMoneyCard commercialOrderSnapshot" } 7338const _hoisted_25 = { class: "orderGrandTotal" } 7339const _hoisted_26 = { class: "offerBreakdown commercialMoneySummary" } 7340const _hoisted_27 = { key: 0 } 7341const _hoisted_28 = { class: "infoGrid orderSnapshotGrid" } 7342const _hoisted_29 = { 7343 key: 0, 7344 class: "commercialSnapshotCard adminCommercialSnapshot" 7345} 7346const _hoisted_30 = { class: "commercialQuoteGrid" } 7347const _hoisted_31 = { key: 0 } 7348const _hoisted_32 = { key: 1 } 7349const _hoisted_33 = { key: 2 } 7350const _hoisted_34 = { key: 3 } 7351const _hoisted_35 = { key: 4 } 7352const _hoisted_36 = { key: 5 } 7353const _hoisted_37 = { key: 6 } 7354const _hoisted_38 = { key: 7 } 7355const _hoisted_39 = { key: 8 } 7356const _hoisted_40 = { key: 9 } 7357const _hoisted_41 = { 7358 key: 10, 7359 class: "commercialWide" 7360} 7361const _hoisted_42 = { 7362 key: 1, 7363 class: "orderMilestoneComposer" 7364} 7365const _hoisted_43 = { class: "formTwo" } 7366const _hoisted_44 = { class: "fieldLabel" } 7367const _hoisted_45 = ["onUpdate:modelValue"] 7368const _hoisted_46 = ["value"] 7369const _hoisted_47 = { class: "fieldLabel" } 7370const _hoisted_48 = ["onUpdate:modelValue"] 7371const _hoisted_49 = ["onUpdate:modelValue", "placeholder"] 7372const _hoisted_50 = ["onUpdate:modelValue"] 7373const _hoisted_51 = ["disabled", "onClick"] 7374const _hoisted_52 = { 7375 key: 2, 7376 class: "orderEvidenceUploader" 7377} 7378const _hoisted_53 = { 7379 key: 0, 7380 class: "emptyCard" 7381} 7382const _hoisted_54 = { class: "formTwo" } 7383const _hoisted_55 = { class: "fieldLabel" } 7384const _hoisted_56 = ["onUpdate:modelValue"] 7385const _hoisted_57 = ["value"] 7386const _hoisted_58 = { class: "fieldLabel" } 7387const _hoisted_59 = ["onUpdate:modelValue"] 7388const _hoisted_60 = ["value"] 7389const _hoisted_61 = { class: "fieldLabel" } 7390const _hoisted_62 = ["onUpdate:modelValue"] 7391const _hoisted_63 = { class: "filePicker wide" } 7392const _hoisted_64 = ["onChange"] 7393const _hoisted_65 = ["disabled", "onClick"] 7394const _hoisted_66 = { class: "orderTimeline orderEvidenceTimeline adminEvidenceTimeline" } 7395const _hoisted_67 = { class: "orderTimelineHead" } 7396const _hoisted_68 = { class: "orderTimelineBody" } 7397const _hoisted_69 = { class: "orderTimelineTitle" } 7398const _hoisted_70 = { 7399 key: 0, 7400 class: "evidenceBadge" 7401} 7402const _hoisted_71 = { 7403 key: 0, 7404 class: "orderEvidenceGrid" 7405} 7406const _hoisted_72 = ["href"] 7407const _hoisted_73 = ["src"] 7408const _hoisted_74 = ["src"] 7409const _hoisted_75 = { 7410 key: 2, 7411 class: "orderEvidenceIcon" 7412} 7413const _hoisted_76 = ["onClick"] 7414const _hoisted_77 = ["onClick"] 7415 7416return function render(_ctx, _cache) { 7417 with (_ctx) {
7418 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass, createTextVNode: _createTextVNode, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 7419 7420 const _component_AdminFrame = _resolveComponent("AdminFrame") 7421 7422 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø·ÙØ¨Ø§Øª Ø§ÙØ¹Ù ÙØ§Ø¡ اÙÙ Ø¤ÙØ¯Ø©" }, { 7423 default: _withCtx(() => [ 7424 (!workspaceMode) 7425 ? (_openBlock(), _createElementBlock("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ø·ÙØ¨Ø§Øª Ø§ÙØ¹Ù ÙØ§Ø¡ اÙÙ Ø¤ÙØ¯Ø©"), _createElementVNode("h3", null, "Ø§ÙØ·Ùبات اÙÙ Ø¤ÙØ¯Ø©"), _createElementVNode("p", { class: "hint" }, "Ù٠سج٠ÙÙØ§ ÙØªØ¬ Ø¹Ù Ù ÙØ§ÙÙØ© Ø§ÙØ¹Ø¶Ù عÙ٠عرض Ù ÙØ´Ùر. Ø§ÙØ¥Ø¬Ù اÙÙØ§Øª ÙØ§ÙØ¹Ù ÙØ§Øª ÙØ§ÙØ´Ø±ÙØ· ÙÙØ·Ø§Øª ثابتة ÙØ§ ØªØªØºÙØ± بتعدÙÙ Ù Ù٠اÙÙ Ø´ØªØ±ÙØ§Øª.")], -1)), _createElementVNode("button", { 7426 class: "smallbtn", 7427 onClick: load 7428 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)])) 7429 : _createCommentVNode("", true), 7430 (!workspaceMode) 7431 ? (_openBlock(), _createElementBlock("div", _hoisted_3, [ 7432 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(counts.total||0), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "ÙÙ Ø§ÙØ·Ùبات", -1))]), 7433 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(counts.confirmed||0), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "Ù Ø¤ÙØ¯Ø©", -1))]), 7434 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(counts.procurement||0), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "ÙÙØ¯ اÙÙ Ø´ØªØ±ÙØ§Øª", -1))]), 7435 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(counts.completed||0), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "Ù ÙØªÙ ÙØ©", -1))]) 7436 ])) 7437 : _createCommentVNode("", true), 7438 (!workspaceMode) 7439 ? (_openBlock(), _createElementBlock("div", _hoisted_4, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(['all','confirmed','procurement','completed','cancelled'], (s) => { 7440 return (_openBlock(), _createElementBlock("button", { 7441 key: s, 7442 class: _normalizeClass({active:status===s}), 7443 onClick: $event => (status=s) 7444 }, _toDisplayString(s==='all'?'اÙÙÙ':customerOrderStatusLabel(s)), 11, _hoisted_5)) 7445 }), 128))])) 7446 : _createCommentVNode("", true), 7447 (!workspaceMode) 7448 ? (_openBlock(), _createElementBlock("section", _hoisted_6, [(store.state.busy&&!orders.length) 7449 ? (_openBlock(), _createElementBlock("div", _hoisted_7, "جار٠تØÙ ÙÙ Ø§ÙØ·Ùبات اÙÙ Ø¤ÙØ¯Ø©...")) 7450 : (!orders.length) 7451 ? (_openBlock(), _createElementBlock("div", _hoisted_8, "ÙØ§ ØªÙØ¬Ø¯ Ø·ÙØ¨Ø§Øª ÙÙ ÙØ°Ø§ Ø§ÙØªØµÙÙÙ.")) 7452 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(orders, (o) => { 7453 return (_openBlock(), _createElementBlock("button", { 7454 class: "customerOrderItem", 7455 key: o.id, 7456 onClick: $event => (open(o)) 7457 }, [_createElementVNode("div", null, [ 7458 _createElementVNode("span", _hoisted_11, _toDisplayString(o.order_code), 1), 7459 _createElementVNode("b", null, _toDisplayString(o.title_snapshot), 1), 7460 _createElementVNode("span", null, [_createTextVNode(_toDisplayString(o.member_name) + " · ", 1), _createElementVNode("span", _hoisted_12, _toDisplayString(o.request_code), 1)]), 7461 _createElementVNode("div", _hoisted_13, [ 7462 _createElementVNode("span", null, [_cache[5] || (_cache[5] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(customerOrderStatusLabel(o.status)), 1)]), 7463 _createElementVNode("span", null, [_cache[6] || (_cache[6] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(adminQueueOwner('orders',o)), 1)]), 7464 _createElementVNode("span", null, [_cache[7] || (_cache[7] = _
7464createElementVNode("small", null, "آخر ØªØØ¯ÙØ«", -1)), _createElementVNode("b", null, _toDisplayString(adminRecordUpdatedAt(o)), 1)]), 7465 _createElementVNode("span", _hoisted_14, [_cache[8] || (_cache[8] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(orderQueueNextAction(o)), 1)]) 7466 ]) 7467 ]), _createElementVNode("div", null, [_createElementVNode("strong", null, _toDisplayString(o.total_amount) + " " + _toDisplayString(o.currency), 1), _createElementVNode("em", { class: _normalizeClass('orderState '+o.status) }, _toDisplayString(customerOrderStatusLabel(o.status)), 3)])], 8, _hoisted_10)) 7468 }), 128))])])) 7469 : _createCommentVNode("", true), 7470 detail 7471 ? (_openBlock(), _createElementBlock("section", _hoisted_15, [ 7472 _createElementVNode("div", _hoisted_16, [_createElementVNode("button", { 7473 class: "smallbtn secondary", 7474 onClick: closeDetail 7475 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙØ·Ùبات", 8, _hoisted_17), _cache[9] || (_cache[9] = _createElementVNode("span", null, "Ù Ø³Ø§ØØ© Ø·ÙØ¨ ٠ستÙÙØ© â ÙÙÙØ° Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ ÙÙØ§ ث٠ارجع ÙÙÙØ§Ø¦Ù Ø©", -1))]), 7476 _createElementVNode("div", _hoisted_18, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_19, _toDisplayString(detail.order.order_code), 1), _createElementVNode("h3", null, _toDisplayString(detail.order.title_snapshot), 1), _createElementVNode("p", null, [_createTextVNode(_toDisplayString(detail.order.member_name) + " â ", 1), _createElementVNode("span", _hoisted_20, _toDisplayString(detail.order.member_whatsapp), 1)])]), _createElementVNode("span", _hoisted_21, _toDisplayString(customerOrderStatusLabel(detail.order.status)), 1)]), 7477 _createElementVNode("section", { class: _normalizeClass('operationsNextAction '+nextAction.tone) }, [_cache[10] || (_cache[10] = _createElementVNode("span", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØØ§ÙÙ", -1)), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(nextAction.title), 1), _createElementVNode("small", null, "Ø§ÙØ¯Ùر Ø§ÙØ¢Ù: " + _toDisplayString(nextAction.owner), 1)]), _createElementVNode("p", null, _toDisplayString(nextAction.note), 1)], 2), 7478 _createElementVNode("div", _hoisted_22, [_createElementVNode("button", { 7479 class: "btn", 7480 onClick: $event => ($router.push('/admin/procurement/'+detail.order.procurement_request_id)) 7481 }, "ÙØªØ اÙÙ Ø´ØªØ±ÙØ§Øª ÙØªÙÙÙØ° Ø§ÙØ¥Ø¬Ø±Ø§Ø¡", 8, _hoisted_23), _createElementVNode("span", null, "ØØ§ÙØ© اÙÙ Ø´ØªØ±ÙØ§Øª: " + _toDisplayString(procurementStatusLabel(detail.order.procurement_status)), 1)]), 7482 _createElementVNode("section", _hoisted_24, [_createElementVNode("div", _hoisted_25, [_cache[11] || (_cache[11] = _createElementVNode("span", null, "Ø§ÙØ¥Ø¬Ù اÙÙ ØºÙØ± اÙÙØ§Ø¨Ù ÙÙØªØºÙÙØ±", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.total_amount,detail.order.currency)), 1)]), _createElementVNode("div", _hoisted_26, [ 7483 _createElementVNode("span", null, [_cache[12] || (_cache[12] = _createElementVNode("small", null, "اÙÙ ÙØªØ¬Ø§Øª / Ø§ÙØ®Ø¯Ù Ø©", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.subtotal_amount,detail.order.currency)), 1)]), 7484 _createElementVNode("span", null, [_createElementVNode("small", null, "Ø§ÙØ®Ø¯Ù Ø© " + _toDisplayString(Number(detail.order.commercial_model_version||1)>=2?'('+Number(detail.order.service_fee_percent||0)+'%)':''), 1), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.service_fee_amount,detail.order.currency)), 1)]), 7485 _createElementVNode("span", null, [_cache[13] || (_cache[13] = _createElementVNode("small", null, "Ø§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.shipping_amount,detail.order.currency)), 1)]), 7486 (Number(detail.order.insurance_amount||0)>0) 7487 ? (_openBlock(), _createElementBlock("span", _hoisted_27, [_cache[14] || (_cache[14] = _createElementVNode("small", null, "Ø§ÙØªØ£Ù ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.insurance_amount,detail.order.currency)), 1)])) 7488 : _createCommentVNode("", true), 7489 _createElementVNode("span", null, [_cache[15] || (_cache[15] = _createElementVNode("small", null, "Ø§ÙØ®ØµÙ ", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.order.discount_amount,detail.order.currency)), 1)]) 7490 ])]), 7491 _createElementVNode("div", _hoisted_28, [ 7492 _createElementVNode("p", null, [_cache[16] || (_cache[16] = _createElementVNode("b", null, "ÙØ³Ø®Ø© Ø§ÙØ¹Ø±Ø¶:", -1)), _createTextVNode(" " + _toDisplayString(detail.order.source_offer_version), 1)]), 7493 _createElementVNode("p", null, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "اÙÙÙ ÙØ°Ø¬ Ø§ÙØªØ¬Ø§Ø±Ù:", -1)), _createTextVNode(" v" + _toDisplayString(detail.order.commercial_model_version||
74931), 1)]), 7494 _createElementVNode("p", null, [_cache[18] || (_cache[18] = _createElementVNode("b", null, "Ø§ÙØ¹Ù ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(procurementCurrencyLabel(detail.order.currency)), 1)]), 7495 _createElementVNode("p", null, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "طرÙÙØ© Ø§ÙØ´Ø±Ø§Ø¡:", -1)), _createTextVNode(" " + _toDisplayString(purchaseModeLabel(detail.order.purchase_mode)), 1)]), 7496 _createElementVNode("p", null, [_cache[20] || (_cache[20] = _createElementVNode("b", null, "Ø§ÙØ¯Ùع:", -1)), _createTextVNode(" " + _toDisplayString(customerOrderPaymentLabel(detail.order.payment_status)), 1)]), 7497 _createElementVNode("p", null, [_cache[21] || (_cache[21] = _createElementVNode("b", null, "اÙ٠سؤÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(detail.order.assigned_admin_name||'ØºÙØ± ٠عÙÙ'), 1)]), 7498 _createElementVNode("p", null, [_cache[22] || (_cache[22] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØ¹Ø±Ø¶:", -1)), _cache[23] || (_cache[23] = _createElementVNode("br", null, null, -1)), _createTextVNode(_toDisplayString(detail.order.offer_terms_snapshot), 1)]), 7499 _createElementVNode("p", null, [_cache[24] || (_cache[24] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØªØ³ÙÙÙ :", -1)), _cache[25] || (_cache[25] = _createElementVNode("br", null, null, -1)), _createTextVNode(_toDisplayString(detail.order.delivery_terms_snapshot), 1)]) 7500 ]), 7501 (Number(detail.order.commercial_model_version||1)>=2) 7502 ? (_openBlock(), _createElementBlock("section", _hoisted_29, [_cache[44] || (_cache[44] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Immutable Commercial Snapshot"), _createElementVNode("h3", null, "Ø§ÙØªØ³Ø¹Ùر ÙØ§ÙØ´ØÙ اÙ٠عت٠داÙ")])], -1)), _createElementVNode("div", _hoisted_30, [ 7503 _createElementVNode("p", null, [_cache[26] || (_cache[26] = _createElementVNode("b", null, "Ø§ÙØªØ³Ø¹Ùر:", -1)), _createTextVNode(" " + _toDisplayString(procurementPricingLabel(commercialSnapshot.pricing_mode)), 1)]), 7504 (commercialSnapshot.pricing_mode==='unit') 7505 ? (_openBlock(), _createElementBlock("p", _hoisted_31, [_cache[27] || (_cache[27] = _createElementVNode("b", null, "اÙÙÙ ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.quote_quantity) + " " + _toDisplayString(procurementQuoteUnitLabel(commercialSnapshot.quote_unit)), 1)])) 7506 : _createCommentVNode("", true), 7507 (commercialSnapshot.pricing_mode==='unit') 7508 ? (_openBlock(), _createElementBlock("p", _hoisted_32, [_cache[28] || (_cache[28] = _createElementVNode("b", null, "سعر اÙÙØØ¯Ø©:", -1)), _createTextVNode(" " + _toDisplayString(procurementMoney(commercialSnapshot.unit_price,detail.order.currency)), 1)])) 7509 : _createCommentVNode("", true), 7510 _createElementVNode("p", null, [_cache[29] || (_cache[29] = _createElementVNode("b", null, "Incoterm:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.incoterm?procurementIncotermLabel(commercialSnapshot.incoterm):'-'), 1)]), 7511 _createElementVNode("p", null, [_cache[30] || (_cache[30] = _createElementVNode("b", null, "ÙÙØ¹ Ø§ÙØ´ØÙ:", -1)), _createTextVNode(" " + _toDisplayString(procurementShippingLabel(commercialSnapshot.shipping_mode)), 1)]), 7512 (commercialSnapshot.container_type) 7513 ? (_openBlock(), _createElementBlock("p", _hoisted_33, [_cache[31] || (_cache[31] = _createElementVNode("b", null, "Ø§ÙØØ§ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(procurementContainerLabel(commercialSnapshot.container_type)), 1)])) 7514 : _createCommentVNode("", true), 7515 (Number(commercialSnapshot.gross_weight_kg||0)) 7516 ? (_openBlock(), _createElementBlock("p", _hoisted_34, [_cache[32] || (_cache[32] = _createElementVNode("b", null, "Gross:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.gross_weight_kg) + " kg", 1)])) 7517 : _createCommentVNode("", true), 7518 (Number(commercialSnapshot.net_weight_kg||0)) 7519 ? (_openBlock(), _createElementBlock("p", _hoisted_35, [_cache[33] || (_cache[33] = _createElementVNode("b", null, "Net:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.net_weight_kg) + " kg", 1)])) 7520 : _createCommentVNode("", true), 7521 (Number(commercialSnapshot.total_cbm||0)) 7522 ? (_openBlock(), _createElementBlock("p", _hoisted_36, [_cache[34] || (_cache[34] = _createElementVNode("b", null, "CBM:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.total_cbm), 1)])) 7523 : _createCommentVNode("", true), 7524 (Number(commercialSnapshot.packages_count||0)) 7525 ? (_openBlock(), _createElementBlock("p", _hoisted_37, [_cache[35] || (_cache[35] = _createElementVNode("b", null, "Ø§ÙØ·Ø±Ùد:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.packages_count), 1)])) 7526 : _createCommentVNode("", true), 7527 _createElementVNode("p", null, [_cache[36] || (_cache[36] = _createElementVNode("b", null, "اÙÙ ÙØ´Ø£:", -1)), _createTextVNode(" " + _toDisplayString([$cityLabel(commercialSnapshot.origin_city),commercialSnapshot.origin_country].filter(
7527Boolean).join(' â ')||'-'), 1)]), 7528 _createElementVNode("p", null, [_cache[37] || (_cache[37] = _createElementVNode("b", null, "Ø§ÙØªØÙ ÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.loading_point||'-'), 1)]), 7529 _createElementVNode("p", null, [_cache[38] || (_cache[38] = _createElementVNode("b", null, "اÙÙØ¬ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString([$cityLabel(commercialSnapshot.destination_city),commercialSnapshot.destination_country].filter(Boolean).join(' â ')||'-'), 1)]), 7530 _createElementVNode("p", null, [_cache[39] || (_cache[39] = _createElementVNode("b", null, "اÙÙØµÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.destination_point||'-'), 1)]), 7531 (Number(commercialSnapshot.production_lead_days||0)) 7532 ? (_openBlock(), _createElementBlock("p", _hoisted_38, [_cache[40] || (_cache[40] = _createElementVNode("b", null, "Lead Time:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.production_lead_days) + " ÙÙÙ ", 1)])) 7533 : _createCommentVNode("", true), 7534 (Number(commercialSnapshot.transit_days||0)) 7535 ? (_openBlock(), _createElementBlock("p", _hoisted_39, [_cache[41] || (_cache[41] = _createElementVNode("b", null, "Transit:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.transit_days) + " ÙÙÙ ", 1)])) 7536 : _createCommentVNode("", true), 7537 (commercialSnapshot.hs_code) 7538 ? (_openBlock(), _createElementBlock("p", _hoisted_40, [_cache[42] || (_cache[42] = _createElementVNode("b", null, "HS Code:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.hs_code), 1)])) 7539 : _createCommentVNode("", true), 7540 (commercialSnapshot.packing_notes) 7541 ? (_openBlock(), _createElementBlock("p", _hoisted_41, [_cache[43] || (_cache[43] = _createElementVNode("b", null, "Ø§ÙØªØ¹Ø¨Ø¦Ø©:", -1)), _createTextVNode(" " + _toDisplayString(commercialSnapshot.packing_notes), 1)])) 7542 : _createCommentVNode("", true) 7543 ])])) 7544 : _createCommentVNode("", true), 7545 (detail.order.status!=='cancelled') 7546 ? (_openBlock(), _createElementBlock("section", _hoisted_42, [ 7547 _cache[48] || (_cache[48] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Order Evidence"), _createElementVNode("h3", null, "Ø¥Ø¶Ø§ÙØ© ٠رØÙØ© تÙÙÙØ°"), _createElementVNode("p", { class: "hint compactHint" }, "أض٠٠ا ØØ¯Ø« ÙØ¹ÙÙØ§Ù. اÙ٠رØÙØ© Ø§ÙØ¸Ø§Ùرة ÙÙØ¹Ø¶Ù ØªÙØ±Ø³Ù ÙØªØØ¯ÙØ« ÙØªØ®Ø¶Ø¹ ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª WhatsApp.")])], -1)), 7548 _createElementVNode("div", _hoisted_43, [_createElementVNode("label", _hoisted_44, [_cache[45] || (_cache[45] = _createElementVNode("span", null, "ÙÙØ¹ اÙ٠رØÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((milestoneForm.milestone_type) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(ORDER_MILESTONE_LABELS, (label, key) => { 7549 return (_openBlock(), _createElementBlock("option", { 7550 key: key, 7551 value: key 7552 }, _toDisplayString(label), 9, _hoisted_46)) 7553 }), 128))], 8, _hoisted_45), [[_vModelSelect, milestoneForm.milestone_type]])]), _createElementVNode("label", _hoisted_47, [_cache[47] || (_cache[47] = _createElementVNode("span", null, "Ø§ÙØ¸ÙÙØ±", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((milestoneForm.visibility) = $event) }, _cache[46] || (_cache[46] = [_createElementVNode("option", { value: "member" }, "Ø¸Ø§ÙØ± ÙÙØ¹Ø¶Ù", -1), _createElementVNode("option", { value: "internal" }, "داخÙÙ ÙÙØ¥Ø¯Ø§Ø±Ø© ÙÙØ·", -1)]), 8, _hoisted_48), [[_vModelSelect, milestoneForm.visibility]])])]), 7554 _withDirectives(_createElementVNode("input", { 7555 "onUpdate:modelValue": $event => ((milestoneForm.title) = $event), 7556 placeholder: orderMilestoneLabel(milestoneForm.milestone_type) 7557 }, null, 8, _hoisted_49), [[_vModelText, milestoneForm.title]]), 7558 _withDirectives(_createElementVNode("textarea", { 7559 "onUpdate:modelValue": $event => ((milestoneForm.body) = $event), 7560 placeholder: "ØªÙØ§ØµÙ٠٠ختصرة: اÙÙ ØµÙØ¹Ø ÙØ³Ø¨Ø© Ø§ÙØ¥ÙجازØ
7560 ÙØªÙجة اÙÙØØµØ Ø±ÙÙ Ø§ÙØ´ØÙØ©..." 7561 }, null, 8, _hoisted_50), [[_vModelText, milestoneForm.body]]), 7562 _createElementVNode("button", { 7563 class: "btn", 7564 disabled: store.state.busy, 7565 onClick: createMilestone 7566 }, "Ø¥Ø¶Ø§ÙØ© اÙ٠رØÙØ©", 8, _hoisted_51) 7567 ])) 7568 : _createCommentVNode("", true), 7569 (detail.order.status!=='cancelled') 7570 ? (_openBlock(), _createElementBlock("section", _hoisted_52, [_cache[55] || (_cache[55] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Evidence"), _createElementVNode("h3", null, "Ø¥Ø±ÙØ§Ù دÙÙ٠ب٠رØÙØ©"), _createElementVNode("p", { class: "hint compactHint" }, "Ø§ÙØµÙر ØªÙØ¯Ø§Ø± تÙÙØ§Ø¦ÙاÙ: Auto-orientation + WebP + Thumbnail. اÙÙÙØ¯ÙÙ MP4/MOV/WebM ÙPDF Ù Ø³Ù ÙØØ§Ù.")])], -1)), (!safeArray(detail.milestones).length) 7571 ? (_openBlock(), _createElementBlock("div", _hoisted_53, "أض٠٠رØÙØ© Ø£ÙÙØ§Ù ث٠اربط Ø¨ÙØ§ Ø§ÙØµÙر أ٠اÙÙÙØ¯Ù٠أ٠اÙÙ Ø³ØªÙØ¯.")) 7572 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 7573 _createElementVNode("div", _hoisted_54, [_createElementVNode("label", _hoisted_55, [_cache[50] || (_cache[50] = _createElementVNode("span", null, "اÙ٠رØÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((evidenceMilestoneId) = $event) }, [_cache[49] || (_cache[49] = _createElementVNode("option", { value: "" }, "اختر اÙ٠رØÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(detail.milestones), (m) => { 7574 return (_openBlock(), _createElementBlock("option", { 7575 key: m.id, 7576 value: m.id 7577 }, _toDisplayString(orderMilestoneLabel(m.milestone_type)) + " â " + _toDisplayString(m.title), 9, _hoisted_57)) 7578 }), 128))], 8, _hoisted_56), [[_vModelSelect, evidenceMilestoneId]])]), _createElementVNode("label", _hoisted_58, [_cache[51] || (_cache[51] = _createElementVNode("span", null, "ÙÙØ¹ Ø§ÙØ¯ÙÙÙ", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((evidenceType) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(ORDER_EVIDENCE_LABELS, (label, key) => { 7579 return (_openBlock(), _createElementBlock("option", { 7580 key: key, 7581 value: key 7582 }, _toDisplayString(label), 9, _hoisted_60)) 7583 }), 128))], 8, _hoisted_59), [[_vModelSelect, evidenceType]])])]), 7584 _createElementVNode("label", _hoisted_61, [_cache[53] || (_cache[53] = _createElementVNode("span", null, "ظÙÙØ± Ø§ÙØ¯ÙÙÙ", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((evidenceVisibility) = $event) }, _cache[52] || (_cache[52] = [_createElementVNode("option", { value: "inherit" }, "ÙØªØ¨Ø¹ ظÙÙØ± اÙ٠رØÙØ©", -1), _createElementVNode("option", { value: "member" }, "Ø¸Ø§ÙØ± ÙÙØ¹Ø¶Ù إذا ÙØ§Ùت اÙ٠رØÙØ© Ø¸Ø§ÙØ±Ø©", -1), _createElementVNode("option", { value: "internal" }, "داخÙÙ ÙÙØ¥Ø¯Ø§Ø±Ø© ÙÙØ·", -1)]), 8, _hoisted_62), [[_vModelSelect, evidenceVisibility]])]), 7585 _createElementVNode("label", _hoisted_63, [_createElementVNode("input", { 7586 type: "file", 7587 accept: "image/jpeg,image/png,image/webp,application/pdf,video/mp4,video/quicktime,video/webm", 7588 onChange: onEvidenceFile 7589 }, null, 40, _hoisted_64), _cache[54] || (_cache[54] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± Ù ÙÙ", -1)), _createElementVNode("em", null, _toDisplayString(evidenceFileLabel), 1)]), 7590 _createElementVNode("button", { 7591 class: "btn secondary", 7592 disabled: store.state.upload&&store.state.upload.active, 7593 onClick: uploadEvidence 7594 }, _toDisplayString(store.state.upload&&store.state.upload.active?'Ø¬Ø§Ø±Ù Ø§ÙØ±Ùع...':'Ø±ÙØ¹ دÙÙ٠اÙ٠رØÙØ©'), 9, _hoisted_65) 7595 ], 64))])) 7596 : _createCommentVNode("", true), 7597 _createElementVNode("section", _hoisted_66, [_createElementVNode("div", _hoisted_67, [_cache[56] || (_cache[56] = _
7597createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Execution Timeline"), _createElementVNode("h3", null, "Ø§ÙØ³Ø¬Ù Ø§ÙØ²Ù ÙÙ ÙØ§ÙØ£Ø¯ÙØ©")], -1)), _createElementVNode("span", null, _toDisplayString(safeArray(detail.timeline).length) + " ØªØØ¯ÙØ«", 1)]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(detail.timeline).length?safeArray(detail.timeline):safeArray(detail.events), (e) => { 7598 return (_openBlock(), _createElementBlock("div", { 7599 class: "orderTimelineItem", 7600 key: e.id 7601 }, [_cache[57] || (_cache[57] = _createElementVNode("i", null, null, -1)), _createElementVNode("div", _hoisted_68, [ 7602 _createElementVNode("div", _hoisted_69, [_createElementVNode("b", null, _toDisplayString(e.title), 1), (e.source==='milestone') 7603 ? (_openBlock(), _createElementBlock("span", _hoisted_70, _toDisplayString(orderMilestoneLabel(e.milestone_type)) + " · " + _toDisplayString(orderVisibilityLabel(e.visibility)), 1)) 7604 : _createCommentVNode("", true)]), 7605 _createElementVNode("p", null, _toDisplayString(e.body||'-'), 1), 7606 _createElementVNode("small", null, _toDisplayString(shortDate(e.occurred_at||e.created_at)) + " · " + _toDisplayString(e.actor_type), 1), 7607 (safeArray(e.evidence).length) 7608 ? (_openBlock(), _createElementBlock("div", _hoisted_71, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(e.evidence), (x) => { 7609 return (_openBlock(), _createElementBlock("div", { 7610 key: x.id, 7611 class: "orderEvidenceCard adminEvidenceCard" 7612 }, [_createElementVNode("a", { 7613 href: x.file_url, 7614 target: "_blank", 7615 rel: "noopener" 7616 }, [(x.kind==='image') 7617 ? (_openBlock(), _createElementBlock("img", { 7618 key: 0, 7619 src: x.thumb_url||x.file_url, 7620 loading: "lazy", 7621 alt: "" 7622 }, null, 8, _hoisted_73)) 7623 : (x.kind==='video'&&x.thumb_url) 7624 ? (_openBlock(), _createElementBlock("img", { 7625 key: 1, 7626 src: x.thumb_url, 7627 loading: "lazy", 7628 alt: "" 7629 }, null, 8, _hoisted_74)) 7630 : (_openBlock(), _createElementBlock("span", _hoisted_75, _toDisplayString(x.kind==='video'?'â¶':'PDF'), 1)), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(orderEvidenceLabel(x.evidence_type)), 1), _createElementVNode("small", null, _toDisplayString(x.original_name) + " · " + _toDisplayString(orderVisibilityLabel(x.visibility)), 1)])], 8, _hoisted_72), _createElementVNode("button", { 7631 class: "tinyDanger", 7632 onClick: $event => (archiveEvidence(x)) 7633 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_76)])) 7634 }), 128))])) 7635 : _createCommentVNode("", true), 7636 (e.source==='milestone') 7637 ? (_openBlock(), _createElementBlock("button", { 7638 key: 1, 7639 class: "tinyLink dangerText", 7640 onClick: $event => (archiveMilestone({id:e.milestone_id})) 7641 }, "Ø£Ø±Ø´ÙØ© اÙ٠رØÙØ©", 8, _hoisted_77)) 7642 : _createCommentVNode("", true) 7643 ])])) 7644 }), 128))]) 7645 ])) 7646 : _createCommentVNode("", true) 7647 ]), 7648 _: 1 7649 })) 7650 } 7651} 7652})() 7653 }; 7654 7655 const AdminProcurementPage={ 7656 components:{AdminFrame}, 7657 setup(){ 7658 const store=useGzcStore();const router=useRouter();const route=useRoute();const status=ref('all');const overdueOnly=computed(()=>String((route.query||{}).overdue||'')==='1');const requests=ref([]);const detail=ref(null);const memberPreview=ref(false);const workspaceMode=computed(()=>!!route.params.id);const nextAction=computed(()=>procurementNextAction(detail.value,'admin'));const offerDelivery=computed(()=>safeRecord(detail.value&&detail.value.offer_delivery)||{});const memberUpdates=computed(()=>safeArray(detail.value&&detail.value.updates));const unreadMemberUpdates=computed(()=>memberUpdates.value.filter(u=>!u.read_at).length);const note=ref('');const proformaNumber=ref('');const purchaseMode=ref('request_quote');const offerTerms=ref('');const deliveryTerms=ref('');const offerValidUntil=ref('');const file=ref(null);const documentType=ref('quotation');const operators=ref([]);const assignedAdminId=ref('');const nextActionDays=ref('');const fileLabel=computed(()=>file.value?file.value.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± Ù Ø³ØªÙØ¯'); 7659 const commercial=reactive({pricing_mode:'total',quote_quantity:1,quote_unit:'unit',unit_price:0,goods_amount:0,quoted_currency:'CNY',service_fee_percent:0,shipping_amount:0,insurance_amount:0,discount_amount:0,incoterm:'',shipping_mode:'none',container_type:'',gross_weight_kg:0,net_weight_kg:0,total_cbm:0,packages_count:0,packing_notes:'',origin_country:'',origin_city:'',loading_point:'',destination_country:'',destination_city:'',destination_point:'',production_lead_days:0,transit_days:0,hs_code:''}); 7660 const computedGoodsAmount=computed(()=>commercial.pricing_mode==='unit'?Math.round((Number(commercial.quote_quantity||0)*Number(commercial.unit_price||0)+Number.EPSILON)*100)/100:Math.max(0,Number(commercial.goods_amount||0))); 7661 const computedServiceFee=computed(()=>Math.round((computedGoodsAmount.value*Number(commercial.service_fee_percent||0)/100+Number.EPSILON)*100)/100); 7662 const computedGrandTotal=computed(()=>Math.round((computedGoodsAmount.value+computedServiceFee.value+Number(commercial.shipping_amount||0)+Number(commercial.insurance_amount||0)-Number(commercial.discount_amount||0)+Number.EPSILON)*100)/100); 7663 const commercialReadiness=computed(()=>{const shipping=String(commercial.shipping_mode||'none');const checks=[{key:'price',label:'Ø§ÙØ³Ø¹Ø±',ok:computedGoodsAmount.value>0},{key:'validity',label:'Ø§ÙØµÙاØÙØ©',ok:!!String(offerValidUntil.value||'')},{key:'terms',label:'Ø§ÙØ´Ø±ÙØ·',ok:!!String(offerTerms.value||'').trim()&&!!String(deliveryTerms.value||'').trim()},{key:'shipping',label:'Ø¨ÙØ§Ùات Ø§ÙØ´ØÙ',ok:shipping==='none'||(Number(commercial.total_cbm||0)>0&&Number(commercial.gross_weight_kg||0)>=Number(commercial.net_weight_kg||0)&&(shipping!=='fcl'||!!commercial.container_type))},{key:'route',label:'اÙ٠سار',ok:shipping==='none'||(!!String(commercial.origin_country||'').trim()&&!!String(commercial.destination_country||'').trim())}];return{checks,done:checks.filter(x=>x.ok).length,total:checks.length,ready:checks.every(x=>x.ok)}}); 7664 function loadCommercialForm(r){Object.assign(commercial,{pricing_mode:r.pricing_mode||'total',quote_quantity:Number(r.quote_quantity||1),quote_unit:r.quote_unit||'unit',unit_price:Number(r.unit_price||0),goods_amount:Number(r.goods_amount||0),quoted_currency:['CNY','USD','SDG'].includes(String(r.quoted_currency||'').toUpperCase())?String(r.quoted_currency).toUpperCase():'CNY',service_fee_percent:Number(r.service_fee_percent||0),shipping_amount:Number(r.shipping_amount||0),insurance_amount:Number(r.insurance_amount||0),discount_amount:Number(r.discount_amount||0),incoterm:r.incoterm||'',shipping_mode:r.shipping_mode||'none',container_type:r.container_type||'',gross_weight_kg:Number(r.gross_weight_kg||0),net_weight_kg:Number(r.net_weight_kg||0),total_cbm:Number(r.total_cbm||0),packages_count:Number(r.packages_count||0),packing_notes:r.packing_notes||'',origin_country:r.origin_country||'',origin_city:r.origin_city||'',loading_point:r.loading_point||'',destination_country:r.de
7664stination_country||'',destination_city:r.destination_city||'',destination_point:r.destination_point||'',production_lead_days:Number(r.production_lead_days||0),transit_days:Number(r.transit_days||0),hs_code:r.hs_code||''});} 7665 watch(()=>commercial.shipping_mode,(mode)=>{if(mode!=='fcl')commercial.container_type='';if(mode==='none'){commercial.incoterm='';commercial.shipping_amount=0;commercial.insurance_amount=0;commercial.transit_days=0;}}); 7666 async function load(){if(!(await store.requireAdmin(router)))return;store.state.busy=true;const filter='?status='+encodeURIComponent(status.value)+(overdueOnly.value?'&overdue=1':'');const r=await api('/api/admin/procurement'+filter);store.state.busy=false;if(r.status===403){store.state.msg=r.message||'Ø§ÙØµÙاØÙØ© ØºÙØ± Ù ØªØ§ØØ©';router.push('/admin');return;}requests.value=safeArray(r.requests);operators.value=safeArray(r.operators);const requested=String(route.params.id||route.query.request||'');if(requested&&!detail.value){const row=requests.value.find(x=>String(x.id)===requested)||{id:requested};await open(row);}} 7667 async function open(x){const r=await runBusyAction(store,'admin-procurement.open',()=>api('/api/admin/procurement/'+encodeURIComponent(x.id)));const request=safeRecord(r.request);if(r.ok&&request&&request.id){r.request=request;detail.value=r;memberPreview.value=false;const target='/admin/procurement/'+encodeURIComponent(x.id);if(route.path!==target)router.push(target).catch(()=>{});loadCommercialForm(r.request);proformaNumber.value=r.request.proforma_number||'';purchaseMode.value=r.request.purchase_mode||'request_quote';offerTerms.value=r.request.offer_terms||'';deliveryTerms.value=r.request.delivery_terms||'';offerValidUntil.value=r.request.offer_valid_until?String(r.request.offer_valid_until).slice(0,10):new Date(Date.now()+7*86400000).toISOString().slice(0,10);assignedAdminId.value=r.request.assigned_admin_id||'';nextActionDays.value='';note.value='';}else store.state.msg=r.message||r.error||'';} 7668 async function move(target){if(!detail.value)return;const payload={status:target,note:note.value,...commercial,proforma_number:proformaNumber.value,purchase_mode:purchaseMode.value,offer_terms:offerTerms.value,delivery_terms:deliveryTerms.value,offer_valid_until:offerValidUntil.value,next_action_days:nextActionDays.value};const r=await api('/api/admin/procurement/'+detail.value.request.id+'/status',{method:'POST',body:JSON.stringify(payload)});store.state.msg=r.message||r.error||'';if(r.ok){detail.value=null;await load();await open(r.request);}} 7669 async function assign(){if(!detail.value)return;const r=await api('/api/admin/procurement/'+detail.value.request.id+'/assign',{method:'POST',body:JSON.stringify({admin_id:assignedAdminId.value||0})});store.state.msg=r.message||r.error||'';if(r.ok){await load();await open(r.request);}} 7670 function onFile(e){file.value=e.target.files&&e.target.files[0]?e.target.files[0]:null;} 7671 async function upload(){if(!detail.value||!file.value){store.state.msg='اختر اÙÙ Ø³ØªÙØ¯';return;}const fd=new FormData();fd.append('document_type',documentType.value);fd.append('file',file.value);const r=await uploadApi('/api/admin/procurement/'+detail.value.request.id+'/documents',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ Ù Ø³ØªÙØ¯ Ø§ÙØªÙØ±ÙØ¯'});store.state.msg=r.message||r.error||'';if(r.ok){file.value=null;await open(detail.value.request);}} 7672 async function archiveDocument(d){if(!detail.value){return;}const reason=String(note.value||'').trim();if(!reason){store.state.msg='Ø§ÙØªØ¨ سبب Ø£Ø±Ø´ÙØ© اÙÙ Ø³ØªÙØ¯ ÙÙ Ù ÙØ§ØØ¸Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©';return;}if(!confirm('Ø£Ø±Ø´ÙØ© ÙØ°Ø§ اÙÙ Ø³ØªÙØ¯Ø'))return;const r=await api('/api/admin/procurement/'+detail.value.request.id+'/documents/'+d.id+'/archive',{method:'POST',body:JSON.stringify({reason})});store.state.msg=r.message||r.error||'';if(r.ok)await open(detail.value.request);} 7673 async function resendOffer(){if(!detail.value||detail.value.request.status!=='quoted')return;if(!confirm('إعادة إرسا٠إشعار عرض Ø§ÙØ³Ø¹Ø± ÙÙØ¹Ø¶ÙØ'))return;const r=await runBusyAction(store,'admin-procurement.offer-resend',()=>api('/api/admin/procurement/'+detail.value.request.id+'/offer/resend',{method:'POST',body:'{}'}));store.state.msg=r.message||r.error||'';if(r.ok)await open(detail.value.request);} 7674 async function refreshOfferDelivery(){if(detail.value)await open(detail.value.request);} 7675 function whatsappDeliveryLabel(d){const status=String(d&&d.whatsapp_queue_status||'');if(status==='sent')return 'ت٠تسÙÙÙ Ù Ù٠زÙÙØ¯ WhatsApp';if(status==='queued')return 'ÙÙ ÙØ§Ø¦Ù Ø© Ø§ÙØ¥Ø±Ø³Ø§Ù';if(status==='processing')return 'Ø¬Ø§Ø±Ù Ø§ÙØ¥Ø±Ø³Ø§Ù';if(status==='failed')return 'ÙØ´Ù ÙØ³Ùعاد ØØ³Ø¨ Ø§ÙØ³Ùاسة';if(status==='dead')return 'ÙØ´Ù ÙÙØ§Ø¦Ù';if(status==='cancelled')return 'Ù ÙØºÙ';const outcome=String(d&&d.last_whatsapp_outcome||'');if(outcome.startsWith('suppressed:'))return '٠تÙÙÙ Ø¨Ø³ÙØ§Ø³Ø© Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª';if(outcome.startsWith('skipped:'))return 'ÙÙ ÙÙØ±Ø³Ù: '+outcome.slice(8);if(outcome==='backfilled')return 'ÙØ§ ØªÙØ¬Ø¯ ØØ§ÙØ© WhatsApp Ù ÙØ«ÙØ© ÙÙØ°Ø§ Ø§ÙØ¹Ø±Ø¶ اÙÙØ¯ÙÙ ';return 'ÙÙ ØªØªÙ Ù ØØ§ÙÙØ© WhatsApp بعد';} 7676 const next=computed(()=>{const s=detail.value&&detail.value.request&&detail.value.request.status;return({submitted:['under_review','cancelled'],under_review:['quoted','cancelled'],quoted:['under_review','cancelled'],payment_pending:['processing','cancelled'],processing:['completed']}[s])||[];}); 7677 const primaryNext=computed(()=>{const s=String(detail.value&&detail.value.request&&detail.value.request.status||'');return({submitted:['under_review'],payment_pending:['processing'],processing:['completed']}[s])||[];}); 7678 const secondaryNext=computed(()=>next.value.filter(x=>!primaryNext.value.includes(x))); 7679 const timelineSteps=[['submitted','Ø·ÙØ¨ Ø§ÙØ¹Ù ÙÙ'],['under_review','Ø§ÙØ¨ØØ« ÙØ§ÙتØÙ٠٠٠اÙÙ ÙØ±Ø¯'],['quoted','عرض اÙÙ ÙØ±Ø¯'],['payment_pending','Ù ÙØ§ÙÙØ© Ø§ÙØ¹Ù ÙÙ ÙØ§ÙØ¯ÙØ¹'],['processing','Ø§ÙØ´Ø±Ø§Ø¡ ÙØ§ÙÙØØµ ÙØ§ÙØ´ØÙ'],['completed','Ù ÙØªÙ Ù']]; 7680 function timelineIndex(v){const i=timelineSteps.findIndex(x=>x[0]===String(v||''));return i<0?0:i;} 7681 const currentTimelineLabel=computed(()=>{const i=timelineIndex(detail.value&&detail.value.request&&detail.value.request.status);return 'اÙ٠رØÙØ© '+(i+1)+' Ù Ù '+timelineSteps.length+' â '+timelineSteps[i][1];}); 7682 function transitionLabel(target){const current=String(detail.value&&detail.value.request&&detail.value.request.status||'');if(target==='under_review')return current==='submitted'?'بدء اÙ٠راجعة ÙØ§ÙØ¨ØØ« ع٠اÙÙ ÙØ±Ø¯':'إعادة Ø§ÙØ¹Ø±Ø¶ ÙÙ٠راجعة';if(target==='quoted')return 'ÙØ´Ø± ÙØ¥Ø±Ø³Ø§Ù عرض Ø§ÙØ³Ø¹Ø±';if(target==='payment_pending')return 'Ø¨Ø§ÙØªØ¸Ø§Ø± Ø¯ÙØ¹ Ø§ÙØ¹Ù ÙÙ';if(target==='processing')return 'تأÙÙØ¯ Ø§ÙØ¯Ùع ÙØ¨Ø¯Ø¡ Ø§ÙØªÙÙÙØ°';if(target==='completed')return 'Ø¥ÙÙ Ø§Ù Ø§ÙØ·Ùب';if(target==='cancelled')return 'Ø¥ÙØºØ§Ø¡ Ø§ÙØ·Ùب';return procurementStatusLabel(target);} 7683 function closeDetail(){detail.value=null;router.push('/admin/procurement').catch(()=>{});} 7684 async function clearOverdueFilter(){const query={...(route.query||{})};delete query.overdue;await router.replace({path:'/admin/procurement',query}).catch(()=>{});await load();} 7685 onMounted(load);
7685watch(status,load); 7686 return{store,status,overdueOnly,requests,detail,memberPreview,workspaceMode,nextAction,offerDelivery,memberUpdates,unreadMemberUpdates,note,commercial,computedGoodsAmount,computedServiceFee,computedGrandTotal,commercialReadiness,proformaNumber,purchaseMode,offerTerms,deliveryTerms,offerValidUntil,file,fileLabel,documentType,operators,assignedAdminId,nextActionDays,PROCUREMENT_DOCUMENT_LABELS,PROCUREMENT_PRICING_LABELS,PROCUREMENT_QUOTE_UNIT_LABELS,PROCUREMENT_INCOTERM_LABELS,PROCUREMENT_SHIPPING_LABELS,PROCUREMENT_CONTAINER_LABELS,next,primaryNext,secondaryNext,timelineSteps,timelineIndex,currentTimelineLabel,transitionLabel,closeDetail,clearOverdueFilter,load,open,move,assign,onFile,upload,archiveDocument,resendOffer,refreshOfferDelivery,whatsappDeliveryLabel,procurementQuoteDocuments,procurementServiceLabel,procurementStatusLabel,procurementDocumentLabel,purchaseModeLabel,procurementCurrencyLabel,procurementMoney,procurementPricingLabel,procurementQuoteUnitLabel,procurementIncotermLabel,procurementShippingLabel,procurementContainerLabel,shortDate,adminRecordUpdatedAt,adminQueueOwner,procurementQueueNextAction}; 7687 }, 7688 render:(function(){ 7689const _Vue = Vue 7690const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 7691 7692const _hoisted_1 = { 7693 key: 0, 7694 class: "card dashboardHeaderCard" 7695} 7696const _hoisted_2 = { class: "row" } 7697const _hoisted_3 = ["onClick"] 7698const _hoisted_4 = ["onClick"] 7699const _hoisted_5 = { 7700 key: 1, 7701 class: "card adminQueuePurpose" 7702} 7703const _hoisted_6 = ["onClick"] 7704const _hoisted_7 = { 7705 key: 2, 7706 class: "segmented operationsFilters" 7707} 7708const _hoisted_8 = ["onClick"] 7709const _hoisted_9 = { 7710 key: 3, 7711 class: "card" 7712} 7713const _hoisted_10 = { 7714 key: 0, 7715 class: "adminQueueState adminQueueLoading" 7716} 7717const _hoisted_11 = { class: "adminGuideList" } 7718const _hoisted_12 = ["onClick"] 7719const _hoisted_13 = { 7720 key: 0, 7721 class: "newBadge danger" 7722} 7723const _hoisted_14 = { class: "codeToken requestCode" } 7724const _hoisted_15 = { class: "requestTitle" } 7725const _hoisted_16 = { class: "adminInlineWorkflowFacts procurementInlineWorkflowFacts" } 7726const _hoisted_17 = { class: "adminQueueNextAction" } 7727const _hoisted_18 = { 7728 key: 0, 7729 class: "hint" 7730} 7731const _hoisted_19 = { 7732 key: 4, 7733 class: "card adminRecordWorkspace procurementWorkspace recordWorkspaceOnly adminProcurementWorkspaceV4" 7734} 7735const _hoisted_20 = { class: "adminWorkspaceBackBar" } 7736const _hoisted_21 = ["onClick"] 7737const _hoisted_22 = { class: "memberCardTop" } 7738const _hoisted_23 = { class: "codeToken requestCode" } 7739const _hoisted_24 = { class: "workspaceTitle" } 7740const _hoisted_25 = { class: "codeToken inlineCode" } 7741const _hoisted_26 = { class: "statusPill" } 7742const _hoisted_27 = { class: "workflowActionMeta" } 7743const _hoisted_28 = { key: 0 } 7744const _hoisted_29 = { class: "adminAssignmentCard" } 7745const _hoisted_30 = { class: "fieldLabel" } 7746const _hoisted_31 = ["onUpdate:modelValue"] 7747const _hoisted_32 = ["value"] 7748const _hoisted_33 = ["onClick"] 7749const _hoisted_34 = { 7750 key: 0, 7751 class: "adminPrimaryActionCard" 7752} 7753const _hoisted_35 = { class: "adminPrimaryActionFields" } 7754const _hoisted_36 = { class: "fieldLabel" } 7755const _hoisted_37 = ["onUpdate:modelValue"] 7756const _hoisted_38 = { class: "fieldLabel" } 7757const _hoisted_39 = ["onUpdate:modelValue"] 7758const _hoisted_40 = ["disabled", "onClick"] 7759const _hoisted_41 = { class: "adminProcessMap" } 7760const _hoisted_42 = { 7761 key: 1, 7762 class: "warningBox" 7763} 7764const _hoisted_43 = { class: "recordNarrative" } 7765const _hoisted_44 = { class: "infoGrid" } 7766const _hoisted_45 = { 7767 key: 2, 7768 class: "offerPublishForm commercialOfferComposer commercialComposerWorkspace" 7769} 7770const _hoisted_46 = { class: "offerPublishHead" } 7771const _hoisted_47 = { class: "commercialComposerSummary" } 7772const _hoisted_48 = { class: "commercialComposerTotal" } 7773const _hoisted_49 = { class: "commercialComposerFacts" } 7774const _hoisted_50 = { class: "formTwo commercialOfferBasics" } 7775const _hoisted_51 = { class: "fieldLabel" } 7776const _hoisted_52 = ["onUpdate:modelValue"] 7777const _hoisted_53 = { class: "fieldLabel" } 7778const _hoisted_54 = ["onUpdate:modelValue"] 7779const _hoisted_55 = { 7780 class: "commercialComposerStep", 7781 open: "" 7782} 7783const _hoisted_56 = { class: "commercialComposerStepBody" } 7784const _hoisted_57 = { class: "formTwo" } 7785const _hoisted_58 = { class: "fieldLabel" } 7786const _hoisted_59 = ["onUpdate:modelValue"] 7787const _hoisted_60 = { class: "fieldLabel" } 7788const _hoisted_61 = ["onUpdate:modelValue"] 7789const _hoisted_62 = ["value"] 7790const _hoisted_63 = { 7791 key: 0, 7792 class: "formTwo" 7793} 7794const _hoisted_64 = { class: "fieldLabel" } 7795const _hoisted_65 = ["onUpdate:modelValue"] 7796const _hoisted_66 = { class: "fieldLabel" } 7797const _hoisted_67 = ["onUpdate:modelValue"] 7798const _hoisted_68 = { 7799 key: 1, 7800 class: "fieldLabel" 7801} 7802const _hoisted_69 = ["onUpdate:modelValue"] 7803const _hoisted_70 = { class: "offerAmountGrid commercialFeesGrid" } 7804const _hoisted_71 = ["onUpdate:modelValue"] 7805const _hoisted_72 = ["onUpdate:modelValue"] 7806const _hoisted_73 = ["onUpdate:modelValue"] 7807const _hoisted_74 = ["onUpdate:modelValue"] 7808const _hoisted_75 = { class: "commercialCalculatedTotals" } 7809const _hoisted_76 = { class: "grand" } 7810const _hoisted_77 = { class: "commercialComposerStep" } 7811const _hoisted_78 = { class: "commercialComposerStepBody" } 7812const _hoisted_79 = { class: "formTwo" } 7813const _hoisted_80 = { class: "fieldLabel" } 7814const _hoisted_81 = ["onUpdate:modelValue"] 7815const _hoisted_82 = { class: "fieldLabel" } 7816const _hoisted_83 = ["onUpdate:modelValue"] 7817const _hoisted_84 = { 7818 key: 0, 7819 class: "fieldLabel" 7820} 7821const _hoisted_85 = ["onUpdate:modelValue"] 7822const _hoisted_86 = { 7823 key: 1, 7824 class: "commercialQuoteGrid commercialInputGrid" 7825} 7826const _hoisted_87 = { class: "fieldLabel" } 7827const _hoisted_88 = ["onUpdate:modelValue"] 7828const _hoisted_89 = { class: "fieldLabel" } 7829const _hoisted_90 = ["onUpdate:modelValue"] 7830const _hoisted_91 = { class: "fieldLabel" } 7831const _hoisted_92 = ["onUpdate:modelValue"] 7832const _hoisted_93 = { class: "fieldLabel" } 7833const _hoisted_94 = ["onUpdate:modelValue"] 7834const _hoisted_95 = { 7835 key: 0, 7836 class: "commercialComposerStep" 7837} 7838const _hoisted_96 = { class: "commercialComposerStepBody" } 7839const _hoisted_97 = { class: "formTwo" } 7840const _hoisted_98 = { class: "fieldLabel" } 7841const _hoisted_99 = ["onUpdate:modelValue"] 7842const _hoisted_100 = { class: "fieldLabel" } 7843const _hoisted_101 = ["onUpdate:modelValue"] 7844const _hoisted_102 = { class: "fieldLabel" } 7845const _hoisted_103 = ["onUpdate:modelValue"] 7846const _hoisted_104 = { class: "formTwo" } 7847const _hoisted_105 = { class: "fieldLabel" } 7848const _hoisted_106 = ["onUpdate:modelValue"] 7849const _hoisted_107 = { class: "fieldLabel" } 7850const _hoisted_108 = ["onUpdate:modelValue"] 7851const _hoisted_109 = { class: "fieldLabel" } 7852const _hoisted_110 = ["onUpdate:modelValue"] 7853const _hoisted_111 = { class: "formTwo" } 7854const _hoisted_112 = { class: "fieldLabel" } 7855const _hoisted_113 = ["onUpdate:modelValue"] 7856const _hoisted_114 = { class: "fieldLabel" } 7857const _hoisted_115 = ["onUpdate:modelValue"] 7858const _hoisted_116 = { class: "commercialComposerStep" } 7859const _hoisted_117 = { class: "commercialComposerStepBody" } 7860const _hoisted_118 = { class: "formTwo" } 7861const _hoisted_119 = { class: "fieldLabel" } 7862const _hoisted_120 = ["onUpdate:modelValue"] 7863const _hoisted_121 = { class: "fieldLabel" } 7864const _hoisted_122 = ["onUpdate:modelValue"] 7865const _hoisted_123 = { class: "fieldLabel" } 7866const _hoisted_124 = ["onUpdate:modelValue"]
7867const _hoisted_125 = { class: "fieldLabel" } 7868const _hoisted_126 = ["onUpdate:modelValue"] 7869const _hoisted_127 = { class: "fieldLabel" } 7870const _hoisted_128 = ["onUpdate:modelValue"] 7871const _hoisted_129 = { class: "fieldLabel" } 7872const _hoisted_130 = ["onUpdate:modelValue"] 7873const _hoisted_131 = { class: "commercialReadinessChecks" } 7874const _hoisted_132 = { 7875 key: 3, 7876 class: "offerWaitingCard commercialPublishedWorkspace" 7877} 7878const _hoisted_133 = { class: "commercialPublishedHead" } 7879const _hoisted_134 = { class: "vueBadge" } 7880const _hoisted_135 = { class: "commercialPublishedTotal" } 7881const _hoisted_136 = { class: "commercialDecisionHighlights adminCommercialHighlights" } 7882const _hoisted_137 = { class: "offerDeliveryAssurance" } 7883const _hoisted_138 = { class: "offerDeliveryHead" } 7884const _hoisted_139 = ["onClick"] 7885const _hoisted_140 = { class: "deliverySteps" } 7886const _hoisted_141 = { class: "deliveryStep done" } 7887const _hoisted_142 = { key: 0 } 7888const _hoisted_143 = { key: 0 } 7889const _hoisted_144 = { key: 0 } 7890const _hoisted_145 = { key: 1 } 7891const _hoisted_146 = { class: "row offerDeliveryActions" } 7892const _hoisted_147 = ["disabled", "onClick"] 7893const _hoisted_148 = ["onClick"] 7894const _hoisted_149 = { 7895 key: 0, 7896 class: "hint" 7897} 7898const _hoisted_150 = { 7899 key: 0, 7900 class: "memberOfferPreview commercialMemberPreview" 7901} 7902const _hoisted_151 = { class: "offerTotal" } 7903const _hoisted_152 = { class: "commercialQuoteGrid" } 7904const _hoisted_153 = { key: 0 } 7905const _hoisted_154 = { key: 1 } 7906const _hoisted_155 = { key: 2 } 7907const _hoisted_156 = { key: 3 } 7908const _hoisted_157 = { class: "decisionDocumentList" } 7909const _hoisted_158 = ["href"] 7910const _hoisted_159 = { 7911 key: 4, 7912 class: "orderCreatedBanner" 7913} 7914const _hoisted_160 = ["onClick"] 7915const _hoisted_161 = { 7916 key: 5, 7917 class: "adminNextDecisionCard" 7918} 7919const _hoisted_162 = { class: "fieldLabel" } 7920const _hoisted_163 = ["onUpdate:modelValue"] 7921const _hoisted_164 = { class: "fieldLabel" } 7922const _hoisted_165 = ["onUpdate:modelValue"] 7923const _hoisted_166 = { class: "adminDecisionActions" } 7924const _hoisted_167 = ["onClick"] 7925const _hoisted_168 = { class: "uploadBox procurementUploadBox" } 7926const _hoisted_169 = { class: "fieldLabel" } 7927const _hoisted_170 = ["onUpdate:modelValue"] 7928const _hoisted_171 = ["value"] 7929const _hoisted_172 = { class: "filePicker wide" } 7930const _hoisted_173 = ["onChange"] 7931const _hoisted_174 = ["disabled", "onClick"] 7932const _hoisted_175 = { class: "row" } 7933const _hoisted_176 = ["href"] 7934const _hoisted_177 = ["onClick"] 7935const _hoisted_178 = { 7936 key: 6, 7937 class: "adminMemberUpdatesCard" 7938} 7939const _hoisted_179 = { class: "memberSectionHead" } 7940const _hoisted_180 = { class: "hint compactHint" } 7941const _hoisted_181 = { 7942 key: 0, 7943 class: "compactHistory" 7944} 7945 7946return function render(_ctx, _cache) { 7947 with (_ctx) { 7948 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass, createTextVNode: _createTextVNode, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 7949 7950 const _component_AdminFrame = _resolveComponent("AdminFrame") 7951 7952 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø·ÙØ¨Ø§Øª Ø§ÙØªÙØ±ÙØ¯" }, { 7953 default: _withCtx(() => [ 7954 (!workspaceMode) 7955 ? (_openBlock(), _createElementBlock("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ع٠ÙÙØ§Øª Ø§ÙØªÙØ±ÙØ¯ ØØ³Ø¨ Ø·ÙØ¨ Ø§ÙØ¹Ù ÙÙ"), _createElementVNode("h3", null, "Ø·ÙØ¨Ø§Øª Ø§ÙØ¨ØØ« ÙØ¹Ø±Ùض اÙÙ ÙØ±Ø¯ÙÙ"), _createElementVNode("p", { class: "hint" }, "SMT ØªØ¨ØØ« ÙØªÙسÙÙ ØØ³Ø¨ Ø·ÙØ¨ Ø§ÙØ¹Ù ÙÙ. Ø§ÙØ´Ø± عرض اÙÙ ÙØ±Ø¯ Ù ÙØªÙ ÙØ§ÙØ Ø«Ù ÙÙØªØ¸Ø± اÙÙØ¸Ø§Ù ÙØ¨ÙÙ Ø§ÙØ¹Ø¶ÙØ ÙØ§ ÙÙØ¬Ø¯ ٠خزÙÙ Ù ÙØªØ¬Ø§Øª Ø£Ù ÙØ¨Ù٠باÙÙÙØ§Ø¨Ø© عÙÙ.")], -1)), _createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 7956 class: "smallbtn secondary", 7957 onClick: $event => ($router.push('/admin/orders')) 7958 }, "Ø§ÙØ·Ùبات اÙÙ Ø¤ÙØ¯Ø©", 8, _hoisted_3), _createElementVNode("button", { 7959 class: "smallbtn", 7960 onClick: load 7961 }, "ØªØØ¯ÙØ«", 8, _hoisted_4)])])) 7962 : _createCommentVNode("", true), 7963 (!workspaceMode&&overdueOnly) 7964 ? (_openBlock(), _createElementBlock("section", _hoisted_5, [_createElementVNode("div", null, [_cache[1] || (_cache[1] = _createElementVNode("b", null, "ÙÙØªØ±: ØªØ¬Ø§ÙØ² Ù ÙØ¹Ø¯ Ø§ÙØ¥Ø¬Ø±Ø§Ø¡", -1)), _createElementVNode("span", null, _toDisplayString(requests.length) + " Ø·ÙØ¨ ØªÙØ±Ùد ٠تأخر ٠طاب٠ÙÙÙØ³ عداد ÙÙØØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø©.", 1)]), _createElementVNode("button", { 7965 class: "smallbtn secondary", 7966 onClick: clearOverdueFilter 7967 }, "عرض ÙÙ Ø§ÙØ·Ùبات", 8, _hoisted_6)])) 7968 : _createCommentVNode("", true), 7969 (!workspaceMode) 7970 ? (_openBlock(), _createElementBlock("div", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(['all','submitted','under_review','quoted','payment_pending','processing','completed','cancelled'], (s) => { 7971 return (_openBlock(), _createElementBlock("button", { 7972 key: s, 7973 class: _normalizeClass({active:status===s}), 7974 onClick: $event => (status=s) 7975 }, _toDisplayString(s==='all'?'اÙÙÙ':procurementStatusLabel(s)), 11, _hoisted_8)) 7976 }), 128))])) 7977 : _createCommentVNode("", true), 7978 (!workspaceMode) 7979 ? (_openBlock(), _createElementBlock("section", _hoisted_9, [(store.state.busy&&!requests.length) 7980 ? (_openBlock(), _createElementBlock("div", _hoisted_10, "جار٠تØÙ ÙÙ Ø·ÙØ¨Ø§Øª Ø§ÙØªÙØ±ÙØ¯...")) 7981 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_11, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(requests, (x) => { 7982 return (_openBlock(), _createElementBlock("button", { 7983 class: _normalizeClass(["guideAdminItem procurementRequestItem", {overdue:x.is_overdue}]), 7984 key: x.id, 7985 onClick: $event => (open(x)) 7986 }, [ 7987 (x.is_overdue) 7988 ? (_openBlock(), _createElementBlock("span", _hoisted_13, "٠تأخر")) 7989 : _createCommentVNode("", true), 7990 _createElementVNode("span", _hoisted_14, _toDisplayString(x.request_code), 1), 7991 _createElementVNode("b", _hoisted_15, _toDisplayString(x.title), 1), 7992 _createElementVNode("small", null, _toDisplayString(x.member_name) + " · " + _toDisplayString(procurementServiceLabel(x.service_type)) + " · " + _toDisplayString(x.document_count||0) + " Ù Ø³ØªÙØ¯", 1), 7993 _createElementVNode("div", _hoisted_16, [ 7994 _createElementVNode("span", null, [_cache[2] || (_cache[2] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(procurementStatusLabel(x.status)), 1)]), 7995 _createElementVNode("span", null, [_cache[3] || (_cache[3] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(adminQueueOwner('procurement',x)), 1)]), 7996 _createElementVNode("span", null, [_cache[4] || (_cache[4] = _createElementVNode("small", null, "آخر ØªØØ¯ÙØ«", -1)), _createElementVNode("b", null, _toDisplayString(adminRecordUpdatedAt(x)), 1)]), 7997 _createElementVNode("span", _hoisted_17, [_cache[5] || (_cache[5] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementQueueNextAction(x)), 1)]) 7998 ]), 7999 (x.next_action_due_at) 8000 ? (_openBlock(), _createElementBlock("small", { 8001 key: 1, 8002 class: _normalizeClass({errorText:x.is_overdue}) 8003 }, "Ù ÙØ¹Ø¯ Ø§ÙØ¥Ø¬Ø±Ø§Ø¡: " + _toDisplayString(shortDate(x.next_action_due_at)), 3)) 8004 : _createCommentVNode("", true) 8005 ], 10, _hoisted_12)) 8006 }), 128)), (!requests.length) 8007 ? (_openBlock(), _createElementBlock("p", _hoisted_18, "ÙØ§ ØªÙØ¬Ø¯ Ø·ÙØ¨Ø§Øª ÙÙ ÙØ°Ø§ Ø§ÙØªØµÙÙÙ.")) 8008 : _createCommentVNode("", true)])])) 8009 : _createCommentVNode("", true), 8010 detail 8011 ? (_openBlock(), _createElementBlock("section", _hoisted_19, [ 8012 _createElementVNode("div", _hoisted_20, [_createElementVNode("button", { 8013 class: "smallbtn secondary", 8014 onClick: closeDetail 8015 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙØ·Ùبات Ø§ÙØªÙØ±ÙØ¯", 8, _hoisted_21), _cache[6] || (_cache[6] = _createElementVNode("span", null, "Ù Ø³Ø§ØØ© Ø·ÙØ¨ ØªÙØ±Ùد ٠ستÙÙØ© â Ù٠إجراءات Ø§ÙØ·Ùب ÙÙØ§", -1))]), 8016 _createElementVNode("div", _hoisted_22, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_23, _toDisplayString(detail.request.request_code), 1), _createElementVNode("h3", _hoisted_24, _toDisplayString(detail.request.title), 1), _createElementVNode("p", null, [_createTextVNode(_toDisplayString(detail.request.member_name) + " â ", 1), _createElementVNode("span", _hoisted_25, _toDisplayString(detail.request.member_whatsapp), 1)])]), _createElementVNode("span", _hoisted_26, _toDisplayString(procurementStatusLabel(detail.request.status)), 1)]), 8017 _createElementVNode("section", { class: _normalizeClass('workflowActionCard '+nextAction.tone) }, [
8018 _cache[7] || (_cache[7] = _createElementVNode("span", { class: "workflowActionKicker" }, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ اÙÙ Ø·ÙÙØ¨ Ø§ÙØ¢Ù", -1)), 8019 _createElementVNode("h3", null, _toDisplayString(nextAction.title), 1), 8020 _createElementVNode("div", _hoisted_27, [_createElementVNode("b", null, "Ø§ÙØ¯Ùر Ø§ÙØ¢Ù: " + _toDisplayString(nextAction.owner), 1), (detail.request.next_action_due_at) 8021 ? (_openBlock(), _createElementBlock("small", _hoisted_28, "اÙ٠تابعة ÙØ¨Ù " + _toDisplayString(shortDate(detail.request.next_action_due_at)), 1)) 8022 : _createCommentVNode("", true)]), 8023 _createElementVNode("p", null, _toDisplayString(nextAction.note), 1) 8024 ], 2), 8025 _cache[116] || (_cache[116] = _createTextVNode()), 8026 _createElementVNode("section", _hoisted_29, [_createElementVNode("label", _hoisted_30, [_cache[9] || (_cache[9] = _createElementVNode("span", null, "٠سؤÙÙ Ø§ÙØ·Ùب", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((assignedAdminId) = $event) }, [_cache[8] || (_cache[8] = _createElementVNode("option", { value: "" }, "ØºÙØ± ٠عÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(operators, (a) => { 8027 return (_openBlock(), _createElementBlock("option", { 8028 key: a.id, 8029 value: a.id 8030 }, _toDisplayString(a.name) + " â " + _toDisplayString(a.role), 9, _hoisted_32)) 8031 }), 128))], 8, _hoisted_31), [[_vModelSelect, assignedAdminId]])]), _createElementVNode("button", { 8032 class: "smallbtn secondary", 8033 onClick: assign 8034 }, "ØÙظ اÙ٠سؤÙÙ", 8, _hoisted_33)]), 8035 (primaryNext.length) 8036 ? (_openBlock(), _createElementBlock("section", _hoisted_34, [_createElementVNode("div", null, [_cache[10] || (_cache[10] = _createElementVNode("span", { class: "adminEyebrow" }, "ÙÙÙØ° Ø§ÙØ¢Ù", -1)), _createElementVNode("b", null, _toDisplayString(transitionLabel(primaryNext[0])), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "ÙØ°Ø§ Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ ÙÙÙÙ Ø§ÙØ·Ùب Ø¥Ù٠اÙ٠رØÙØ© Ø§ÙØªØ§ÙÙØ© ÙÙØ· بعد ٠راجعة Ø§ÙØØ§ÙØ© Ø§ÙØØ§ÙÙØ©.", -1))]), _createElementVNode("div", _hoisted_35, [_createElementVNode("label", _hoisted_36, [_cache[12] || (_cache[12] = _createElementVNode("span", null, "Ù ÙØ§ØØ¸Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©", -1)), _withDirectives(_createElementVNode("textarea", { 8037 "onUpdate:modelValue": $event => ((note) = $event), 8038 placeholder: "Ù ÙØ§ØØ¸Ø© ٠ختصرة Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©" 8039 }, null, 8, _hoisted_37), [[_vModelText, note]])]), _createElementVNode("label", _hoisted_38, [_cache[14] || (_cache[14] = _createElementVNode("span", null, "Ù ÙØ¹Ø¯ اÙ٠تابعة", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((nextActionDays) = $event) }, _cache[13] || (_cache[13] = [ 8040 _createElementVNode("option", { value: "" }, "ØØ³Ø¨ اÙ٠دة Ø§ÙØ§ÙØªØ±Ø§Ø¶ÙØ©", -1), 8041 _createElementVNode("option", { value: "1" }, "Ø®ÙØ§Ù ÙÙÙ ", -1), 8042 _createElementVNode("option", { value: "2" }, "Ø®ÙØ§Ù ÙÙÙ ÙÙ", -1), 8043 _createElementVNode("option", { value: "3" }, "Ø®ÙØ§Ù 3 Ø£ÙØ§Ù ", -1), 8044 _createElementVNode("option", { value: "7" }, "Ø®ÙØ§Ù 7 Ø£ÙØ§Ù ", -1) 8045 ]), 8, _hoisted_39), [[_vModelSelect, nextActionDays]])])]), _createElementVNode("button", { 8046 class: "btn", 8047 disabled: store.state.busy, 8048 onClick: $event => (move(primaryNext[0])) 8049 }, _toDisplayString(transitionLabel(primaryNext[0])), 9, _hoisted_40)])) 8050 : _createCommentVNode("", true), 8051 _createElementVNode("details", _hoisted_41, [_createElementVNode("summary", null, [_createElementVNode("div", null, [_cache[15] || (_cache[15] = _createElementVNode("span", { class: "adminEyebrow" }, "٠سار Ø§ÙØ·Ùب", -1)), _createElementVNode("b", null, _toDisplayString(currentTimelineLabel), 1)]), _cache[16] || (_cache[16] = _createElementVNode("strong", null, "عرض Ù٠اÙ٠راØÙ", -1))]), _createElementVNode("div", { class: _normalizeClass(["adminProcessStepperV3", {cancelled:detail.request.status==='cancelled'}]) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(timelineSteps, (step, i) => { 8052 return (_openBlock(), _createElementBlock("span", { 8053 key: step[0], 8054 class: _normalizeClass({done:i<=timelineIndex(detail.request.status),current:i===timelineIndex(detail.request.status)}) 8055 }, [_createElementVNode("i", null, _toDisplayString(i+1), 1), _createElementVNode("b", null, _toDisplayString(step[1]), 1)], 2)) 8056 }), 128))], 2)]), 8057 (detail.request.status==='cancelled') 8058 ? (_openBlock(), _createElementBlock("div", _hoisted_42, "ØªÙ Ø¥ÙØºØ§Ø¡ Ø§ÙØ·Ùب. راجع Ø³Ø¬Ù Ø§ÙØØ§ÙØ© ÙÙ Ø¹Ø±ÙØ© Ø§ÙØ³Ø¨Ø¨ ÙØ¢Ø®Ø± إجراء.")) 8059 : _createCommentVNode("", true), 8060 _createElementVNode("p", _hoisted_43, _toDisplayString(detail.request.description), 1), 8061 _createElementVNode("div", _hoisted_44, [ 8062 _createElementVNode("p", null, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "Ø§ÙØ®Ø¯Ù Ø©:", -1)), _createTextVNode(" " + _toDisplayString(procurementServiceLabel(detail.request.service_type)), 1
8062)]), 8063 _createElementVNode("p", null, [_cache[18] || (_cache[18] = _createElementVNode("b", null, "اÙÙ ÙØ±Ø¯:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.supplier_name||'-'), 1)]), 8064 _createElementVNode("p", null, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "ØªÙØ§ØµÙ اÙÙ ÙØ±Ø¯:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.supplier_contact||'-'), 1)]), 8065 _createElementVNode("p", null, [_cache[20] || (_cache[20] = _createElementVNode("b", null, "اÙÙ Ø¨ÙØº:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.quoted_amount?detail.request.quoted_amount+' '+detail.request.quoted_currency:'-'), 1)]) 8066 ]), 8067 (detail.request.status==='under_review') 8068 ? (_openBlock(), _createElementBlock("section", _hoisted_45, [ 8069 _createElementVNode("div", _hoisted_46, [_cache[21] || (_cache[21] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ø§ÙØ®Ø·ÙØ© Ø§ÙØ£Ø®Ùرة ÙØ¨Ù عرض Ø§ÙØ³Ø¹Ø± ÙÙØ¹Ø¶Ù"), _createElementVNode("h3", null, "تجÙÙØ² Ø§ÙØ¹Ø±Ø¶ Ø§ÙØªØ¬Ø§Ø±Ù ÙØ§ÙÙÙØ¬Ø³ØªÙ")], -1)), _createElementVNode("span", null, "Commercial v2 · ÙØ³Ø®Ø© " + _toDisplayString(Number(detail.request.offer_version||0)+1), 1)]), 8070 _createElementVNode("div", _hoisted_47, [_createElementVNode("div", _hoisted_48, [_cache[22] || (_cache[22] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙ٠اÙ٠تÙÙØ¹", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(computedGrandTotal,commercial.quoted_currency)), 1), _createElementVNode("span", null, _toDisplayString(procurementCurrencyLabel(commercial.quoted_currency)), 1)]), _createElementVNode("div", _hoisted_49, [_createElementVNode("span", null, [_cache[23] || (_cache[23] = _createElementVNode("small", null, "Ø§ÙØªØ³ÙÙÙ ", -1)), _createElementVNode("b", null, _toDisplayString(commercial.incoterm?procurementIncotermLabel(commercial.incoterm):'بدÙÙ Incoterm'), 1)]), _createElementVNode("span", null, [_cache[24] || (_cache[24] = _createElementVNode("small", null, "Ø§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementShippingLabel(commercial.shipping_mode)), 1)]), _createElementVNode("span", null, [_cache[25] || (_cache[25] = _createElementVNode("small", null, "Ø§ÙØ¬Ø§ÙØ²ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(commercialReadiness.done) + " / " + _toDisplayString(commercialReadiness.total), 1)])])]), 8071 _cache[74] || (_cache[74] = _createElementVNode("p", { class: "hint commercialAuthorityHint" }, [_createTextVNode("ÙØ°Ù ٠عاÙÙØ© تشغÙÙÙØ© ÙÙØ·Ø "), _createElementVNode("b", null, "Ø§ÙØ³ÙØ±ÙØ± ÙØ¹Ùد ØØ³Ø§Ø¨ رسÙÙ Ø§ÙØ®Ø¯Ù Ø© ÙØ§Ùإج٠اÙÙ ÙÙØªØÙ٠٠٠اÙÙÙØ§Ø¹Ø¯ Ø¹ÙØ¯ اÙÙØ´Ø±.")], -1)), 8072 _createElementVNode("div", _hoisted_50, [_createElementVNode("label", _hoisted_51, [_cache[27] || (_cache[27] = _createElementVNode("span", null, "ÙÙØ¹ Ø§ÙØ¹Ø±Ø¶", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((purchaseMode) = $event) }, _cache[26] || (_cache[26] = [_createElementVNode("option", { value: "request_quote" }, "Ø·ÙØ¨ Ø¨ØØ« ÙØªØ¬ÙÙØ² عرض", -1), _createElementVNode("option", { value: "buy_now" }, "عرض Ù ÙØ±Ø¯ Ø¬Ø§ÙØ² ÙÙØ§Ø¹ØªÙ اد", -1)]), 8, _hoisted_52), [[_vModelSelect, purchaseMode]])]), _createElementVNode("label", _hoisted_53, [_cache[29] || (_cache[29] = _createElementVNode("span", null, "Ø¹Ù ÙØ© Ø§ÙØ¹Ø±Ø¶", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((commercial.quoted_currency) = $event) }, _cache[28] || (_cache[28] = [_createElementVNode("option", { value: "CNY" }, "ÙÙØ§Ù صÙÙ٠¥ (CNY)", -1), _createElementVNode("option", { value: "USD" }, "دÙÙØ§Ø± أ٠رÙÙÙ $ (USD)", -1), _createElementVNode("option", { value: "SDG" }, "جÙÙÙ Ø³ÙØ¯Ø§ÙÙ (SDG)", -1)]), 8, _hoisted_54), [[_vModelSelect, commercial.quoted_currency]])])]), 8073 _createElementVNode("details", _hoisted_55, [_createElementVNode("summary", null, [_cache[30] || (_cache[30] = _createElementVNode("span", null, [_createElementVNode("i", null, "1"), _createElementVNode("b", null, "Ø§ÙØªØ³Ø¹Ùر")], -1)), _createElementVNode("strong", null, _toDisplayString(procurementMoney(computedGrandTotal,commercial.quoted_currency)), 1)]), _createElementVNode("div", _hoisted_56, [ 8074 _createElementVNode("div", _hoisted_57, [_createElementVNode("label", _hoisted_58, [_cache[32] || (_cache[32] = _createElementVNode("span", null, "طرÙÙØ© Ø§ÙØªØ³Ø¹Ùر", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((commercial.pricing_mode) = $event) }, _cache[31] || (_cache[31] = [_createElementVNode("option", { value: "total" }, "سعر إج٠اÙÙ", -1), _createElementVNode("option", { value: "unit" }, "سعر ÙØØ¯Ø© à ÙÙ ÙØ©", -1)]), 8, _hoisted_59), [[_vModelSelect, commercial.pricing_mode]])]), _createElementVNode("label", _hoisted_60, [_cache[33] || (_cache[33] = _createElementVNode("span", null, "ÙØØ¯Ø© Ø§ÙØªØ³Ø¹Ùر", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((commercial.quote_unit) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(PROCUREMENT_QUOTE_UNIT_LABELS, (label, key) => { 8075 return (_openBlock(), _createElementBlock("option", { 8076 key: key, 8077 value: key 8078 }, _toDisplayString(label), 9, _hoisted_62)) 8079 }), 128))], 8, _hoisted_61), [[_vModelSelect, commercial.quote_unit]])])]), 8080 (commercial.pricing_mode==='unit') 8081 ? (_openBlock(), _createElementBlock("div", _hoisted_63, [_createElementVNode("label", _hoisted_64, [_cache[34] || (_cache[34] = _createElementVNode("span", null, "اÙÙÙ ÙØ©", -1)), _withDirectives(_createElementVNode("input", { 8082 type: "number", 8083 min: "0.001", 8084 step: "0.001", 8085 "onUpdate:modelValue": $event => ((commercial.quote_quantity) = $event) 8086 }, null, 8, _hoisted_65), [[ 8087 _vModelText, 8088 commercial.quote_quantity, 8089 void 0, 8090 { number: true } 8091 ]])]), _createElementVNode("label", _hoisted_66, [_cache[35] || (_cache[35] = _createElementVNode("span", null, "سعر اÙÙØØ¯Ø©", -1)), _withDirectives(_createElementVNode("input", { 8092 type: "number", 8093 min: "0.0001", 8094 step: "0.0001", 8095 "onUpdate:modelValue": $event => ((commercial.unit_price) = $event) 8096 }, null, 8, _hoisted_67), [[ 8097 _vModelText, 8098 commercial.unit_price, 8099 void 0, 8100 { number: true } 8101 ]])])])) 8102 : (_openBlock(), _createElementBlock("label", _hoisted_68, [_cache[36] || (_cache[36] = _createElementVNode("span", null, "ÙÙÙ Ø© اÙÙ ÙØªØ¬Ø§Øª / Ø§ÙØ®Ø¯Ù Ø© Ø§ÙØ£Ø³Ø§Ø³ÙØ©", -1)), _withDirectives(_createElementVNode("input", { 8103 type: "number", 8104 min: "0.01", 8105 step: "0.01", 8106 "onUpdate:modelValue": $event => ((commercial.goods_amount) = $event) 8107 }, null, 8, _hoisted_69), [[ 8108 _vModelText, 8109 commercial.goods_amount, 8110 void 0, 8111 { number: true } 8112 ]])])), 8113 _createElementVNode("div", _hoisted_70, [ 8114 _createElementVNode("label", null, [_cache[37] || (_cache[37] = _createElementVNode("span", null, "رسÙ٠خد٠ات SMT %", -1)), _withDirectives(_createElementVNode("input", { 8115 type: "number", 8116 min: "0", 8117 max: "100", 8118 step: "0.01", 8119 "onUpdate:modelValue": $event => ((commercial.service_fee_percent) = $event) 8120 }, null, 8, _hoisted_71), [[ 8121 _vModelText, 8122 commercial.service_fee_percent, 8123 void 0, 8124 { number: true } 8125 ]]), _cache[38] || (_cache[38] = _createElementVNode("small", null, "ØªÙØØ³Ø¨ ٠٠اÙÙÙÙ Ø© Ø§ÙØ£Ø³Ø§Ø³ÙØ©", -1))]), 8126 _createElementVNode("label", null, [_cache[39] || (_cache[39] = _createElementVNode("span", null, "تÙÙÙØ© Ø§ÙØ´ØÙ", -1)), _withDirectives(_createElementVNode("input", { 8127 type: "number", 8128 min: "0", 8129 step: "0.01", 8130 "onUpdate:modelValue": $event => ((commercial.shipping_amount) = $event) 8131 }, null, 8, _hoisted_72), [[ 8132 _vModelText, 8133 commercial.shipping_amount, 8134 void 0, 8135 { number: true } 8136 ]])]), 8137 _createElementVNode("label", null, [_cache[40] || (_cache[40] = _createElementVNode("span", null, "Ø§ÙØªØ£Ù ÙÙ", -1)), _withDirectives(_createElementVNode("input", { 8138 type: "number", 8139 min: "0", 8140 step: "0.01", 8141 "onUpdate:modelValue": $event => ((commercial.insurance_amount) = $event) 8142 }, null, 8, _hoisted_73), [[ 8143 _vModelText, 8144 commercial.insurance_amount, 8145 void 0, 8146 { number: true } 8147 ]])]), 8148 _createElementVNode("label", null, [_cache[41] || (_cache[41] = _createElementVNode("span", null, "Ø§ÙØ®ØµÙ ", -1)), _withDirectives(_createElementVNode("input", { 8149 type: "number", 8150 min: "0", 8151 step: "0.01", 8152 "onUpdate:modelValue": $event => ((commercial.discount_amount) = $event) 8153 }, null, 8, _hoisted_74), [[ 8154 _vModelText, 8155 commercial.discount_amount, 8156 void 0, 8157 { number: true } 8158 ]])]) 8159 ]), 8160 _createElementVNode("div", _hoisted_75, [_createElementVNode("span", null, [_cache[42] || (_cache[42] = _createElementVNode("small", null, "اÙÙÙÙ Ø© Ø§ÙØ£Ø³Ø§Ø³ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(computedGoodsAmount,commercial.quoted_currency)), 1)]), _createElementVNode("span", null, [_cache[43] || (_cache[43] = _createElementVNode("small", null, "رسÙÙ Ø§ÙØ®Ø¯Ù Ø© اÙÙ ØØ³Ùبة", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(computedServiceFee,commercial.quoted_currency)), 1)]), _createElementVNode("span", _hoisted_76, [_cache[44] || (_cache[44] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙ٠اÙ٠تÙÙØ¹", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(computedGrandTotal,commercial.quoted_currency)), 1)])]) 8161 ])]), 8162 _createElementVNode("details", _hoisted_77, [_createElementVNode("summary", null, [_cache[45] || (_cache[45] = _
8162createElementVNode("span", null, [_createElementVNode("i", null, "2"), _createElementVNode("b", null, "Ø§ÙØ´ØÙ ÙØ§ÙتسÙÙÙ ")], -1)), _createElementVNode("strong", null, _toDisplayString(procurementShippingLabel(commercial.shipping_mode)), 1)]), _createElementVNode("div", _hoisted_78, [_createElementVNode("div", _hoisted_79, [_createElementVNode("label", _hoisted_80, [_cache[47] || (_cache[47] = _createElementVNode("span", null, "Incoterm", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((commercial.incoterm) = $event) }, _cache[46] || (_cache[46] = [ 8163 _createElementVNode("option", { value: "" }, "بدÙÙ Incoterm / ÙØ§ ÙÙØ¬Ø¯ Ø´ØÙ", -1), 8164 _createElementVNode("option", { value: "EXW" }, "EXW â Ø§Ø³ØªÙا٠٠٠اÙÙ ØµÙØ¹", -1), 8165 _createElementVNode("option", { value: "FOB" }, "FOB â Ø¹ÙÙ Ø¸ÙØ± Ø§ÙØ³ÙÙÙØ©", -1), 8166 _createElementVNode("option", { value: "CIF" }, "CIF â ØªÙÙÙØ© + تأ٠ÙÙ + Ø´ØÙ", -1) 8167 ]), 8, _hoisted_81), [[_vModelSelect, commercial.incoterm]])]), _createElementVNode("label", _hoisted_82, [_cache[49] || (_cache[49] = _createElementVNode("span", null, "ÙÙØ¹ Ø§ÙØ´ØÙ", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((commercial.shipping_mode) = $event) }, _cache[48] || (_cache[48] = [ 8168 _createElementVNode("option", { value: "none" }, "بدÙÙ Ø´ØÙ Ø¶Ù Ù Ø§ÙØ¹Ø±Ø¶", -1), 8169 _createElementVNode("option", { value: "fcl" }, "ØØ§ÙÙØ© ÙØ§Ù ÙØ© FCL", -1), 8170 _createElementVNode("option", { value: "lcl" }, "Ø´ØÙ Ø¨ØØ±Ù ٠جزأ LCL", -1), 8171 _createElementVNode("option", { value: "air_cargo" }, "Ø´ØÙ جÙÙ Air Cargo", -1) 8172 ]), 8, _hoisted_83), [[_vModelSelect, commercial.shipping_mode]])])]), (commercial.shipping_mode==='fcl') 8173 ? (_openBlock(), _createElementBlock("label", _hoisted_84, [_cache[51] || (_cache[51] = _createElementVNode("span", null, "ÙÙØ¹ Ø§ÙØØ§ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((commercial.container_type) = $event) }, _cache[50] || (_cache[50] = [ 8174 _createElementVNode("option", { value: "" }, "اختر Ø§ÙØØ§ÙÙØ©", -1), 8175 _createElementVNode("option", { value: "20GP" }, "20GP â 20 ÙØ¯Ù ", -1), 8176 _createElementVNode("option", { value: "40GP" }, "40GP â 40 ÙØ¯Ù ", -1), 8177 _createElementVNode("option", { value: "40HC" }, "40HC â 40 ÙØ¯Ù High Cube", -1) 8178 ]), 8, _hoisted_85), [[_vModelSelect, commercial.container_type]])])) 8179 : _createCommentVNode("", true), (commercial.shipping_mode!=='none') 8180 ? (_openBlock(), _createElementBlock("div", _hoisted_86, [ 8181 _createElementVNode("label", _hoisted_87, [_cache[52] || (_cache[52] = _createElementVNode("span", null, "Gross Weight kg", -1)), _withDirectives(_createElementVNode("input", { 8182 type: "number", 8183 min: "0", 8184 step: "0.001", 8185 "onUpdate:modelValue": $event => ((commercial.gross_weight_kg) = $event) 8186 }, null, 8, _hoisted_88), [[ 8187 _vModelText, 8188 commercial.gross_weight_kg, 8189 void 0, 8190 { number: true } 8191 ]])]), 8192 _createElementVNode("label", _hoisted_89, [_cache[53] || (_cache[53] = _createElementVNode("span", null, "Net Weight kg", -1)), _withDirectives(_createElementVNode("input", { 8193 type: "number", 8194 min: "0", 8195 step: "0.001", 8196 "onUpdate:modelValue": $event => ((commercial.net_weight_kg) = $event) 8197 }, null, 8, _hoisted_90), [[ 8198 _vModelText, 8199 commercial.net_weight_kg, 8200 void 0, 8201 { number: true } 8202 ]])]), 8203 _createElementVNode("label", _hoisted_91, [_cache[54] || (_cache[54] = _createElementVNode("span", null, "CBM", -1)), _withDirectives(_createElementVNode("input", { 8204 type: "number", 8205 min: "0", 8206 step: "0.001", 8207 "onUpdate:modelValue": $event => ((commercial.total_cbm) = $event) 8208 }, null, 8, _hoisted_92), [[ 8209 _vModelText, 8210 commercial.total_cbm, 8211 void 0, 8212 { number: true } 8213 ]])]), 8214 _createElementVNode("label", _hoisted_93, [_cache[55] || (_cache[55] = _createElementVNode("span", null, "عدد Ø§ÙØ·Ø±Ùد / Packages", -1)), _withDirectives(_createElementVNode("input", { 8215 type: "number", 8216 min: "0", 8217 step: "1", 8218 "onUpdate:modelValue": $event => ((commercial.packages_count) = $event) 8219 }, null, 8, _hoisted_94), [[ 8220 _vModelText, 8221 commercial.packages_count, 8222 void 0, 8223 { number: true } 8224 ]])]) 8225 ])) 8226 : _createCommentVNode("", true)])]), 8227 (commercial.shipping_mode!=='none') 8228 ? (_openBlock(), _createElementBlock("details", _hoisted_95, [_createElementVNode("summary", null, [_cache[56] || (_cache[56] = _
8228createElementVNode("span", null, [_createElementVNode("i", null, "3"), _createElementVNode("b", null, "خط Ø§ÙØ´ØÙ ÙØ§Ù٠دة")], -1)), _createElementVNode("strong", null, _toDisplayString(commercial.origin_country||'اÙÙ ÙØ´Ø£') + " â " + _toDisplayString(commercial.destination_country||'اÙÙØ¬ÙØ©'), 1)]), _createElementVNode("div", _hoisted_96, [ 8229 _createElementVNode("div", _hoisted_97, [_createElementVNode("label", _hoisted_98, [_cache[57] || (_cache[57] = _createElementVNode("span", null, "Ø¨ÙØ¯ اÙÙ ÙØ´Ø£", -1)), _withDirectives(_createElementVNode("input", { 8230 "onUpdate:modelValue": $event => ((commercial.origin_country) = $event), 8231 placeholder: "China" 8232 }, null, 8, _hoisted_99), [[_vModelText, commercial.origin_country]])]), _createElementVNode("label", _hoisted_100, [_cache[58] || (_cache[58] = _createElementVNode("span", null, "٠دÙÙØ© اÙÙ ÙØ´Ø£", -1)), _withDirectives(_createElementVNode("input", { 8233 "onUpdate:modelValue": $event => ((commercial.origin_city) = $event), 8234 placeholder: "Guangzhou / Yiwu..." 8235 }, null, 8, _hoisted_101), [[_vModelText, commercial.origin_city]])])]), 8236 _createElementVNode("label", _hoisted_102, [_cache[59] || (_cache[59] = _createElementVNode("span", null, "Ù ÙÙØ§Ø¡ / ٠طار / ÙÙØ·Ø© Ø§ÙØªØÙ ÙÙ", -1)), _withDirectives(_createElementVNode("input", { 8237 "onUpdate:modelValue": $event => ((commercial.loading_point) = $event), 8238 placeholder: "Guangzhou / Shenzhen / Shanghai Port Ø£Ù Airport" 8239 }, null, 8, _hoisted_103), [[_vModelText, commercial.loading_point]])]), 8240 _createElementVNode("div", _hoisted_104, [_createElementVNode("label", _hoisted_105, [_cache[60] || (_cache[60] = _createElementVNode("span", null, "Ø¨ÙØ¯ اÙÙØ¬ÙØ©", -1)), _withDirectives(_createElementVNode("input", { 8241 "onUpdate:modelValue": $event => ((commercial.destination_country) = $event), 8242 placeholder: "Sudan" 8243 }, null, 8, _hoisted_106), [[_vModelText, commercial.destination_country]])]), _createElementVNode("label", _hoisted_107, [_cache[61] || (_cache[61] = _createElementVNode("span", null, "٠دÙÙØ© اÙÙØ¬ÙØ©", -1)), _withDirectives(_createElementVNode("input", { 8244 "onUpdate:modelValue": $event => ((commercial.destination_city) = $event), 8245 placeholder: "Port Sudan / Khartoum..." 8246 }, null, 8, _hoisted_108), [[_vModelText, commercial.destination_city]])])]), 8247 _createElementVNode("label", _hoisted_109, [_cache[62] || (_cache[62] = _createElementVNode("span", null, "Ù ÙÙØ§Ø¡ / ٠طار / ÙÙØ·Ø© اÙÙØµÙÙ", -1)), _withDirectives(_createElementVNode("input", { 8248 "onUpdate:modelValue": $event => ((commercial.destination_point) = $event), 8249 placeholder: "Port Sudan Port / KRT Airport..." 8250 }, null, 8, _hoisted_110), [[_vModelText, commercial.destination_point]])]), 8251 _createElementVNode("div", _hoisted_111, [_createElementVNode("label", _hoisted_112, [_cache[63] || (_cache[63] = _createElementVNode("span", null, "٠دة Ø§ÙØ¥Ùتاج / Ø§ÙØªØ¬ÙÙØ² Ø¨Ø§ÙØ£Ùا٠", -1)), _withDirectives(_createElementVNode("input", { 8252 type: "number", 8253 min: "0", 8254 step: "1", 8255 "onUpdate:modelValue": $event => ((commercial.production_lead_days) = $event) 8256 }, null, 8, _hoisted_113), [[ 8257 _vModelText, 8258 commercial.production_lead_days, 8259 void 0, 8260 { number: true } 8261 ]])]), _createElementVNode("label", _hoisted_114, [_cache[64] || (_cache[64] = _createElementVNode("span", null, "٠دة Ø§ÙØ´ØÙ / Transit Ø¨Ø§ÙØ£Ùا٠", -1)), _withDirectives(_createElementVNode("input", { 8262 type: "number", 8263 min: "1", 8264 step: "1", 8265 "onUpdate:modelValue": $event => ((commercial.transit_days) = $event) 8266 }, null, 8, _hoisted_115), [[ 8267 _vModelText, 8268 commercial.transit_days, 8269 void 0, 8270 { number: true } 8271 ]])])]) 8272 ])])) 8273 : _createCommentVNode("", true), 8274 _createElementVNode("details", _hoisted_116, [_createElementVNode("summary", null, [_cache[65] || (_cache[65] = _createElementVNode("span", null, [_createElementVNode("i", null, "4"), _createElementVNode("b", null, "اÙÙ Ø³ØªÙØ¯Ø§Øª ÙØ§ÙØ´Ø±ÙØ·")], -1)), _createElementVNode("strong", null, _toDisplayString(offerValidUntil?('ØØªÙ '+sh
8274ortDate(offerValidUntil)):'Ø£ÙÙ Ù Ø§ÙØ¨ÙØ§ÙØ§Øª'), 1)]), _createElementVNode("div", _hoisted_117, [ 8275 _createElementVNode("div", _hoisted_118, [_createElementVNode("label", _hoisted_119, [_cache[66] || (_cache[66] = _createElementVNode("span", null, "رÙÙ Quotation / Proforma", -1)), _withDirectives(_createElementVNode("input", { 8276 "onUpdate:modelValue": $event => ((proformaNumber) = $event), 8277 placeholder: "Ø§Ø®ØªÙØ§Ø±Ù ÙÙØ¨ØØ«Ø Ù Ø·ÙÙØ¨ ÙÙ Buy Now" 8278 }, null, 8, _hoisted_120), [[_vModelText, proformaNumber]])]), _createElementVNode("label", _hoisted_121, [_cache[67] || (_cache[67] = _createElementVNode("span", null, [_createTextVNode("HS Code "), _createElementVNode("small", null, "Ø§Ø®ØªÙØ§Ø±Ù")], -1)), _withDirectives(_createElementVNode("input", { 8279 "onUpdate:modelValue": $event => ((commercial.hs_code) = $event), 8280 placeholder: "٠ثا٠8479.89" 8281 }, null, 8, _hoisted_122), [[_vModelText, commercial.hs_code]])])]), 8282 _createElementVNode("label", _hoisted_123, [_cache[68] || (_cache[68] = _createElementVNode("span", null, [_createTextVNode("Ø§ÙØªØ¹Ø¨Ø¦Ø© ÙØ§ÙتغÙÙÙ "), _createElementVNode("small", null, "Ø§Ø®ØªÙØ§Ø±Ù")], -1)), _withDirectives(_createElementVNode("textarea", { 8283 "onUpdate:modelValue": $event => ((commercial.packing_notes) = $event), 8284 placeholder: "Cartons / Pallets / Wooden cases / Shipping Marks..." 8285 }, null, 8, _hoisted_124), [[_vModelText, commercial.packing_notes]])]), 8286 _createElementVNode("label", _hoisted_125, [_cache[69] || (_cache[69] = _createElementVNode("span", null, "ØµØ§ÙØ ØØªÙ", -1)), _withDirectives(_createElementVNode("input", { 8287 type: "date", 8288 "onUpdate:modelValue": $event => ((offerValidUntil) = $event) 8289 }, null, 8, _hoisted_126), [[_vModelText, offerValidUntil]])]), 8290 _createElementVNode("label", _hoisted_127, [_cache[70] || (_cache[70] = _createElementVNode("span", null, "Ø´Ø±ÙØ· Ø§ÙØ³Ø¹Ø± ÙØ§ÙØ¯ÙØ¹", -1)), _withDirectives(_createElementVNode("textarea", { 8291 "onUpdate:modelValue": $event => ((offerTerms) = $event), 8292 placeholder: "Ø´Ø±ÙØ· Ø§ÙØ³Ø¹Ø± ÙØ§ÙØ¯ÙØ¹ â Ù Ø·ÙÙØ¨Ø©" 8293 }, null, 8, _hoisted_128), [[_vModelText, offerTerms]])]), 8294 _createElementVNode("label", _hoisted_129, [_cache[71] || (_cache[71] = _createElementVNode("span", null, "Ø´Ø±ÙØ· ÙÙ ÙØ§Ù ÙØ²Ù Ù Ø§ÙØªØ³ÙÙÙ ", -1)), _withDirectives(_createElementVNode("textarea", { 8295 "onUpdate:modelValue": $event => ((deliveryTerms) = $event), 8296 placeholder: "Ø´Ø±ÙØ· ÙÙ ÙØ§Ù ÙØ²Ù Ù Ø§ÙØªØ³ÙÙÙ â Ù Ø·ÙÙØ¨Ø©" 8297 }, null, 8, _hoisted_130), [[_vModelText, deliveryTerms]])]) 8298 ])]), 8299 _createElementVNode("div", { class: _normalizeClass(["commercialReadinessCard", {ready:commercialReadiness.ready}]) }, [_createElementVNode("div", null, [_cache[72] || (_cache[72] = _createElementVNode("span", { class: "adminEyebrow" }, "ÙØØµ ÙØ§Ø¬ÙØ© ÙØ¨Ù اÙÙØ´Ø±", -1)), _createElementVNode("b", null, _toDisplayString(commercialReadiness.ready?'Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ£Ø³Ø§Ø³ÙØ© Ù ÙØªÙ ÙØ©':'راجع Ø§ÙØÙÙÙ ÙØ¨Ù اÙÙØ´Ø±'), 1), _cache[73] || (_cache[73] = _createElementVNode("small", null, "اÙÙØØµ اÙÙÙØ§Ø¦Ù ÙØ¨ÙÙ ÙØ¯Ù Ø§ÙØ³ÙØ±ÙØ±.", -1))]), _createElementVNode("div", _hoisted_131, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(commercialReadiness.checks, (c) => { 8300 return (_openBlock(), _createElementBlock("span", { 8301 key: c.key, 8302 class: _normalizeClass({done:c.ok}) 8303 }, [_createElementVNode("i", null, _toDisplayString(c.ok?'â':'â¢'), 1), _createTextVNode(_toDisplayString(c.label), 1)], 2)) 8304 }), 128))])], 2), 8305 _cache[75] || (_cache[75] = _createElementVNode("p", { class: "hint compactHint" }, "اÙÙØ´Ø± ÙØªØ·Ùب Quotation Ø£Ù Proforma ٠رÙÙØ§Ù. CIF ÙØªØ·Ùب تÙÙÙØ© Ø´ØÙ ÙØªØ£Ù ÙÙ. FCL ÙØªØ·Ùب ÙÙØ¹ ØØ§ÙÙØ©Ø ÙØ§ÙØ´ØÙ Ø§ÙØ¨ØØ±Ù ÙØªØ·Ùب CBM.", -1)) 8306 ])) 8307 : (detail.request.status==='quoted') 8308 ? (_openBlock(), _createElementBlock("section", _hoisted_132, [ 8309 _createElementVNode("div", _hoisted_133, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_134, "Ø§ÙØ¹Ø±Ø¶ رÙÙ " + _toDisplayString(detail.request.offer_version), 1), _cache[76] || (_cache[76] = _
8309createElementVNode("h3", null, "Ø§ÙØ¹Ø±Ø¶ Ù ÙØ´Ùر ÙÙÙØªØ¸Ø± ÙØ±Ø§Ø± Ø§ÙØ¹Ø¶Ù", -1)), _cache[77] || (_cache[77] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØ¥Ø¯Ø§Ø±Ø© تتابع اÙÙØµÙÙ ÙØ§ÙÙØ±Ø§Ø¡Ø© ÙÙØ·Ø اÙÙØ¨ÙÙ ÙØ±Ø§Ø± Ø§ÙØ¹Ø¶Ù.", -1))]), _createElementVNode("div", _hoisted_135, [_cache[78] || (_cache[78] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙ٠اÙÙ ÙØ´Ùر", -1)), _createElementVNode("b", null, _toDisplayString(procurementMoney(detail.request.quoted_amount,detail.request.quoted_currency)), 1)])]), 8310 _createElementVNode("div", _hoisted_136, [ 8311 _createElementVNode("span", null, [_cache[79] || (_cache[79] = _createElementVNode("small", null, "Ø§ÙØ¹Ù ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(procurementCurrencyLabel(detail.request.quoted_currency)), 1)]), 8312 _createElementVNode("span", null, [_cache[80] || (_cache[80] = _createElementVNode("small", null, "Incoterm", -1)), _createElementVNode("b", null, _toDisplayString(detail.request.incoterm||'بدÙÙ Incoterm'), 1)]), 8313 _createElementVNode("span", null, [_cache[81] || (_cache[81] = _createElementVNode("small", null, "Ø§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(procurementShippingLabel(detail.request.shipping_mode)), 1)]), 8314 _createElementVNode("span", null, [_cache[82] || (_cache[82] = _createElementVNode("small", null, "ØµØ§ÙØ ØØªÙ", -1)), _createElementVNode("b", null, _toDisplayString(shortDate(detail.request.offer_valid_until)), 1)]) 8315 ]), 8316 _createElementVNode("div", _hoisted_137, [ 8317 _createElementVNode("div", _hoisted_138, [_cache[83] || (_cache[83] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ØØ§ÙØ© اÙÙØµÙÙ"), _createElementVNode("h4", null, "ÙÙ ÙØµÙ Ø§ÙØ¹Ø±Ø¶ ÙÙØªØÙ Ø§ÙØ¹Ø¶ÙØ")], -1)), _createElementVNode("button", { 8318 class: "smallbtn secondary", 8319 onClick: refreshOfferDelivery 8320 }, "ØªØØ¯ÙØ« Ø§ÙØØ§ÙØ©", 8, _hoisted_139)]), 8321 _createElementVNode("div", _hoisted_140, [ 8322 _createElementVNode("div", _hoisted_141, [_cache[85] || (_cache[85] = _createElementVNode("i", null, "1", -1)), _createElementVNode("span", null, [_cache[84] || (_cache[84] = _createElementVNode("b", null, "Ù ÙØ´Ùر ÙÙ ØØ³Ø§Ø¨ Ø§ÙØ¹Ø¶Ù", -1)), _createElementVNode("small", null, _toDisplayString(shortDate(offerDelivery.published_at||detail.request.offer_published_at)), 1)])]), 8323 _createElementVNode("div", { class: _normalizeClass('deliveryStep '+(offerDelivery.notification_read_at?'done':'waiting')) }, [_cache[86] || (_cache[86] = _createElementVNode("i", null, "2", -1)), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(offerDelivery.notification_read_at?'ÙØ±Ø£ إشعار Ø§ÙØ¹Ø±Ø¶':'إشعار Ø§ÙØ¹Ø±Ø¶ ØºÙØ± Ù ÙØ±ÙØ¡'), 1), _createElementVNode("small", null, _toDisplayString(offerDelivery.notification_read_at?shortDate(offerDelivery.notification_read_at):'ØªÙ Ø¥ÙØ´Ø§Ø¡ Ø§ÙØ¥Ø´Ø¹Ø§Ø± '+shortDate(offerDelivery.notification_created_at)), 1)])], 2), 8324 _createElementVNode("div", { class: _normalizeClass('deliveryStep '+(offerDelivery.first_offer_opened_at?'done':'waiting')) }, [_cache[87] || (_cache[87] = _createElementVNode("i", null, "3", -1)), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(offerDelivery.first_offer_opened_at?'ÙØªØ ØµÙØØ© Ø§ÙØ¹Ø±Ø¶':'ÙÙ ÙÙØªØ ØµÙØØ© Ø§ÙØ¹Ø±Ø¶ بعد'), 1), (offerDelivery.first_offer_opened_at) 8325 ? (_openBlock(), _createElementBlock("small", _hoisted_142, "Ø£ÙÙ ÙØªØ " + _toDisplayString(shortDate(offerDelivery.first_offer_opened_at)) + " · " + _toDisplayString(offerDelivery.offer_open_count||1) + " ٠رة", 1)) 8326 : _createCommentVNode("", true)])], 2), 8327 _createElementVNode("div", { class: _normalizeClass('deliveryStep '+(offerDelivery.first_document_opened_at?'done':'waiting')) }, [_cache[88] || (_cache[88] = _createElementVNode("i", null, "4", -1)), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(offerDelivery.first_document_opened_at?'ÙØªØ Ù Ø³ØªÙØ¯ Ø§ÙØ¹Ø±Ø¶':'ÙÙ ÙÙØªØ Quotation / Proforma بعد'), 1), (offerDelivery.first_document_opened_at) 8328 ? (_openBlock(), _createElementBlock("small", _hoisted_143, "آخر ÙØªØ " + _toDisplayString(shortDate(offerDelivery.last_document_opened_at)) + " · " + _toDisplayString(offerDelivery.document_open_count||1) + " ٠رة", 1)) 8329 : _createCommentVNode("", true)])], 2), 8330 _createElementVNode("div", { class: _normalizeClass('deliveryStep '+(offerDelivery.whatsapp_queue_status==='sent'?'done':'waiting')) }, [_cache[89] || (_cache[89] = _createElementVNode("i", null, "WA", -1)), _createElementVNode("span", null, [_createElementVNode("b", null, "WhatsApp: " + _toDisplayString(whatsappDeliveryLabel(offerDelivery)), 1), (offerDelivery.whatsapp_sent_at) 8331 ? (_openBlock(), _createElementBlock("small", _hoisted_144, "ÙØ¨ÙÙ Ù Ø²ÙØ¯ Ø§ÙØ¥Ø±Ø³Ø§Ù " + _toDisplayString(shortDate(offerDelivery.whatsapp_sent_at)), 1)) 8332 : (offerDelivery.last_whatsapp_attempt_at) 8333 ? (_openBlock(), _createElementBlock("small", _hoisted_145, "آخر Ù ØØ§ÙÙØ© " + _toDisplayString(shortDate(offerDelivery.last_whatsapp_attempt_at)), 1)) 8334 : _createCommentVNode("", true)])], 2) 8335 ]), 8336 _cache[90] || (_cache[90] = _createElementVNode("p", { class: "hint compactHint" }, "ØØ§ÙØ© WhatsApp «ت٠تسÙÙÙ Ù Ù٠زÙÙØ¯ WhatsApp» ÙØ§ تعÙÙ Ø£Ù Ø§ÙØ¹Ù ÙÙ ÙØ±Ø£ Ø§ÙØ±Ø³Ø§ÙØ©Ø Delivered/Read ÙØ§ ÙØ¸ÙØ±Ø§Ù Ø¥ÙØ§ Ø¹ÙØ¯ تÙÙØ± callback Ù ÙØ«Ù٠٠٠اÙÙ Ø²ÙØ¯.", -1)), 8337 _createElementVNode("div", _hoisted_146, [_createElementVNode("button", { 8338 class: "smallbtn", 8339 disabled: store.state.busy, 8340 onClick: resendOffer 8341 }, "إعادة Ø¥Ø±Ø³Ø§Ù Ø§ÙØ¥Ø´Ø¹Ø§Ø±", 8, _hoisted_147), _createElementVNode("button", { 8342 class: "smallbtn secondary", 8343 onClick: $event => (memberPreview=!memberPreview) 8344 }, _toDisplayString(memberPreview?'Ø¥Ø®ÙØ§Ø¡ اÙ٠عاÙÙØ©':'٠عاÙÙØ© ٠ا ÙØ±Ø§Ù Ø§ÙØ¹Ø¶Ù'), 9, _hoisted_148)]), 8345 (offerDelivery.resend_count) 8346 ? (_openBlock(), _createElementBlock("div", _hoisted_149, "Ø£Ø¹ÙØ¯ Ø¥Ø±Ø³Ø§Ù Ø§ÙØ¥Ø´Ø¹Ø§Ø± " + _toDisplayString(offerDelivery.resend_count) + " ٠رة · آخر إعادة " + _toDisplayString(shortDate(offerDelivery.last_resent_at)), 1)) 8347 : _createCommentVNode("", true) 8348 ]), 8349 memberPreview 8350 ? (_openBlock(), _createElementBlock("div", _hoisted_150, [ 8351 _cache[102] || (_cache[102] = _createElementVNode("span", { class: "adminEyebrow" }, "٠عاÙÙØ© ØºÙØ± ØªÙØ§Ø¹ÙÙØ©", -1)), 8352 _cache[103] || (_cache[103] = _createElementVNode("h4", null, "عرض Ø§ÙØ³Ø¹Ø± ÙÙØ¹Ø¶Ù", -1)), 8353 _createElementVNode("b", _hoisted_151, _toDisplayString(procurementMoney(detail.request.quoted_amount,detail.request.quoted_currency)), 1), 8354 _createElementVNode("div", _hoisted_152, [ 8355 _createElementVNode("p", null, [_cache[91] || (_cache[91] = _createElementVNode("b", null, "ÙÙÙ Ø© اÙÙ ÙØªØ¬Ø§Øª/Ø§ÙØ®Ø¯Ù Ø©:", -1)), _createTextVNode(" " + _toDisplayString(procurementMoney(detail.request.goods_amount,detail.request.quoted_currency)), 1)]), 8356 _createElementVNode("p", null, [_cache[92] || (_cache[92] = _createElementVNode("b", null, "رسÙÙ SMT:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.service_fee_percent) + "% = " + _toDisplayString(procurementMoney(detail.request.service_fee_amount,detail.request.quoted_currency)), 1)]), 8357 _createElementVNode("p", null, [_cache[93] || (_cache[93] = _createElementVNode("b", null, "Ø§ÙØ´ØÙ:", -1)), _createTextVNode(" " + _toDisplayString(procurementMoney(detail.request.shipping_amount,detail.request.quoted_currency)), 1)]), 8358 (Number(detail.request.insurance_amount||0)) 8359 ? (_openBlock(), _createElementBlock("p", _hoisted_153, [_cache[94] || (_cache[94] = _createElementVNode("b", null, "Ø§ÙØªØ£Ù ÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(procurementMoney(detail.request.insurance_amount,detail.request.quoted_currency)), 1)])) 8360 : _createCommentVNode("", true), 8361 _createElementVNode("p", null, [_cache[95] || (_cache[95] = _createElementVNode("b", null, "Incoterm:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.incoterm||'-'), 1)]), 8362 _createElementVNode("p", null, [_cache[96] || (_cache[96] = _createElementVNode("b", null, "ÙÙØ¹ Ø§ÙØ´ØÙ:", -1)), _createTextVNode(" " + _toDisplayString(procurementShippingLabel(detail.request.shipping_mode)), 1
8362)]), 8363 (detail.request.container_type) 8364 ? (_openBlock(), _createElementBlock("p", _hoisted_154, [_cache[97] || (_cache[97] = _createElementVNode("b", null, "Ø§ÙØØ§ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(procurementContainerLabel(detail.request.container_type)), 1)])) 8365 : _createCommentVNode("", true), 8366 (detail.request.gross_weight_kg) 8367 ? (_openBlock(), _createElementBlock("p", _hoisted_155, [_cache[98] || (_cache[98] = _createElementVNode("b", null, "Gross:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.gross_weight_kg) + " kg", 1)])) 8368 : _createCommentVNode("", true), 8369 (detail.request.total_cbm) 8370 ? (_openBlock(), _createElementBlock("p", _hoisted_156, [_cache[99] || (_cache[99] = _createElementVNode("b", null, "CBM:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.total_cbm), 1)])) 8371 : _createCommentVNode("", true) 8372 ]), 8373 _createElementVNode("p", null, [_cache[100] || (_cache[100] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØ¹Ø±Ø¶:", -1)), _createTextVNode(" " + _toDisplayString(detail.request.offer_terms), 1)]), 8374 _createElementVNode("p", null, [_cache[101] || (_cache[101] = _createElementVNode("b", null, "Ø´Ø±ÙØ· Ø§ÙØªØ³ÙÙÙ :", -1)), _createTextVNode(" " + _toDisplayString(detail.request.delivery_terms), 1)]) 8375 ])) 8376 : _createCommentVNode("", true), 8377 _createElementVNode("div", _hoisted_157, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(procurementQuoteDocuments(detail), (d) => { 8378 return (_openBlock(), _createElementBlock("div", { 8379 class: "decisionDocument", 8380 key: d.id 8381 }, [_createElementVNode("div", null, [_cache[104] || (_cache[104] = _createElementVNode("span", { class: "adminEyebrow" }, "Ø¶Ù Ù Ø§ÙØ¹Ø±Ø¶ اÙÙ ÙØ´Ùر", -1)), _createElementVNode("b", null, _toDisplayString(procurementDocumentLabel(d.document_type)), 1
8381), _createElementVNode("small", null, _toDisplayString(d.original_name), 1)]), _createElementVNode("a", { 8382 class: "smallbtn secondary", 8383 href: d.file_url, 8384 target: "_blank", 8385 rel: "noopener" 8386 }, "ÙØªØ", 8, _hoisted_158)])) 8387 }), 128))]) 8388 ])) 8389 : _createCommentVNode("", true), 8390 (detail.order) 8391 ? (_openBlock(), _createElementBlock("div", _hoisted_159, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(detail.order.order_code), 1), _cache[105] || (_cache[105] = _createElementVNode("span", null, "ØªÙ ÙØ¨ÙÙ Ø§ÙØ¹Ø±Ø¶ ÙØ¥Ùشاء Ø§ÙØ·Ùب.", -1))]), _createElementVNode("button", { 8392 class: "smallbtn", 8393 onClick: $event => ($router.push('/admin/orders/'+detail.order.id)) 8394 }, "ÙØªØ Ø§ÙØ·Ùب", 8, _hoisted_160)])) 8395 : _createCommentVNode("", true), 8396 (secondaryNext.length) 8397 ? (_openBlock(), _createElementBlock("section", _hoisted_161, [ 8398 _cache[109] || (_cache[109] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ®Ø·ÙØ© Ø§ÙØªØ§ÙÙØ©"), _createElementVNode("h3", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØ¥Ø¯Ø§Ø±Ù"), _createElementVNode("p", { class: "hint compactHint" }, "اختر Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ اÙÙ ÙØ§Ø³Ø¨ ÙÙØ· بعد ٠راجعة Ø¨ÙØ§Ùات Ø§ÙØ·Ùب ÙØ§ÙÙ Ø³ØªÙØ¯Ø§Øª.")])], -1)), 8399 _createElementVNode("label", _hoisted_162, [_cache[106] || (_cache[106] = _createElementVNode("span", null, "Ù ÙØ§ØØ¸Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©", -1)), _withDirectives(_createElementVNode("textarea", { 8400 "onUpdate:modelValue": $event => ((note) = $event), 8401 placeholder: "Ø§ÙØªØ¨ سبب Ø§ÙØ¥Ø±Ø¬Ø§Ø¹ Ø£Ù Ø§ÙØ¥ÙØºØ§Ø¡Ø Ø£Ù Ù ÙØ§ØØ¸Ø© اÙ٠تابعة Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©" 8402 }, null, 8, _hoisted_163), [[_vModelText, note]])]), 8403 _createElementVNode("label", _hoisted_164, [_cache[108] || (_cache[108] = _createElementVNode("span", null, "Ù ÙØ¹Ø¯ اÙ٠تابعة", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((nextActionDays) = $event) }, _cache[107] || (_cache[107] = [ 8404 _createElementVNode("option", { value: "" }, "ØØ³Ø¨ اÙ٠دة Ø§ÙØ§ÙØªØ±Ø§Ø¶ÙØ© ÙÙ٠رØÙØ©", -1), 8405 _createElementVNode("option", { value: "1" }, "Ø®ÙØ§Ù ÙÙÙ ", -1), 8406 _createElementVNode("option", { value: "2" }, "Ø®ÙØ§Ù ÙÙÙ ÙÙ", -1), 8407 _createElementVNode("option", { value: "3" }, "Ø®ÙØ§Ù 3 Ø£ÙØ§Ù ", -1), 8408 _createElementVNode("option", { value: "7" }, "Ø®ÙØ§Ù 7 Ø£ÙØ§Ù ", -1), 8409 _createElementVNode("option", { value: "14" }, "Ø®ÙØ§Ù 14 ÙÙ٠اÙ", -1), 8410 _createElementVNode("option", { value: "30" }, "Ø®ÙØ§Ù 30 ÙÙ٠اÙ", -1) 8411 ]), 8, _hoisted_165), [[_vModelSelect, nextActionDays]])]), 8412 _createElementVNode("div", _hoisted_166, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(secondaryNext, (n) => { 8413 return (_openBlock(), _createElementBlock("button", { 8414 key: n, 8415 class: _normalizeClass(n==='cancelled'?'btn danger':'btn'), 8416 onClick: $event => (move(n)) 8417 }, _toDisplayString(transitionLabel(n)), 11, _hoisted_167)) 8418 }), 128))]) 8419 ])) 8420 : _createCommentVNode("", true), 8421 _createElementVNode("div", _hoisted_168, [ 8422 _cache[112] || (_cache[112] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙ Ø³ØªÙØ¯Ø§Øª"), _createElementVNode("h3", null, "Ø±ÙØ¹ Ù Ø³ØªÙØ¯ إدارÙ"), _createElementVNode("p", { class: "hint compactHint" }, "Ø£Ø«ÙØ§Ø¡ تجÙÙØ² Ø§ÙØ¹Ø±Ø¶ تبÙ٠اÙÙ ÙÙØ§Øª Ø§ÙØ¬Ø¯Ùدة داخÙÙØ© ØØªÙ ÙØ´Ø± Ø§ÙØ¹Ø±Ø¶.")])], -1)), 8423 _createElementVNode("label", _hoisted_169, [_cache[110] || (_cache[110] = _createElementVNode("span", null, "ÙÙØ¹ اÙÙ Ø³ØªÙØ¯", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((documentType) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(PROCUREMENT_DOCUMENT_LABELS, (label, key) => { 8424 return (_openBlock(), _createElementBlock("option", { 8425 key: key, 8426 value: key 8427 }, _toDisplayString(label), 9, _hoisted_171)) 8428 }), 128))], 8, _hoisted_170), [[_vModelSelect, documentType]])]), 8429 _createElementVNode("label", _hoisted_172, [_createElementVNode("input", { 8430 type: "file", 8431 accept: "application/pdf,image/jpeg,image/png,image/webp", 8432 onChange: onFile 8433 }, null, 40, _hoisted_173), _cache[111] || (_cache[111] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± Ù Ø³ØªÙØ¯", -1)), _createElementVNode("em", null, _toDisplayString(fileLabel), 1)]), 8434 _createElementVNode("button", { 8435 class: "btn loadMore", 8436 disabled: store.state.upload&&store.state.upload.active, 8437 onClick: upload 8438 }, _toDisplayString(store.state.upload&&store.state.upload.active?'Ø¬Ø§Ø±Ù Ø§ÙØ±Ùع...':'Ø±ÙØ¹ اÙÙ Ø³ØªÙØ¯'), 9, _hoisted_174) 8439 ]), 8440 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(detail.documents, (d) => { 8441 return (_openBlock(), _createElementBlock("div", { 8442 class: "relatedItem", 8443 key: d.id 8444 }, [_createElementVNode("b", null, _toDisplayString(procurementDocumentLabel(d.document_type)), 1
8444), _createElementVNode("span", null, _toDisplayString(d.original_name) + " â " + _toDisplayString(d.uploaded_by_type), 1), _createElementVNode("div", _hoisted_175, [_createElementVNode("a", { 8445 class: "smallbtn secondary", 8446 href: d.file_url, 8447 target: "_blank", 8448 rel: "noopener" 8449 }, "ÙØªØ", 8, _hoisted_176), (!['processing','completed'].includes(detail.request.status)) 8450 ? (_openBlock(), _createElementBlock("button", { 8451 key: 0, 8452 class: "smallbtn danger", 8453 onClick: $event => (archiveDocument(d)) 8454 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_177)) 8455 : _createCommentVNode("", true)])])) 8456 }), 128)), 8457 (memberUpdates.length) 8458 ? (_openBlock(), _createElementBlock("section", _hoisted_178, [_createElementVNode("div", _hoisted_179, [_createElementVNode("div", null, [_cache[113] || (_cache[113] = _createElementVNode("span", { class: "adminEyebrow" }, "ØªÙØ§ØµÙ Ø§ÙØ¹Ù ÙÙ", -1)), _cache[114] || (_cache[114] = _createElementVNode("h3", null, "إشعارات Ø§ÙØ¹Ø¶Ù", -1)), _createElementVNode("p", _hoisted_180, _toDisplayString(unreadMemberUpdates?unreadMemberUpdates+' إشعار ÙÙ ÙÙØ±Ø£Ù Ø§ÙØ¹Ø¶Ù بعد':'Ø§Ø·ÙØ¹ Ø§ÙØ¹Ø¶Ù عÙÙ Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª Ø§ÙØØ§ÙÙØ©'), 1)]), _createElementVNode("span", { class: _normalizeClass(unreadMemberUpdates?'statusPill warning':'statusPill') }, _toDisplayString(unreadMemberUpdates?unreadMemberUpdates+' ØºÙØ± Ù ÙØ±ÙØ¡':'Ù ÙØ±ÙØ¡'), 3)]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(memberUpdates.slice(0,3), (u) => { 8459 return (_openBlock(), _createElementBlock("div", { 8460 class: "memberUpdatePreview", 8461 key: u.id 8462 }, [_createElementVNode("span", { class: _normalizeClass({unread:!u.read_at}) }, null, 2), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(u.title), 1), _createElementVNode("p", null, _toDisplayString(u.body), 1), _createElementVNode("small", null, _toDisplayString(u.read_at?'Ø§Ø·ÙØ¹ عÙÙÙ Ø§ÙØ¹Ø¶Ù':'ØºÙØ± Ù ÙØ±ÙØ¡') + " · " + _toDisplayString(shortDate(u.created_at)), 1)])])) 8463 }), 128)), (memberUpdates.length>3) 8464 ? (_openBlock(), _createElementBlock("details", _hoisted_181, [_createElementVNode("summary", null, "عرض ÙÙ Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª (" + _toDisplayString(memberUpdates.length) + ")", 1), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(memberUpdates.slice(3), (u) => { 8465 return (_openBlock(), _createElementBlock("div", { 8466 class: "relatedItem", 8467 key: u.id 8468 }, [_createElementVNode("b", null, _toDisplayString(u.title), 1), _createElementVNode("span", null, _toDisplayString(u.body), 1), _createElementVNode("small", null, _toDisplayString(u.read_at?'Ø§Ø·ÙØ¹ عÙÙÙ Ø§ÙØ¹Ø¶Ù':'ØºÙØ± Ù ÙØ±ÙØ¡') + " · " + _toDisplayString(shortDate(u.created_at)), 1)])) 8469 }), 128))])) 8470 : _createCommentVNode("", true)])) 8471 : _createCommentVNode("", true), 8472 _createElementVNode("details", null, [_cache[115] || (_cache[115] = _createElementVNode("summary", null, "Ø³Ø¬Ù Ø§ÙØØ§ÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(detail.history, (h) => { 8473 return (_openBlock(), _createElementBlock("div", { 8474 class: "relatedItem", 8475 key: h.id 8476 }, [_createElementVNode("b", null, _toDisplayString(procurementStatusLabel(h.from_status)) + " â " + _toDisplayString(procurementStatusLabel(h.to_status)), 1), _createElementVNode("span", null, _toDisplayString(h.note||'-'), 1), _createElementVNode("small", null, _toDisplayString(shortDate(h.created_at)), 1)])) 8477 }), 128))]) 8478 ])) 8479 : _createCommentVNode("", true) 8480 ]), 8481 _: 1 8482 })) 8483 } 8484} 8485})() 8486 }; 8487 8488 const PublicOfficialCircularsPage={ 8489 components:{PublicFrame}, 8490 setup(){ 8491 const store=useGzcStore();const router=useRouter(); 8492 const items=computed(()=>safeArray(store.state.circulars)); 8493 const unread=computed(()=>items.value.filter(a=>a.unread_by_me).length); 8494 async function load(){if(await store.requireMember(router,'/circulars/all')){const r=await api('/api/announcements?engine=circular');store.state.circulars=safeArray(r.announcements);setTimeout(()=>store.markAnnouncementsRead('circular'),350);}} 8495 function openDetail(a){if(a&&a.id)router.push('/circulars/all/'+encodeURIComponent(a.id));} 8496 onMounted(load); 8497 return{store,items,unread,shortDate,isVerifiedAnnouncement,verificationLabel,compactContentExcerpt,officialSourceName,openDetail}; 8498 }, 8499 render:(function(){ 8500const _Vue = Vue
8501const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 8502 8503const _hoisted_1 = { class: "officialNoticeCard officialCircularPage embassyCard" } 8504const _hoisted_2 = { class: "officialNoticeHead large" } 8505const _hoisted_3 = { 8506 key: 0, 8507 class: "newBadge" 8508} 8509const _hoisted_4 = { class: "guideList contentQueueList" } 8510const _hoisted_5 = { 8511 key: 0, 8512 class: "card emptyCard officialEmptyPage" 8513} 8514const _hoisted_6 = ["onClick"] 8515const _hoisted_7 = { class: "guideCardTop" } 8516const _hoisted_8 = { 8517 key: 0, 8518 class: "guideBadge" 8519} 8520const _hoisted_9 = { class: "contentQueueExcerpt" } 8521const _hoisted_10 = { class: "guideActions row" } 8522const _hoisted_11 = ["onClick"] 8523 8524return function render(_ctx, _cache) { 8525 with (_ctx) { 8526 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 8527 8528 const _component_PublicFrame = _resolveComponent("PublicFrame") 8529 8530 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©" }, { 8531 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_cache[0] || (_cache[0] = _createElementVNode("span", { class: "ico" }, "ðï¸", -1)), _cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("b", null, "Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©"), _createElementVNode("small", null, "تع٠Ù٠ات Ø³ÙØ§Ø±Ø§Øª ÙÙÙØµÙÙØ§Øª ÙØ¬Ùات Ø±Ø³Ù ÙØ© Ù ÙØ«ÙÙØ©Ø ØØ³Ø¨ دÙÙØ© Ø§ÙØ¹Ø¶Ù.")], -1)), unread 8532 ? (_openBlock(), _createElementBlock("span", _hoisted_3, _toDisplayString(unread), 1)) 8533 : _createCommentVNode("", true)])]), _createElementVNode("section", _hoisted_4, [(!items.length&&!store.state.busy) 8534 ? (_openBlock(), _createElementBlock("div", _hoisted_5, _cache[2] || (_cache[2] = [_createElementVNode("b", null, "ÙØ§ ØªÙØ¬Ø¯ تع٠Ù٠ات Ù ÙØ´Ùرة ØØ§ÙÙØ§Ù.", -1), _createElementVNode("p", { class: "hint" }, "Ø³ÙØ¸Ùر ÙÙØ§ أ٠تع٠ÙÙ Ø¬Ø¯ÙØ¯ ٠٠اÙ٠صادر Ø§ÙØ±Ø³Ù ÙØ© اÙÙ ÙØ«ÙÙØ© اÙ٠رتبطة بدÙÙØªÙ.", -1)]))) 8535 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (a) => { 8536 return (_openBlock(), _createElementBlock("article", { 8537 class: "card guideItemCard contentQueueCard officialCircularItem", 8538 key: a.id 8539 }, [_createElementVNode("button", { 8540 type: "button", 8541 class: "guideCardOpen", 8542 onClick: $event => (openDetail(a)) 8543 }, [_cache[4] || (_cache[4] = _createElementVNode("span", { 8544 class: "guideItemImg icon", 8545 "aria-hidden": "true" 8546 }, "ð", -1)), _createElementVNode("span", null, [ 8547 _createElementVNode("span", _hoisted_7, [(a.unread_by_me) 8548 ? (_openBlock(), _createElementBlock("em", _hoisted_8, "Ø¬Ø¯ÙØ¯")) 8549 : _createCommentVNode("", true), _createElementVNode("small", null, _toDisplayString(shortDate(a.source_published_at || a.created_at)), 1)]), 8550 _createElementVNode("h3", null, _toDisplayString(a.title), 1), 8551 _createElementVNode("p", _hoisted_9, _toDisplayString(compactContentExcerpt(a.body,170)||'اضغط ÙØ¹Ø±Ø¶ Ø§ÙØªØ¹Ù ÙÙ .'), 1), 8552 _createElementVNode("small", null, [_createTextVNode(_toDisplayString(a.country_name_ar || a.country_code || ''), 1), (officialSourceName(a)) 8553 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(officialSourceName(a)), 1)], 64)) 8554 : _createCommentVNode("", true), (isVerifiedAnnouncement(a)) 8555 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_cache[3] || (_cache[3] = _createTextVNode(" · ")), _createElementVNode("b", null, _toDisplayString(verificationLabel(a)), 1)], 64)) 8556 : _createCommentVNode("", true)]) 8557 ])], 8, _hoisted_6), _createElementVNode("div", _hoisted_10, [_createElementVNode("button", { 8558 class: "smallbtn secondary", 8559 onClick: $event => (openDetail(a)) 8560 }, "ÙØªØ Ø§ÙØªØ¹Ù ÙÙ ", 8, _hoisted_11)])])) 8561 }), 128))])]), 8562 _: 1 8563 })) 8564 } 8565} 8566})() 8567 }; 8568 8569 const PublicAnnouncementsPage={ 8570 components:{PublicFrame}, 8571 setup(){const store=useGzcStore();const router=useRouter();const general=computed(()=>safeArray(store.state.announcements).filter(a=>a.source_type!=='official'&&a.channel!=='embassy'&&a.channel!=='consulate'&&((a.content_engine||'announcement')==='announcement')));function openDetail(a){if(a&&a.id)router.push('/announcements/'+encodeURIComponent(a.id));}onMounted(async()=>
8571{if(await store.requirePublicAccess(router,'/announcements')){const r=await api('/api/announcements?engine=announcement');store.state.announcements=safeArray(r.announcements);store.state.announcementUnread=Number(r.unread_count||0);store.state.officialAnnouncementUnread=0;setTimeout(()=>store.markAnnouncementsRead('announcement'),600);}});return {store,general,shortDate,isVerifiedAnnouncement,verificationLabel,compactContentExcerpt,openDetail};}, 8572 render:(function(){ 8573const _Vue = Vue 8574const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 8575 8576const _hoisted_1 = { class: "guideList contentQueueList" } 8577const _hoisted_2 = { 8578 key: 0, 8579 class: "card emptyCard" 8580} 8581const _hoisted_3 = ["onClick"] 8582const _hoisted_4 = { class: "guideCardTop" } 8583const _hoisted_5 = { 8584 key: 0, 8585 class: "guideBadge" 8586} 8587const _hoisted_6 = { class: "contentQueueExcerpt" } 8588const _hoisted_7 = { key: 0 } 8589const _hoisted_8 = { class: "guideActions row" } 8590const _hoisted_9 = ["onClick"] 8591 8592return function render(_ctx, _cache) { 8593 with (_ctx) { 8594 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 8595 8596 const _component_PublicFrame = _resolveComponent("PublicFrame") 8597 8598 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª" }, { 8599 default: _withCtx(() => [_cache[1] || (_cache[1] = _createElementVNode("h3", { class: "sectionLabel" }, "Ø¥Ø¹ÙØ§Ùات اÙÙ ÙØµØ©", -1)), _createElementVNode("section", _hoisted_1, [(!general.length && !store.state.busy) 8600 ? (_openBlock(), _createElementBlock("div", _hoisted_2, "ÙØ§ ØªÙØ¬Ø¯ Ø¥Ø¹ÙØ§Ùات ØØ§ÙÙØ§Ù.")) 8601 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(general, (a) => { 8602 return (_openBlock(), _createElementBlock("article", { 8603 class: "card guideItemCard contentQueueCard announcementQueueCard", 8604 key: a.id 8605 }, [_createElementVNode("button", { 8606 type: "button", 8607 class: "guideCardOpen", 8608 onClick: $event => (openDetail(a)) 8609 }, [_cache[0] || (_cache[0] = _createElementVNode("span", { 8610 class: "guideItemImg icon", 8611 "aria-hidden": "true" 8612 }, "ð¢", -1)), _createElementVNode("span", null, [ 8613 _createElementVNode("span", _hoisted_4, [(a.unread_by_me) 8614 ? (_openBlock(), _createElementBlock("em", _hoisted_5, "Ø¬Ø¯ÙØ¯")) 8615 : _createCommentVNode("", true), _createElementVNode("small", null, _toDisplayString(shortDate(a.created_at)), 1)]), 8616 _createElementVNode("h3", null, _toDisplayString(a.title), 1), 8617 _createElementVNode("p", _hoisted_6, _toDisplayString(compactContentExcerpt(a.body,170)||'اضغط ÙØ¹Ø±Ø¶ Ø§ÙØ¥Ø¹ÙاÙ.'), 1), 8618 _createElementVNode("small", null, [(isVerifiedAnnouncement(a)) 8619 ? (_openBlock(), _createElementBlock("b", _hoisted_7, _toDisplayString(verificationLabel(a)), 1)) 8620 : _createCommentVNode("", true), (a.expires_at) 8621 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createTextVNode(" · ÙÙØªÙÙ " + _toDisplayString(String(a.expires_at).slice(0,10)), 1)], 64)) 8622 : _createCommentVNode("", true)]) 8623 ])], 8, _hoisted_3), _createElementVNode("div", _hoisted_8, [_createElementVNode("button", { 8624 class: "smallbtn secondary", 8625 onClick: $event => (openDetail(a)) 8626 }, "ÙØªØ Ø§ÙØ¥Ø¹ÙاÙ", 8, _hoisted_9)])])) 8627 }), 128))])]), 8628 _: 1, 8629 __: [1] 8630 })) 8631 } 8632} 8633})() 8634 }; 8635 8636 const AnnouncementDetailPage={ 8637 components:{PublicFrame}, 8638 setup(){ 8639 const store=useGzcStore();const router=useRouter();const route=useRoute(); 8640 const item=ref(null);const loading=ref(true);const error=ref(''); 8641 const circular=computed(()=>String(route.path||'').indexOf('/circulars/')===0); 8642 const channel=computed(()=>circular.value?(String(route.params.channel||'embassy')==='consulate'?'consulate':'embassy'):''); 8643 const pageTitle=computed(()=>circular.value?(channel.value==='embassy'?'تع٠ÙÙ Ø§ÙØ³Ùارة':'تع٠Ù٠اÙÙÙØµÙÙØ©'):'ØªÙØ§ØµÙÙ Ø§ÙØ¥Ø¹ÙاÙ');
8644 function backPath(){return circular.value?'/circulars/'+channel.value:'/announcements';} 8645 function safeHttpUrl(url){return safeExternalHttpUrl(url);} 8646 function publicVerificationNote(x){let note=String((x&&x.verification_note)||'').trim();if(!note)return 'اÙÙ ØØªÙÙ Ù Ø¹Ø±ÙØ¶ Ù٠ا ÙÙØ´Ø± Ù٠اÙÙ ÙØµØ©.';note=note.replace(/^Ù Ø³ÙØ¯Ø© AI ت٠ت Ù Ø±Ø§Ø¬Ø¹ØªÙØ§ ÙØ§Ø¹ØªÙ Ø§Ø¯ÙØ§ Ø¨Ø´Ø±ÙØ§Ù\.\s*/,'');note=note.replace('دÙÙ٠اÙ٠صدر: Ø§ÙØµÙرة Ø§ÙØ£ØµÙÙØ© اÙ٠رÙÙØ¹Ø©','دÙÙ٠اÙ٠صدر: Ø§ÙØµÙرة Ø§ÙØ£ØµÙÙØ© ٠٠اÙ٠صدر');note=note.replace('دÙÙ٠اÙ٠صدر: Ù ÙÙ PDF Ø§ÙØ£ØµÙ٠اÙ٠رÙÙØ¹','دÙÙ٠اÙ٠صدر: اÙÙ Ø³ØªÙØ¯ Ø§ÙØ£ØµÙ٠٠٠اÙ٠صدر');return note||'اÙÙ ØØªÙÙ Ù Ø¹Ø±ÙØ¶ Ù٠ا ÙÙØ´Ø± Ù٠اÙÙ ÙØµØ©.';} 8647 function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener,noreferrer');} 8648 async function shareItem(){const x=item.value;if(!x)return;return shareDetailContent({title:x.title||pageTitle.value,text:[x.title,x.body].filter(Boolean).join(' â '),url:window.location.href});} 8649 async function load(){loading.value=true;error.value='';item.value=null;const next=String(route.fullPath||backPath());const allowed=circular.value?await store.requireMember(router,next):await store.requirePublicAccess(router,next);if(!allowed){loading.value=false;return;}const qs=new URLSearchParams({engine:circular.value?'circular':'announcement'});if(channel.value)qs.set('channel',channel.value);const r=await api('/api/announcements/'+encodeURIComponent(route.params.id)+'?'+qs.toString());if(r&&r.ok)item.value=r.announcement;else error.value=(r&&(r.message||r.error))||'تعذر تØÙ Ù٠اÙÙ ØØªÙÙ';loading.value=false;} 8650 onMounted(load);watch(()=>route.fullPath,load); 8651 return{store,item,loading,error,circular,channel,pageTitle,backPath,safeHttpUrl,publicVerificationNote,openAttachment,shareItem,shortDate,mediaSrc,isVideo,isPdf,isVerifiedAnnouncement,verificationLabel,router}; 8652 }, 8653 render:(function(){ 8654const _Vue = Vue 8655const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 8656 8657const _hoisted_1 = { class: "guideDetailBack" } 8658const _hoisted_2 = ["onClick"] 8659const _hoisted_3 = { 8660 key: 0, 8661 class: "card loadingState contentDetailSkeleton", 8662 role: "status" 8663} 8664const _hoisted_4 = { 8665 key: 1, 8666 class: "card errorState", 8667 role: "alert" 8668} 8669const _hoisted_5 = ["onClick"] 8670const _hoisted_6 = { class: "card guideDetailPageCard contentDetailPage announcementDetailPage" } 8671const _hoisted_7 = { class: "guideDetailHeroBody" } 8672const _hoisted_8 = { class: "notifyMeta" } 8673const _hoisted_9 = { key: 0 } 8674const _hoisted_10 = { 8675 key: 0, 8676 class: "verifyStamp ok" 8677} 8678const _hoisted_11 = { class: "guideDetailDescription announcementBody" } 8679const _hoisted_12 = { class: "guideDetailPrimaryGrid" } 8680const _hoisted_13 = ["href"] 8681const _hoisted_14 = ["onClick"] 8682const _hoisted_15 = { 8683 key: 0, 8684 class: "card guideDetailSection" 8685} 8686const _hoisted_16 = { class: "guideDetailSectionHead" } 8687const _hoisted_17 = { class: "announcementMediaGrid" } 8688const _hoisted_18 = ["onClick"] 8689const _hoisted_19 = ["src"] 8690const _hoisted_20 = ["src"] 8691const _hoisted_21 = { 8692 key: 2, 8693 class: "announcementPdfTile" 8694} 8695const _hoisted_22 = { class: "card guideDetailSection guideVerificationCard" } 8696const _hoisted_23 = { class: "guideDetailSectionHead" } 8697 8698return function render(_ctx, _cache) { 8699 with (_ctx) { 8700 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 8701 8702 const _component_PublicFrame = _resolveComponent("PublicFrame") 8703 8704 return (_openBlock(), _createBlock(_component_PublicFrame, { title: pageTitle }, { 8705 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_createElementVNode("button", { 8706 type: "button", 8707 class: "smallbtn secondary", 8708 onClick: $event => (router.push(backPath())) 8709 }, "â Ø±Ø¬Ùع", 8, _hoisted_2)]), loading 8710 ? (_openBlock(), _createElementBlock("section", _hoisted_3, _cache[0] || (_cache[0] = [_createElementVNode("span", { class: "loadingSpinner" }, null, -1), _createElementVNode("h3", null, "جار٠تØÙ Ù٠اÙÙ ØØªÙÙ...", -1)]))) 8711 : error 8712 ? (_openBlock(), _createElementBlock("section", _hoisted_4, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "تعذر ÙØªØ اÙÙ ØØªÙÙ", -1)), _createElementVNode("p", null, _toDisplayString(error), 1), _createElementVNode("button", { 8713 class: "btn secondary", 8714 onClick: $event => (router.push(backPath())) 8715 }
8715, "Ø§ÙØ¹Ùدة", 8, _hoisted_5)])) 8716 : item 8717 ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [_createElementVNode("article", _hoisted_6, [_createElementVNode("div", _hoisted_7, [ 8718 _createElementVNode("div", _hoisted_8, [_createElementVNode("span", null, _toDisplayString(shortDate(item.created_at)), 1), (item.expires_at) 8719 ? (_openBlock(), _createElementBlock("span", _hoisted_9, "ÙÙØªÙÙ " + _toDisplayString(String(item.expires_at).slice(0,10)), 1)) 8720 : _createCommentVNode("", true)]), 8721 (isVerifiedAnnouncement(item)) 8722 ? (_openBlock(), _createElementBlock("div", _hoisted_10, _toDisplayString(verificationLabel(item)), 1)) 8723 : _createCommentVNode("", true), 8724 _createElementVNode("h2", null, _toDisplayString(item.title), 1), 8725 _createElementVNode("p", _hoisted_11, _toDisplayString(item.body), 1), 8726 _createElementVNode("div", _hoisted_12, [(safeHttpUrl(item.action_url)) 8727 ? (_openBlock(), _createElementBlock("a", { 8728 key: 0, 8729 class: "btn guideMapPrimary", 8730 href: safeHttpUrl(item.action_url), 8731 target: "_blank", 8732 rel: "noopener noreferrer" 8733 }, "ÙØªØ Ø§ÙØ±Ø§Ø¨Ø· â", 8, _hoisted_13)) 8734 : _createCommentVNode("", true), _createElementVNode("button", { 8735 class: "btn secondary", 8736 onClick: shareItem 8737 }, "Ù Ø´Ø§Ø±ÙØ©", 8, _hoisted_14)]) 8738 ])]), (item.media&&item.media.length) 8739 ? (_openBlock(), _createElementBlock("section", _hoisted_15, [_
8739createElementVNode("div", _hoisted_16, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "ð", -1)), _createElementVNode("div", null, [_cache[2] || (_cache[2] = _createElementVNode("h3", null, "اÙ٠رÙÙØ§Øª", -1)), _createElementVNode("small", null, _toDisplayString(item.media.length) + " Ù ÙÙ", 1)])]), _createElementVNode("div", _hoisted_17, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.media, (m) => { 8740 return (_openBlock(), _createElementBlock("button", { 8741 key: m.id, 8742 class: "announcementMediaItem", 8743 onClick: $event => (openAttachment(m)) 8744 }, [(!isVideo(m) && !isPdf(m)) 8745 ? (_openBlock(), _createElementBlock("img", { 8746 key: 0, 8747 src: mediaSrc(m), 8748 loading: "lazy", 8749 alt: "" 8750 }, null, 8, _hoisted_19)) 8751 : (isVideo(m)) 8752 ? (_openBlock(), _createElementBlock("video", { 8753 key: 1, 8754 src: m.file_url, 8755 controls: "", 8756 preload: "metadata" 8757 }, null, 8, _hoisted_20)) 8758 : (_openBlock(), _createElementBlock("span", _hoisted_21, "PDF")), _createElementVNode("span", null, _toDisplayString(isPdf(m)?'PDF':(isVideo(m)?'ÙÙØ¯ÙÙ':'ØµÙØ±Ø©')), 1)], 8, _hoisted_18)) 8759 }), 128))])])) 8760 : _createCommentVNode("", true), _createElementVNode("section", _hoisted_22, [_createElementVNode("div", _hoisted_23, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "â", -1)), _createElementVNode("div", null, [_cache[4] || (_cache[4] = _createElementVNode("h3", null, "Ø¨ÙØ§Ùات اÙÙØ´Ø±", -1)), _createElementVNode("small", null, _toDisplayString(item.source_name_ar||item.source_name_en||'إدارة اÙÙ ÙØµØ©'), 1)])]), _createElementVNode("p", null, _toDisplayString(publicVerificationNote(item)), 1)])], 64)) 8761 : _createCommentVNode("", true)]), 8762 _: 1 8763 }, 8, ["title"])) 8764 } 8765} 8766})() 8767 }; 8768 8769 const PublicEventsPage={ 8770 components:{PublicFrame}, 8771 setup(){ 8772 const store=useGzcStore();const router=useRouter(); 8773 const loading=ref(true);const loaded=ref(false);const loadError=ref(''); 8774 const memberAccess=computed(()=>!!(store.state.me&&store.state.me.authenticated&&(store.state.me.member||store.state.me.official))); 8775 async function load(){ 8776 loading.value=true;loadError.value=''; 8777 await store.loadMe(); 8778 if(memberAccess.value){ 8779 const [events,upcoming]=await Promise.all([api('/api/events'),api('/api/events/upcoming')]); 8780 if(events.ok&&upcoming.ok){store.state.events=safeArray(events.events);store.state.upcomingEvents=safeArray(upcoming.events);} 8781 else loadError.value='تعذر تØÙ ÙÙ ÙØ¹Ø§ÙÙØ§Øª Ø§ÙØ¹Ø¶ÙÙØ© Ø§ÙØ¢Ù.'; 8782 }else{ 8783 const r=await api('/api/public/events'); 8784 if(r.ok){store.state.events=safeArray(r.events);store.state.upcomingEvents=store.state.events.filter(e=>e.status==='published'&&String(e.event_date||'')>=new Date().toISOString().slice(0,10)).slice(0,8);} 8785 else loadError.value='تعذر تØÙ Ù٠اÙÙØ¹Ø§ÙÙØ§Øª Ø§ÙØ¹Ø§Ù Ø© Ø§ÙØ¢Ù.'; 8786 } 8787 loaded.value=true;loading.value=false; 8788 } 8789 function previewMedia(){return [];} 8790 function previewPhotos(){return [];} 8791 function previewVideos(){return [];} 8792 function eventShareUrl(e){return ((window&&window.location&&window.location.origin)||'')+'/events/'+e.id;} 8793 function shareWhatsapp(e){ 8794 const lines=['ÙØ¹Ø§ÙÙØ© Ù Ù Ù ÙØµØ© SMT China',e.title||'ÙØ¹Ø§ÙÙØ©',e.event_date||'',e.event_time||'',e.location||e.address||'',eventShareUrl(e)].filter(Boolean); 8795 window.open('https://wa.me/?text='+encodeURIComponent(lines.join('\n')),'_blank'); 8796 } 8797 onMounted(load); 8798 return {store,loading,loaded,loadError,memberAccess,load,previewMedia,previewPhotos,previewVideos,shareWhatsapp,eventCategoryName,isVideo,mediaSrc}; 8799 }, 8800 render:(function(){ 8801const _Vue = Vue
8802const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 8803 8804const _hoisted_1 = { 8805 key: 0, 8806 class: "card loadingState", 8807 role: "status" 8808} 8809const _hoisted_2 = { 8810 key: 1, 8811 class: "card errorState", 8812 role: "alert" 8813} 8814const _hoisted_3 = ["onClick"] 8815const _hoisted_4 = { 8816 key: 2, 8817 class: "card upcomingEventsCard" 8818} 8819const _hoisted_5 = { class: "memberCardTop" } 8820const _hoisted_6 = { class: "hint" } 8821const _hoisted_7 = { class: "upcomingEventList" } 8822const _hoisted_8 = ["onClick"] 8823const _hoisted_9 = { 8824 key: 3, 8825 class: "card emptyCard" 8826} 8827const _hoisted_10 = { 8828 key: 0, 8829 class: "hint" 8830} 8831const _hoisted_11 = ["onClick"] 8832const _hoisted_12 = ["src"] 8833const _hoisted_13 = { class: "memberCardTop" } 8834const _hoisted_14 = { class: "statusPill" } 8835const _hoisted_15 = { class: "hint" } 8836const _hoisted_16 = { class: "eventQuickMeta" } 8837const _hoisted_17 = { class: "metaRow" } 8838const _hoisted_18 = { class: "metaRow" } 8839const _hoisted_19 = { class: "metaRow" } 8840const _hoisted_20 = { 8841 key: 1, 8842 class: "miniStats mediaMini" 8843} 8844const _hoisted_21 = { 8845 key: 2, 8846 class: "hint" 8847} 8848const _hoisted_22 = { 8849 key: 3, 8850 class: "membersOnlyNotice" 8851} 8852const _hoisted_23 = { class: "row" } 8853const _hoisted_24 = ["onClick"] 8854const _hoisted_25 = ["onClick"] 8855const _hoisted_26 = ["href"] 8856 8857return function render(_ctx, _cache) { 8858 with (_ctx) { 8859 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 8860 8861 const _component_PublicFrame = _resolveComponent("PublicFrame") 8862 8863 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "اÙÙØ¹Ø§ÙÙØ§Øª" }, { 8864 default: _withCtx(() => [ 8865 (loading && !loaded) 8866 ? (_openBlock(), _createElementBlock("section", _hoisted_1, _c
8866ache[0] || (_cache[0] = [_createElementVNode("span", { 8867 class: "loadingSpinner", 8868 "aria-hidden": "true" 8869 }, null, -1), _createElementVNode("h3", null, "جار٠تØÙ Ù٠اÙÙØ¹Ø§ÙÙØ§Øª...", -1)]))) 8870 : loadError 8871 ? (_openBlock(), _createElementBlock("section", _hoisted_2, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "تعذر تØÙ Ù٠اÙÙØ¹Ø§ÙÙØ§Øª", -1)), _createElementVNode("p", null, _toDisplayString(loadError), 1), _createElementVNode("button", { 8872 class: "btn secondary", 8873 onClick: load 8874 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_3)])) 8875 : _createCommentVNode("", true), 8876 (store.state.upcomingEvents && store.state.upcomingEvents.length) 8877 ? (_openBlock(), _createElementBlock("section", _hoisted_4, [_createElementVNode("div", _hoisted_5, [_createElementVNode("div", null, [_cache[2] || (_cache[2] = _createElementVNode("span", { class: "vueBadge" }, "ÙØ¹Ø§ÙÙØ§Øª ÙØ§Ø¯Ù Ø©", -1)), _cache[3] || (_cache[3] = _createElementVNode("h3", null, "ÙØ§ تÙÙÙØª اÙÙØ¹Ø§ÙÙØ© اÙÙØ§Ø¯Ù Ø©", -1)), _createElementVNode("p", _hoisted_6, _toDisplayString(memberAccess?'ÙØ¹Ø§ÙÙØ§Øª Ø§ÙØ¹Ø¶ÙÙØ© ØØ³Ø¨ ÙØ·Ø§Ù جاÙÙØªÙØ Ù Ø¹ Ø§ÙØªØ°ÙÙØ± عبر ÙØ§ØªØ³Ø§Ø¨ Ø¹ÙØ¯ ØªÙØ¹ÙÙÙ.':'ÙØ¹Ø§ÙÙØ§Øª عا٠ة اختارت Ø§ÙØ¥Ø¯Ø§Ø±Ø© ÙØ´Ø± ٠عÙÙÙ Ø§ØªÙØ§ ÙÙØ²Ùار.'), 1)]), _cache[4] || (_cache[4] = _createElementVNode("span", null, "ðï¸", -1))]), _createElementVNode("div", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.upcomingEvents, (u) => { 8878 return (_openBlock(), _createElementBlock("button", { 8879 key: 'u'+u.id, 8880 onClick: $event => ($router.push('/events/'+u.id)) 8881 }, [_createElementVNode("b", null, _toDisplayString(u.title), 1), _createElementVNode("small", null, _toDisplayString(u.event_date || '-') + " " + _toDisplayString(u.event_time || '') + " · " + _toDisplayString(u.location || u.address_cn || '-'), 1)], 8, _hoisted_8)) 8882 }), 128))])])) 8883 : _createCommentVNode("", true), 8884 (loaded && !loading && !loadError && !store.state.events.length) 8885 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [_cache[5] || (_cache[5] = _createElementVNode("h3", null, "ÙØ§ ØªÙØ¬Ø¯ ÙØ¹Ø§ÙÙØ§Øª عا٠ة ØØ§ÙÙØ§Ù", -1)), (!memberAccess) 8886 ? (_openBlock(), _createElementBlock("p", _hoisted_10, "ÙÙ ÙÙ٠تسجÙÙ Ø§ÙØ¯Ø®ÙÙ ÙØ¹Ø±Ø¶ ÙØ¹Ø§ÙÙØ§Øª Ø§ÙØ¹Ø¶ÙÙØ©Ø Ø£Ù Ø§ÙØ¹Ùدة ÙØ§ØÙØ§Ù Ø¹ÙØ¯ ÙØ´Ø± ÙØ¹Ø§ÙÙØ© عا٠ة.")) 8887 : _createCommentVNode("", true), (!memberAccess) 8888 ? (_openBlock(), _createElementBlock("button", { 8889 key: 1, 8890 class: "btn secondary", 8891 onClick: $event => ($router.push({path:'/login',query:{next:'/events'}})) 8892 }, "دخÙÙ Ø§ÙØ¹Ø¶ÙÙØ©", 8, _hoisted_11)) 8893 : _createCommentVNode("", true)])) 8894 : _createCommentVNode("", true), 8895 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.events, (e) => { 8896 return (_openBlock(), _createElementBlock("div", { 8897 class: "card eventLite eventLiteExpanded", 8898 key: e.id 8899 }, [ 8900 (e.cover_url) 8901 ? (_openBlock(), _createElementBlock("img", { 8902 key: 0, 8903 class: "eventCover", 8904 src: e.cover_url, 8905 loading: "lazy", 8906 alt: "ØºÙØ§Ù اÙÙØ¹Ø§ÙÙØ©" 8907 }, null, 8, _hoisted_12)) 8908 : _createCommentVNode("", true), 8909 _createElementVNode("div", _hoisted_13, [_createElementVNode("h3", null, _toDisplayString(e.title || 'ÙØ¹Ø§ÙÙØ©'), 1), _createElementVNode("span", _hoisted_14, _toDisplayString(eventCategoryName(e.category)), 1)]), 8910 _createElementVNode("p", _hoisted_15, _toDisplayString(e.description || 'Ø£ÙØ¨Ù٠اÙÙØ¹Ø§ÙÙØ© ÙØ¸Ùر ٠باشرة ÙÙØ£Ø¹Ø¶Ø§Ø¡ بدÙÙ Ø§ÙØØ§Ø¬Ø© ÙÙØªØÙ ÙÙ ØµÙØØ© Ù ÙÙØµÙØ©.'), 1), 8911 _createElementVNode("div", _hoisted_16, [_createElementVNode("div", _hoisted_17, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "Ø§ÙØªØ§Ø±ÙØ®", -1)), _createElementVNode("span", null, _toDisplayString(e.event_date || '-'), 1)]), _createElementVNode("div", _hoisted_18, [_cache[7] || (_cache[7] = _
8911createElementVNode("b", null, "اÙÙÙØª", -1)), _createElementVNode("span", null, _toDisplayString(e.event_time || '-'), 1)]), _createElementVNode("div", _hoisted_19, [_cache[8] || (_cache[8] = _createElementVNode("b", null, "اÙÙ ÙÙØ¹", -1)), _createElementVNode("span", null, _toDisplayString(e.location || e.address || '-'), 1)])]), 8912 memberAccess 8913 ? (_openBlock(), _createElementBlock("div", _hoisted_20, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.photo_count||0), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "ØµÙØ±", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.video_count||0), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "ÙÙØ¯ÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.media_count||0), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "ÙØ³Ø§Ø¦Ø·", -1))])])) 8914 : _createCommentVNode("", true), 8915 (memberAccess && e.has_album) 8916 ? (_openBlock(), _createElementBlock("p", _hoisted_21, "Ø§ÙØ£ÙبÙÙ Ù ØªØ§Ø Ø¯Ø§Ø®Ù ØµÙØØ© اÙÙØ¹Ø§ÙÙØ© ØØªÙ ÙØ§ ÙØªÙ تØÙ ÙÙ ÙØ³Ø§Ø¦Ø· Ø¬Ù ÙØ¹ اÙÙØ¹Ø§ÙÙØ§Øª Ø¯ÙØ¹Ø© ÙØ§ØØ¯Ø©.")) 8917 : (!memberAccess) 8918 ? (_openBlock(), _createElementBlock("div", _hoisted_22, "Ø§ÙØ£ÙبÙÙ ÙØ§ÙØªÙØ§ØµÙÙ Ø§ÙØ¯Ø§Ø®ÙÙØ© Ù ØÙ ÙØ© ÙØªØ¸Ùر بعد دخÙÙ Ø§ÙØ¹Ø¶ÙÙØ©.")) 8919 : _createCommentVNode("", true), 8920 _createElementVNode("div", _hoisted_23, [_createElementVNode("button", { 8921 class: "btn secondary", 8922 onClick: $event => (shareWhatsapp(e)) 8923 }, "Ù Ø´Ø§Ø±ÙØ© عÙÙ ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_24), _createElementVNode("button", { 8924 class: "btn secondary", 8925 onClick: $event => ($router.push('/events/'+e.id)) 8926 }, "عرض Ù ÙÙØµÙ", 8, _hoisted_25), (e.amap_url) 8927 ? (_openBlock(), _createElementBlock("a", { 8928 key: 0, 8929 class: "btn secondary", 8930 href: e.amap_url, 8931 target: "_blank" 8932 }, "ÙØªØ اÙÙ ÙÙØ¹", 8, _hoisted_26)) 8933 : _createCommentVNode("", true)]) 8934 ])) 8935 }), 128)) 8936 ]), 8937 _: 1 8938 })) 8939 } 8940} 8941})() 8942 }; 8943 8944 const CompleteProfilePage={ 8945 components:{PublicFrame}, 8946 setup(){ 8947 const store=useGzcStore();const router=useRouter(); 8948 const f=reactive({full_name:'',gender:'',china_phone:'',whatsapp:'',wechat:'',category:'',country_code:'',china_city:'',china_district:'',profession:'',workplace:'',university:'',family_count:1}); 8949 const tourOpen=ref(false); const tourStep=ref(0); const nameTouched=ref(false); 8950 const locked=computed(()=>{const m=store.state.me&&store.state.me.member;return m&&(m.profile_locked||m.profile_completed_at||['pending','approved','suspended'].includes(String(m.status||'')));}); 8951 const nameWords=computed(()=>arabicNameWords(f.full_name).length); 8952 const nameValid=computed(()=>isArabicTripleName(f.full_name)); 8953 const completionTips=[ 8954 'Ø§ÙØªØ¨ Ø§ÙØ§Ø³Ù Ø«ÙØ§Ø«Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù ÙÙØ·Ø ٠ثاÙ: Ù ØÙ د Ø£ØÙ د عÙÙ.', 8955 'اختر دÙÙØªÙ ث٠٠دÙÙØ© Ø¥ÙØ§Ù ت٠ÙÙ Ø§ÙØµÙÙ ÙØ§ÙØÙ ٠٠اÙÙÙØ§Ø¦Ù .', 8956 'رÙÙ ÙØ§ØªØ³Ø§Ø¨ اÙÙ ÙØ«Ù عبر OTP Ù٠رÙ٠دخÙÙÙ ÙØªØµÙ عÙÙÙ Ø§ÙØªÙبÙÙØ§Øª.', 8957 'عدد Ø§ÙØ£Ø³Ø±Ø© ÙØ¹Ù٠اÙÙ ÙØ¬ÙدÙ٠٠ع٠ÙÙ Ø§ÙØµÙÙ ÙÙØ·.' 8958 ]; 8959 const usageTips=[ 8960 {icon:'ðªª',title:'Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©',body:'بعد اعت٠اد Ø§ÙØ¹Ø¶ÙÙØ© ØªØ¸ÙØ± Ø§ÙØ¨Ø·Ø§ÙØ© Ø¯Ø§Ø®Ù ØØ³Ø§Ø¨ÙØ ÙÙÙ ÙÙ ØÙØ¸ÙØ§ Ù٠اÙÙØ§ØªÙ ٠ع ر٠ز Ø§ÙØ§Ø³ØªØ¬Ø§Ø¨Ø© Ø§ÙØ³Ø±Ùعة.'}, 8961 {icon:'ð£',title:'Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª',body:'تابع Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ© ÙØ§ÙÙØ¹Ø§ÙÙØ§Øª ÙØ§ÙØªØØ¯Ùثات اÙÙ ÙÙ Ø© ٠٠داخ٠اÙÙ ÙØµØ©.'}, 8962 {icon:'ð§',title:'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ',body:'Ø§Ø³ØªØ®Ø¯Ù Ø§ÙØ¯ÙÙÙ ÙÙÙØµÙÙ ÙÙØ£Ø³ÙØ§ÙØ اÙ٠ستشÙÙØ§ØªØ Ø§ÙØ®Ø¯Ù Ø§ØªØ ÙØ§Ù٠عÙÙ٠ات اÙÙ ÙÙØ¯Ø©.'}, 8963 {icon:'ð',title:'اÙ٠ساعدة ÙØ§ÙØ·ÙØ§Ø±Ø¦',body:'إذا Ø§ØØªØ¬Øª Ø¥Ù٠اÙ٠ساعدة Ø£Ù ÙØ§Ø¬Ùت ØØ§ÙØ© Ø·Ø§Ø±Ø¦Ø©Ø Ø£Ø±Ø³Ù Ø·ÙØ¨Ø§Ù عبر اÙÙ ÙØµØ© ÙÙØµÙ Ø¥ÙÙ Ø§ÙØ¬ÙØ© اÙ٠ختصة.'} 8964 ]; 8965 const tourSteps=[ 8966 {title:'Ù Ø±ØØ¨Ø§Ù ب٠ÙÙ Ù ÙØµØ© SMT China',body:'ÙØ³Ø§Ø¹Ø¯Ù Ø§ÙØªØ³Ø¬Ù٠عÙÙ Ø§ÙØ§Ø³ØªÙادة Ù Ù Ø§ÙØ¹Ø¶ÙÙØ© ÙØ§Ùخد٠ات ÙØ§ÙØªÙØ§ØµÙ. Ø£Ø¯Ø®Ù Ø¨ÙØ§ÙØ§ØªÙ Ø¨Ø¯ÙØ©Ø Ø«Ù Ø±Ø§Ø¬Ø¹ÙØ§ ÙØ¨Ù Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨ Ø§ÙØ¹Ø¶ÙÙØ© ÙÙØ¥Ø¯Ø§Ø±Ø©.',points:['ØªÙØ³ØªØ®Ø¯Ù Ø¨ÙØ§ÙØ§ØªÙ ÙØªÙظÙ٠خد٠ات اÙÙ ÙØµØ© ÙÙØ·.','ÙÙ ÙÙ٠استخدا٠اÙÙ ÙØµØ© Ù Ù ÙØ§ØªÙÙ.','بعد اعت٠اد Ø§ÙØ¹Ø¶ÙÙØ© Ø³ØªØ¸ÙØ± Ø¨Ø·Ø§ÙØªÙ ÙØ±Ù ز QR.']}, 8967 {title:'Ø§ÙØ§Ø³Ù ٠٠أÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª',body:'Ø§ÙØªØ¨ Ø§Ø³Ù Ù Ø§ÙØ«Ùاث٠باÙÙØºØ© Ø§ÙØ¹Ø±Ø¨ÙØ©. Ø³ÙØ¸Ùر Ø§ÙØ§Ø³Ù ÙÙ Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© ÙØ³Ø¬Ùات Ø§ÙØ¥Ø¯Ø§Ø±Ø©Ø ÙØ°Ø§ Ø§ÙØªØ¨Ù Ø¨ÙØ¶ÙØ ÙØ¨Ø§ÙØµÙØºØ© Ø§ÙØ±Ø³Ù ÙØ©.',example:'٠ثاÙ: Ù ØÙ د Ø£ØÙ د عÙÙ',points:['Ø§Ø³ØªØ®Ø¯Ù Ø§Ø³Ù Ù Ø§ÙØÙÙÙÙ.','Ø§ÙØªØ¨ Ø§ÙØ§Ø³Ù Ø¨Ø§ÙØ¹Ø±Ø¨ÙØ©.','ÙØ¬Ø¨ Ø£Ù ÙØªÙÙÙÙ Ø§ÙØ§Ø³Ù Ù Ù Ø«ÙØ§Ø«Ø© أجزاء.']}, 8968 {title:'اختر ٠٠اÙÙÙØ§Ø¦Ù ',body:'اختر Ø§ÙØ¯ÙÙØ© Ù٠دÙÙØ© Ø§ÙØ¥Ùا٠ة ÙØ§ÙØÙ ÙØ§ÙÙØ¦Ø© ÙØ§ÙÙ ÙÙØ© ٠٠اÙÙÙØ§Ø¦Ù Ø ÙÙØ°Ø§ ÙØ³Ø§Ø¹Ø¯ عÙÙ ØÙظ Ø¨ÙØ§ÙØ§ØªÙ Ø¨ØµÙØ±Ø© صØÙØØ©.',points:['اختر دÙÙØªÙ Ø£ÙÙØ§ÙØ Ø«Ù Ù Ø¯ÙÙØ© Ø¥ÙØ§Ù ت٠ÙÙ Ø§ÙØµÙÙ.','ØªØªØºÙØ± Ø§ÙØ£ØÙاء اÙÙ ØªØ§ØØ© Ø¨ØØ³Ø¨ اÙ٠دÙÙØ©.','إذا غÙÙØ±Øª اÙ٠دÙÙØ©Ø ÙØ§Ø®ØªØ± Ø§ÙØÙ Ù Ù Ø¬Ø¯ÙØ¯.','ÙÙ ÙÙ ÙÙØ¥Ø¯Ø§Ø±Ø© Ø¥Ø¶Ø§ÙØ© Ø£Ù Ø®ÙØ§Ø± ØºÙØ± Ù ÙØ¬Ùد.']}, 8969 {title:'Ø£Ø±ÙØ§Ù Ø§ÙØªÙاصÙ',body:'رÙÙ ÙØ§ØªØ³Ø§Ø¨ اÙÙ ÙØ«Ù عبر OTP ÙÙ ÙÙÙØ© Ø§ÙØ¯Ø®ÙÙ ÙÙØ§ ÙØªØºÙر Ù Ù ÙÙ ÙØ°Ø¬ Ø§ÙØ¥Ù٠اÙ. أض٠رÙÙ Ø§ÙØµÙÙ Ø¥Ù ÙØ¬Ø¯.',points:['تعدÙ٠رÙÙ ÙØ§ØªØ³Ø§Ø¨ ÙØªÙ عبر ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© بعد Ø§ÙØªØÙÙ.','Ù Ø«Ø§Ù Ø§ÙØµÙÙ: 8613xxxxxxxxx.','Ù Ø«Ø§Ù Ø§ÙØ³ÙداÙ: 2499xxxxxxxx.']},
8970 {title:'ÙÙ٠تستخد٠اÙÙ ÙØµØ© بعد Ø§ÙØªØ³Ø¬ÙÙØ',body:'بعد Ø§ÙØ¥Ø±Ø³Ø§Ù Ø§ÙØªØ¸Ø± اعت٠اد Ø§ÙØ¥Ø¯Ø§Ø±Ø©. Ø¨Ø¹Ø¯ÙØ§ Ø§ÙØªØ ØØ³Ø§Ø¨Ù ÙØ¹Ø±Ø¶ Ø¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©Ø ÙØªØ§Ø¨Ø¹ Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª ÙØ§ÙÙØ¹Ø§ÙÙØ§Øª ÙØ§ÙØ£ÙØ¨Ù٠ات ÙØ§Ø³ØªÙد ٠٠دÙÙÙ Ø§ÙØµÙÙ ÙØ®Ø¯Ù ات اÙ٠ساعدة.',points:['ØØ³Ø§Ø¨Ù: ÙØ¹Ø±Ø¶ Ø¨ÙØ§ÙØ§ØªÙ ÙØ¨Ø·Ø§ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©.','Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª: ÙÙØªØ¹Ù Ù٠ات اÙÙ ÙÙ Ø©.','دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ: ٠عÙÙ٠ات ÙØ®Ø¯Ù ات.','اÙ٠ساعدة ÙØ§ÙØ·ÙØ§Ø±Ø¦: ÙÙØØ§ÙØ§Øª Ø§ÙØªÙ ØªØØªØ§Ø¬ ٠تابعة.']}, 8971 {title:'راجع ÙØ¨Ù Ø§ÙØ¥Ø±Ø³Ø§Ù',body:'بعد Ø§ÙØ¶ØºØ· عÙ٠تأÙÙØ¯ ÙØ¥Ø±Ø³Ø§ÙØ Ø§ÙØ¨ÙØ§ÙØ§Øª تÙÙÙÙ ÙØªØ°Ùب ÙÙ٠راجعة. أ٠تعدÙÙ ÙØ§ØÙ ÙØªÙ عبر Ø§ÙØ¥Ø¯Ø§Ø±Ø© Ø£Ù ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©.',points:['راجع Ø§ÙØ§Ø³Ù Ø«ÙØ§Ø«Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù.','راجع اÙ٠دÙÙØ© ÙØ§ÙØÙ.','راجع رÙÙ ÙØ§ØªØ³Ø§Ø¨.','راجع عدد Ø£ÙØ±Ø§Ø¯ Ø§ÙØ£Ø³Ø±Ø©.']} 8972 ]; 8973 onMounted(async()=>{if(await store.requireMember(router,'/complete')){const m=store.state.me.member||{};Object.keys(f).forEach(k=>{if(m[k]!=null)f[k]=m[k]}); if(!Number(f.family_count||0))f.family_count=1; tourOpen.value=!m.profile_tour_seen_at&&!locked.value;}}); 8974 async function finishTour(){tourOpen.value=false;tourStep.value=0;try{await api('/api/member/profile-tour/seen',{method:'POST',body:JSON.stringify({})});await store.loadMe();}catch(e){}} 8975 function openTour(){tourStep.value=0;tourOpen.value=true;} 8976 function nextTour(){if(tourStep.value<tourSteps.length-1)tourStep.value++;else finishTour();} 8977 function prevTour(){if(tourStep.value>0)tourStep.value--;} 8978 async function submit(){ 8979 nameTouched.value=true; 8980 const family=Number(f.family_count||0); 8981 if(!nameValid.value){store.state.msg='Ø§ÙØ§Ø³Ù Ù Ø·ÙÙØ¨ Ø«ÙØ§Ø«Ù Ø¨Ø§ÙØ¹Ø±Ø¨ÙØ Ù Ø«Ø§Ù: Ù ØÙ د Ø£ØÙ د عÙÙ';return;} 8982 if(!f.country_code){store.state.msg='اختر دÙÙØªÙ ٠٠اÙÙØ§Ø¦Ù Ø©';return;} 8983 if(!f.china_city){store.state.msg='اختر ٠دÙÙØ© Ø¥ÙØ§Ù ت٠ÙÙ Ø§ÙØµÙÙ';return;} 8984 if(family<1){store.state.msg='عدد Ø£ÙØ±Ø§Ø¯ Ø§ÙØ£Ø³Ø±Ø© ÙØ¬Ø¨ Ø£Ù ÙÙÙÙ 1 عÙÙ Ø§ÙØ£ÙÙØ ÙØ£Ù Ø§ÙØ¹Ø¶Ù ÙÙØ³Ù Ù ØØ³Ùب.';return;} 8985 store.state.busy=true;store.state.msg='جار٠ØÙظ Ø§ÙØ¨ÙØ§ÙØ§Øª...'; 8986 const payload=Object.assign({},f,{full_name:String(f.full_name||'').trim(),china_phone:norm(f.china_phone),whatsapp:norm(f.whatsapp),family_count:family}); 8987 const r=await api('/api/members/complete',{method:'POST',body:JSON.stringify(payload)}); 8988 store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){await store.loadMe();router.replace('/account');} 8989 } 8990 return {store,f,locked,submit,tourOpen,tourStep,tourSteps,nextTour,prevTour,finishTour,openTour,nameTouched,nameWords,nameValid,completionTips,usageTips}; 8991 }, 8992 render:(function(){ 8993const _Vue = Vue 8994const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 8995 8996const _hoisted_1 = { 8997 key: 0, 8998 class: "tourOverlay", 8999 role: "dialog", 9000 "aria-modal": "true" 9001} 9002const _hoisted_2 = { class: "tourCard tourCardLarge" } 9003const _hoisted_3 = { class: "tourProgress" } 9004const _hoisted_4 = { class: "tourStepCount" } 9005const _hoisted_5 = { 9006 key: 0, 9007 class: "tourExample" 9008} 9009const _hoisted_6 = { 9010 key: 1, 9011 class: "tourPoints" 9012} 9013const _hoisted_7 = { class: "tourActions" } 9014const _hoisted_8 = ["onClick"] 9015const _hoisted_9 = ["onClick"] 9016const _hoisted_10 = ["onClick"] 9017const _hoisted_11 = { 9018 key: 1, 9019 class: "card" 9020} 9021const _hoisted_12 = ["onClick"] 9022const _hoisted_13 = { 9023 key: 2, 9024 class: "profileCompleteWrap" 9025} 9026const _hoisted_14 = { class: "card onboardingGuide" } 9027const _hoisted_15 = ["onClick"] 9028const _hoisted_16 = { class: "card quickTipsCard" } 9029const _hoisted_17 = { class: "card profileCompleteCard" } 9030const _hoisted_18 = { class: "fieldHelpLabel requiredField" } 9031const _hoisted_19 = ["onUpdate:modelValue", "onBlur"] 9032const _hoisted_20 = ["onUpdate:modelValue"] 9033const _hoisted_21 = ["value"] 9034const _hoisted_22 = { class: "fieldHelpLabel" } 9035const _hoisted_23 = ["onUpdate:modelValue"] 9036const _hoisted_24 = ["onUpdate:modelValue"] 9037const _hoisted_25 = ["onUpdate:modelValue"] 9038const _hoisted_26 = ["onUpdate:modelValue"] 9039const _hoisted_27 = ["value"] 9040const _hoisted_28 = { class: "fieldHelpLabel requiredField" } 9041const _hoisted_29 = ["onUpdate:modelValue"] 9042const _hoisted_30 = ["value"] 9043const _hoisted_31 = ["onUpdate:modelValue", "onChange"] 9044const _hoisted_32 = ["value"] 9045const _hoisted_33 = ["onUpdate:modelValue"] 9046const _hoisted_34 = ["value"] 9047const _hoisted_35 = ["onUpdate:modelValue"] 9048const _hoisted_36 = ["value"] 9049const _hoisted_37 = ["onUpdate:modelValue"] 9050const _hoisted_38 = ["onUpdate:modelValue"] 9051const _hoisted_39 = { class: "fieldHelpLabel" } 9052const _hoisted_40 = ["onUpdate:modelValue"] 9053const _hoisted_41 = ["onClick"] 9054const _hoisted_42 = { class: "card usageGuideCard" } 9055const _hoisted_43 = { class: "usageGrid" } 9056 9057return function render(_ctx, _cache) { 9058 with (_ctx) { 9059 const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, normalizeClass: _normalizeClass, createElementVNode: _
9059createElementVNode, toDisplayString: _toDisplayString, createCommentVNode: _createCommentVNode, vModelText: _vModelText, withDirectives: _withDirectives, vModelSelect: _vModelSelect, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 9060 9061 const _component_PublicFrame = _resolveComponent("PublicFrame") 9062 9063 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª" }, { 9064 default: _withCtx(() => [tourOpen 9065 ? (_openBlock(), _createElementBlock("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, [ 9066 _createElementVNode("div", _hoisted_3, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tourSteps, (s, i) => { 9067 return (_openBlock(), _createElementBlock("span", { 9068 key: i, 9069 class: _normalizeClass({active:i===tourStep}) 9070 }, null, 2)) 9071 }), 128))]), 9072 _createElementVNode("div", _hoisted_4, "Ø®Ø·ÙØ© " + _toDisplayString(tourStep+1) + " Ù Ù " + _toDisplayString(tourSteps.length), 1), 9073 _createElementVNode("h3", null, _toDisplayString(tourSteps[tourStep].title), 1), 9074 _createElementVNode("p", null, _toDisplayString(tourSteps[tourStep].body), 1), 9075 (tourSteps[tourStep].example) 9076 ? (_openBlock(), _createElementBlock("div", _hoisted_5, _toDisplayString(tourSteps[tourStep].example), 1)) 9077 : _createCommentVNode("", true), 9078 (tourSteps[tourStep].points) 9079 ? (_openBlock(), _createElementBlock("ul", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tourSteps[tourStep].points, (p) => { 9080 return (_openBlock(), _createElementBlock("li", { key: p }, _toDisplayString(p), 1)) 9081 }), 128))])) 9082 : _createCommentVNode("", true), 9083 _createElementVNode("div", _hoisted_7, [(tourStep>0) 9084 ? (_openBlock(), _createElementBlock("button", { 9085 key: 0, 9086 class: "smallbtn secondary", 9087 onClick: prevTour 9088 }, "Ø§ÙØ³Ø§Ø¨Ù", 8, _hoisted_8)) 9089 : _createCommentVNode("", true), _createElementVNode("button", { 9090 class: "smallbtn ghost", 9091 onClick: finishTour 9092 }, "تخطÙ", 8, _hoisted_9), _createElementVNode("button", { 9093 class: "btn", 9094 onClick: nextTour 9095 }, _toDisplayString(tourStep===tourSteps.length-1?'بدء تعبئة Ø§ÙØ¨ÙØ§ÙØ§Øª':'Ø§ÙØªØ§ÙÙ'), 9, _hoisted_10)]) 9096 ])])) 9097 : _createCommentVNode("", true), locked 9098 ? (_openBlock(), _createElementBlock("div", _hoisted_11, [_cache[0] || (_cache[0] = _createElementVNode("h3", null, "Ø¨ÙØ§Ùات٠٠ÙÙÙÙØ©", -1)), _cache[1] || (_cache[1] = _createElementVNode("p", { class: "hint" }, "Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØªÙ ٠رة ÙØ§ØØ¯Ø© ÙÙØ·. أ٠تعدÙÙ ÙØ§ØÙ ÙØªÙ عبر Ø§ÙØ¥Ø¯Ø§Ø±Ø© Ø£Ù ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ©.", -1)), _createElementVNode("button", { 9099 class: "btn", 9100 onClick: $event => ($router.push('/account')) 9101 }, "عرض Ø§ÙØ¨Ø·Ø§ÙØ© Ø¯Ø§Ø®Ù ØØ³Ø§Ø¨Ù", 8, _hoisted_12)])) 9102 : (_openBlock(), _createElementBlock("div", _hoisted_13, [ 9103 _createElementVNode("section", _hoisted_14, [_cache[2] || (_cache[2] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "دÙÙÙ Ø§ÙØªØ³Ø¬ÙÙ"), _createElementVNode("h3", null, "ÙØ¨Ù Ø§ÙØ¨Ø¯Ø¡"), _createElementVNode("p", null, "ØªÙØ³ØªØ®Ø¯Ù ÙØ°Ù Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ¥Ø¹Ø¯Ø§Ø¯ Ø§ÙØ¹Ø¶ÙÙØ© ÙØ§ÙØ¨Ø·Ø§ÙØ© ÙØªØ³ÙÙÙ Ø§ÙØªÙاصÙ. تذÙÙØ± ÙØªØ§Ø¨Ø© Ø§Ø³Ù Ù Ø§ÙØ«Ùاث٠باÙÙØºØ© Ø§ÙØ¹Ø±Ø¨ÙØ©.")], -1)), _createElementVNode("button", { 9104 class: "smallbtn secondary", 9105 onClick: openTour 9106 }, "عرض Ø§ÙØªØ¹ÙÙ٠ات", 8, _hoisted_15)]), 9107 _createElementVNode("section", _hoisted_16, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, "تذÙÙØ± Ø³Ø±ÙØ¹", -1)), _createElementVNode("ul", null, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(completionTips, (t) => { 9108 return (_openBlock(), _createElementBlock("li", { key: t }, _toDisplayString(t), 1)) 9109 }), 128))])]), 9110 _createElementVNode("div", _hoisted_17, [ 9111 _cache[17] || (_cache[17] = _createElementVNode("h3", null, "Ø¥ÙÙ Ø§Ù Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶Ù", -1)), 9112 _cache[18] || (_cache[18] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ¨ Ø§ÙØ¨ÙØ§ÙØ§Øª Ø¨Ø¯ÙØ©. بعد Ø§ÙØ¥Ø±Ø³Ø§Ù Ø³ØªÙØ±Ø³Ù ÙÙ٠راجعة ÙÙØ§ ÙÙ Ù٠تعدÙÙÙØ§ Ø¥ÙØ§ عبر Ø§ÙØ¥Ø¯Ø§Ø±Ø©.", -1)), 9113 _createElementVNode("label", _hoisted_18, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "Ø§ÙØ§Ø³Ù Ø§ÙØ«ÙØ§Ø«Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù", -1)), _withDirectives(_createElementVNode("input", { 9114 "onUpdate:modelValue": $event => ((f.full_name) = $event), 9115 onBlur: $event => (nameTouched=true),
9116 placeholder: "٠ثاÙ: Ù ØÙ د Ø£ØÙ د عÙÙ" 9117 }, null, 40, _hoisted_19), [[_vModelText, f.full_name]]), _createElementVNode("em", { class: _normalizeClass({bad:nameTouched&&!nameValid,ok:nameValid}) }, _toDisplayString(nameValid?'Ø§ÙØ§Ø³Ù ÙØ§Ø¶Ø ÙÙ ÙØ§Ø³Ø¨ ÙÙØ¨Ø·Ø§ÙØ©':'Ù Ø·ÙÙØ¨ 3 ÙÙ٠ات Ø¹Ø±Ø¨ÙØ© عÙÙ Ø§ÙØ£ÙÙ. Ø§ÙØØ§ÙÙ: '+nameWords), 3)]), 9118 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.gender) = $event) }, [_cache[5] || (_cache[5] = _createElementVNode("option", { value: "" }, "Ø§ÙØ¬Ùس", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('gender',f.gender), (o) => { 9119 return (_openBlock(), _createElementBlock("option", { 9120 key: o.value, 9121 value: o.value 9122 }, _toDisplayString(o.label), 9, _hoisted_21)) 9123 }), 128))], 8, _hoisted_20), [[_vModelSelect, f.gender]]), 9124 _createElementVNode("label", _hoisted_22, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "ÙØ§ØªØ³Ø§Ø¨ اÙÙ ÙØ«Ù عبر OTP", -1)), _withDirectives(_createElementVNode("input", { 9125 class: "ltr", 9126 "onUpdate:modelValue": $event => ((f.whatsapp) = $event), 9127 readonly: "" 9128 }, null, 8, _hoisted_23), [[_vModelText, f.whatsapp]]), _cache[7] || (_cache[7] = _createElementVNode("em", null, "تعدÙ٠رÙÙ Ø§ÙØ¯Ø®ÙÙ ÙØªÙ عبر ÙØ¬ÙØ© Ø§ÙØ¹Ø¶ÙÙØ© بعد Ø§ÙØªØÙÙ.", -1))]), 9129 _withDirectives(_createElementVNode("input", { 9130 class: "ltr", 9131 "onUpdate:modelValue": $event => ((f.china_phone) = $event), 9132 placeholder: "ÙØ§ØªÙ Ø§ÙØµÙÙ" 9133 }, null, 8, _hoisted_24), [[_vModelText, f.china_phone]]), 9134 _withDirectives(_createElementVNode("input", { 9135 "onUpdate:modelValue": $event => ((f.wechat) = $event), 9136 placeholder: "WeChat" 9137 }, null, 8, _hoisted_25), [[_vModelText, f.wechat]]), 9138 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.category) = $event) }, [_cache[8] || (_cache[8] = _createElementVNode("option", { value: "" }, "ÙØ¦Ø© Ø§ÙØ¹Ø¶ÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('member_category',f.category), (o) => { 9139 return (_openBlock(), _createElementBlock("option", { 9140 key: o.value, 9141 value: o.value 9142 }, _toDisplayString(o.label), 9, _hoisted_27)) 9143 }), 128))], 8, _hoisted_26), [[_vModelSelect, f.category]]), 9144 _createElementVNode("label", _hoisted_28, [_cache[10] || (_cache[10] = _createElementVNode("span", null, "Ø§ÙØ¯ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.country_code) = $event) }, [_cache[9] || (_cache[9] = _createElementVNode("option", { value: "" }, "اختر دÙÙØªÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($countryList(f.country_code), (c) => { 9145 return (_openBlock(), _createElementBlock("option", { 9146 key: c.value, 9147 value: c.value 9148 }, _toDisplayString(c.label), 9, _hoisted_30)) 9149 }), 128))], 8, _hoisted_29), [[_vModelSelect, f.country_code]]), _cache[11] || (_cache[11] = _createElementVNode("em", null, "ØªØØ¯Ø¯ Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ© اÙÙ ÙØ§Ø³Ø¨Ø© ÙØØ³Ø§Ø¨Ù.", -1))]), 9150 _withDirectives(_createElementVNode("select", { 9151 "onUpdate:modelValue": $event => ((f.china_city) = $event), 9152 onChange: $event => (f.china_district='') 9153 }, [_cache[12] || (_cache[12] = _createElementVNode("option", { value: "" }, "اختر ٠دÙÙØ© Ø§ÙØ¥Ùا٠ة ÙÙ Ø§ÙØµÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(f.china_city), (c) => { 9154 return (_openBlock(), _createElementBlock("option", { 9155 key: c.value, 9156 value: c.value 9157 }, _toDisplayString(c.label), 9, _hoisted_32)) 9158 }), 128))], 40, _hoisted_31), [[_vModelSelect, f.china_city]]), 9159 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.china_district) = $event) }, [_cache[13] || (_cache[13] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØÙ / اÙÙ ÙØ·ÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($districtList(f.china_city,f.china_district), (d) => { 9160 return (_openBlock(), _createElementBlock("option", { 9161 key: d.value, 9162 value: d.value 9163 }, _toDisplayString(d.label), 9, _hoisted_34)) 9164 }), 128))], 8, _hoisted_33), [[_vModelSelect, f.china_district]]), 9165 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.profession) = $event) }, [_cache[14] || (_cache[14] = _createElementVNode("option", { value: "" }, "اختر اÙÙ ÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($professionList(f.profession), (p) => { 9166 return (_openBlock(), _createElementBlock("option", { 9167 key: p.value, 9168 value: p.value 9169 }, _toDisplayString(p.label), 9, _hoisted_36)) 9170 }), 128))], 8, _hoisted_35), [[_vModelSelect, f.profession]]), 9171 _withDirectives(_createElementVNode("input", { 9172 "onUpdate:modelValue": $event => ((f.workplace) = $event), 9173 placeholder: "Ø¬ÙØ© Ø§ÙØ¹Ù Ù" 9174 }, null, 8, _hoisted_37), [[_vModelText, f.workplace]]), 9175 _withDirectives(_createElementVNode("input", { 9176 "onUpdate:modelValue": $event => ((f.university) = $event), 9177 placeholder: "Ø§ÙØ¬Ø§Ù عة" 9178 }, null, 8, _hoisted_38), [[_vModelText, f.university]]), 9179 _createElementVNode("label", _hoisted_39, [_cache[15] || (_cache[15] = _createElementVNode("span", null, "عدد Ø£ÙØ±Ø§Ø¯ Ø§ÙØ£Ø³Ø±Ø©", -1)), _withDirectives(_createElementVNode("input", { 9180 type: "number", 9181 min: "1", 9182 "onUpdate:modelValue": $event => ((f.family_count) = $event), 9183 placeholder: "عدد Ø£ÙØ±Ø§Ø¯ Ø§ÙØ£Ø³Ø±Ø©" 9184 }, null, 8, _hoisted_40), [[_vModelText, f.family_count]]), _cache[16] || (_cache[16] = _createElementVNode("em", null, "ÙØ´Ù Ù: Ø£ÙØª + Ø§ÙØ²Ùجة/Ø§ÙØ²Ùج + Ø§ÙØ£Ø¨Ùاء Ø£ÙÙ Ù Ù 18 Ø³ÙØ© اÙÙ ÙØ¬ÙدÙÙ ÙÙ Ø§ÙØµÙÙ.", -1))]), 9185 _cache[19] || (_cache[19] = _createElementVNode("div", { class: "privacyNote" }, "ØªÙØ³ØªØ®Ø¯Ù Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØªÙظÙ٠خد٠ات اÙÙ ÙØµØ© ÙØ§ÙØªÙØ§ØµÙ ÙØ§Ùتع٠Ù٠ات اÙÙ ÙØ§Ø³Ø¨Ø© Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©Ø ÙÙØ§ ØªÙØ¹Ø±Ø¶ Ø¥ÙØ§ ÙÙØ¬Ùات اÙÙ Ø®ÙÙØ© داخ٠اÙÙ ÙØµØ©.", -1)), 9186 _createElementVNode("button", { 9187 class: "btn loadMore", 9188 onClick: submit 9189 }, "تأÙÙØ¯ ÙØ¥Ø±Ø³Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª", 8, _hoisted_41) 9190 ]), 9191 _createElementVNode("section", _hoisted_42, [_cache[20] || (_cache[20] = _createElementVNode("h3", null, "بعد Ø§ÙØªØ³Ø¬Ù٠تستخد٠اÙÙ ÙØµØ© ÙÙÙØ", -1)), _createElementVNode("div", _hoisted_43, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(usageTips, (u) => { 9192 return (_openBlock(), _createElementBlock("div", { 9193 key: u.title, 9194 class: "usageMini" 9195 }, [_createElementVNode("span", null, _toDisplayString(u.icon), 1), _createElementVNode("b", null, _toDisplayString(u.title), 1), _createElementVNode("small", null, _toDisplayString(u.body), 1)])) 9196 }), 128))])]) 9197 ]))]), 9198 _: 1 9199 })) 9200 } 9201} 9202})() 9203 }; 9204 9205 const ArrivalPage={ 9206 components:{PublicFrame}, 9207 setup(){ 9208 const store=useGzcStore();const router=useRouter();
9208const f=reactive({full_name:'',china_phone:'',whatsapp:'',china_city:'Guangzhou',china_district:'',type:'Ø·Ø§ÙØ¨',description:''});const code=ref('');const otp=ref(false);const verified=ref(false); 9209 onMounted(()=>store.loadMe()); 9210 async function requestOtp(){const phone=norm(f.whatsapp||f.china_phone);if(!phone){store.state.msg='رÙÙ ÙØ§ØªØ³Ø§Ø¨ Ù Ø·ÙÙØ¨';return;}store.state.busy=true;store.state.msg='جار٠إرسا٠ÙÙØ¯ Ø§ÙØªØÙÙ...';const r=await api('/api/auth/request-otp',{method:'POST',body:JSON.stringify({phone,purpose:'arrival_request'})});store.state.busy=false;store.state.msg=r.message||r.error||'';otp.value=!!r.ok;} 9211 async function verifyOtp(){const phone=norm(f.whatsapp||f.china_phone);store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø§ÙØªØÙÙ...';const r=await api('/api/auth/verify-otp',{method:'POST',body:JSON.stringify({phone,code:code.value,purpose:'arrival_request'})});store.state.busy=false;store.state.msg=r.message||r.error||'';verified.value=!!r.ok;} 9212 async function submit(){if(!verified.value){store.state.msg='تØÙ٠٠٠رÙÙ ÙØ§ØªØ³Ø§Ø¨ Ø£ÙÙØ§Ù';return;}store.state.busy=true;store.state.msg='جار٠تسجÙ٠اÙÙØµÙÙ...';const payload=Object.assign({},f,{whatsapp:norm(f.whatsapp),china_phone:norm(f.china_phone),description:(f.type?('ÙÙØ¹ اÙÙØ§Ø¯Ù : '+f.type+'\n'):'')+(f.description||'')});const r=await api('/api/arrival',{method:'POST',body:JSON.stringify(payload)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)router.push('/');} 9213 return {store,f,code,otp,verified,requestOtp,verifyOtp,submit}; 9214 }, 9215 render:(function(){ 9216const _Vue = Vue 9217const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 9218 9219const _hoisted_1 = { 9220 key: 0, 9221 class: "card" 9222} 9223const _hoisted_2 = ["onClick"] 9224const _hoisted_3 = { 9225 key: 1, 9226 class: "card" 9227} 9228const _hoisted_4 = ["onUpdate:modelValue"] 9229const _hoisted_5 = ["onUpdate:modelValue"] 9230const _hoisted_6 = ["onUpdate:modelValue"] 9231const _hoisted_7 = ["onUpdate:modelValue", "onChange"] 9232const _hoisted_8 = ["value"] 9233const _hoisted_9 = ["onUpdate:modelValue"] 9234const _hoisted_10 = ["value"] 9235const _hoisted_11 = ["onUpdate:modelValue"] 9236const _hoisted_12 = ["value"] 9237const _hoisted_13 = ["onUpdate:modelValue"] 9238const _hoisted_14 = { class: "otpBox" } 9239const _hoisted_15 = ["onClick"] 9240const _hoisted_16 = ["onUpdate:modelValue"] 9241const _hoisted_17 = ["onClick"] 9242const _hoisted_18 = { 9243 key: 1, 9244 class: "okText" 9245} 9246const _hoisted_19 = ["disabled", "onClick"] 9247 9248return function render(_ctx, _cache) { 9249 with (_ctx) { 9250 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, vModelText: _vModelText, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 9251 9252 const _component_PublicFrame = _resolveComponent("PublicFrame") 9253 9254 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "ÙØµÙت ØØ¯ÙثاÙ" }, { 9255 default: _withCtx(() => [(store.state.me&&store.state.me.authenticated) 9256 ? (_openBlock(), _createElementBlock("div", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("h3", null, "ÙØ°Ù Ø§ÙØ®Ø¯Ù Ø© ÙÙØ²Ø§Ø¦Ø±ÙÙ ØºÙØ± اÙ٠سجÙÙÙ ÙÙØ·", -1)), _cache[1] || (_cache[1] = _createElementVNode("p", { class: "hint" }, "بعد تسجÙÙ Ø§ÙØ¯Ø®ÙÙ Ø¨ÙØ§Ùات٠٠عرÙÙØ© ÙÙÙØ¸Ø§Ù .", -1)), _createElementVNode("button", { 9257 class: "btn", 9258 onClick: $event => ($router.push('/')) 9259 }, "Ø§ÙØ±Ø¦ÙØ³ÙØ©", 8, _hoisted_2)])) 9260 : (_openBlock(), _createElementBlock("div", _hoisted_3, [ 9261 _cache[4] || (_cache[4] = _createElementVNode("h3", null, "تسجÙÙ ÙØµÙÙ Ø¬Ø¯ÙØ¯", -1)), 9262 _cache[5] || (_cache[5] = _createElementVNode("p", { class: "hint" }, "Ø·ÙØ¨ Ø§Ø³ØªÙØ¨Ø§Ù ÙÙÙØ³ عضÙÙØ© تÙÙØ§Ø¦ÙØ©. Ø§ÙØªØÙ٠باÙÙØ§ØªØ³Ø§Ø¨ Ù Ø·ÙÙØ¨ ÙØ¨Ù Ø§ÙØ¥Ø±Ø³Ø§Ù.", -1)), 9263 _withDirectives(_createElementVNode("input", { 9264 "onUpdate:modelValue": $event => ((f.full_name) = $event), 9265 placeholder: "Ø§ÙØ§Ø³Ù " 9266 }, null, 8, _hoisted_4), [[_vModelText, f.full_name]]), 9267 _withDirectives(_createElementVNode("input", { 9268 class: "ltr", 9269 "onUpdate:modelValue": $event =>
9269 ((f.china_phone) = $event), 9270 placeholder: "رÙ٠اÙÙØ§ØªÙ ÙÙ Ø§ÙØµÙÙ" 9271 }, null, 8, _hoisted_5), [[_vModelText, f.china_phone]]), 9272 _withDirectives(_createElementVNode("input", { 9273 class: "ltr", 9274 "onUpdate:modelValue": $event => ((f.whatsapp) = $event), 9275 placeholder: "رÙÙ ÙØ§ØªØ³Ø§Ø¨" 9276 }, null, 8, _hoisted_6), [[_vModelText, f.whatsapp]]), 9277 _withDirectives(_createElementVNode("select", { 9278 "onUpdate:modelValue": $event => ((f.china_city) = $event), 9279 onChange: $event => (f.china_district='') 9280 }, [_cache[2] || (_cache[2] = _createElementVNode("option", { value: "" }, "اختر اÙ٠دÙÙØ© ÙÙ Ø§ÙØµÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(f.china_city), (c) => { 9281 return (_openBlock(), _createElementBlock("option", { 9282 key: c.value, 9283 value: c.value 9284 }, _toDisplayString(c.label), 9, _hoisted_8)) 9285 }), 128))], 40, _hoisted_7), [[_vModelSelect, f.china_city]]), 9286 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.china_district) = $event) }, [_cache[3] || (_cache[3] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØÙ / اÙÙ ÙØ·ÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($districtList(f.china_city,f.china_district), (d) => { 9287 return (_openBlock(), _createElementBlock("option", { 9288 key: d.value, 9289 value: d.value 9290 }, _toDisplayString(d.label), 9, _hoisted_10)) 9291 }), 128))], 8, _hoisted_9), [[_vModelSelect, f.china_district]]), 9292 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.type) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('member_category',f.type), (o) => { 9293 return (_openBlock(), _createElementBlock("option", { 9294 key: o.value, 9295 value: o.value 9296 }, _toDisplayString(o.label), 9, _hoisted_12)) 9297 }), 128))], 8, _hoisted_11), [[_vModelSelect, f.type]]), 9298 _withDirectives(_createElementVNode("textarea", { 9299 "onUpdate:modelValue": $event => ((f.description) = $event), 9300 placeholder: "ÙÙ ØªØØªØ§Ø¬ سÙÙØ ØªØ±Ø¬Ù Ø©Ø Ø§Ø³ØªÙØ¨Ø§ÙØ" 9301 }, null, 8, _hoisted_13), [[_vModelText, f.description]]), 9302 _createElementVNode("div", _hoisted_14, [_createElementVNode("button", { 9303 class: "btn secondary loadMore", 9304 onClick: requestOtp 9305 }, "إرسا٠ر٠ز Ø§ÙØªØÙÙ", 8, _hoisted_15), otp 9306 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_withDirectives(_createElementVNode("input", { 9307 class: "ltr", 9308 "onUpdate:modelValue": $event => ((code) = $event), 9309 placeholder: "ر٠ز Ø§ÙØªØÙÙ" 9310 }, null, 8, _hoisted_16), [[_vModelText, code]]), _createElementVNode("button", { 9311 class: "btn secondary loadMore", 9312 onClick: verifyOtp 9313 }, "تØÙÙ Ù Ù Ø§ÙØ±Ù ز", 8, _hoisted_17)], 64)) 9314 : _createCommentVNode("", true), verified 9315 ? (_openBlock(), _createElementBlock("p", _hoisted_18, "â ØªÙ Ø§ÙØªØÙÙ Ù Ù Ø§ÙØ±ÙÙ ")) 9316 : _createCommentVNode("", true)]), 9317 _createElementVNode("button", { 9318 class: "btn loadMore", 9319 disabled: !verified, 9320 onClick: submit 9321 }, "إرساÙ", 8, _hoisted_19) 9322 ]))]), 9323 _: 1 9324 })) 9325 } 9326} 9327})() 9328 }; 9329 9330 const HelpPage={ 9331 components:{PublicFrame}, 9332 setup(){const store=useGzcStore();const router=useRouter();const f=reactive({type:'other',description:''});const files=ref([]);const fileLabel=computed(()=>mediaPreviewLabel(files.value));function onFiles(e){files.value=Array.from((e.target&&e.target.files)||[]).slice(0,3);}onMounted(()=>store.requireMember(router,'/help'));async function submit(){const fd=new FormData();fd.append('type',f.type);fd.append('description',f.description);
9332Array.from(files.value||[]).forEach(file=>fd.append('media',file));store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨ اÙ٠ساعدة...';const r=await uploadApi('/api/help',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'إرسا٠٠رÙÙØ§Øª Ø·ÙØ¨ اÙ٠ساعدة'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){f.description='';files.value=[];router.push('/');}}return {store,f,files,fileLabel,onFiles,submit};}, 9333 render:(function(){ 9334const _Vue = Vue 9335const { createElementVNode: _createElementVNode } = _Vue 9336 9337const _hoisted_1 = { class: "card" } 9338const _hoisted_2 = ["onUpdate:modelValue"] 9339const _hoisted_3 = ["value"] 9340const _hoisted_4 = ["onUpdate:modelValue"] 9341const _hoisted_5 = { class: "filePicker caseFilePicker" } 9342const _hoisted_6 = ["onChange"] 9343const _hoisted_7 = ["onClick"] 9344 9345return function render(_ctx, _cache) { 9346 with (_ctx) { 9347 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 9348 9349 const _component_PublicFrame = _resolveComponent("PublicFrame") 9350 9351 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø£ØØªØ§Ø¬ ٠ساعدة" }, { 9352 default: _withCtx(() => [_createElementVNode("div", _hoisted_1, [ 9353 _cache[1] || (_cache[1] = _createElementVNode("h3", null, "Ø·ÙØ¨ ٠ساعدة", -1)), 9354 _cache[2] || (_cache[2] = _createElementVNode("p", { class: "hint" }, "اختر اÙÙÙØ¹ ÙØ§Ùتب Ø§ÙØªÙاصÙÙ. ÙÙ ÙÙ Ø¥Ø±ÙØ§Ù ØØªÙ 3 ØµÙØ± ØªÙØ¶ÙØÙØ© ØªØ¸ÙØ± ÙÙØ¥Ø¯Ø§Ø±Ø© ÙÙØ·.", -1)), 9355 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.type) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('help_type',f.type), (o) => { 9356 return (_openBlock(), _createElementBlock("option", { 9357 key: o.value, 9358 value: o.value 9359 }, _toDisplayString(o.label), 9, _hoisted_3)) 9360 }), 128))], 8, _hoisted_2), [[_vModelSelect, f.type]]), 9361 _withDirectives(_createElementVNode("textarea", { 9362 "onUpdate:modelValue": $event => ((f.description) = $event), 9363 placeholder: "Ø§Ø´Ø±Ø Ø§ÙØ·Ùب" 9364 }, null, 8, _hoisted_4), [[_vModelText, f.description]]), 9365 _createElementVNode("label", _hoisted_5, [_createElementVNode("input", { 9366 type: "file", 9367 multiple: "", 9368 accept: "image/jpeg,image/png,image/webp", 9369 onChange: onFiles 9370 }, null, 40, _hoisted_6), _cache[0] || (_cache[0] = _createElementVNode("span", null, "Ø¥Ø±ÙØ§Ù ØµÙØ±", -1)), _createElementVNode("em", null, _toDisplayString(fileLabel) + " â Ø§ÙØØ¯ Ø§ÙØ£Ùص٠3", 1)]), 9371 _createElementVNode("button", { 9372 class: "btn loadMore", 9373 onClick: submit 9374 }, "إرساÙ", 8, _hoisted_7) 9375 ])]), 9376 _: 1 9377 })) 9378 } 9379} 9380})() 9381 }; 9382 9383 9384 const FeedbackPage={ 9385 components:{PublicFrame}, 9386 setup(){ 9387 const store=useGzcStore();const router=useRouter(); 9388 const f=reactive({feedback_type:'suggestion',title:'',message:''}); 9389 const items=ref([]);const loading=ref(false); 9390 const types=[['suggestion','Ø§ÙØªØ±Ø§Ø'],['note','Ù ÙØ§ØØ¸Ø©'],['bug','Ù Ø´ÙÙØ© تÙÙÙØ©'],['correction','تصØÙØ Ù Ø¹ÙÙÙ Ø©'],['feature','Ø·ÙØ¨ Ø¥Ø¶Ø§ÙØ©'],['other','أخرÙ']]; 9391 function typeLabel(v){return (types.find(x=>x[0]===v)||['',v])[1];} 9392 function statusLabel(v){return ({new:'Ø¬Ø¯ÙØ¯',reviewing:'ÙÙØ¯ اÙ٠راجعة',done:'ØªÙ Ø§ÙØªÙÙÙØ°',rejected:'٠رÙÙØ¶',archived:'٠ؤرشÙ'}[String(v||'')])||String(v||'-');} 9393 async function load(){const me=await store.loadMe();if(!me||!me.authenticated||!me.member){router.replace('/login');return;}loading.value=true;const r=await api('/api/member/feedback');loading.value=false;items.value=safeArray(r.feedback);} 9394 async function submit(){if(!String(f.message||'').trim()){store.state.msg='Ø§ÙØªØ¨ اÙÙ ÙØ§ØØ¸Ø© Ø£ÙÙØ§Ù';return;}store.state.busy=true;const r=await api('/api/member/feedback',{method:'POST',body:JSON.stringify(f)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){f.title='';f.message='';f.feedback_type='suggestion';await load();}} 9395 onMounted(load); 9396 return{store,f,items,types,typeLabel,statusLabel,submit,loading,shortDate}; 9397 }, 9398 render:(function(){ 9399const _Vue = Vue
9400const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 9401 9402const _hoisted_1 = { class: "card formCard feedbackForm" } 9403const _hoisted_2 = ["onUpdate:modelValue"] 9404const _hoisted_3 = ["value"] 9405const _hoisted_4 = ["onUpdate:modelValue"] 9406const _hoisted_5 = ["onUpdate:modelValue"] 9407const _hoisted_6 = ["onClick"] 9408const _hoisted_7 = { class: "card" } 9409const _hoisted_8 = { 9410 key: 0, 9411 class: "hint" 9412} 9413const _hoisted_9 = { 9414 key: 1, 9415 class: "hint" 9416} 9417const _hoisted_10 = { 9418 key: 2, 9419 class: "feedbackList" 9420} 9421const _hoisted_11 = { key: 0 } 9422 9423return function render(_ctx, _cache) { 9424 with (_ctx) { 9425 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 9426 9427 const _component_PublicFrame = _resolveComponent("PublicFrame") 9428 9429 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ù ÙØ§ØØ¸Ø§Øª ÙØ§ÙØªØ±Ø§ØØ§Øª" }, { 9430 default: _withCtx(() => [_cache[1] || (_cache[1] = _createElementVNode("section", { class: "card feedbackHero" }, [_createElementVNode("span", { class: "vueBadge" }, "عضÙ"), _createElementVNode("h3", null, "Ø£Ø±Ø³Ù Ù ÙØ§ØØ¸Ø© Ø£Ù Ø§ÙØªØ±Ø§Ø"), _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ¨ Ø£Ù Ù Ø´ÙÙØ©Ø تصØÙØØ Ø£Ù ÙÙØ±Ø© تطÙÙØ±. Ø§ÙØ±Ø³Ø§ÙØ© ØªØ¸ÙØ± ÙÙØ¥Ø¯Ø§Ø±Ø© ÙÙØ·.")], -1)), _createElementVNode("section", _hoisted_1, [ 9431 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.feedback_type) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(types, (t) => { 9432 return (_openBlock(), _createElementBlock("option", { 9433 key: t[0], 9434 value: t[0] 9435 }, _toDisplayString(t[1]), 9, _hoisted_3)) 9436 }), 128))], 8, _hoisted_2), [[_vModelSelect, f.feedback_type]]), 9437 _withDirectives(_createElementVNode("input", { 9438 "onUpdate:modelValue": $event => ((f.title) = $event), 9439 placeholder: "عÙÙØ§Ù Ø§Ø®ØªÙØ§Ø±Ù" 9440 }, null, 8, _hoisted_4), [[_vModelText, f.title]]), 9441 _withDirectives(_createElementVNode("textarea", { 9442 "onUpdate:modelValue": $event => ((f.message) = $event), 9443 placeholder: "Ø§ÙØªØ¨ اÙÙ ÙØ§ØØ¸Ø© Ø£Ù Ø§ÙØ§ÙØªØ±Ø§Ø Ø¨ÙØ¶ÙØ" 9444 }, null, 8, _hoisted_5), [[_vModelText, f.message]]), 9445 _createElementVNode("button", { 9446 class: "btn loadMore", 9447 onClick: submit 9448 }, "إرسا٠اÙÙ ÙØ§ØØ¸Ø©", 8, _hoisted_6) 9449 ]), _createElementVNode("section", _hoisted_7, [_cache[0] || (_cache[0] = _createElementVNode("h3", null, "Ù ÙØ§ØØ¸Ø§ØªÙ Ø§ÙØ³Ø§Ø¨ÙØ©", -1)), loading 9450 ? (_openBlock(), _createElementBlock("p", _hoisted_8, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...")) 9451 : (!items.length) 9452 ? (_openBlock(), _createElementBlock("p", _hoisted_9, "ÙØ§ ØªÙØ¬Ø¯ Ù ÙØ§ØØ¸Ø§Øª Ø³Ø§Ø¨ÙØ©.")) 9453 : (_openBlock(), _createElementBlock("div", _hoisted_10, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (x) => { 9454 return (_openBlock(), _createElementBlock("article", { 9455 key: x.id, 9456 class: "feedbackItem" 9457 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(x.title || typeLabel(x.feedback_type)), 1), _createElementVNode("small", null, _toDisplayString(typeLabel(x.feedback_type)) + " â " + _toDisplayString(statusLabel(x.status)) + " â " + _toDisplayString(shortDate(x.created_at)), 1)]), _createElementVNode("p", null, _toDisplayString(x.message), 1), (x.admin_note) 9458 ? (_openBlock(), _createElementBlock("em", _hoisted_11, "رد Ø§ÙØ¥Ø¯Ø§Ø±Ø©: " + _toDisplayString(x.admin_note), 1)) 9459 : _createCommentVNode("", true)])) 9460 }), 128))]))])]), 9461 _: 1, 9462 __: [1] 9463 })) 9464 } 9465} 9466})() 9467 }; 9468 9469 const EmergencyPage={ 9470 components:{PublicFrame}, 9471 setup(){const store=useGzcStore();const router=useRouter();const f=reactive({type:'medical',priority:'urgent',location_text:'',description:''});const files=ref([]);const submitted=ref(null);const fileLabel=computed(()=>mediaPreviewLabel(files.value));function onFiles(e){files.value=Array.from((e.target&&e.target.files)||[]).slice(0,3);}onMounted(()=>store.requireMember(router,'/emergency'));function useLocation(){if(!navigator.geolocation){store.state.msg='اÙÙ ØªØµÙØ ÙØ§ ÙØ¯Ø¹Ù ØªØØ¯Ùد اÙÙ ÙÙØ¹';return;}navigator.geolocation.getCurrentPosition(pos=>{f.location_text=pos.coords.latitude+','+pos.coords.longitude;store.state.msg='ØªÙ ØªØØ¯Ùد اÙÙ ÙÙØ¹ بعد Ù ÙØ§ÙÙØªÙ';},()=>{store.state.msg='تعذر ØªØØ¯Ùد اÙÙ ÙÙØ¹Ø Ø§ÙØªØ¨ اÙÙ ÙÙØ¹ ÙØ¯ÙÙØ§Ù';},{enableHighAccuracy:true,timeout:10000,maximumAge:60000});}async function submit(){if(!String(f.description||'').trim()){store.state.msg='Ø§ÙØªØ¨ ÙØµÙ Ø§ÙØØ§ÙØ© Ø£ÙÙØ§Ù';return;}const fd=new FormData();Object.keys(f).forEach(k=>
9471fd.append(k,String(f[k]||'')));Array.from(files.value||[]).forEach(file=>fd.append('media',file));store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø¥Ø±Ø³Ø§Ù Ø¨ÙØ§Øº Ø§ÙØ·Ùارئ...';const r=await uploadApi('/api/emergency',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'إرسا٠٠رÙÙØ§Øª Ø¨ÙØ§Øº Ø§ÙØ·Ùارئ'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)submitted.value=r;}return {store,f,files,submitted,fileLabel,onFiles,useLocation,submit};}, 9472 render:(function(){ 9473const _Vue = Vue 9474const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 9475 9476const _hoisted_1 = { 9477 key: 0, 9478 class: "card successState" 9479} 9480const _hoisted_2 = { class: "ltr" } 9481const _hoisted_3 = ["onClick"] 9482const _hoisted_4 = { 9483 key: 1, 9484 class: "card emergencyForm" 9485} 9486const _hoisted_5 = ["onUpdate:modelValue"] 9487const _hoisted_6 = ["value"] 9488const _hoisted_7 = ["onUpdate:modelValue"] 9489const _hoisted_8 = ["value"] 9490const _hoisted_9 = ["onClick"] 9491const _hoisted_10 = ["onUpdate:modelValue"] 9492const _hoisted_11 = ["onUpdate:modelValue"] 9493const _hoisted_12 = { class: "filePicker caseFilePicker" } 9494const _hoisted_13 = ["onChange"] 9495const _hoisted_14 = ["disabled", "onClick"] 9496 9497return function render(_ctx, _cache) { 9498 with (_ctx) { 9499 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 9500 9501 const _component_PublicFrame = _resolveComponent("PublicFrame") 9502 9503 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø·ÙØ§Ø±Ø¦" }, { 9504 default: _withCtx(() => [_cache[10] || (_cache[10] = _createElementVNode("section", { 9505 class: "card emergencyNumbers", 9506 role: "alert" 9507 }, [ 9508 _createElementVNode("span", { class: "vueBadge" }, "اتص٠أÙÙØ§Ù Ø¹ÙØ¯ Ø§ÙØ®Ø·Ø± اÙ٠باشر"), 9509 _createElementVNode("h3", null, "Ø£Ø±ÙØ§Ù Ø§ÙØ·Ùارئ Ø§ÙØ±Ø³Ù ÙØ© ÙÙ Ø§ÙØµÙÙ"), 9510 _createElementVNode("div", null, [ 9511 _createElementVNode("a", { href: "tel:110" }, [_createElementVNode("b", null, "110"), _createElementVNode("small", null, "Ø§ÙØ´Ø±Ø·Ø©")]), 9512 _createElementVNode("a", { href: "tel:119" }, [_createElementVNode("b", null, "119"), _createElementVNode("small", null, "Ø§ÙØ¥Ø·Ùاء")]), 9513 _createElementVNode("a", { href: "tel:120" }, [_createElementVNode("b", null, "120"), _createElementVNode("small", null, "Ø§ÙØ¥Ø³Ø¹Ø§Ù")]), 9514 _createElementVNode("a", { href: "tel:122" }, [_createElementVNode("b", null, "122"), _createElementVNode("small", null, "ØÙادث اÙÙ Ø±ÙØ±")]) 9515 ]), 9516 _createElementVNode("p", null, "اÙÙ ÙØµØ© ÙØ§ تستبد٠خد٠ات Ø§ÙØ·Ùارئ Ø§ÙØ±Ø³Ù ÙØ©. Ø§ØªØµÙ Ø¨Ø§ÙØ±Ù٠اÙÙ ÙØ§Ø³Ø¨ ÙÙØ±Ø§ÙØ Ø«Ù Ø£Ø±Ø³Ù Ø§ÙØ¨Ùاغ ÙÙ٠تابعة اÙÙ Ø¬ØªÙ Ø¹ÙØ© إذا Ø£Ù ÙÙ.") 9517 ], -1)), submitted 9518 ? (_openBlock(), _createElementBlock("div", _hoisted_1, [ 9519 _cache[1] || (_cache[1] = _createElementVNode("span", { 9520 class: "metricMark", 9521 "aria-hidden": "true" 9522 }, null, -1)), 9523 _cache[2] || (_cache[2] = _createElementVNode("h3", null, "ØªÙ Ø¥Ø±Ø³Ø§Ù Ø§ÙØ¨Ùاغ ÙØ¥Ø®Ø·Ø§Ø± Ø§ÙØ¥Ø¯Ø§Ø±Ø©", -1)), 9524 _createElementVNode("p", null, [_cache[0] || (_cache[0] = _createTextVNode("رÙ٠اÙ٠تابعة: ")), _createElementVNode("b", _hoisted_2, _toDisplayString(submitted.ticket_code), 1)]), 9525 _cache[3] || (_cache[3] = _createElementVNode("p", { class: "hint" }, "Ø§ØØªÙظ Ø¨Ø§ÙØ±ÙÙ . إذا ÙØ§Ù Ø§ÙØ®Ø·Ø± Ù Ø³ØªÙ Ø±Ø§Ù ÙØ§ØªØµÙ بخد٠ة Ø§ÙØ·Ùارئ Ø§ÙØ±Ø³Ù ÙØ© ٠باشرة.", -1)), 9526 _createElementVNode("button", { 9527 class: "btn secondary", 9528 onClick: $event => ($router.push('/')) 9529 }, "Ø§ÙØ¹Ùدة ÙÙØ±Ø¦ÙØ³ÙØ©", 8, _hoisted_3) 9530 ])) 9531 : (_openBlock(), _createElementBlock("div", _hoisted_4, [ 9532 _cache[5] || (_cache[5] = _createElementVNode("h3", null, "Ø¨ÙØ§Øº ٠تابعة عاجÙ", -1)), 9533 _cache[6] || (_cache[6] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ù Ø§ÙØ®Ø¯Ù Ø© ÙÙØ£Ø¹Ø¶Ø§Ø¡ اÙ٠سجÙÙÙ. ÙÙ ÙÙÙ Ø¥Ø±ÙØ§Ù ØØªÙ 3 ØµÙØ± ØªØ¸ÙØ± ÙÙØ¥Ø¯Ø§Ø±Ø© اÙÙ Ø®ÙÙØ© ÙÙØ·.", -1)),
9534 _cache[7] || (_cache[7] = _createElementVNode("label", { 9535 class: "fieldLabel", 9536 for: "emergency-type" 9537 }, "ÙÙØ¹ Ø§ÙØØ§ÙØ©", -1)), 9538 _withDirectives(_createElementVNode("select", { 9539 id: "emergency-type", 9540 "onUpdate:modelValue": $event => ((f.type) = $event) 9541 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('emergency_type',f.type), (o) => { 9542 return (_openBlock(), _createElementBlock("option", { 9543 key: o.value, 9544 value: o.value 9545 }, _toDisplayString(o.label), 9, _hoisted_6)) 9546 }), 128))], 8, _hoisted_5), [[_vModelSelect, f.type]]), 9547 _cache[8] || (_cache[8] = _createElementVNode("label", { 9548 class: "fieldLabel", 9549 for: "emergency-priority" 9550 }, "Ø§ÙØ£ÙÙÙÙØ©", -1)), 9551 _withDirectives(_createElementVNode("select", { 9552 id: "emergency-priority", 9553 "onUpdate:modelValue": $event => ((f.priority) = $event) 9554 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('emergency_priority',f.priority), (o) => { 9555 return (_openBlock(), _createElementBlock("option", { 9556 key: o.value, 9557 value: o.value 9558 }, _toDisplayString(o.label), 9, _hoisted_8)) 9559 }), 128))], 8, _hoisted_7), [[_vModelSelect, f.priority]]), 9560 _createElementVNode("button", { 9561 class: "btn secondary loadMore", 9562 onClick: useLocation 9563 }, "Ø§ÙØ³Ù Ø§Ø Ø¨Ø§Ø³ØªØ®Ø¯Ø§Ù Ù ÙÙØ¹Ù Ø§ÙØØ§ÙÙ", 8, _hoisted_9), 9564 _cache[9] || (_cache[9] = _createElementVNode("p", { class: "privacyNote" }, "اÙÙ ÙÙØ¹ ÙØ§ ÙÙØ·Ùب تÙÙØ§Ø¦ÙØ§ÙØ ÙÙØ±Ø³Ù ÙÙØ· إذا ضغطت Ø§ÙØ²Ø± ÙÙØ§ÙÙØª ٠٠اÙÙ ØªØµÙØ. ÙÙ ÙÙÙ ÙØªØ§Ø¨Ø© ÙØµÙ اÙÙ ÙØ§Ù Ø¨Ø¯ÙØ§Ù Ù ÙÙ.", -1)), 9565 _withDirectives(_createElementVNode("input", { 9566 "onUpdate:modelValue": $event => ((f.location_text) = $event), 9567 placeholder: "اÙÙ ÙÙØ¹ Ø§ÙØªÙØ±ÙØ¨Ù Ø£Ù ÙØµÙ اÙÙ ÙØ§Ù" 9568 }, null, 8, _hoisted_10), [[_vModelText, f.location_text]]), 9569 _withDirectives(_createElementVNode("textarea", { 9570 "onUpdate:modelValue": $event => ((f.description) = $event), 9571 placeholder: "ÙØµÙ Ø§ÙØØ§ÙØ© Ù٠ا اÙ٠ساعدة اÙÙ Ø·ÙÙØ¨Ø©" 9572 }, null, 8, _hoisted_11), [[_vModelText, f.description]]), 9573 _createElementVNode("label", _hoisted_12, [_createElementVNode("input", { 9574 type: "file", 9575 multiple: "", 9576 accept: "image/jpeg,image/png,image/webp", 9577 onChange: onFiles 9578 }, null, 40, _hoisted_13), _cache[4] || (_cache[4] = _createElementVNode("span", null, "Ø¥Ø±ÙØ§Ù ØµÙØ±", -1)), _createElementVNode("em", null, _toDisplayString(fileLabel) + " â Ø§ÙØØ¯ Ø§ÙØ£Ùص٠3", 1)]), 9579 _createElementVNode("button", { 9580 class: "btn danger loadMore", 9581 disabled: store.state.busy, 9582 onClick: submit 9583 }, "Ø¥Ø±Ø³Ø§Ù Ø§ÙØ¨Ùاغ ÙØ¥Ø®Ø·Ø§Ø± Ø§ÙØ¥Ø¯Ø§Ø±Ø©", 8, _hoisted_14) 9584 ]))]), 9585 _: 1, 9586 __: [10] 9587 })) 9588 } 9589} 9590})() 9591 }; 9592 9593 const AboutPage={ 9594 components:{PublicFrame}, 9595 setup(){ 9596 const store=useGzcStore(); 9597 const loading=ref(true);const loadError=ref(''); 9598 async function load(){loading.value=true;loadError.value='';const r=await api('/api/community-profile');if(r&&r.ok)store.state.community=r.community||{};else loadError.value=(r&&r.message)||'تعذر تØÙ ÙÙ Ø¨ÙØ§Ùات اÙ٠جت٠ع.';loading.value=false;} 9599 onMounted(load); 9600 const c=computed(()=>store.state.community||{}); 9601 const profile=computed(()=>c.value.profile||c.value||{}); 9602 const communities=computed(()=>safeArray(c.value.communities||c.value.local_communities).filter(x=>!x.archived_at&&x.status!=='archived'&&String(x.slug)!=='all-china')); 9603 const countryCommunities=computed(()=>safeArray(c.value.country_communities)); 9604 const locale=computed(()=>store.state.locale||I18N_DEFAULT_LOCALE); 9605 const locales=computed(()=>Array.isArray(store.state.locales)?store.state.locales:[]); 9606 const multiLocale=computed(()=>locales.value.length>1); 9607 function t(key){return i18nTranslate(locale.value,key);} 9608 function localeLabel(x){return locale.value==='ar'?(x.label_ar||x.code):(x.label_en||x.code);} 9609 function setLocale(code){const found=locales.value.find(x=>String(x.code)===String(code));if(!found)return;store.state.locale=found.code;i18nPersistLocale(found.code);i18nApplyDocument(found.code,found.dir);} 9610 async function loadLocales(){ 9611 if(store.state.localesLoaded)return; 9612 const r=await api('/api/platform/locales'); 9613 if(r&&r.ok){ 9614 const list=safeArray(r.locales);if(list.length)store.state.locales=list; 9615 const enabled=safeArray(r.enabled);const stored=i18nStoredLocale(); 9616 const initial=enabled.includes(stored)?stored:(r.default_locale||I18N_DEFAULT_LOCALE); 9617 store.state.locale=initial; 9618 const def=safeArray(store.state.locales).find(x=>String(x.code)===String(initial)); 9619 i18nApplyDocument(initial,def&&def.dir); 9620 } 9621 store.state.localesLoaded=true; 9622 } 9623 onMounted(loadLocales); 9624 const router=useRouter(); 9625 function openCommunity(lc){if(lc&&lc.slug)router.push('/community/'+encodeURIComponent(lc.slug));} 9626 return {store,c,profile,communities,countryCommunities,loading,loadError,load,safeArray,openCommunity,locale,locales,multiLocale,t,setLocale,localeLabel}; 9627 }, 9628 render:(function(){ 9629const _Vue = Vue
9630const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 9631 9632const _hoisted_1 = { 9633 key: 0, 9634 class: "card loadingState", 9635 role: "status" 9636} 9637const _hoisted_2 = { 9638 key: 1, 9639 class: "card errorState", 9640 role: "alert" 9641} 9642const _hoisted_3 = ["onClick"] 9643const _hoisted_4 = { 9644 key: 2, 9645 class: "card aboutCard communityPublicHero" 9646} 9647const _hoisted_5 = { class: "hint" } 9648const _hoisted_6 = { 9649 key: 0, 9650 class: "infoBox" 9651} 9652const _hoisted_7 = { 9653 key: 1, 9654 class: "infoBox" 9655} 9656const _hoisted_8 = { 9657 key: 3, 9658 class: "card" 9659} 9660const _hoisted_9 = { class: "localCommunityGrid" } 9661const _hoisted_10 = ["onClick"] 9662const _hoisted_11 = ["src"] 9663const _hoisted_12 = { class: "memberCardTop" } 9664const _hoisted_13 = { 9665 key: 1, 9666 class: "hint" 9667} 9668const _hoisted_14 = { 9669 key: 4, 9670 class: "card localeCard" 9671} 9672const _hoisted_15 = { class: "row" } 9673const _hoisted_16 = ["onClick"] 9674const _hoisted_17 = { 9675 key: 5, 9676 class: "card" 9677} 9678const _hoisted_18 = { class: "localCommunityGrid" } 9679const _hoisted_19 = ["onClick"] 9680const _hoisted_20 = { class: "memberCardTop" } 9681const _hoisted_21 = { 9682 key: 0, 9683 class: "hint" 9684} 9685 9686return function render(_ctx, _cache) { 9687 with (_ctx) { 9688 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createVNode: _createVNode, createBlock: _createBlock } = _Vue 9689 9690 const _component_router_link = _resolveComponent("router-link") 9691 const _component_PublicFrame = _resolveComponent("PublicFrame") 9692 9693 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "ع٠اÙÙ ÙØµØ©" }, { 9694 default: _withCtx(() => [ 9695 loading 9696 ? (_openBlock(), _createElementBlock("div", _hoisted_1, _c
9696ache[0] || (_cache[0] = [_createElementVNode("span", { 9697 class: "loadingSpinner", 9698 "aria-hidden": "true" 9699 }, null, -1), _createElementVNode("h3", null, "جار٠تØÙ Ù٠٠عÙÙ٠ات اÙ٠جت٠ع...", -1)]))) 9700 : loadError 9701 ? (_openBlock(), _createElementBlock("div", _hoisted_2, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "تعذر تØÙ ÙÙ Ø§ÙØµÙØØ©", -1)), _createElementVNode("p", null, _toDisplayString(loadError), 1), _createElementVNode("button", { 9702 class: "btn secondary", 9703 onClick: load 9704 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_3)])) 9705 : _createCommentVNode("", true), 9706 (!loading && !loadError) 9707 ? (_openBlock(), _createElementBlock("div", _hoisted_4, [ 9708 _cache[4] || (_cache[4] = _createElementVNode("img", { 9709 class: "communitySplash platformAboutLogo", 9710 src: "/brand/smt-gold-v1/smt-logo-transparent.png", 9711 width: "160", 9712 height: "160", 9713 loading: "eager", 9714 alt: "شعار Ù ÙØµØ© SMT China" 9715 }, null, -1)), 9716 _createElementVNode("h3", null, _toDisplayString(profile.title_ar || 'Ù ÙØµØ© SMT China'), 1), 9717 _createElementVNode("p", _hoisted_5, _toDisplayString(profile.body_ar || 'Ù ÙØµØ© ØªÙØ¸ÙÙ ÙØ®Ø¯Ù Ø© Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ ÙØ§Ù٠جت٠عات ÙÙ Ø§ÙØµÙÙ.'), 1), 9718 (profile.mission_ar) 9719 ? (_openBlock(), _createElementBlock("div", _hoisted_6, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "Ø§ÙØ±Ø³Ø§ÙØ©", -1)), _createElementVNode("p", null, _toDisplayString(profile.mission_ar), 1)])) 9720 : _createCommentVNode("", true), 9721 (profile.vision_ar) 9722 ? (_openBlock(), _createElementBlock("div", _hoisted_7, [_cache[3] || (_cache[3] = _createElementVNode("b", null, "Ø§ÙØ±Ø¤ÙØ©", -1)), _createElementVNode("p", null, _toDisplayString(profile.vision_ar), 1)])) 9723 : _createCommentVNode("", true) 9724 ])) 9725 : _createCommentVNode("", true), 9726 (!loading && !loadError && communities.length) 9727 ? (_openBlock(), _createElementBlock("div", _hoisted_8, [_cache[8] || (_cache[8] = _createElementVNode("h3", null, "اÙ٠جت٠عات اÙÙ ØÙÙØ©", -1)), _cache[9] || (_cache[9] = _createElementVNode("p", { class: "hint" }, "اختر أ٠٠جت٠ع Ù ØÙÙ ÙÙØ±Ø§Ø¡Ø© ٠عÙÙÙ Ø§ØªÙ ÙØ®Ø¯Ù اتÙ.", -1)), _createElementVNode("div", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(communities, (lc) => { 9728 return (_openBlock(), _createElementBlock("button", { 9729 type: "button", 9730 class: "localCommunityPublicCard clickable", 9731 key: lc.id, 9732 onClick: $event => (openCommunity(lc)) 9733 }, [ 9734 (lc.hero_image_url) 9735 ? (_openBlock(), _createElementBlock("img", { 9736 key: 0, 9737 class: "localCommunityHero", 9738 src: lc.hero_image_url, 9739 loading: "lazy", 9740 alt: "" 9741 }, null, 8, _hoisted_11)) 9742 : _createCommentVNode("", true), 9743 _createElementVNode("span", _hoisted_12, [_createElementVNode("h4", null, _toDisplayString(lc.name_ar), 1)]), 9744 (lc.name_en) 9745 ? (_openBlock(), _createElementBlock("span", _hoisted_13, _toDisplayString(lc.name_en), 1)) 9746 : _createCommentVNode("", true), 9747 _createElementVNode("span", null, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "اÙ٠دÙÙØ© Ø§ÙØ±Ø¦ÙØ³ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString($cityLabel(lc.main_city) || '-'), 1)]), 9748 _createElementVNode("span", null, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "اÙÙØ·Ø§Ù:", -1)), _createTextVNode(" " + _toDisplayString(safeArray(lc.coverage_cities).map($cityLabel).join('Ø ') || '
9748-'), 1)]), 9749 _cache[7] || (_cache[7] = _createElementVNode("small", { class: "openHint" }, "اضغط ÙÙØªØ ØµÙØØ© اÙ٠جت٠ع", -1)) 9750 ], 8, _hoisted_10)) 9751 }), 128))])])) 9752 : _createCommentVNode("", true), 9753 multiLocale 9754 ? (_openBlock(), _createElementBlock("div", _hoisted_14, [_createElementVNode("h3", null, _toDisplayString(t('common.language')), 1), _createElementVNode("div", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(locales, (l) => { 9755 return (_openBlock(), _createElementBlock("button", { 9756 key: l.code, 9757 class: _normalizeClass(["smallbtn", {active:l.code===locale}]), 9758 onClick: $event => (setLocale(l.code)) 9759 }, _toDisplayString(localeLabel(l)), 11, _hoisted_16)) 9760 }), 128))]), _cache[10] || (_cache[10] = _createElementVNode("p", { class: "hint" }, "اÙÙØºØ© Ø§ÙØ¹Ø±Ø¨ÙØ© ÙÙ ÙØºØ© اÙÙ ØØªÙÙ Ø§ÙØ£Ø³Ø§Ø³ÙØ©Ø Ø§ÙÙØºØ§Øª Ø§ÙØ£Ø®Ø±Ù تÙÙØ¹ÙÙÙ ØªØ¯Ø±ÙØ¬Ùا٠٠ع Ø§ÙØªÙ Ø§Ù ØªØ±Ø¬Ù ØªÙØ§.", -1))])) 9761 : _createCommentVNode("", true), 9762 (!loading && !loadError && countryCommunities.length) 9763 ? (_openBlock(), _createElementBlock("div", _hoisted_17, [ 9764 _cache[14] || (_cache[14] = _createElementVNode("h3", null, "جاÙÙØ§Øª دÙÙØªÙ ÙÙ Ø§ÙØµÙÙ", -1)), 9765 _cache[15] || (_cache[15] = _createElementVNode("p", { class: "hint" }, "ØªØ¸ÙØ± ÙÙØ§ Ø§ÙØ¬Ø§ÙÙØ§Øª اÙÙ Ø³Ø¬ÙØ© ÙØ¯ÙÙØªÙ ÙÙØ·Ø ÙÙ٠جاÙÙØ© ØªÙØ´Ø± ٠عÙÙÙ Ø§ØªÙØ§ ÙØ·Ø±ÙÙØ© Ø§ÙØªÙØ§ØµÙ Ù Ø¹ÙØ§ بÙÙØ³Ùا.", -1)), 9766 _createElementVNode("div", _hoisted_18, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(countryCommunities, (cc) => { 9767 return (_openBlock(), _createElementBlock("button", { 9768 type: "button", 9769 class: "localCommunityPublicCard clickable", 9770 key: cc.id, 9771 onClick: $event => (openCommunity(cc)) 9772 }, [ 9773 _createElementVNode("span", _hoisted_20, [_createElementVNode("h4", null, _toDisplayString(cc.name_ar), 1)]), 9774 (cc.name_en) 9775 ? (_openBlock(), _createElementBlock("span", _hoisted_21, _toDisplayString(cc.name_en), 1)) 9776 : _createCommentVNode("", true), 9777 _createElementVNode("span", null, [_cache[11] || (_cache[11] = _createElementVNode("b", null, "اÙ٠دÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString($cityLabel(cc.main_city) || '-'), 1)]), 9778 _cache[12] || (_cache[12] = _createElementVNode("small", { class: "openHint" }, "اضغط ÙÙØªØ ØµÙØØ© Ø§ÙØ¬Ø§ÙÙØ©", -1)) 9779 ], 8, _hoisted_19)) 9780 }), 128))]), 9781 _createVNode(_component_router_link, { 9782 class: "btn secondary", 9783 to: "/country-communities" 9784 }, { 9785 default: _withCtx(() => _cache[13] || (_cache[13] = [_createTextVNode("إدارة Ø£Ù Ø·ÙØ¨ تسجÙ٠جاÙÙØ©")])), 9786 _: 1, 9787 __: [13] 9788 }) 9789 ])) 9790 : _createCommentVNode("", true) 9791 ]), 9792 _: 1 9793 })) 9794 } 9795} 9796})() 9797 }; 9798 9799 9800 9801 const CommunityDetailPage={ 9802 components:{PublicFrame}, 9803 setup(){ 9804 const route=useRoute(); 9805 const state=reactive({busy:true,community:null,message:''}); 9806 async function load(){state.busy=true;state.message='';const r=await api('/api/communities/'+encodeURIComponent(route.params.slug||''));state.busy=false;if(r.ok)state.community=r.community;else state.message=r.message||'تعذر تØÙ ÙÙ ØµÙØØ© اÙ٠جت٠ع';} 9807 onMounted(load);watch(()=>route.params.slug,load); 9808 const lc=computed(()=>state.community||{}); 9809 return {state,lc,safeArray}; 9810 }, 9811 render:(function(){ 9812const _Vue = Vue 9813const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 9814 9815const _hoisted_1 = { class: "card localCommunityDetailHero" } 9816const _hoisted_2 = ["src"] 9817const _hoisted_3 = { 9818 key: 1, 9819 class: "hint" 9820} 9821const _hoisted_4 = { 9822 key: 2, 9823 class: "hint" 9824} 9825const _hoisted_5 = { 9826 key: 3, 9827 class: "hint dangerText" 9828} 9829const _hoisted_6 = { 9830 key: 0, 9831 class: "card" 9832} 9833const _hoisted_7 = { class: "communityAboutText" } 9834const _hoisted_8 = { 9835 key: 1, 9836 class: "card" 9837} 9838const _hoisted_9 = { 9839 key: 2, 9840 class: "card" 9841} 9842const _hoisted_10 = { class: "communityGalleryPublic" } 9843const _hoisted_11 = ["src", "alt"] 9844const _hoisted_12 = { 9845 key: 3, 9846 class: "card" 9847} 9848const _hoisted_13 = { class: "memberCardTop" } 9849const _hoisted_14 = { 9850 key: 0, 9851 class: "statusPill" 9852} 9853const _hoisted_15 = { 9854 key: 0, 9855 class: "hint" 9856} 9857const _hoisted_16 = { 9858 key: 1, 9859 class: "executiveGrid" 9860} 9861const _hoisted_17 = ["src"] 9862const _hoisted_18 = { 9863 key: 1, 9864 class: "avatar" 9865} 9866 9867return function render(_ctx, _cache) { 9868 with (_ctx) { 9869 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _
9869createCommentVNode, toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, createTextVNode: _createTextVNode, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 9870 9871 const _component_PublicFrame = _resolveComponent("PublicFrame") 9872 9873 return (_openBlock(), _createBlock(_component_PublicFrame, { title: lc.name_ar || 'اÙ٠جت٠ع اÙÙ ØÙÙ' }, { 9874 default: _withCtx(() => [ 9875 _createElementVNode("div", _hoisted_1, [ 9876 (lc.hero_image_url) 9877 ? (_openBlock(), _createElementBlock("img", { 9878 key: 0, 9879 class: "communityHeroPhoto", 9880 src: lc.hero_image_url, 9881 loading: "eager", 9882 alt: "ØµÙØ±Ø© اÙ٠جت٠ع" 9883 }, null, 8, _hoisted_2)) 9884 : _createCommentVNode("", true), 9885 _createElementVNode("h3", null, _toDisplayString(lc.name_ar || 'اÙ٠جت٠ع اÙÙ ØÙÙ'), 1), 9886 (lc.name_en) 9887 ? (_openBlock(), _createElementBlock("p", _hoisted_3, _toDisplayString(lc.name_en), 1)) 9888 : _createCommentVNode("", true), 9889 (state.busy) 9890 ? (_openBlock(), _createElementBlock("p", _hoisted_4, "جار٠تØÙ Ù٠٠عÙÙ٠ات اÙ٠جت٠ع...")) 9891 : _createCommentVNode("", true), 9892 (state.message) 9893 ? (_openBlock(), _createElementBlock("p", _hoisted_5, _toDisplayString(state.message), 1)) 9894 : _createCommentVNode("", true) 9895 ]), 9896 (lc.id) 9897 ? (_openBlock(), _createElementBlock("div", _hoisted_6, [_createElementVNode("h3", null, "ع٠" + _toDisplayString(lc.name_ar), 1), _createElementVNode("p", _hoisted_7, _toDisplayString(lc.about_ar || 'ÙØ§ تتÙÙØ± ٠عÙÙ٠ات ØªÙØµÙÙÙØ© ÙÙØ°Ø§ اÙ٠جت٠ع ØØ§ÙÙØ§Ù.'), 1)])) 9898 : _createCommentVNode("", true), 9899 (lc.id) 9900 ? (_openBlock(), _createElementBlock("div", _hoisted_8, [_cache[2] || (_cache[2] = _createElementVNode("h3", null, "ÙØ·Ø§Ù اÙ٠جت٠ع", -1)), _createElementVNode("p", null, [_cache[0] || (_cache[0] = _createElementVNode("b", null, "اÙ٠دÙÙØ© Ø§ÙØ±Ø¦ÙØ³ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString($cityLabel(lc.main_city) || '-'), 1)]), _createElementVNode("p", null, [_cache[1] || (_cache[1] = _createElementVNode("b", null, "اÙÙ Ø¯Ù Ø§ÙØªØ§Ø¨Ø¹Ø©:", -1)), _createTextVNode(" " + _toDisplayString(safeArray(lc.coverage_cities).map($cityLabel).join('Ø ') || '-'), 1)])])) 9901 : _createCommentVNode("", true), 9902 (safeArray(lc.images).length) 9903 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, "ØµÙØ± اÙ٠جت٠ع", -1)), _createElementVNode("div", _hoisted_10, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(lc.images), (img) => { 9904 return (_openBlock(), _createElementBlock("figure", { key: img.id }, [_createElementVNode("img", { 9905 src: img.image_url, 9906 loading: "lazy", 9907 alt: img.title || 'ØµÙØ±Ø© اÙ٠جت٠ع' 9908 }, null, 8, _hoisted_11), _createElementVNode("figcaption", null, _toDisplayString(img.title || 'ØµÙØ±Ø©'), 1)])) 9909 }), 128))])])) 9910 : _createCommentVNode("", true), 9911 (safeArray(lc.terms).length) 9912 ? (_openBlock(), _createElementBlock("div", _hoisted_12, [_cache[4] || (_cache[4] = _createElementVNode("h3", null, "اÙÙ ÙØªØ¨ Ø§ÙØªÙÙÙØ°Ù", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(safeArray(lc.terms), (t) => { 9913 return (_openBlock(), _createElementBlock("div", { 9914 class: "termPublic", 9915 key: t.id 9916 }, [_createElementVNode("div", _hoisted_13, [_createElementVNode("h4", null, _toDisplayString(t.title), 1), (t.is_current) 9917 ? (_openBlock(), _createElementBlock("span", _hoisted_14, "Ø§ÙØØ§ÙÙ")) 9918 : _createCommentVNode("", true)]), (t.period_label) 9919 ? (_openBlock(), _createElementBlock("p", _hoisted_15, _toDisplayString(t.period_label), 1)) 9920 : _createCommentVNode("", true), (t.members&&t.members.length) 9921 ? (_openBlock(), _createElementBlock("div", _hoisted_16, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(t.members, (m) => { 9922 return (_openBlock(), _createElementBlock("div", { 9923 class: "execMini", 9924 key: m.id 9925 }, [($memberPhoto(m,'thumb')) 9926 ? (_openBlock(), _createElementBlock("img", { 9927 key: 0, 9928 src: $memberPhoto(m,'thumb'), 9929 loading: "lazy", 9930 alt: "" 9931 }, null, 8, _hoisted_17)) 9932 : (_openBlock(), _createElementBlock("div", _hoisted_18, "ð¤")), _createElementVNode("b", null, _toDisplayString(m.n
9932ame), 1), _createElementVNode("small", null, _toDisplayString(m.position || 'عضÙ'), 1)])) 9933 }), 128))])) 9934 : _createCommentVNode("", true)])) 9935 }), 128))])) 9936 : _createCommentVNode("", true), 9937 _cache[5] || (_cache[5] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("h3", null, "اÙ٠صدر"), _createElementVNode("p", null, "٠عÙÙ٠ات ÙØ°Ù Ø§ÙØµÙØØ© Ù ÙØ¯Ù Ø© ٠٠إدارة اÙ٠جت٠ع اÙÙ ØÙÙ.")], -1)) 9938 ]), 9939 _: 1, 9940 __: [5] 9941 }, 8, ["title"])) 9942 } 9943} 9944})() 9945 }; 9946 9947 const AdminCasesPage={ 9948 components:{AdminFrame}, 9949 props:['mode'], 9950 setup(props){ 9951 const store=useGzcStore();const router=useRouter();const route=useRoute();const filterStatus=ref('active'); 9952 const workspaceMode=computed(()=>!!route.params.id); 9953 const targetCase=String((route.query||{}).case||'').trim(); 9954 const title=computed(()=>props.mode==='arrival'?'اÙÙØµÙÙ':'اÙ٠ساعدة'); 9955 const type=computed(()=>props.mode==='arrival'?'arrival':'help'); 9956 const basePath=computed(()=>props.mode==='arrival'?'/admin/arrivals':'/admin/help'); 9957 const baseRows=computed(()=>store.state.adminCases); 9958 const filteredRows=computed(()=>{ 9959 const all=baseRows.value; 9960 if(filterStatus.value==='all')return all; 9961 if(filterStatus.value==='active')return all.filter(c=>!['closed','resolved'].includes(String(c.status||''))); 9962 return all.filter(c=>String(c.status||'')===filterStatus.value); 9963 }); 9964 const rows=computed(()=>workspaceMode.value?baseRows.value.filter(c=>String(c.id)===String(route.params.id)):filteredRows.value); 9965 const summary=computed(()=>baseRows.value.reduce((a,c)=>{a.total++;const st=String(c.status||'open');if(['closed','resolved'].includes(st))a.closed++;else a.open++;if(st==='in_progress')a.progress++;return a;},{total:0,open:0,progress:0,closed:0})); 9966 function phoneOf(c){return norm(c.whatsapp||c.contact_whatsapp||c.china_phone||c.contact_china_phone||'');} 9967 function waLink(c){const p=phoneOf(c);return p?('https://wa.me/'+p):'#';} 9968 function telLink(c){const p=phoneOf(c);return p?('tel:+'+p):'#';} 9969 function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');} 9970 function openWorkspace(c){if(c&&c.id)router.push(basePath.value+'/'+encodeURIComponent(c.id));} 9971 function closeWorkspace(){router.push(basePath.value);} 9972 async function redirectLegacyTarget(){ 9973 if(workspaceMode.value||!targetCase)return; 9974 const row=baseRows.value.find(c=>String(c.id)===targetCase||String(c.case_code||'')===targetCase); 9975 if(row)await router.replace(basePath.value+'/'+encodeURIComponent(row.id)); 9976 } 9977 async function load(){if(await store.requireAdmin(router)){await store.loadAdminCases(type.value,router);await redirectLegacyTarget();if(workspaceMode.value&&!rows.value.length)store.state.msg='Ø§ÙØØ§ÙØ© ØºÙØ± Ù ÙØ¬Ùدة أ٠خارج ÙØ·Ø§Ù ØµÙØ§ØÙتÙ';}} 9978 onMounted(load); 9979 watch(()=>route.params.id,load); 9980 async function setStatus(c,st){if(!c||!c.id)return;store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù ØªØØ¯ÙØ« Ø§ÙØØ§ÙØ©...';const r=await api('/api/admin/cases/'+encodeURIComponent(c.id)+'/status',{method:'POST',body:JSON.stringify({status:st})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 9981 return {store,title,rows,baseRows,summary,filterStatus,workspaceMode,basePath,openWorkspace,closeWorkspace,load,setStatus,caseTypeName,caseStatusName,phoneOf,waLink,telLink,openAttachment,mediaSrc,shortDate,adminRecordUpdatedAt,adminQueueOwner,caseQueueNextAction}; 9982 }, 9983 render:(function(){ 9984const _Vue = Vue 9985const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 9986 9987const _hoisted_1 = { class: "adminQueueIntro caseQueueIntro" } 9988const _hoisted_2 = { class: "card opsSummaryCard" } 9989const _hoisted_3 = { class: "miniStats" } 9990const _hoisted_4 = { class: "opsFilterBar" } 9991const _hoisted_5 = ["onClick"] 9992const _hoisted_6 = ["onClick"] 9993const _hoisted_7 = ["onClick"] 9994const _hoisted_8 = ["onClick"] 9995const _hoisted_9 = { 9996 key: 1, 9997 class: "adminWorkspaceBackBar" 9998} 9999const _hoisted_10 = ["onClick"] 10000const _hoisted_11 = { 10001 key: 2, 10002 class: "card adminQueueState adminQueueLoading" 10003} 10004const _hoisted_12 = { 10005 key: 3, 10006 class: "card emptyCard adminQueueState" 10007} 10008const _hoisted_13 = { 10009 key: 4, 10010 class: "adminQueueList caseQueueList" 10011} 10012const _hoisted_14 = ["onClick", "onKeyup"] 10013const _hoisted_15 = { class: "adminQueueIdentity" } 10014const _hoisted_16 = { class: "memberThumb memberThumbPlaceholder" } 10015const _hoisted_17 = { class: "adminQueueFacts adminWorkflowFacts" } 10016const _hoisted_18 = { class: "adminQueueNextAction" } 10017const _hoisted_19 = ["onClick"] 10018const _hoisted_20 = { 10019 key: 5,
10020 class: "opsList" 10021} 10022const _hoisted_21 = { class: "adminRecordWorkspaceTop" } 10023const _hoisted_22 = ["onClick"] 10024const _hoisted_23 = { class: "memberCardTop compactToggleRow" } 10025const _hoisted_24 = { class: "adminEyebrow" } 10026const _hoisted_25 = { class: "hint" } 10027const _hoisted_26 = { class: "statusPill" } 10028const _hoisted_27 = { class: "compactSummaryBar" } 10029const _hoisted_28 = { dir: "ltr" } 10030const _hoisted_29 = { class: "recordNarrative" } 10031const _hoisted_30 = { class: "opsDesc" } 10032const _hoisted_31 = { 10033 key: 0, 10034 class: "announcementMediaGrid" 10035} 10036const _hoisted_32 = ["onClick"] 10037const _hoisted_33 = ["src"] 10038const _hoisted_34 = { class: "notifyMeta" } 10039const _hoisted_35 = { dir: "ltr" } 10040const _hoisted_36 = { class: "memberActions stageActions" } 10041const _hoisted_37 = ["onClick"] 10042const _hoisted_38 = ["onClick"] 10043const _hoisted_39 = ["onClick"] 10044const _hoisted_40 = ["href"] 10045const _hoisted_41 = ["href"] 10046 10047return function render(_ctx, _cache) { 10048 with (_ctx) { 10049 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, withModifiers: _withModifiers, withKeys: _withKeys, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 10050 10051 const _component_AdminFrame = _resolveComponent("AdminFrame") 10052 10053 return (_openBlock(), _createBlock(_component_AdminFrame, { title: title }, { 10054 default: _withCtx(() => [ 10055 (!workspaceMode) 10056 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("section", _hoisted_1, [_createElementVNode("div", null, [_cache[0] || (_cache[0] = _createElementVNode("span", { class: "adminEyebrow" }, "ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ù Ù", -1)), _createElementVNode("h2", null, _toDisplayString(title), 1), _createElementVNode("p", null, _toDisplayString(mode==='arrival'?'Ø·ÙØ¨Ø§Øª اÙÙØµÙÙ ÙÙÙØ±Ø² ÙØ§Ù٠تابعة. Ø§ÙØªØ Ø§ÙØ³Ø¬Ù ÙØ¥Ø¬Ø±Ø§Ø¡ Ø£Ù ØªØØ¯ÙØ«.':'Ø·ÙØ¨Ø§Øª اÙ٠ساعدة ÙÙÙØ±Ø² ÙØ§Ù٠تابعة. Ø§ÙØªØ Ø§ÙØ³Ø¬Ù ØØªÙ تبÙÙ Ø§ÙØªÙاصÙÙ ÙØ§Ùإجراءات ÙÙ Ø³ÙØ§Ù ÙØ§ØØ¯.'), 1)])]), _createElementVNode("div", _hoisted_2, [_createElementVNode("div", _hoisted_3, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.total), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.open), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "Ù ÙØªÙØØ©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.progress), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "٠تابعة", -1))])]), _createElementVNode("div", _hoisted_4, [ 10057 _createElementVNode("button", { 10058 class: _normalizeClass(filterStatus==='active'?'active':''), 10059 onClick: $event => (filterStatus='active') 10060 }, "اÙÙØ´Ø·Ø©", 10, _hoisted_5), 10061 _createElementVNode("button", { 10062 class: _normalizeClass(filterStatus==='all'?'active':''), 10063 onClick: $event => (filterStatus='all') 10064 }, "اÙÙÙ", 10, _hoisted_6), 10065 _createElementVNode("button", { 10066 class: _normalizeClass(filterStatus==='in_progress'?'active':''), 10067 onClick: $event => (filterStatus='in_progress') 10068 }, "٠تابعة", 10, _hoisted_7), 10069 _createElementVNode("button", { 10070 class: _normalizeClass(filterStatus==='closed'?'active':''), 10071 onClick: $event => (filterStatus='closed') 10072 }, "٠غÙÙØ©", 10, _hoisted_8) 10073 ])])], 64)) 10074 : _createCommentVNode("", true), 10075 workspaceMode 10076 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [_createElementVNode("button", { 10077 class: "smallbtn secondary", 10078 onClick: closeWorkspace 10079 }, "â Ø§ÙØ¹ÙØ¯Ø© Ø¥ÙÙ " + _toDisplayString(title), 9, _hoisted_10), _c
10079ache[4] || (_cache[4] = _createElementVNode("span", null, "Ù Ø³Ø§ØØ© ØØ§ÙØ© ٠ستÙÙØ© â Ø§ÙØªÙØ§ØµÙÙ ÙØ§ÙØªÙØ§ØµÙ ÙØ§Ùإجراء ÙÙ Ø³Ø¬Ù ÙØ§ØØ¯", -1))])) 10080 : _createCommentVNode("", true), 10081 (store.state.busy && !rows.length) 10082 ? (_openBlock(), _createElementBlock("div", _hoisted_11, "جار٠تØÙ ÙÙ Ø§ÙØØ§ÙØ§Øª...")) 10083 : (!rows.length) 10084 ? (_openBlock(), _createElementBlock("div", _hoisted_12, _toDisplayString(workspaceMode?'Ø§ÙØØ§ÙØ© ØºÙØ± Ù ÙØ¬Ùدة.':'ÙØ§ ØªÙØ¬Ø¯ Ø·ÙØ¨Ø§Øª Ù Ø·Ø§Ø¨ÙØ©.'), 1)) 10085 : _createCommentVNode("", true), 10086 (!workspaceMode) 10087 ? (_openBlock(), _createElementBlock("div", _hoisted_13, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (c) => { 10088 return (_openBlock(), _createElementBlock("article", { 10089 class: "adminQueueRow caseQueueRow", 10090 key: c.id, 10091 onClick: $event => (openWorkspace(c)), 10092 tabindex: "0", 10093 onKeyup: _withKeys($event => (openWorkspace(c)), ["enter"]) 10094 }
10094, [_createElementVNode("div", _hoisted_15, [_createElementVNode("div", _hoisted_16, _toDisplayString(mode==='arrival'?'â':'ð¤'), 1), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(c.case_code || c.title || 'ØØ§ÙØ©'), 1), _createElementVNode("small", null, _toDisplayString(c.full_name || c.contact_name || 'بدÙ٠اس٠') + " · " + _toDisplayString($cityLabel(c.china_city) || '-'), 1)])]), _createElementVNode("div", _hoisted_17, [ 10095 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(caseStatusName(c.status)), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))]), 10096 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminQueueOwner(mode==='arrival'?'arrival':'help',c)), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1))]), 10097 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminRecordUpdatedAt(c)), 1), _cache[7] || (_cache[7] = _createElementVNode("small", null, "آخر ØªØØ¯ÙØ«", -1))]), 10098 _createElementVNode("span", _hoisted_18, [_createElementVNode("b", null, _toDisplayString(caseQueueNextAction(c)), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1))]) 10099 ]), _createElementVNode("button", { 10100 class: "smallbtn secondary adminQueueOpen", 10101 onClick: _withModifiers($event => (openWorkspace(c)), ["stop"]) 10102 }, "ÙØªØ Ø§ÙØØ§ÙØ©", 8, _hoisted_19)], 40, _hoisted_14)) 10103 }), 128))])) 10104 : (_openBlock(), _createElementBlock("div", _hoisted_20, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (c) => { 10105 return (_openBlock(), _createElementBlock("article", { 10106 class: "card opsCard opsCompactCard adminRecordWorkspace recordWorkspaceOnly caseRecordWorkspace", 10107 key: c.id 10108 }, [ 10109 _createElementVNode("div", _hoisted_21, [_createElementVNode("button", { 10110 class: "smallbtn secondary", 10111 onClick: closeWorkspace 10112 }, "â Ø§ÙØ¹ÙØ¯Ø© Ø¥ÙÙ " + _toDisplayString(title), 9, _hoisted_22)]), 10113 _createElementVNode("div", _hoisted_23, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_24, _toDisplayString(caseTypeName(c.type)), 1), _createElementVNode("h3", null, _toDisplayString(c.case_code || c.title || 'ØØ§ÙØ©'), 1), _createElementVNode("p", _hoisted_25, _toDisplayString(c.full_name || c.contact_name || 'بدÙ٠اس٠') + " · " + _toDisplayString($cityLabel(c.china_city) || '-'), 1)]), _createElementVNode("span", _hoisted_26, _toDisplayString(caseStatusName(c.status)), 1)]), 10114 _createElementVNode("div", _hoisted_27, [_createElementVNode("span", null, [_createElementVNode("b", _hoisted_28, _toDisplayString(phoneOf(c)||'-'), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "Ø§ÙØªÙاصÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(shortDate(c.created_at)), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "ØªØ§Ø±ÙØ® اÙÙØªØ", -1))])]), 10115 _createElementVNode("section", _hoisted_29, [_cache[11] || (_cache[11] = _createElementVNode("h4", null, "ØªÙØ§ØµÙÙ Ø§ÙØØ§ÙØ©", -1)), _createElementVNode("p", _hoisted_30, _toDisplayString(c.description || 'ÙØ§ ÙÙØ¬Ø¯ ÙØµÙ.'), 1)]), 10116 (c.media&&c.media.length) 10117 ? (_openBlock(), _createElementBlock("div", _hoisted_31, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(c.media, (m) => { 10118 return (_openBlock(), _createElementBlock("button", { 10119 key: m.id, 10120 class: "announcementMediaItem", 10121 onClick: $event => (openAttachment(m)) 10122 }, [_createElementVNode("img", { 10123 src: mediaSrc(m), 10124 loading: "lazy", 10125 alt: "ØµÙØ±Ø© Ø§ÙØØ§ÙØ©" 10126 }, null, 8, _hoisted_33), _cache[12] || (_cache[12] = _createElementVNode("span", null, "ØµÙØ±Ø©", -1))], 8, _hoisted_32)) 10127 }), 128))])) 10128 : _createCommentVNode("", true), 10129 _createElementVNode("div", _hoisted_34, [ 10130 _createElementVNode("span", null, _toDisplayString(c.full_name || c.contact_name || 'بدÙ٠اس٠'), 1), 10131 _createElementVNode("span", _hoisted_35, _toDisplayString(phoneOf(c)||'-'), 1), 10132 _createElementVNode("span", null, _toDisplayString($cityLabel(c.china_city) || '-'), 1), 10133 _createElementVNode("span", null, _toDisplayString(shortDate(c.created_at)), 1) 10134 ]), 10135 _createElementVNode("div", _hoisted_36, [ 10136 _createElementVNode("button", { 10137 class: "smallbtn", 10138 onClick: $event => (setStatus(c,'open')) 10139 }, "Ù ÙØªÙØØ©", 8, _hoisted_37), 10140 _createElementVNode("button", { 10141 class: "smallbtn", 10142 onClick: $event => (setStatus(c,'in_progress')) 10143 }, "ÙÙØ¯ اÙ٠تابعة", 8, _hoisted_38), 10144 _createElementVNode("button", { 10145 class: "smallbtn danger", 10146 onClick: $event => (setStatus(c,'closed')) 10147 }, "Ø¥ØºÙØ§Ù", 8, _hoisted_39), 10148 _createElementVNode("a", { 10149 class: "smallbtn secondary", 10150 href: waLink(c), 10151 target: "_blank" 10152 }, "ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_40), 10153 _createElementVNode("a", { 10154 class: "smallbtn secondary", 10155 href: telLink(c) 10156 }, "اتصاÙ", 8, _hoisted_41) 10157 ]) 10158 ])) 10159 }), 128))])) 10160 ]), 10161 _: 1 10162 }, 8, ["title"])) 10163 } 10164} 10165})() 10166 }; 10167 10168 const AdminEmergencyPage={ 10169 components:{AdminFrame}, 10170 setup(){ 10171 const store=useGzcStore();const router=useRouter();const route=useRoute();const filterStatus=ref('active'); 10172 const workspaceMode=computed(()=>!!route.params.id);const targetTicket=String((route.query||{}).ticket||'').trim(); 10173 const filteredRows=computed(()=>
10173{const all=store.state.emergencies;if(filterStatus.value==='all')return all;if(filterStatus.value==='active')return all.filter(e=>!['closed','resolved'].includes(String(e.status||'')));return all.filter(e=>String(e.status||'')===filterStatus.value);}); 10174 const rows=computed(()=>workspaceMode.value?store.state.emergencies.filter(e=>String(e.id)===String(route.params.id)):filteredRows.value); 10175 const summary=computed(()=>store.state.emergencies.reduce((a,e)=>{a.total++;const st=String(e.status||'open');if(['closed','resolved'].includes(st))a.closed++;else a.open++;if(st==='in_progress')a.progress++;if(String(e.priority||'')==='high')a.high++;return a;},{total:0,open:0,progress:0,closed:0,high:0})); 10176 function phoneOf(e){return norm(e.whatsapp||e.china_phone||'');} 10177 function waLink(e){const p=phoneOf(e);return p?('https://wa.me/'+p):'#';} 10178 function telLink(e){const p=phoneOf(e);return p?('tel:+'+p):'#';} 10179 function mapLink(e){const loc=String(e.location_text||'');return loc.includes(',')?('https://maps.google.com/?q='+encodeURIComponent(loc)):'';} 10180 function priorityName(v){return ({low:'Ø¹Ø§Ø¯ÙØ©',normal:'Ø¹Ø§Ø¯ÙØ©',medium:'Ù ØªÙØ³Ø·Ø©',high:'Ø¹Ø§Ø¬ÙØ©',critical:'ØØ±Ø¬Ø©'}[String(v||'')])||String(v||'-');} 10181 function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');} 10182 function openWorkspace(e){if(e&&e.id)router.push('/admin/emergency/'+encodeURIComponent(e.id));} 10183 function closeWorkspace(){router.push('/admin/emergency');} 10184 async function redirectLegacyTarget(){if(workspaceMode.value||!targetTicket)return;const row=store.state.emergencies.find(e=>String(e.id)===targetTicket||String(e.ticket_code||'')===targetTicket);if(row)await router.replace('/admin/emergency/'+encodeURIComponent(row.id));} 10185 async function load(){if(await store.requireAdmin(router)){await store.loadAdminEmergencies(router);await redirectLegacyTarget();if(workspaceMode.value&&!rows.value.length)store.state.msg='Ø¨ÙØ§Øº Ø§ÙØ·Ùارئ ØºÙØ± Ù ÙØ¬Ùد أ٠خارج ÙØ·Ø§Ù ØµÙØ§ØÙتÙ';}} 10186 onMounted(load);watch(()=>route.params.id,load); 10187 async function setStatus(e,st){if(!e||!e.id)return;store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù ØªØØ¯ÙØ« Ø¨ÙØ§Øº Ø§ÙØ·Ùارئ...';const r=await api('/api/admin/emergencies/'+encodeURIComponent(e.id)+'/status',{method:'POST',body:JSON.stringify({status:st})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 10188 return {store,rows,summary,filterStatus,workspaceMode,openWorkspace,closeWorkspace,load,setStatus,caseTypeName,caseStatusName,priorityName,phoneOf,waLink,telLink,mapLink,openAttachment,mediaSrc,shortDate,adminRecordUpdatedAt,adminQueueOwner,emergencyQueueNextAction}; 10189 }, 10190 render:(function(){ 10191const _Vue = Vue 10192const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 10193 10194const _hoisted_1 = { class: "card opsSummaryCard emergencyOps" } 10195const _hoisted_2 = { class: "miniStats" } 10196const _hoisted_3 = { class: "opsFilterBar" } 10197const _hoisted_4 = ["onClick"] 10198const _hoisted_5 = ["onClick"] 10199const _hoisted_6 = ["onClick"] 10200const _hoisted_7 = ["onClick"] 10201const _hoisted_8 = { 10202 key: 1, 10203 class: "adminWorkspaceBackBar emergencyWorkspaceBack" 10204} 10205const _hoisted_9 = ["onClick"] 10206const _hoisted_10 = { 10207 key: 2, 10208 class: "card adminQueueState adminQueueLoading" 10209} 10210const _hoisted_11 = { 10211 key: 3, 10212 class: "card emptyCard adminQueueState" 10213} 10214const _hoisted_12 = { 10215 key: 4, 10216 class: "adminQueueList emergencyQueueList" 10217} 10218const _hoisted_13 = ["onClick", "onKeyup"] 10219const _hoisted_14 = { class: "adminQueueIdentity" } 10220const _hoisted_15 = { class: "adminQueueFacts adminWorkflowFacts" } 10221const _hoisted_16 = { class: "adminQueueNextAction" } 10222const _hoisted_17 = ["onClick"] 10223const _hoisted_18 = { 10224 key: 5, 10225 class: "opsList" 10226} 10227const _hoisted_19 = { class: "adminRecordWorkspaceTop" } 10228const _hoisted_20 = ["onClick"] 10229const _hoisted_21 = { class: "memberCardTop compactToggleRow" } 10230const _hoisted_22 = { class: "hint" } 10231const _hoisted_23 = { class: "statusPill dangerPill" } 10232const _hoisted_24 = { class: "compactSummaryBar" } 10233const _hoisted_25 = { dir: "ltr" } 10234const _hoisted_26 = { class: "recordNarrative emergencyNarrative" } 10235const _hoisted_27 = { class: "opsDesc" } 10236const _hoisted_28 = { class: "metaRow" } 10237const _hoisted_29 = { 10238 key: 0, 10239 class: "announcementMediaGrid" 10240} 10241const _hoisted_30 = ["onClick"] 10242const _hoisted_31 = ["src"] 10243const _hoisted_32 = { class: "memberActions stageActions emergencyStageActions" } 10244const _hoisted_33 = ["onClick"] 10245const _hoisted_34 = ["onClick"] 10246const _hoisted_35 = ["onClick"] 10247const _hoisted_36 = ["href"] 10248const _hoisted_37 = ["href"] 10249const _hoisted_38 = ["href"] 10250 10251return function render(_ctx, _cache) { 10252 with (_ctx) {
10253 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, withModifiers: _withModifiers, withKeys: _withKeys, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 10254 10255 const _component_AdminFrame = _resolveComponent("AdminFrame") 10256 10257 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØ·Ùارئ" }, { 10258 default: _withCtx(() => [ 10259 (!workspaceMode) 10260 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_cache[3] || (_cache[3] = _createElementVNode("section", { class: "adminQueueIntro emergencyQueueIntro" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ÙØ§Ø¦Ù Ø© Ø¹Ø§Ø¬ÙØ©"), _createElementVNode("h2", null, "Ø§ÙØ·Ùارئ"), _createElementVNode("p", null, "اÙÙØ§Ø¦Ù Ø© ÙÙÙØ±Ø² Ø§ÙØ³Ø±Ùع ÙÙØ·. Ø§ÙØªØ Ø§ÙØ¨Ùاغ ÙØ¨Ù اتخاذ إجراء ØØªÙ تبÙÙ Ø§ÙØªÙاصÙÙ ÙØ§ÙØªÙØ§ØµÙ ÙØ§ÙØØ§ÙØ© ÙÙ Ø³ÙØ§Ù ÙØ§ØØ¯.")])], -1)), _createElementVNode("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.total), 1), _cache[0] || (_cache[0] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.open), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "ÙØ´Ø·Ø©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.high), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "Ø¹Ø§Ø¬ÙØ©", -1))])]), _createElementVNode("div", _hoisted_3, [ 10261 _createElementVNode("button", { 10262 class: _normalizeClass(filterStatus==='active'?'active':''), 10263 onClick: $event => (filterStatus='active') 10264 }, "اÙÙØ´Ø·Ø©", 10, _hoisted_4), 10265 _createElementVNode("button", { 10266 class: _normalizeClass(filterStatus==='all'?'active':''), 10267 onClick: $event => (filterStatus='all') 10268 }, "اÙÙÙ", 10, _hoisted_5), 10269 _createElementVNode("button", { 10270 class: _normalizeClass(filterStatus==='in_progress'?'active':''), 10271 onClick: $event => (filterStatus='in_progress') 10272 }, "٠تابعة", 10, _hoisted_6), 10273 _createElementVNode("button", { 10274 class: _normalizeClass(filterStatus==='closed'?'active':''), 10275 onClick: $event => (filterStatus='closed') 10276 }, "٠غÙÙØ©", 10, _hoisted_7) 10277 ])])], 64)) 10278 : _createCommentVNode("", true), 10279 workspaceMode 10280 ? (_openBlock(), _createElementBlock("div", _hoisted_8, [_createElementVNode("button", { 10281 class: "smallbtn secondary", 10282 onClick: closeWorkspace 10283 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙØ·Ùارئ", 8, _hoisted_9), _cache[4] || (_cache[4] = _createElementVNode("span", null, "Ù Ø³Ø§ØØ© Ø¨ÙØ§Øº ٠ستÙÙØ© â Ø§ÙØ£ÙÙÙÙØ© ÙØ§ÙØªÙØ§ØµÙ ÙØ§ÙÙ ÙÙØ¹ ÙØ§Ùإجراء ÙÙ Ø³Ø¬Ù ÙØ§ØØ¯", -1))])) 10284 : _createCommentVNode("", true), 10285 (store.state.busy && !rows.length) 10286 ? (_openBlock(), _createElementBlock("div", _hoisted_10, "جار٠تØÙ ÙÙ Ø¨ÙØ§ØºØ§Øª Ø§ÙØ·Ùارئ...")) 10287 : (!rows.length) 10288 ? (_openBlock(), _createElementBlock("div", _hoisted_11, _toDisplayString(workspaceMode?'Ø¨ÙØ§Øº Ø§ÙØ·Ùارئ ØºÙØ± Ù ÙØ¬Ùد.':'ÙØ§ ØªÙØ¬Ø¯ Ø¨ÙØ§ØºØ§Øª Ù Ø·Ø§Ø¨ÙØ©.'), 1)) 10289 : _createCommentVNode("", true), 10290 (!workspaceMode) 10291 ? (_openBlock(), _createElementBlock("div", _hoisted_12, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (e) => { 10292 return (_openBlock(), _createElementBlock("article", { 10293 class: "adminQueueRow emergencyQueueRow", 10294 key: e.id, 10295 onClick: $event => (openWorkspace(e)), 10296 tabindex: "0", 10297 onKeyup: _withKeys($event => (openWorkspace(e)), ["enter"]) 10298 }, [_createElementVNode("div", _hoisted_14, [_cache[5] || (_cache[5] = _createElementVNode("div", { class: "memberThumb memberThumbPlaceholder emergencyAvatar" }, "!", -1)), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(e.ticket_code || 'Ø¨ÙØ§Øº Ø·ÙØ§Ø±Ø¦'), 1), _createElementVNode("small", null, _toDisplayString(e.full_name || 'عضÙ') + " · " + _toDisplayString(e.location_text || $cityLabel(e.china_city) || 'بدÙÙ Ù ÙÙØ¹'), 1)])]), _createElementVNode("div", _hoisted_15, [ 10299 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(caseStatusName(e.status)), 1), _createElementVNode("small", null, "Ø§ÙØØ§ÙØ© · " + _toDisplayString(priorityName(e.priority)), 1)]), 10300 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminQueueOwner('emergency',e)), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1))]), 10301 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminRecordUpdatedAt(e)), 1
10301), _cache[7] || (_cache[7] = _createElementVNode("small", null, "آخر ØªØØ¯ÙØ«", -1))]), 10302 _createElementVNode("span", _hoisted_16, [_createElementVNode("b", null, _toDisplayString(emergencyQueueNextAction(e)), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1))]) 10303 ]), _createElementVNode("button", { 10304 class: "smallbtn secondary adminQueueOpen", 10305 onClick: _withModifiers($event => (openWorkspace(e)), ["stop"]) 10306 }, "ÙØªØ Ø§ÙØ¨Ùاغ", 8, _hoisted_17)], 40, _hoisted_13)) 10307 }), 128))])) 10308 : (_openBlock(), _createElementBlock("div", _hoisted_18, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (e) => { 10309 return (_openBlock(), _createElementBlock("article", { 10310 class: "card opsCard emergencyOps adminRecordWorkspace recordWorkspaceOnly emergencyRecordWorkspace", 10311 key: e.id 10312 }, [ 10313 _createElementVNode("div", _hoisted_19, [_createElementVNode("button", { 10314 class: "smallbtn secondary", 10315 onClick: closeWorkspace 10316 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙØ·Ùارئ", 8, _hoisted_20)]), 10317 _createElementVNode("div", _hoisted_21, [_createElementVNode("div", null, [_cache[9] || (_cache[9] = _createElementVNode("span", { class: "adminEyebrow" }, "Ø¨ÙØ§Øº Ø·ÙØ§Ø±Ø¦", -1)), _createElementVNode("h3", null, _toDisplayString(e.ticket_code || 'Ø¨ÙØ§Øº'), 1), _createElementVNode("p", _hoisted_22, _toDisplayString(e.full_name || 'عضÙ') + " · Ø§ÙØ£ÙÙÙÙØ©: " + _toDisplayString(priorityName(e.priority)), 1)]), _createElementVNode("span", _hoisted_23, _toDisplayString(caseStatusName(e.status)), 1)]), 10318 _createElementVNode("div", _hoisted_24, [_createElementVNode("span", null, [_createElementVNode("b", _hoisted_25, _toDisplayString(phoneOf(e)||'-'), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "Ø§ÙØªÙاصÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(shortDate(e.created_at)), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "ÙÙØª Ø§ÙØ¨Ùاغ", -1))])]), 10319 _createElementVNode("section", _hoisted_26, [_cache[13] || (_cache[13] = _createElementVNode("h4", null, "ØªÙØ§ØµÙÙ Ø§ÙØ¨Ùاغ", -1)), _createElementVNode("p", _hoisted_27, _toDisplayString(e.description || 'ÙØ§ ÙÙØ¬Ø¯ ÙØµÙ.'), 1), _createElementVNode("div", _hoisted_28, [_cache[12] || (_cache[12] = _createElementVNode("b", null, "اÙÙ ÙÙØ¹", -1)), _createElementVNode("span", null, _toDisplayString(e.location_text || $cityLabel(e.china_city) || 'ØºÙØ± Ù ØØ¯Ø¯'), 1)])]), 10320 (e.media&&e.media.length) 10321 ? (_openBlock(), _createElementBlock("div", _hoisted_29, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(e.media, (m) => { 10322 return (_openBlock(), _createElementBlock("button", { 10323 key: m.id, 10324 class: "announcementMediaItem", 10325 onClick: $event => (openAttachment(m)) 10326 }, [_createElementVNode("img", { 10327 src: mediaSrc(m), 10328 loading: "lazy", 10329 alt: "ØµÙØ±Ø© Ø§ÙØ¨Ùاغ" 10330 }, null, 8, _hoisted_31), _cache[14] || (_cache[14] = _createElementVNode("span", null, "ØµÙØ±Ø©", -1))], 8, _hoisted_30)) 10331 }), 128))])) 10332 : _createCommentVNode("", true), 10333 _createElementVNode("div", _hoisted_32, [ 10334 _createElementVNode("button", { 10335 class: "smallbtn", 10336 onClick: $event => (setStatus(e,'open')) 10337 }, "Ù ÙØªÙØ", 8, _hoisted_33), 10338 _createElementVNode("button", { 10339 class: "smallbtn", 10340 onClick: $event => (setStatus(e,'in_progress')) 10341 }, "ÙÙØ¯ اÙ٠تابعة", 8, _hoisted_34), 10342 _createElementVNode("button", { 10343 class: "smallbtn danger", 10344 onClick: $event => (setStatus(e,'closed')) 10345 }, "Ø¥ØºÙØ§Ù Ø§ÙØ¨Ùاغ", 8, _hoisted_35), 10346 _createElementVNode("a", { 10347 class: "smallbtn secondary", 10348 href: waLink(e), 10349 target: "_blank" 10350 }, "ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_36), 10351 _createElementVNode("a", { 10352 class: "smallbtn secondary", 10353 href: telLink(e) 10354 }, "اتصاÙ", 8, _hoisted_37), 10355 (mapLink(e)) 10356 ? (_openBlock(), _createElementBlock("a", { 10357 key: 0, 10358 class: "smallbtn secondary", 10359 href: mapLink(e), 10360 target: "_blank" 10361 }, "ÙØªØ اÙÙ ÙÙØ¹", 8, _hoisted_38)) 10362 : _createCommentVNode("", true) 10363 ]) 10364 ])) 10365 }), 128))])) 10366 ]), 10367 _: 1 10368 })) 10369 } 10370} 10371})() 10372 }; 10373 10374 const AdminEventsPage={ 10375 components:{AdminFrame}, 10376 setup(){ 10377 const store=useGzcStore();const router=useRouter();const route=useRoute();const files=reactive({});const editOpen=reactive({});const filterStatus=ref('active');const search=ref('');const actionBusy=reactive({}); 10378 const workspaceMode=computed(()=>!!route.params.id); 10379 const summary=computed(()=>Object.assign({all:0,total:0,active:0,completed:0,archived:0,media:0},store.state.eventMeta.counts||{}, {all:Number((store.state.eventMeta.counts||{}).total||0)})); 10380 const visibleEvents=computed(()=>safeArray(store.state.events)); 10381 const workspaceMedia=computed(()=>workspaceMode.value?safeArray(store.state.eventMedia[route.params.id]):[]); 10382 const workspacePhotos=computed(()=>workspaceMedia.value.filter(m=>String(m.kind)==='image')); 10383 const workspaceVideos=computed(()=>workspaceMedia.value.filter(m=>String(m.kind)==='video')); 10384 const workspacePreview=computed(()=>workspaceMedia.value.slice(0,6)); 10385 const form=reactive({title:'',title_cn:'',description:'',location:'',address_cn:'',amap_url:'',event_date:'',event_time:'',category:'community_meeting',attendees_count:0,families_count:0,max_seats:0,registration_required:false,checkin_enabled:false,public_visibility:false,public_summary:'',public_location:''}); 10386 const edit=reactive({}); 10387 function setBusy(key,v){actionBusy[key]=!!v;} 10388 async function load(){ 10389 if(!(await store.requireAdmin(router)))return; 10390 if(workspaceMode.value){store.state.busy=true;const r=await store.loadAdminEvent(route.params.id,router);if(r&&r.ok)await store.loadEventMedia(route.params.id,router);else store.state.msg='اÙÙØ¹Ø§ÙÙØ© ØºÙØ± Ù ÙØ¬Ùدة أ٠خارج ÙØ·Ø§Ù ØµÙØ§ØÙتÙ';store.state.busy=false;return;} 10391 await store.loadAdminEvents(router,{page:1,limit:30,status:filterStatus.value,search:search.value}); 10392 } 10393 async function loadMore(){if(!store.state.eventMeta.has_more)return;setBusy('more',true);await store.loadAdminEvents(router,{page:Number(store.state.eventMeta.page||1)+1,limit:30,status:filterStatus.value,search:search.value,append:true});setBusy('more',false);} 10394 onMounted(load);watch(()=>route.params.id,load);watch(filterStatus,()=>{if(!workspaceMode.value)load();}); 10395 let searchTimer=0;
10395watch(search,()=>{if(workspaceMode.value)return;clearTimeout(searchTimer);searchTimer=setTimeout(load,300);}); 10396 function reset(){Object.assign(form,{title:'',title_cn:'',description:'',location:'',address_cn:'',amap_url:'',event_date:'',event_time:'',category:'community_meeting',attendees_count:0,families_count:0,max_seats:0,registration_required:false,checkin_enabled:false,public_visibility:false,public_summary:'',public_location:''});} 10397 async function createEvent(){setBusy('create',true);store.state.msg='Ø¬Ø§Ø±Ù Ø¥ÙØ´Ø§Ø¡ اÙÙØ¹Ø§ÙÙØ©...';const payload=Object.assign({},form,{attendees_count:Number(form.attendees_count||0),families_count:Number(form.families_count||0),max_seats:Number(form.max_seats||0)});const r=await api('/api/admin/events',{method:'POST',body:JSON.stringify(payload)});setBusy('create',false);store.state.msg=r.message||r.error||'';if(r.ok){reset();if(r.id)router.push('/admin/events/'+encodeURIComponent(r.id));}} 10398 function onFiles(e,id){files[id]=Array.from(e.target.files||[]);} 10399 async function uploadMedia(ev){const list=files[ev.id]||[];if(!list.length){store.state.msg='اختر ØµÙØ± Ø£Ù ÙÙØ¯ÙÙÙØ§Øª Ø£ÙÙØ§Ù';return;}const fd=new FormData();list.forEach(f=>fd.append('files',f));setBusy('upload:'+ev.id,true);store.state.msg='Ø¬Ø§Ø±Ù Ø±ÙØ¹ ÙØ³Ø§Ø¦Ø· اÙÙØ¹Ø§ÙÙØ©...';const r=await uploadApi('/api/admin/events/'+encodeURIComponent(ev.id)+'/media',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ÙØ³Ø§Ø¦Ø· اÙÙØ¹Ø§ÙÙØ©'});setBusy('upload:'+ev.id,false);store.state.msg=r.message||r.error||'';files[ev.id]=[];if(r.ok){if(r.event)store.replaceEvent(r.event);store.state.eventMedia[ev.id]=safeArray(store.state.eventMedia[ev.id]).concat(safeArray(r.media));}} 10400 function openWorkspace(e){if(e&&e.id)router.push('/admin/events/'+encodeURIComponent(e.id));} 10401 function closeWorkspace(){router.push('/admin/events');} 10402 function startEdit(e){editOpen[e.id]=true;edit[e.id]={title:e.title||'',title_cn:e.title_cn||'',description:e.description||'',location:e.location||'',address_cn:e.address_cn||'',amap_url:e.amap_url||'',event_date:(e.event_date||'').slice(0,10),event_time:e.event_time||'',category:e.category||'community_meeting',status:e.status||'published',attendees_count:Number(e.attendees_count||0),families_count:Number(e.families_count||0),max_seats:Number(e.max_seats||0),registration_required:!!e.registration_required,checkin_enabled:!!e.checkin_enabled,public_visibility:!!e.public_visibility,public_summary:e.public_summary||'',public_location:e.public_location||''};} 10403 function cancelEdit(e){editOpen[e.id]=false;} 10404 async function saveEvent(e){const payload=edit[e.id];if(!payload){store.state.msg='ÙØ§ ØªÙØ¬Ø¯ تعدÙÙØ§Øª Ù ØÙÙØ¸Ø©';return;}setBusy('save:'+e.id,true);store.state.msg='Ø¬Ø§Ø±Ù ØªØØ¯ÙØ« اÙÙØ¹Ø§ÙÙØ©...';const r=await api('/api/admin/events/'+encodeURIComponent(e.id)+'/update',{method:'POST',body:JSON.stringify(payload)});setBusy('save:'+e.id,false);store.state.msg=r.message||r.error||'';if(r.ok){editOpen[e.id]=false;if(r.event)store.replaceEvent(r.event);}} 10405 async function setEventStatus(e,status){if(!e||!e.id)return;setBusy('status:'+e.id,true);const r=await api('/api/admin/events/'+encodeURIComponent(e.id)+'/status',{method:'POST',body:JSON.stringify({status})});setBusy('status:'+e.id,false);store.state.msg=r.message||r.error||'';if(r.ok&&r.event)store.replaceEvent(r.event);} 10406 async function sendReminder(e){if(!e||!e.id)return;setBusy('reminder:'+e.id,true);const r=await api('/api/admin/events/'+encodeURIComponent(e.id)+'/reminder',{method:'POST',body:JSON.stringify({type:'upcoming'})});setBusy('reminder:'+e.id,false);store.state.msg=r.message||r.error||'';} 10407 async function setCover(m){if(!m||!m.id||String(m.kind)!=='image')return;setBusy('cover:'+m.id,true);store.state.msg='جار٠تعÙÙÙ ØºÙØ§Ù اÙÙØ¹Ø§ÙÙØ©...';const r=await api('/api/admin/event-media/'+encodeURIComponent(m.id)+'/cover',{method:'POST'});setBusy('cover:'+m.id,false);store.state.msg=r.message||r.error||'';if(r.ok){if(r.event)store.replaceEvent(r.event);const list=safeArray(store.state.eventMedia[route.params.id]);store.state.eventMedia[route.params.id]=list.map(x=>Object.assign({},x,{is_cover:String(x.id)===String(m.id)}));}} 10408 function shareWhatsapp(e){const lines=['ÙØ¹Ø§ÙÙØ© Ù Ù Ù ÙØµØ© SMT China',e.title||'ÙØ¹Ø§ÙÙØ©',displayDateAr(e.event_date),e.event_time||'',e.location||e.address_cn||'',location.origin+'/events/'+e.id].filter(
10408Boolean);window.open('https://wa.me/?text='+encodeURIComponent(lines.join('\n')),'_blank');} 10409 return {store,form,files,editOpen,edit,filterStatus,search,actionBusy,workspaceMode,summary,visibleEvents,workspaceMedia,workspacePhotos,workspaceVideos,workspacePreview,load,loadMore,createEvent,onFiles,uploadMedia,openWorkspace,closeWorkspace,startEdit,cancelEdit,saveEvent,setEventStatus,sendReminder,setCover,shareWhatsapp,eventCategoryName,eventStatusName,displayDateAr,mediaSrc,isVideo,mediaKindName,adminRecordUpdatedAt,adminQueueOwner,eventQueueNextAction}; 10410 }, 10411 render:(function(){ 10412const _Vue = Vue 10413const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 10414 10415const _hoisted_1 = { 10416 key: 0, 10417 class: "card collapseSection formCard eventComposer" 10418} 10419const _hoisted_2 = { class: "collapseBody" } 10420const _hoisted_3 = { class: "eventFormStack" } 10421const _hoisted_4 = { class: "fieldBlock" } 10422const _hoisted_5 = ["onUpdate:modelValue"] 10423const _hoisted_6 = { class: "fieldBlock" } 10424const _hoisted_7 = ["onUpdate:modelValue"] 10425const _hoisted_8 = { class: "fieldBlock" } 10426const _hoisted_9 = ["onUpdate:modelValue"] 10427const _hoisted_10 = { class: "editGrid eventEditGrid" } 10428const _hoisted_11 = { class: "fieldBlock" } 10429const _hoisted_12 = ["onUpdate:modelValue"] 10430const _hoisted_13 = { class: "fieldBlock" } 10431const _hoisted_14 = ["onUpdate:modelValue"] 10432const _hoisted_15 = { class: "fieldBlock" } 10433const _hoisted_16 = ["onUpdate:modelValue"] 10434const _hoisted_17 = { class: "fieldBlock" } 10435const _hoisted_18 = ["onUpdate:modelValue"] 10436const _hoisted_19 = { class: "fieldBlock" } 10437const _hoisted_20 = ["onUpdate:modelValue"] 10438const _hoisted_21 = { class: "editGrid eventEditGrid" } 10439const _hoisted_22 = { class: "fieldBlock" } 10440const _hoisted_23 = ["onUpdate:modelValue"] 10441const _hoisted_24 = ["value"] 10442const _hoisted_25 = { class: "fieldBlock" } 10443const _hoisted_26 = ["onUpdate:modelValue"] 10444const _hoisted_27 = { class: "fieldBlock" } 10445const _hoisted_28 = ["onUpdate:modelValue"] 10446const _hoisted_29 = { class: "fieldBlock" } 10447const _hoisted_30 = ["onUpdate:modelValue"] 10448const _hoisted_31 = { class: "checkgrid twoChecks" } 10449const _hoisted_32 = { class: "check" } 10450const _hoisted_33 = ["onUpdate:modelValue"] 10451const _hoisted_34 = { class: "check" } 10452const _hoisted_35 = ["onUpdate:modelValue"] 10453const _hoisted_36 = { class: "publicShareBox" } 10454const _hoisted_37 = { class: "check" } 10455const _hoisted_38 = ["onUpdate:modelValue"] 10456const _hoisted_39 = { 10457 key: 0, 10458 class: "editGrid" 10459} 10460const _hoisted_40 = ["onUpdate:modelValue"] 10461const _hoisted_41 = ["onUpdate:modelValue"] 10462const _hoisted_42 = ["onClick"] 10463const _hoisted_43 = { 10464 key: 1, 10465 class: "adminQueueIntro eventQueueIntro" 10466} 10467const _hoisted_44 = ["onClick"] 10468const _hoisted_45 = { 10469 key: 2, 10470 class: "miniStats mediaMini eventQueueStats" 10471} 10472const _hoisted_46 = { 10473 key: 3, 10474 class: "card eventSearchBar" 10475} 10476const _hoisted_47 = ["onUpdate:modelValue"] 10477const _hoisted_48 = { 10478 key: 4, 10479 class: "opsFilterBar announcementQueueFilters eventQueueFilters" 10480} 10481const _hoisted_49 = ["onClick"] 10482const _hoisted_50 = ["onClick"] 10483const _hoisted_51 = ["onClick"] 10484const _hoisted_52 = ["onClick"] 10485const _hoisted_53 = { 10486 key: 5, 10487 class: "card adminQueueState adminQueueLoading" 10488} 10489const _hoisted_54 = { 10490 key: 6, 10491 class: "card emptyCard adminQueueState" 10492} 10493const _hoisted_55 = { 10494 key: 7, 10495 class: "adminWorkspaceBackBar eventWorkspaceBack eventRecordTop" 10496} 10497const _hoisted_56 = ["onClick"] 10498const _hoisted_57 = { 10499 key: 8, 10500 class: "adminQueueList eventQueueList" 10501} 10502const _hoisted_58 = ["onClick", "onKeyup"] 10503const _hoisted_59 = { class: "adminQueueIdentity" } 10504const _hoisted_60 = { class: "eventQueueThumb" } 10505const _hoisted_61 = ["src"] 10506const _hoisted_62 = { key: 1 } 10507const _hoisted_63 = { class: "adminQueueFacts adminWorkflowFacts" } 10508const _hoisted_64 = { class: "adminQueueNextAction" } 10509const _hoisted_65 = ["onClick"] 10510const _hoisted_66 = ["disabled", "onClick"] 10511const _hoisted_67 = { 10512 key: 10, 10513 class: "opsList eventWorkspaceList" 10514} 10515const _hoisted_68 = ["src"] 10516const _hoisted_69 = { class: "eventWorkspaceHeader" } 10517const _hoisted_70 = { class: "adminEyebrow" } 10518const _hoisted_71 = { class: "eventStateRow" } 10519const _hoisted_72 = { class: "statusPill" } 10520const _hoisted_73 = { 10521 key: 0, 10522 class: "statusPill publicStatus" 10523} 10524const _hoisted_74 = { class: "eventWorkspaceCounts" } 10525const _hoisted_75 = { class: "eventActionBar" } 10526const _hoisted_76 = ["onClick"] 10527const _hoisted_77 = ["onClick"] 10528const _hoisted_78 = ["onClick"] 10529const _hoisted_79 = ["onClick"] 10530const _hoisted_80 = ["onClick"] 10531const _hoisted_81 = ["onClick"] 10532const _hoisted_82 = ["onClick"] 10533const _hoisted_83 = { class: "eventWorkspaceSection" } 10534const _hoisted_84 = { class: "eventQuickMeta" } 10535const _hoisted_85 = { class: "metaRow" } 10536const _hoisted_86 = { class: "metaRow" } 10537const _hoisted_87 = { class: "metaRow" } 10538const _hoisted_88 = { class: "metaRow" } 10539const _hoisted_89 = { 10540 key: 0, 10541 class: "recordNarrative eventNarrative" 10542} 10543const _hoisted_90 = { 10544 key: 1, 10545 class: "eventEditPanel" 10546} 10547const _hoisted_91 = { class: "memberSectionHead" } 10548const _hoisted_92 = ["onClick"] 10549const _hoisted_93 = { class: "editGrid eventEditGrid" } 10550const _hoisted_94 = { class: "fieldBlock" } 10551const _hoisted_95 = ["onUpdate:modelValue"] 10552const _hoisted_96 = { class: "fieldBlock" } 10553const _hoisted_97 = ["onUpdate:modelValue"] 10554const _hoisted_98 = { class: "fieldBlock" } 10555const _hoisted_99 = ["onUpdate:modelValue"] 10556const _hoisted_100 = { class: "fieldBlock" } 10557const _hoisted_101 = ["onUpdate:modelValue"] 10558const _hoisted_102 = { class: "fieldBlock" } 10559const _hoisted_103 = ["onUpdate:modelValue"] 10560const _hoisted_104 = { class: "fieldBlock" } 10561const _hoisted_105 = ["onUpdate:modelValue"] 10562const _hoisted_106 = { class: "fieldBlock" } 10563const _hoisted_107 = ["onUpdate:modelValue"] 10564const _hoisted_108 = { class: "fieldBlock" } 10565const _hoisted_109 = ["onUpdate:modelValue"] 10566const _hoisted_110 = { class: "fieldBlock" } 10567const _hoisted_111 = ["onUpdate:modelValue"] 10568const _hoisted_112 = ["value"] 10569const _hoisted_113 = { class: "fieldBlock" } 10570const _hoisted_114 = ["onUpdate:modelValue"] 10571const _hoisted_115 = ["value"] 10572const _hoisted_116 = { class: "fieldBlock" } 10573const _hoisted_117 = ["onUpdate:modelValue"] 10574const _hoisted_118 = { class: "fieldBlock" } 10575const _hoisted_119 = ["onUpdate:modelValue"] 10576const _hoisted_120 = { class: "fieldBlock" } 10577const _hoisted_121 = ["onUpdate:modelValue"] 10578const _hoisted_122 = { class: "checkgrid twoChecks" } 10579const _hoisted_123 = { class: "check" } 10580const _hoisted_124 = ["onUpdate:modelValue"]
10581const _hoisted_125 = { class: "check" } 10582const _hoisted_126 = ["onUpdate:modelValue"] 10583const _hoisted_127 = { class: "publicShareBox" } 10584const _hoisted_128 = { class: "check" } 10585const _hoisted_129 = ["onUpdate:modelValue"] 10586const _hoisted_130 = { 10587 key: 0, 10588 class: "editGrid" 10589} 10590const _hoisted_131 = ["onUpdate:modelValue"] 10591const _hoisted_132 = ["onUpdate:modelValue"] 10592const _hoisted_133 = { class: "row" } 10593const _hoisted_134 = ["onClick"] 10594const _hoisted_135 = ["onClick"] 10595const _hoisted_136 = { class: "eventWorkspaceSection eventAlbumPreviewSection" } 10596const _hoisted_137 = { class: "memberSectionHead" } 10597const _hoisted_138 = ["onClick"] 10598const _hoisted_139 = { class: "miniStats mediaMini eventAlbumStats" } 10599const _hoisted_140 = { class: "uploadBoxPro eventInlineUpload" } 10600const _hoisted_141 = { class: "filePicker" } 10601const _hoisted_142 = ["onChange"] 10602const _hoisted_143 = ["disabled", "onClick"] 10603const _hoisted_144 = { 10604 key: 0, 10605 class: "albumGrid albumGridInline eventWorkspaceAlbumGrid" 10606} 10607const _hoisted_145 = ["src"] 10608const _hoisted_146 = ["src"] 10609const _hoisted_147 = ["disabled", "onClick"] 10610const _hoisted_148 = { 10611 key: 1, 10612 class: "emptyInline" 10613} 10614 10615return function render(_ctx, _cache) { 10616 with (_ctx) { 10617 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, vModelCheckbox: _vModelCheckbox, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, withModifiers: _withModifiers, withKeys: _withKeys, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 10618 10619 const _component_AdminFrame = _resolveComponent("AdminFrame") 10620 10621 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙÙØ¹Ø§ÙÙØ§Øª" }, { 10622 default: _withCtx(() => [ 10623 (!workspaceMode) 10624 ? (_openBlock(), _createElementBlock("details", _hoisted_1, [_cache[23] || (_cache[23] = _createElementVNode("summary", null, [_createElementVNode("b", null, "+ Ø¥ÙØ´Ø§Ø¡ ÙØ¹Ø§ÙÙØ© Ø¬Ø¯ÙØ¯Ø©"), _createElementVNode("span", null, "Ø§ÙØªØ اÙÙÙ ÙØ°Ø¬ Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©")], -1)), _createElementVNode("div", _hoisted_2, [_cache[22] || (_cache[22] = _createElementVNode("p", { class: "hint" }, "Ø£ÙØ´Ø¦ اÙÙØ¹Ø§ÙÙØ© Ø£ÙÙØ§ÙØ Ø«Ù Ø§ÙØªØ Ù Ø³Ø§ØØªÙا ÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØªÙاصÙÙ ÙØ§ÙØ£ÙØ¨ÙÙ ÙØ§Ùإجراءات Ù Ù Ù ÙØ§Ù ÙØ§ØØ¯.", -1)), _createElementVNode("div", _hoisted_3, [ 10625 _cache[18] || (_cache[18] = _createElementVNode("div", { class: "formSectionTitle" }, "1) اÙ٠عÙÙ٠ات Ø§ÙØ£Ø³Ø§Ø³ÙØ©", -1)), 10626 _createElementVNode("div", _hoisted_4, [_cache[0] || (_cache[0] = _createElementVNode("b", null, "عÙÙØ§Ù اÙÙØ¹Ø§ÙÙØ©", -1)), _cache[1] || (_cache[1] = _createElementVNode("small", null, "Ø§ÙØ§Ø³Ù Ø§ÙØ°Ù Ø³ÙØ¸Ùر ÙÙØ£Ø¹Ø¶Ø§Ø¡ ÙÙÙ ÙØ§ØªØ³Ø§Ø¨.", -1)), _withDirectives(_createElementVNode("input", { 10627 "onUpdate:modelValue": $event => ((form.title) = $event), 10628 placeholder: "٠ثاÙ: رØÙØ© Ø¹ÙØ¯ Ø§ÙØ£Ø¶ØÙ Ø¥ÙÙ ÙÙØ´Ø§Ù" 10629 }, null, 8, _hoisted_5), [[_vModelText, form.title]])]), 10630 _createElementVNode("div", _hoisted_6, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØµÙÙÙ (Ø§Ø®ØªÙØ§Ø±Ù)", -1)), _cache[3] || (_cache[3] = _createElementVNode("small", null, "ÙÙÙØ¯ ÙÙØ³Ø§Ø¦Ù Ø£Ù ÙÙÙ ÙØ§Ù.", -1)), _withDirectives(_createElementVNode("input", { 10631 "onUpdate:modelValue": $event => ((form.title_cn) = $event), 10632 placeholder: "Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØµÙÙÙ Ø¥Ù ÙØ¬Ø¯" 10633 }, null, 8, _hoisted_7), [[_vModelText, form.title_cn]])]), 10634 _createElementVNode("div", _hoisted_8, [_cache[4] || (_cache[4] = _createElementVNode("b", null, "ÙØµÙ اÙÙØ¹Ø§ÙÙØ©", -1)), _cache[5] || (_cache[5] = _createElementVNode("small", null, "اÙÙØ¯ÙØ Ø§ÙÙØ¦Ø© اÙÙ Ø³ØªÙØ¯ÙØ©Ø ÙØ£Ù Ù ÙØ§ØØ¸Ø§Øª Ù ÙÙ Ø©.", -1)), _withDirectives(_createElementVNode("textarea", { 10635 "onUpdate:modelValue": $event => ((form.description) = $event), 10636 placeholder: "ÙØµÙ ÙØ§Ø¶Ø Ù٠ختصر ÙÙÙØ¹Ø§ÙÙØ©" 10637 }, null, 8, _hoisted_9), [[_vModelText, form.description]])]), 10638 _cache[19] || (_cache[19] = _createElementVNode("div", { class: "formSectionTitle" }, "2) اÙÙ ÙØ§Ù ÙØ§ÙÙ ÙØ¹Ø¯", -1)), 10639 _createElementVNode("div", _hoisted_10, [ 10640 _createElementVNode("div", _hoisted_11, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "اÙÙ ÙÙØ¹ اÙ٠ختصر", -1)), _withDirectives(_createElementVNode("input", { 10641 "onUpdate:modelValue": $event => ((form.location) = $event), 10642 placeholder: "٠ثاÙ: ÙÙØ´Ø§Ù" 10643 }, null, 8, _hoisted_12), [[_vModelText, form.location]])]), 10644 _createElementVNode("div", _hoisted_13, [_cache[7] || (_cache[7] = _
10644createElementVNode("b", null, "Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØµÙÙÙ", -1)), _withDirectives(_createElementVNode("input", { 10645 "onUpdate:modelValue": $event => ((form.address_cn) = $event), 10646 placeholder: "å°å / 䏿å°å" 10647 }, null, 8, _hoisted_14), [[_vModelText, form.address_cn]])]), 10648 _createElementVNode("div", _hoisted_15, [_cache[8] || (_cache[8] = _createElementVNode("b", null, "رابط Amap", -1)), _withDirectives(_createElementVNode("input", { 10649 "onUpdate:modelValue": $event => ((form.amap_url) = $event), 10650 placeholder: "https://uri.amap.com/..." 10651 }, null, 8, _hoisted_16), [[_vModelText, form.amap_url]])]), 10652 _createElementVNode("div", _hoisted_17, [_cache[9] || (_cache[9] = _createElementVNode("b", null, "ØªØ§Ø±ÙØ® اÙÙØ¹Ø§ÙÙØ©", -1)), _withDirectives(_createElementVNode("input", { 10653 type: "date", 10654 "onUpdate:modelValue": $event => ((form.event_date) = $event) 10655 }, null, 8, _hoisted_18), [[_vModelText, form.event_date]])]), 10656 _createElementVNode("div", _hoisted_19, [_cache[10] || (_cache[10] = _createElementVNode("b", null, "ÙÙØª Ø§ÙØ¨Ø¯Ø§ÙØ©", -1)), _withDirectives(_createElementVNode("input", { 10657 "onUpdate:modelValue": $event => ((form.event_time) = $event), 10658 placeholder: "٠ثاÙ: 13:30" 10659 }, null, 8, _hoisted_20), [[_vModelText, form.event_time]])]) 10660 ]), 10661 _cache[20] || (_cache[20] = _createElementVNode("div", { class: "formSectionTitle" }, "3) اÙÙÙØ¹ ÙØ§Ùسعة", -1)), 10662 _createElementVNode("div", _hoisted_21, [ 10663 _createElementVNode("div", _hoisted_22, [_cache[11] || (_cache[11] = _createElementVNode("b", null, "ÙÙØ¹ اÙÙØ¹Ø§ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.category) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('event_category',form.category), (o) => { 10664 return (_openBlock(), _createElementBlock("option", { 10665 key: o.value, 10666 value: o.value 10667 }, _toDisplayString(o.label), 9, _hoisted_24)) 10668 }), 128))], 8, _hoisted_23), [[_vModelSelect, form.category]])]), 10669 _createElementVNode("div", _hoisted_25, [_cache[12] || (_cache[12] = _createElementVNode("b", null, "Ø§ÙØØ¶ÙØ± اÙ٠تÙÙØ¹", -1)), _withDirectives(_createElementVNode("input", { 10670 type: "number", 10671 min: "0", 10672 "onUpdate:modelValue": $event => ((form.attendees_count) = $event) 10673 }, null, 8, _hoisted_26), [[_vModelText, form.attendees_count]])]), 10674 _createElementVNode("div", _hoisted_27, [_cache[13] || (_cache[13] = _createElementVNode("b", null, "عدد Ø§ÙØ£Ø³Ø±", -1)), _withDirectives(_createElementVNode("input", { 10675 type: "number", 10676 min: "0", 10677 "onUpdate:modelValue": $event => ((form.families_count) = $event) 10678 }, null, 8, _hoisted_28), [[_vModelText, form.families_count]])]), 10679 _createElementVNode("div", _hoisted_29, [_cache[14] || (_cache[14] = _createElementVNode("b", null, "Ø§ÙØ³Ø¹Ø© اÙÙØµÙÙ", -1)), _withDirectives(_createElementVNode("input", { 10680 type: "number", 10681 min: "0", 10682 "onUpdate:modelValue": $event => ((form.max_seats) = $event) 10683 }, null, 8, _hoisted_30), [[_vModelText, form.max_seats]])]) 10684 ]), 10685 _cache[21] || (_cache[21] = _createElementVNode("div", { class: "formSectionTitle" }, "4) Ø§ÙØªØ³Ø¬ÙÙ ÙØ§ÙÙØ´Ø±", -1)), 10686 _createElementVNode("div", _hoisted_31, [_createElementVNode("label", _hoisted_32, [_withDirectives(_createElementVNode("input", { 10687 type: "checkbox", 10688 "onUpdate:modelValue": $event => ((form.registration_required) = $event) 10689 }, null, 8, _hoisted_33), [[_vModelCheckbox, form.registration_required]]), _cache[15] || (_cache[15] = _createElementVNode("span", null, [_createElementVNode("b", null, "تسجÙÙ Ù Ø·ÙÙØ¨"), _createElementVNode("small", null, "Ø§ÙØØ¶ÙØ± ÙØØªØ§Ø¬ تسجÙ٠٠سبÙ.")], -1))]), _createElementVNode("label", _hoisted_34, [_withDirectives(_createElementVNode("input", { 10690 type: "checkbox", 10691 "onUpdate:modelValue": $event => ((form.checkin_enabled) = $event) 10692 }, null, 8, _hoisted_35), [[_vModelCheckbox, form.checkin_enabled]]), _cache[16] || (_cache[16] = _createElementVNode("span", null, [_createElementVNode("b", null, "ØªÙØ¹ÙÙ Ø§ÙØØ¶ÙØ±"), _createElementVNode("small", null, "٠تابعة Ø§ÙØØ¶ÙØ± ÙÙ٠اÙÙØ¹Ø§ÙÙØ©.")], -1))])]), 10693 _createElementVNode("div", _hoisted_36, [_createElementVNode("label", _hoisted_37, [_withDirectives(_createElementVNode("input", { 10694 type: "checkbox", 10695 "onUpdate:modelValue": $event => ((form.public_visibility) = $event) 10696 }, null, 8, _hoisted_38), [[_vModelCheckbox, form.public_visibility]]), _cache[17] || (_cache[17] = _createElementVNode("span", null, [_createElementVNode("b", null, "Ø¥Ø¸ÙØ§Ø± ÙÙØ¹Ø§ÙÙØ© عا٠ة ÙÙØ²Ùار"), _createElementVNode("small", null, "Ø§Ø³ØªØ®Ø¯Ù Ù ÙØ®ØµØ§Ù ÙÙ ÙÙØ¹Ø§Ù Ø¢Ù ÙÙÙ ÙÙÙØ´Ø± Ø§ÙØ¹Ø§Ù ÙÙØ·.")], -1))]), (form.public_visibility) 10697 ? (_openBlock(), _createElementBlock("div", _hoisted_39, [_withDirectives(_createElementVNode("textarea", { 10698 "onUpdate:modelValue": $event => ((form.public_summary) = $event), 10699 maxlength: "1500", 10700 placeholder: "Ù ÙØ®Øµ عا٠آ٠٠ÙÙÙØ´Ø±" 10701 }, null, 8, _hoisted_40), [[_vModelText, form.public_summary]]), _withDirectives(_createElementVNode("input", { 10702 "onUpdate:modelValue": $event => ((form.public_location) = $event), 10703 maxlength: "300", 10704 placeholder: "Ù ÙÙØ¹ عا٠٠ثÙ: ÙÙØ§ÙغتشÙ" 10705 }, null, 8, _hoisted_41), [[_vModelText, form.public_location]])])) 10706 : _createCommentVNode("", true)]), 10707 _createElementVNode("button", { 10708 class: "btn loadMore", 10709 onClick: createEvent 10710 }, "Ø¥ÙØ´Ø§Ø¡ ÙÙØªØ Ù Ø³Ø§ØØ© اÙÙØ¹Ø§ÙÙØ©", 8, _hoisted_42) 10711 ])])])) 10712 : _createCommentVNode("", true), 10713 (!workspaceMode) 10714 ? (_openBlock(), _createElementBlock("section", _hoisted_43, [_cache[24] || (_cache[24] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "إدارة اÙÙØ¹Ø§ÙÙØ§Øª ÙØ§ÙØ£ÙØ¨Ù٠ات"), _createElementVNode("h2", null, "اÙÙØ¹Ø§ÙÙØ§Øª"), _createElementVNode("p", null, "ÙØ§Ø¦Ù Ø© Ø®ÙÙÙØ© ÙÙÙØ±Ø². Ø§ÙØªØ اÙÙØ¹Ø§ÙÙØ© ÙØªØ¹Ø¯ÙÙ Ø§ÙØªÙاصÙÙØ Ø±ÙØ¹ اÙÙØ³Ø§Ø¦Ø·Ø تعÙÙÙ Ø§ÙØºÙØ§ÙØ Ø§ÙØªØ°ÙÙØ± ÙØªØºÙÙØ± Ø§ÙØØ§ÙØ© ÙÙ Ø³ÙØ§Ù ÙØ§ØØ¯.")], -1)), _createElementVNode("button", { 10715 class: "smallbtn primaryInlineAction", 10716 onClick: load 10717 }, "ØªØØ¯ÙØ«", 8, _hoisted_44)])) 10718 : _createCommentVNode("", true), 10719 (!workspaceMode) 10720 ? (_openBlock(), _createElementBlock("div", _hoisted_45, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.active), 1), _cache[25] || (_cache[25] = _createElementVNode("small", null, "ÙØ´Ø·Ø©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.completed), 1), _cache[26] || (_cache[26] = _createElementVNode("small", null, "Ù ÙØªÙ ÙØ©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.media), 1), _cache[27] || (_cache[27] = _
10720createElementVNode("small", null, "ÙØ³Ø§Ø¦Ø·", -1))])])) 10721 : _createCommentVNode("", true), 10722 (!workspaceMode) 10723 ? (_openBlock(), _createElementBlock("div", _hoisted_46, [_withDirectives(_createElementVNode("input", { 10724 "onUpdate:modelValue": $event => ((search) = $event), 10725 type: "search", 10726 placeholder: "Ø§Ø¨ØØ« باس٠اÙÙØ¹Ø§ÙÙØ©Ø اÙÙ ÙÙØ¹ Ø£Ù Ø§ÙØ¹ÙÙØ§Ù...", 10727 "aria-label": "Ø¨ØØ« اÙÙØ¹Ø§ÙÙØ§Øª" 10728 }, null, 8, _hoisted_47), [[_vModelText, search]])])) 10729 : _createCommentVNode("", true), 10730 (!workspaceMode) 10731 ? (_openBlock(), _createElementBlock("div", _hoisted_48, [ 10732 _createElementVNode("button", { 10733 class: _normalizeClass(["smallbtn", {secondary:filterStatus!=='active'}]), 10734 onClick: $event => (filterStatus='active') 10735 }, [_cache[28] || (_cache[28] = _createTextVNode("اÙÙØ´Ø·Ø© ")), _createElementVNode("small", null, _toDisplayString(summary.active), 1)], 10, _hoisted_49), 10736 _createElementVNode("button", { 10737 class: _normalizeClass(["smallbtn", {secondary:filterStatus!=='completed'}]), 10738 onClick: $event => (filterStatus='completed') 10739 }, [_cache[29] || (_cache[29] = _createTextVNode("اÙÙ ÙØªÙ ÙØ© ")), _createElementVNode("small", null, _toDisplayString(summary.completed), 1)], 10, _hoisted_50), 10740 _createElementVNode("button", { 10741 class: _normalizeClass(["smallbtn", {secondary:filterStatus!=='archived'}]), 10742 onClick: $event => (filterStatus='archived') 10743 }, [_cache[30] || (_cache[30] = _createTextVNode("اÙÙ Ø¤Ø±Ø´ÙØ© ")), _createElementVNode("small", null, _toDisplayString(summary.archived), 1)], 10, _hoisted_51), 10744 _createElementVNode("button", { 10745 class: _normalizeClass(["smallbtn", {secondary:filterStatus!=='all'}]), 10746 onClick: $event => (filterStatus='all') 10747 }, [_cache[31] || (_cache[31] = _createTextVNode("اÙÙÙ ")), _createElementVNode("small", null, _toDisplayString(summary.all), 1)], 10, _hoisted_52) 10748 ])) 10749 : _createCommentVNode("", true), 10750 (store.state.busy && !visibleEvents.length) 10751 ? (_openBlock(), _createElementBlock("div", _hoisted_53, "جار٠تØÙ Ù٠اÙÙØ¹Ø§ÙÙØ§Øª...")) 10752 : (!visibleEvents.length) 10753 ? (_openBlock(), _createElementBlock("div", _hoisted_54, _toDisplayString(workspaceMode?'اÙÙØ¹Ø§ÙÙØ© ØºÙØ± Ù ÙØ¬Ùدة.':'ÙØ§ ØªÙØ¬Ø¯ ÙØ¹Ø§ÙÙØ§Øª ÙÙ ÙØ°Ø§ Ø§ÙØªØµÙÙÙ.'), 1)) 10754 : _createCommentVNode("", true), 10755 workspaceMode 10756 ? (_openBlock(), _createElementBlock("div", _hoisted_55, [_createElementVNode("button", { 10757 class: "smallbtn secondary compactBackButton", 10758 onClick: closeWorkspace 10759 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙÙØ¹Ø§ÙÙØ§Øª", 8, _hoisted_56), _cache[32] || (_cache[32] = _createElementVNode("span", null, "Ù Ø³Ø§ØØ© ÙØ¹Ø§ÙÙØ© ٠ستÙÙØ©", -1))])) 10760 : _createCommentVNode("", true), 10761 (!workspaceMode) 10762 ? (_openBlock(), _createElementBlock("div", _hoisted_57, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleEvents, (e) => { 10763 return (_openBlock(), _createElementBlock("article", { 10764 class: "adminQueueRow eventQueueRow", 10765 key: e.id, 10766 onClick: $event => (openWorkspace(e)), 10767 tabindex: "0", 10768 onKeyup: _withKeys($event => (openWorkspace(e)), ["enter"]) 10769 }, [_createElementVNode("div", _hoisted_59, [_createElementVNode("div", _hoisted_60, [(e.cover_url) 10770 ? (_openBlock(), _createElementBlock("img", { 10771 key: 0, 10772 src: e.cover_url, 10773 loading: "lazy", 10774 alt: "ØºÙØ§Ù" 10775 }, null, 8, _hoisted_61)) 10776 : (_openBlock(), _createElementBlock("span", _hoisted_62, "ð«"))]), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(e.title || 'ÙØ¹Ø§ÙÙØ©'), 1), _createElementVNode("small", null, _toDisplayString(e.location || e.community_name_ar || 'بدÙÙ Ù ÙÙØ¹') + " · " + _toDisplayString(eventCategoryName(e.category)), 1)])]), _createElementVNode("div", _hoisted_63, [ 10777 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(eventStatusName(e.status)), 1), _cache[33] || (_cache[33] = _createElementVNode("small", null, "Ø§ÙØØ§ÙØ©", -1))]), 10778 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminQueueOwner('events',e)), 1), _cache[34] || (_cache[34] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1))]), 10779 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminRecordUpdatedAt(e)), 1
10779), _cache[35] || (_cache[35] = _createElementVNode("small", null, "آخر ØªØØ¯ÙØ«", -1))]), 10780 _createElementVNode("span", _hoisted_64, [_createElementVNode("b", null, _toDisplayString(eventQueueNextAction(e)), 1), _cache[36] || (_cache[36] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1))]) 10781 ]), _createElementVNode("button", { 10782 class: "smallbtn secondary adminQueueOpen", 10783 onClick: _withModifiers($event => (openWorkspace(e)), ["stop"]) 10784 }, "ÙØªØ Ù Ø³Ø§ØØ© اÙÙØ¹Ø§ÙÙØ©", 8, _hoisted_65)], 40, _hoisted_58)) 10785 }), 128))])) 10786 : _createCommentVNode("", true), 10787 (!workspaceMode && store.state.eventMeta.has_more) 10788 ? (_openBlock(), _createElementBlock("button", { 10789 key: 9, 10790 class: "btn loadMore", 10791 disabled: actionBusy.more, 10792 onClick: loadMore 10793 }, _toDisplayString(actionBusy.more?'Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...':'تØÙ Ù٠اÙÙ Ø²ÙØ¯ ('+store.state.events.length+' Ù Ù '+store.state.eventMeta.total+')'), 9, _hoisted_66)) 10794 : (_openBlock(), _createElementBlock("div", _hoisted_67, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleEvents, (e) => { 10795 return (_openBlock(), _createElementBlock("article", { 10796 class: "card eventAdminCard adminRecordWorkspace recordWorkspaceOnly eventRecordWorkspace", 10797 key: e.id 10798 }, [ 10799 (e.cover_url) 10800 ? (_openBlock(), _createElementBlock("img", { 10801 key: 0, 10802 class: "eventWorkspaceCover", 10803 src: e.cover_url, 10804 loading: "lazy", 10805 alt: "ØºÙØ§Ù اÙÙØ¹Ø§ÙÙØ©" 10806 }, null, 8, _hoisted_68)) 10807 : _createCommentVNode("", true), 10808 _createElementVNode("div", _hoisted_69, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_70, _toDisplayString(eventCategoryName(e.category)) + " · " + _toDisplayString(displayDateAr(e.event_date)), 1), _createElementVNode("h3", null, _toDisplayString(e.title || 'ÙØ¹Ø§ÙÙØ©'), 1), _createElementVNode("div", _hoisted_71, [_createElementVNode("span", _hoisted_72, _toDisplayString(eventStatusName(e.status)), 1), (e.public_visibility) 10809 ? (_openBlock(), _createElementBlock("span", _hoisted_73, "عا٠ة")) 10810 : _createCommentVNode("", true)])]), _createElementVNode("div", _hoisted_74, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.photo_count||0), 1), _cache[37] || (_cache[37] = _createElementVNode("small", null, "ØµÙØ±", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.video_count||0), 1), _cache[38] || (_cache[38] = _createElementVNode("small", null, "ÙÙØ¯ÙÙ", -1))])])]), 10811 _createElementVNode("div", _hoisted_75, [ 10812 _createElementVNode("button", { 10813 class: "smallbtn", 10814 onClick: $event => (startEdit(e)) 10815 }, "تعدÙÙ", 8, _hoisted_76), 10816 _createElementVNode("button", { 10817 class: "smallbtn secondary", 10818 onClick: $event => ($router.push('/admin/event/'+e.id+'/album')) 10819 }, "إدارة Ø§ÙØ£ÙبÙÙ ", 8, _hoisted_77), 10820 (e.status==='published') 10821 ? (_openBlock(), _createElementBlock("button", { 10822 key: 0, 10823 class: "smallbtn secondary", 10824 onClick: $event => (shareWhatsapp(e)) 10825 }, "Ù Ø´Ø§Ø±ÙØ©", 8, _hoisted_78)) 10826 : _createCommentVNode("", true), 10827 (e.status==='published') 10828 ? (_openBlock(), _createElementBlock("button", { 10829 key: 1, 10830 class: "smallbtn", 10831 onClick: $event => (sendReminder(e)) 10832 }, "تذÙÙØ± ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_79)) 10833 : _createCommentVNode("", true), 10834 (e.status!=='published'&&e.status!=='completed'&&e.status!=='archived') 10835 ? (_openBlock(), _createElementBlock("button", { 10836 key: 2, 10837 class: "smallbtn", 10838 onClick: $event => (setEventStatus(e,'published')) 10839 }, "ÙØ´Ø±", 8, _hoisted_80)) 10840 : _createCommentVNode("", true), 10841 (e.status==='published') 10842 ? (_openBlock(), _createElementBlock("button", { 10843 key: 3, 10844 class: "smallbtn", 10845 onClick: $event => (setEventStatus(e,'completed')) 10846 }, "Ù ÙØªÙ ÙØ©", 8, _hoisted_81)) 10847 : _createCommentVNode("", true), 10848 (e.status==='completed') 10849 ? (_openBlock(), _createElementBlock("button", { 10850 key: 4, 10851 class: "smallbtn danger", 10852 onClick: $event => (setEventStatus(e,'archived')) 10853 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_82)) 10854 : _createCommentVNode("", true) 10855 ]), 10856 _createElementVNode("section", _hoisted_83, [_createElementVNode("div", _hoisted_84, [ 10857 _createElementVNode("div", _hoisted_85, [_cache[39] || (_cache[39] = _createElementVNode("b", null, "اÙÙ ÙÙØ¹", -1)), _createElementVNode("span", null, _toDisplayString(e.location || e.address_cn || '-'), 1)]), 10858 _createElementVNode("div", _hoisted_86, [_cache[40] || (_cache[40] = _createElementVNode("b", null, "اÙÙÙØª", -1)), _createElementVNode("span", null, _toDisplayString(e.event_time || '-'), 1)]), 10859 _createElementVNode("div", _hoisted_87, [_cache[41] || (_cache[41] = _createElementVNode("b", null, "Ø§ÙØ³Ø¹Ø©", -1)), _createElementVNode("span", null, _toDisplayString(e.max_seats || 'ØºÙØ± Ù ØØ¯Ø¯Ø©'), 1)]), 10860 _createElementVNode("div", _hoisted_88, [_cache[42] || (_cache[42] = _createElementVNode("b", null, "Ø§ÙØªØ³Ø¬ÙÙ", -1)), _createElementVNode("span", null, _toDisplayString(e.registration_required?'Ù Ø·ÙÙØ¨':'ØºÙØ± Ù Ø·ÙÙØ¨'), 1)]) 10861 ]), (e.description) 10862 ? (_openBlock(), _createElementBlock("div", _hoisted_89, [_cache[43] || (_cache[43] = _createElementVNode("h4", null, "ÙØµÙ اÙÙØ¹Ø§ÙÙØ©", -1)), _createElementVNode("p", null, _toDisplayString(e.description), 1)])) 10863 : _createCommentVNode("", true)]), 10864 (editOpen[e.id]) 10865 ? (_openBlock(), _createElementBlock("section", _hoisted_90, [ 10866 _createElementVNode("div", _hoisted_91, [_cache[44] || (_cache[44] = _createElementVNode("div", null, [_createElementVNode("span", null, "تعدÙÙ Ø§ÙØ³Ø¬Ù"), _createElementVNode("h3", null, "ØªÙØ§ØµÙ٠اÙÙØ¹Ø§ÙÙØ©")], -1)), _createElementVNode("button", { 10867 class: "smallbtn secondary", 10868 onClick: $event => (cancelEdit(e)) 10869 }, "Ø¥ØºÙØ§Ù", 8, _hoisted_92)]), 10870 _createElementVNode("div", _hoisted_93, [ 10871 _createElementVNode("div", _hoisted_94, [_cache[45] || (_cache[45] = _
10871createElementVNode("b", null, "Ø§ÙØ¹ÙÙØ§Ù", -1)), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit[e.id].title) = $event) }, null, 8, _hoisted_95), [[_vModelText, edit[e.id].title]])]), 10872 _createElementVNode("div", _hoisted_96, [_cache[46] || (_cache[46] = _createElementVNode("b", null, "Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØµÙÙÙ", -1)), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit[e.id].title_cn) = $event) }, null, 8, _hoisted_97), [[_vModelText, edit[e.id].title_cn]])]), 10873 _createElementVNode("div", _hoisted_98, [_cache[47] || (_cache[47] = _createElementVNode("b", null, "اÙÙØµÙ", -1)), _withDirectives(_createElementVNode("textarea", { "onUpdate:modelValue": $event => ((edit[e.id].description) = $event) }, null, 8, _hoisted_99), [[_vModelText, edit[e.id].description]])]), 10874 _createElementVNode("div", _hoisted_100, [_cache[48] || (_cache[48] = _createElementVNode("b", null, "اÙÙ ÙÙØ¹", -1)), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit[e.id].location) = $event) }, null, 8, _hoisted_101), [[_vModelText, edit[e.id].location]])]), 10875 _createElementVNode("div", _hoisted_102, [_cache[49] || (_cache[49] = _createElementVNode("b", null, "Ø§ÙØ¹ÙÙØ§Ù Ø§ÙØµÙÙÙ", -1)), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit[e.id].address_cn) = $event) }, null, 8, _hoisted_103), [[_vModelText, edit[e.id].address_cn]])]), 10876 _createElementVNode("div", _hoisted_104, [_cache[50] || (_cache[50] = _createElementVNode("b", null, "Amap", -1)), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit[e.id].amap_url) = $event) }, null, 8, _hoisted_105), [[_vModelText, edit[e.id].amap_url]])]), 10877 _createElementVNode("div", _hoisted_106, [_cache[51] || (_cache[51] = _createElementVNode("b", null, "Ø§ÙØªØ§Ø±ÙØ®", -1)), _withDirectives(_createElementVNode("input", { 10878 type: "date", 10879 "onUpdate:modelValue": $event => ((edit[e.id].event_date) = $event) 10880 }, null, 8, _hoisted_107), [[_vModelText, edit[e.id].event_date]])]), 10881 _createElementVNode("div", _hoisted_108, [_cache[52] || (_cache[52] = _createElementVNode("b", null, "اÙÙÙØª", -1)), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit[e.id].event_time) = $event) }, null, 8, _hoisted_109), [[_vModelText, edit[e.id].event_time]])]), 10882 _createElementVNode("div", _hoisted_110, [_cache[53] || (_cache[53] = _createElementVNode("b", null, "اÙÙÙØ¹", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit[e.id].category) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('event_category',edit[e.id].category), (o) => { 10883 return (_openBlock(), _createElementBlock("option", { 10884 key: o.value, 10885 value: o.value 10886 }, _toDisplayString(o.label), 9, _hoisted_112)) 10887 }), 128))], 8, _hoisted_111), [[_vModelSelect, edit[e.id].category]])]), 10888 _createElementVNode("div", _hoisted_113, [_cache[54] || (_cache[54] = _createElementVNode("b", null, "Ø§ÙØØ§ÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit[e.id].status) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('event_status',edit[e.id].status), (o) => { 10889 return (_openBlock(), _createElementBlock("option", { 10890 key: o.value, 10891 value: o.value 10892 }, _toDisplayString(o.label), 9, _hoisted_115)) 10893 }), 128))], 8, _hoisted_114), [[_vModelSelect, edit[e.id].status]])]), 10894 _createElementVNode("div", _hoisted_116, [_cache[55] || (_cache[55] = _createElementVNode("b", null, "Ø§ÙØØ¶ÙØ± اÙ٠تÙÙØ¹", -1)), _withDirectives(_createElementVNode("input", { 10895 type: "number", 10896 min: "0", 10897 "onUpdate:modelValue": $event => ((edit[e.id].attendees_count) = $event) 10898 }, null, 8, _hoisted_117), [[_vModelText, edit[e.id].attendees_count]])]), 10899 _createElementVNode("div", _hoisted_118, [_cache[56] || (_cache[56] = _
10899createElementVNode("b", null, "عدد Ø§ÙØ£Ø³Ø±", -1)), _withDirectives(_createElementVNode("input", { 10900 type: "number", 10901 min: "0", 10902 "onUpdate:modelValue": $event => ((edit[e.id].families_count) = $event) 10903 }, null, 8, _hoisted_119), [[_vModelText, edit[e.id].families_count]])]), 10904 _createElementVNode("div", _hoisted_120, [_cache[57] || (_cache[57] = _createElementVNode("b", null, "Ø§ÙØ³Ø¹Ø© اÙÙØµÙÙ", -1)), _withDirectives(_createElementVNode("input", { 10905 type: "number", 10906 min: "0", 10907 "onUpdate:modelValue": $event => ((edit[e.id].max_seats) = $event) 10908 }, null, 8, _hoisted_121), [[_vModelText, edit[e.id].max_seats]])]) 10909 ]), 10910 _createElementVNode("div", _hoisted_122, [_createElementVNode("label", _hoisted_123, [_withDirectives(_createElementVNode("input", { 10911 type: "checkbox", 10912 "onUpdate:modelValue": $event => ((edit[e.id].registration_required) = $event) 10913 }, null, 8, _hoisted_124), [[_vModelCheckbox, edit[e.id].registration_required]]), _cache[58] || (_cache[58] = _createElementVNode("span", null, [_createElementVNode("b", null, "تسجÙÙ Ù Ø·ÙÙØ¨")], -1))]), _createElementVNode("label", _hoisted_125, [_withDirectives(_createElementVNode("input", { 10914 type: "checkbox", 10915 "onUpdate:modelValue": $event => ((edit[e.id].checkin_enabled) = $event) 10916 }, null, 8, _hoisted_126), [[_vModelCheckbox, edit[e.id].checkin_enabled]]), _cache[59] || (_cache[59] = _createElementVNode("span", null, [_createElementVNode("b", null, "ØªÙØ¹ÙÙ Ø§ÙØØ¶ÙØ±")], -1))])]), 10917 _createElementVNode("div", _hoisted_127, [_createElementVNode("label", _hoisted_128, [_withDirectives(_createElementVNode("input", { 10918 type: "checkbox", 10919 "onUpdate:modelValue": $event => ((edit[e.id].public_visibility) = $event) 10920 }, null, 8, _hoisted_129), [[_vModelCheckbox, edit[e.id].public_visibility]]), _cache[60] || (_cache[60] = _createElementVNode("span", null, [_createElementVNode("b", null, "Ø¥Ø¸ÙØ§Ø± ÙÙØ¹Ø§ÙÙØ© عا٠ة")], -1))]), (edit[e.id].public_visibility) 10921 ? (_openBlock(), _createElementBlock("div", _hoisted_130, [_withDirectives(_createElementVNode("textarea", { 10922 "onUpdate:modelValue": $event => ((edit[e.id].public_summary) = $event), 10923 maxlength: "1500", 10924 placeholder: "Ù ÙØ®Øµ عا٠آ٠٠ÙÙÙØ´Ø±" 10925 }, null, 8, _hoisted_131), [[_vModelText, edit[e.id].public_summary]]), _withDirectives(_createElementVNode("input", { 10926 "onUpdate:modelValue": $event => ((edit[e.id].public_location) = $event), 10927 maxlength: "300", 10928 placeholder: "اÙÙ ÙÙØ¹ Ø§ÙØ¹Ø§Ù " 10929 }, null, 8, _hoisted_132), [[_vModelText, edit[e.id].public_location]])])) 10930 : _createCommentVNode("", true)]), 10931 _createElementVNode("div", _hoisted_133, [_createElementVNode("button", { 10932 class: "btn secondary", 10933 onClick: $event => (saveEvent(e)) 10934 }, "ØÙظ Ø§ÙØªØ¹Ø¯ÙÙ", 8, _hoisted_134), _createElementVNode("button", { 10935 class: "btn danger", 10936 onClick: $event => (cancelEdit(e)) 10937 }, "Ø¥ÙØºØ§Ø¡", 8, _hoisted_135)]) 10938 ])) 10939 : _createCommentVNode("", true), 10940 _createElementVNode("section", _hoisted_136, [ 10941 _createElementVNode("div", _hoisted_137, [_cache[61] || (_cache[61] = _createElementVNode("div", null, [_createElementVNode("span", null, "Event Album"), _createElementVNode("h3", null, "Ø£ÙØ¨Ù٠اÙÙØ¹Ø§ÙÙØ©")], -1)), _createElementVNode("button", { 10942 class: "smallbtn secondary", 10943 onClick: $event =>
10943 ($router.push('/admin/event/'+e.id+'/album')) 10944 }, "Ù٠اÙÙØ³Ø§Ø¦Ø·", 8, _hoisted_138)]), 10945 _createElementVNode("div", _hoisted_139, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(workspacePhotos.length), 1), _cache[62] || (_cache[62] = _createElementVNode("small", null, "ØµÙØ±", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(workspaceVideos.length), 1), _cache[63] || (_cache[63] = _createElementVNode("small", null, "ÙÙØ¯ÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(workspaceMedia.length), 1), _cache[64] || (_cache[64] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙÙ", -1))])]), 10946 _createElementVNode("div", _hoisted_140, [_createElementVNode("label", _hoisted_141, [_createElementVNode("input", { 10947 type: "file", 10948 multiple: "", 10949 accept: "image/jpeg,image/png,image/webp,video/mp4,video/quicktime,video/webm", 10950 onChange: $event => (onFiles($event,e.id)) 10951 }, null, 40, _hoisted_142), _cache[65] || (_cache[65] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± ÙØ³Ø§Ø¦Ø·", -1)), _createElementVNode("em", null, _toDisplayString((files[e.id]&&files[e.id].length)?files[e.id].length+' Ù ÙÙ':'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± Ù ÙÙØ§Øª'), 1)]), _createElementVNode("button", { 10952 class: "smallbtn", 10953 disabled: actionBusy['upload:'+e.id], 10954 onClick: $event => (uploadMedia(e)) 10955 }, _toDisplayString(actionBusy['upload:'+e.id]?'Ø¬Ø§Ø±Ù Ø§ÙØ±Ùع...':'Ø±ÙØ¹ ÙÙØ£ÙبÙÙ '), 9, _hoisted_143)]), 10956 (workspacePreview.length) 10957 ? (_openBlock(), _createElementBlock("div", _hoisted_144, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(workspacePreview, (m) => { 10958 return (_openBlock(), _createElementBlock("figure", { 10959 class: "albumItem", 10960 key: m.id 10961 }, [(!isVideo(m)) 10962 ? (_openBlock(), _createElementBlock("img", { 10963 key: 0, 10964 src: mediaSrc(m), 10965 loading: "lazy", 10966 alt: "ØµÙØ±Ø© اÙÙØ¹Ø§ÙÙØ©" 10967 }, null, 8, _hoisted_145)) 10968 : (_openBlock(), _createElementBlock("video", { 10969 key: 1, 10970 src: m.file_url, 10971 preload: "metadata", 10972 controls: "" 10973 }, null, 8, _hoisted_146)), _createElementVNode("figcaption", null, [_createElementVNode("b", null, _toDisplayString(m.is_cover?'ØºÙØ§Ù اÙÙØ¹Ø§ÙÙØ©':(m.filename||mediaKindName(m.kind))), 1), _createElementVNode("small", null, _toDisplayString(mediaKindName(m.kind)), 1)]), (String(m.kind)==='image'&&!m.is_cover) 10974 ? (_openBlock(), _createElementBlock("button", { 10975 key: 2, 10976 class: "smallbtn secondary coverAction", 10977 disabled: actionBusy['cover:'+m.id], 10978 onClick: $event => (setCover(m)) 10979 }, _toDisplayString(actionBusy['cover:'+m.id]?'جارÙ...':'تعÙÙÙ ÙØºÙاÙ'), 9, _hoisted_147)) 10980 : _createCommentVNode("", true)])) 10981 }), 128))])) 10982 : (!store.state.busy) 10983 ? (_openBlock(), _createElementBlock("div", _hoisted_148, "ÙØ§ ØªÙØ¬Ø¯ ÙØ³Ø§Ø¦Ø· بعد. Ø§Ø±ÙØ¹ Ø§ÙØµÙر أ٠اÙÙÙØ¯ÙÙÙØ§Øª Ù Ù ÙÙØ§.")) 10984 : _createCommentVNode("", true) 10985 ]) 10986 ])) 10987 }), 128))])) 10988 ]), 10989 _: 1 10990 })) 10991 } 10992} 10993})() 10994 }; 10995 10996 const PublicEventDetailPage={ 10997 components:{PublicFrame}, 10998 setup(){ 10999 const store=useGzcStore();const router=useRouter();const route=useRoute();const event=ref(null);const media=ref([]); 11000 const loading=ref(true);const loadError=ref(''); 11001 const memberAccess=computed(()=>!!(store.state.me&&store.state.me.authenticated&&(store.state.me.member||store.state.me.official))); 11002 const photos=computed(()=>media.value.filter(m=>String(m.kind)==='image')); 11003 const videos=computed(()=>media.value.filter(m=>String(m.kind)==='video')); 11004 function shareWhatsapp(){ 11005 if(!event.value)return; 11006 const shareUrl=((window&&window.location&&window.location.origin)||'')+'/events/'+route.params.id; 11007 const lines=['ÙØ¹Ø§ÙÙØ© Ù Ù Ù ÙØµØ© SMT China',event.value.title||'ÙØ¹Ø§ÙÙØ©',event.value.event_date||'',event.value.event_time||'',event.value.location||event.value.address||'',shareUrl].filter(
11007Boolean); 11008 window.open('https://wa.me/?text='+encodeURIComponent(lines.join('\n')),'_blank'); 11009 } 11010 async function load(){ 11011 const id=route.params.id; 11012 loading.value=true;loadError.value='';await store.loadMe(); 11013 if(memberAccess.value){ 11014 const events=await api('/api/events'); 11015 event.value=safeArray(events.events).find(e=>String(e.id)===String(id))||null; 11016 const r=await api('/api/events/'+encodeURIComponent(id)+'/media'); 11017 media.value=safeArray(r.media); 11018 if(!event.value)loadError.value='اÙÙØ¹Ø§ÙÙØ© ØºÙØ± Ù ÙØ¬Ùدة أ٠خارج ÙØ·Ø§Ù عضÙÙØªÙ.'; 11019 }else{ 11020 const r=await api('/api/public/events/'+encodeURIComponent(id)); 11021 if(r.ok)event.value=r.event;else loadError.value=r.message||'اÙÙØ¹Ø§ÙÙØ© Ø§ÙØ¹Ø§Ù Ø© ØºÙØ± Ù ÙØ¬Ùدة.'; 11022 } 11023 loading.value=false; 11024 } 11025 onMounted(load); 11026 return {store,event,media,photos,videos,loading,loadError,memberAccess,shareWhatsapp,mediaSrc,isVideo,mediaKindName,fileMB}; 11027 }, 11028 render:(function(){ 11029const _Vue = Vue 11030const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 11031 11032const _hoisted_1 = { 11033 key: 0, 11034 class: "card loadingState", 11035 role: "status" 11036} 11037const _hoisted_2 = { 11038 key: 1, 11039 class: "card errorState", 11040 role: "alert" 11041} 11042const _hoisted_3 = ["onClick"] 11043const _hoisted_4 = { 11044 key: 2, 11045 class: "card eventAlbumHero" 11046} 11047const _hoisted_5 = ["src"] 11048const _hoisted_6 = { class: "hint" } 11049const _hoisted_7 = { 11050 key: 1, 11051 class: "eventQuickMeta" 11052} 11053const _hoisted_8 = { class: "metaRow" } 11054const _hoisted_9 = { class: "metaRow" } 11055const _hoisted_10 = { class: "metaRow" } 11056const _hoisted_11 = { 11057 key: 2, 11058 class: "miniStats mediaMini" 11059} 11060const _hoisted_12 = { class: "row" } 11061const _hoisted_13 = ["onClick"] 11062const _hoisted_14 = ["href"] 11063const _hoisted_15 = { 11064 key: 3, 11065 class: "card emptyCard" 11066} 11067const _hoisted_16 = { 11068 key: 4, 11069 class: "card membersOnlyNotice" 11070} 11071const _hoisted_17 = ["onClick"] 11072const _hoisted_18 = { 11073 key: 5, 11074 class: "albumGrid" 11075} 11076const _hoisted_19 = ["src"] 11077const _hoisted_20 = ["src"] 11078 11079return function render(_ctx, _cache) { 11080 with (_ctx) { 11081 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 11082 11083 const _component_PublicFrame = _resolveComponent("PublicFrame") 11084 11085 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø£ÙØ¨Ù٠اÙÙØ¹Ø§ÙÙØ©" }, { 11086 default: _withCtx(() => [ 11087 loading 11088 ? (_openBlock(), _createElementBlock("div", _hoisted_1, _c
11088ache[0] || (_cache[0] = [_createElementVNode("span", { 11089 class: "loadingSpinner", 11090 "aria-hidden": "true" 11091 }, null, -1), _createElementVNode("h3", null, "جار٠تØÙ Ù٠اÙÙØ¹Ø§ÙÙØ©...", -1)]))) 11092 : loadError 11093 ? (_openBlock(), _createElementBlock("div", _hoisted_2, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "تعذر ÙØªØ اÙÙØ¹Ø§ÙÙØ©", -1)), _createElementVNode("p", null, _toDisplayString(loadError), 1), _createElementVNode("button", { 11094 class: "btn secondary", 11095 onClick: $event => ($router.push('/events')) 11096 }, "Ø§ÙØ¹Ùدة ÙÙÙØ¹Ø§ÙÙØ§Øª", 8, _hoisted_3)])) 11097 : _createCommentVNode("", true), 11098 event 11099 ? (_openBlock(), _createElementBlock("div", _hoisted_4, [ 11100 (event&&event.cover_url) 11101 ? (_openBlock(), _createElementBlock("img", { 11102 key: 0, 11103 class: "eventCover", 11104 src: event.cover_url, 11105 loading: "lazy", 11106 alt: "ØºÙØ§Ù اÙÙØ¹Ø§ÙÙØ©" 11107 }, null, 8, _hoisted_5)) 11108 : _createCommentVNode("", true), 11109 _cache[8] || (_cache[8] = _createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©", -1)), 11110 _createElementVNode("h3", null, _toDisplayString(event&&event.title || 'Ø£ÙØ¨Ù٠اÙÙØ¹Ø§ÙÙØ©'), 1), 11111 _createElementVNode("p", _hoisted_6, _toDisplayString(event&&event.description || (memberAccess?'ØµÙØ± ÙÙÙØ¯ÙÙÙØ§Øª اÙÙØ¹Ø§ÙÙØ© ØªØ¸ÙØ± ÙÙØ§ ÙÙØ£Ø¹Ø¶Ø§Ø¡ بعد تسجÙÙ Ø§ÙØ¯Ø®ÙÙ.':'Ù ÙØ®Øµ ÙØ¹Ø§ÙÙØ© عا٠ة Ù Ù Ù ÙØµØ© SMT.')), 1), 11112 event 11113 ? (_openBlock(), _createElementBlock("div", _hoisted_7, [_createElementVNode("div", _hoisted_8, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "Ø§ÙØªØ§Ø±ÙØ®", -1)), _createElementVNode("span", null, _toDisplayString(event.event_date || '-'), 1)]), _createElementVNode("div", _hoisted_9, [_cache[3] || (_cache[3] = _createElementVNode("b", null, "اÙÙÙØª", -1)), _createElementVNode("span", null, _toDisplayString(event.event_time || '-'), 1)]), _createElementVNode("div", _hoisted_10, [_cache[4] || (_cache[4] = _createElementVNode("b", null, "اÙÙ ÙÙØ¹", -1)), _createElementVNode("span", null, _toDisplayString(event.location || event.address || '-'), 1)])])) 11114 : _createCommentVNode("", true), 11115 memberAccess 11116 ? (_openBlock(), _createElementBlock("div", _hoisted_11, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(photos.length), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "ØµÙØ±", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(videos.length), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "ÙÙØ¯ÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(media.length), 1), _cache[7] || (_cache[7] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ù اÙÙ", -1))])])) 11117 : _createCommentVNode("", true), 11118 _createElementVNode("div", _hoisted_12, [_createElementVNode("button", { 11119 class: "btn secondary", 11120 onClick: shareWhatsapp 11121 }, "Ù Ø´Ø§Ø±ÙØ© عÙÙ ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_13), (event&&event.amap_url) 11122 ? (_openBlock(), _createElementBlock("a", { 11123 key: 0, 11124 class: "btn secondary", 11125 href: event.amap_url, 11126 target: "_blank" 11127 }, "ÙØªØ اÙÙ ÙÙØ¹", 8, _hoisted_14)) 11128 : _createCommentVNode("", true)]) 11129 ])) 11130 : _createCommentVNode("", true), 11131 (memberAccess && !media.length && !store.state.busy) 11132 ? (_openBlock(), _createElementBlock("div", _hoisted_15, "ÙØ§ ØªÙØ¬Ø¯ ÙØ³Ø§Ø¦Ø· Ù ÙØ´Ùرة ÙÙØ°Ø§ Ø§ÙØ£ÙبÙÙ ØØ§ÙÙØ§Ù.")) 11133 : _createCommentVNode("", true), 11134 (!memberAccess && event) 11135 ? (_openBlock(), _createElementBlock("div", _hoisted_16, [_cache[9] || (_cache[9] = _createElementVNode("h3", null, "Ø£ÙØ¨Ù٠اÙÙØ¹Ø§ÙÙØ© Ù ØÙ Ù", -1)), _cache[10] || (_cache[10] = _createElementVNode("p", null, "اÙ٠عÙÙ٠ات Ø§ÙØ¹Ø§Ù Ø© Ø£Ø¹ÙØ§Ù Ù ØªØ§ØØ© ÙÙØ¬Ù ÙØ¹Ø أ٠ا Ø§ÙØµÙر ÙØ§ÙÙÙØ¯ÙÙÙØ§Øª ÙØªØ¸Ùر ÙÙØ£Ø¹Ø¶Ø§Ø¡ بعد Ø§ÙØ¯Ø®ÙÙ.", -1)), _createElementVNode("button", { 11136 class: "btn secondary", 11137 onClick: $event => ($router.push({path:'/login',query:{next:'/events/'+$route.params.id}})) 11138 }, "دخÙÙ Ø§ÙØ¹Ø¶ÙÙØ©", 8, _hoisted_17)])) 11139 : _createCommentVNode("", true), 11140 memberAccess 11141 ? (_openBlock(), _createElementBlock("div", _hoisted_18, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(media, (m) => { 11142 return (_openBlock(), _createElementBlock("figure", { 11143 class: "albumItem", 11144 key: m.id 11145 }, [(!isVideo(m)) 11146 ? (_openBlock(), _createElementBlock("img", { 11147 key: 0, 11148 src: mediaSrc(m), 11149 loading: "lazy", 11150 alt: "ØµÙØ±Ø© اÙÙØ¹Ø§ÙÙØ©" 11151 }, null, 8, _hoisted_19)) 11152 : (_openBlock(), _createElementBlock("video", { 11153 key: 1, 11154 src: m.file_url, 11155 controls: "", 11156 preload: "metadata" 11157 }
11157, null, 8, _hoisted_20)), _createElementVNode("figcaption", null, [_createElementVNode("b", null, _toDisplayString(mediaKindName(m.kind)), 1), _createElementVNode("small", null, _toDisplayString(m.filename || fileMB(m.size_bytes)), 1)])])) 11158 }), 128))])) 11159 : _createCommentVNode("", true) 11160 ]), 11161 _: 1 11162 })) 11163 } 11164} 11165})() 11166 }; 11167 11168 const AdminEventAlbumPage={ 11169 components:{AdminFrame}, 11170 setup(){ 11171 const store=useGzcStore();const router=useRouter();const route=useRoute(); 11172 const files=ref([]);const audioFile=ref(null);const audioTitle=ref('');const audioType=ref('national');const selectedAudioId=ref(''); 11173 const event=computed(()=>store.state.events.find(e=>String(e.id)===String(route.params.id))||{}); 11174 const activeMedia=computed(()=>safeArray(store.state.eventMedia[route.params.id])); 11175 const archivedMedia=computed(()=>safeArray(store.state.eventArchivedMedia[route.params.id])); 11176 const photos=computed(()=>activeMedia.value.filter(m=>String(m.kind)==='image')); 11177 const videos=computed(()=>activeMedia.value.filter(m=>String(m.kind)==='video')); 11178 async function load(){if(await store.requireAdmin(router)){await store.loadAdminEvents(router);await Promise.all([store.loadEventMedia(route.params.id,router),store.loadArchivedEventMedia(route.params.id,router),store.loadEventAudio(router)]);}} 11179 onMounted(load); 11180 function onFiles(e){files.value=Array.from(e.target.files||[]);} function onAudio(e){audioFile.value=(e.target.files||[])[0]||null;} 11181 async function uploadMedia(){if(!files.value.length){store.state.msg='اختر ØµÙØ± Ø£Ù ÙÙØ¯ÙÙÙØ§Øª Ø£ÙÙØ§Ù';return;}const fd=new FormData();files.value.forEach(f=>fd.append('files',f));store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø±ÙØ¹ ÙØ³Ø§Ø¦Ø· Ø§ÙØ£ÙبÙÙ ...';const r=await uploadApi('/api/admin/events/'+encodeURIComponent(route.params.id)+'/media',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ÙØ³Ø§Ø¦Ø· Ø§ÙØ£ÙبÙÙ '});store.state.busy=false;store.state.msg=r.message||r.error||'';files.value=[];await load();} 11182 async function setCover(m){if(!m||!m.id||String(m.kind)!=='image')return;store.state.busy=true;const r=await api('/api/admin/event-media/'+encodeURIComponent(m.id)+'/cover',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 11183 async function archiveMedia(m){if(!m||!m.id)return;if(!confirm('Ø£Ø±Ø´ÙØ© ÙØ°Ø§ اÙÙ ÙÙØ'))return;store.state.busy=true;const r=await api('/api/admin/event-media/'+encodeURIComponent(m.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 11184 async function restoreMedia(m){if(!m||!m.id)return;store.state.busy=true;const r=await api('/api/admin/event-media/'+encodeURIComponent(m.id)+'/restore',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 11185 async function deleteMedia(m){if(!m||!m.id)return;if(!confirm('ØØ°Ù Ù Ù Ø§ÙØ¹Ø±Ø¶ ÙÙØ§Ø¦ÙØ§ÙØ'))return;store.state.busy=true;const r=await api('/api/admin/event-media/'+encodeURIComponent(m.id)+'/delete',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 11186 async function uploadAudio(){if(!audioFile.value){store.state.msg='ÙØ±Ø¬Ù Ø§Ø®ØªÙØ§Ø± Ù ÙÙ ØµÙØªÙ Ø£ÙÙØ§Ù';return;}const fd=new FormData();fd.append('audio',audioFile.value);fd.append('title',audioTitle.value||audioFile.value.name);fd.append('audio_type',audioType.value||'national');store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø±ÙØ¹ اÙÙ ÙÙ Ø§ÙØµÙتÙ...';const r=await uploadApi('/api/admin/event-audio',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ اÙÙ ÙÙ Ø§ÙØµÙتÙ'});store.state.busy=false;store.state.msg=r.message||r.error||'';audioFile.value=null;audioTitle.value='';await store.loadEventAudio(router);} 11187 async function archiveAudio(a){if(!a||!a.id)return;if(!confirm('Ø£Ø±Ø´ÙØ© اÙÙ ÙÙ Ø§ÙØµÙØªÙØ'))return;store.state.busy=true;const r=await api('/api/admin/event-audio/'+encodeURIComponent(a.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await store.loadEventAudio(router);} 11188 async function createSlideshow(){if(photos.value.length<2){store.state.msg='اÙÙÙØ¯ÙÙ ÙØØªØ§Ø¬ ØµÙØ±ØªÙ٠عÙÙ Ø§ÙØ£ÙÙ';return;}store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø¥ÙØ´Ø§Ø¡ ÙÙØ¯ÙÙ Ù ÙØ®Øµ اÙÙØ¹Ø§ÙÙØ©...';const r=await api('/api/admin/events/'+encodeURIComponent(route.params.id)+'/slideshow',{method:'POST',body:JSON.stringify({audio_id:selectedAudioId.value||''})});store.state.busy=false;store.state.msg=r.message||r.error||'';await store.loadAdminEvents(router);await store.loadEventMedia(route.params.id,router);} 11189 return {store,event,files,audioFile,audioTitle,audioType,selectedAudioId,activeMedia,archivedMedia,photos,videos,load,onFiles,onAudio,uploadMedia,setCover,archiveMedia,restoreMedia,deleteMedia,uploadAudio,archiveAudio,createSlideshow,mediaSrc,isVideo,mediaKindName,fileMB,shortDate,displayDateAr}; 11190 }, 11191 render:(function(){ 11192const _Vue = Vue
11193const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 11194 11195const _hoisted_1 = { class: "adminWorkspaceBackBar eventAlbumBack" } 11196const _hoisted_2 = ["onClick"] 11197const _hoisted_3 = { class: "card eventAlbumHero adminEventAlbumHero" } 11198const _hoisted_4 = ["src"] 11199const _hoisted_5 = { class: "adminEyebrow" } 11200const _hoisted_6 = { class: "miniStats mediaMini" } 11201const _hoisted_7 = { class: "card formCard eventAlbumUploadCard" } 11202const _hoisted_8 = { class: "filePicker wide" } 11203const _hoisted_9 = ["onChange"] 11204const _hoisted_10 = ["onClick"] 11205const _hoisted_11 = { 11206 key: 0, 11207 class: "card emptyCard" 11208} 11209const _hoisted_12 = { 11210 key: 1, 11211 class: "albumGrid adminAlbumGrid eventAlbumManagerGrid" 11212} 11213const _hoisted_13 = { 11214 key: 0, 11215 class: "coverMediaBadge" 11216} 11217const _hoisted_14 = ["src"] 11218const _hoisted_15 = ["src"] 11219const _hoisted_16 = { class: "mediaActions eventMediaActions" } 11220const _hoisted_17 = ["onClick"] 11221const _hoisted_18 = ["onClick"] 11222const _hoisted_19 = ["onClick"] 11223const _hoisted_20 = { 11224 key: 2, 11225 class: "card archivedBox" 11226} 11227const _hoisted_21 = { class: "albumGrid adminAlbumGrid" } 11228const _hoisted_22 = ["src"] 11229const _hoisted_23 = ["src"] 11230const _hoisted_24 = ["onClick"] 11231const _hoisted_25 = { class: "card collapseSection eventAlbumTools" } 11232const _hoisted_26 = { class: "collapseBody" } 11233const _hoisted_27 = { class: "eventToolSection" } 11234const _hoisted_28 = ["onUpdate:modelValue"] 11235const _hoisted_29 = ["value"] 11236const _hoisted_30 = ["onClick"] 11237const _hoisted_31 = ["href"] 11238const _hoisted_32 = { class: "eventToolSection" } 11239const _hoisted_33 = { class: "editGrid" } 11240const _hoisted_34 = ["onUpdate:modelValue"] 11241const _hoisted_35 = ["onUpdate:modelValue"] 11242const _hoisted_36 = { class: "filePicker wide" } 11243const _hoisted_37 = ["onChange"] 11244const _hoisted_38 = ["onClick"] 11245const _hoisted_39 = { 11246 key: 0, 11247 class: "audioList" 11248} 11249const _hoisted_40 = ["src"] 11250const _hoisted_41 = ["onClick"] 11251 11252return function render(_ctx, _cache) { 11253 with (_ctx) { 11254 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 11255 11256 const _component_AdminFrame = _resolveComponent("AdminFrame") 11257 11258 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø£ÙØ¨Ù٠اÙÙØ¹Ø§ÙÙØ©" }, { 11259 default: _withCtx(() => [ 11260 _createElementVNode("div", _hoisted_1, [_createElementVNode("button", { 11261 class: "smallbtn secondary compactBackButton", 11262 onClick: $event => ($router.push('/admin/events/'+$route.params.id)) 11263 }, "â Ø§ÙØ¹ÙØ¯Ø© ÙÙ Ø³Ø§ØØ© اÙÙØ¹Ø§ÙÙØ©", 8, _hoisted_2), _cache[0] || (_cache[0] = _createElementVNode("span", null, "إدارة Ø§ÙØ£ÙبÙÙ ", -1))]), 11264 _createElementVNode("section", _hoisted_3, [ 11265 (event.cover_url) 11266 ? (_openBlock(), _createElementBlock("img", { 11267 key: 0, 11268 class: "eventCover", 11269 src: event.cover_url, 11270 loading: "lazy", 11271 alt: "ØºÙØ§Ù اÙÙØ¹Ø§ÙÙØ©" 11272 }, null, 8, _hoisted_4)) 11273 : _createCommentVNode("", true), 11274 _createElementVNode("span", _hoisted_5, "Event Albums · " + _toDisplayString(displayDateAr(event.event_date)), 1), 11275 _createElementVNode("h3", null, _toDisplayString(event.title || 'ÙØ¹Ø§ÙÙØ©'), 1), 11276 _cache[4] || (_cache[4] = _createElementVNode("p", { class: "hint" }, "Ø±ÙØ¹ Ø§ÙØµÙر ÙØ§ÙÙÙØ¯ÙÙÙØ§ØªØ Ø§Ø®ØªÙØ§Ø± Ø§ÙØºÙØ§ÙØ Ø§ÙØ£Ø±Ø´ÙØ©Ø Ø«Ù Ø§ÙØ£Ø¯Ùات Ø§ÙØ¥Ø¶Ø§ÙÙØ© Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©.", -1)), 11277 _createElementVNode("div", _hoisted_6, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(photos.length), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "ØµÙØ±", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(videos.length), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "ÙÙØ¯ÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(activeMedia.length), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "ÙØ´Ø·", -1))])]) 11278 ]), 11279 _createElementVNode("section", _hoisted_7, [ 11280 _cache[6] || (_cache[6] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", null, "Ø§ÙØ®Ø·ÙØ© Ø§ÙØ£Ø³Ø§Ø³ÙØ©"), _createElementVNode("h3", null, "Ø±ÙØ¹ ÙØ³Ø§Ø¦Ø· ÙÙØ£ÙبÙÙ ")])], -1)),
11281 _cache[7] || (_cache[7] = _createElementVNode("p", { class: "hint" }, "اÙÙ Ø³Ù ÙØ: jpg / jpeg / png / webp / mp4 / mov / webm. Ø£ÙÙ ØµÙØ±Ø© ØªØµØ¨Ø ØºÙØ§Ùا٠تÙÙØ§Ø¦Ùا٠إذا ÙÙ ÙÙØ¬Ø¯ ØºÙØ§Ù.", -1)), 11282 _createElementVNode("label", _hoisted_8, [_createElementVNode("input", { 11283 type: "file", 11284 multiple: "", 11285 accept: "image/jpeg,image/png,image/webp,video/mp4,video/quicktime,video/webm", 11286 onChange: onFiles 11287 }, null, 40, _hoisted_9), _cache[5] || (_cache[5] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± ØµÙØ± Ø£Ù ÙÙØ¯ÙÙÙØ§Øª", -1)), _createElementVNode("em", null, _toDisplayString(files.length?files.length+' Ù ÙÙ':'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± Ù ÙÙØ§Øª'), 1)]), 11288 _createElementVNode("button", { 11289 class: "btn loadMore", 11290 onClick: uploadMedia 11291 }, "Ø±ÙØ¹ ÙÙØ£ÙبÙÙ ", 8, _hoisted_10) 11292 ]), 11293 (!activeMedia.length && !store.state.busy) 11294 ? (_openBlock(), _createElementBlock("section", _hoisted_11, "ÙØ§ ØªÙØ¬Ø¯ ÙØ³Ø§Ø¦Ø· ÙØ´Ø·Ø© ÙÙ ÙØ°Ø§ Ø§ÙØ£ÙبÙÙ .")) 11295 : (_openBlock(), _createElementBlock("section", _hoisted_12, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(activeMedia, (m) => { 11296 return (_openBlock(), _createElementBlock("figure", { 11297 class: _normalizeClass(["albumItem", {coverMediaItem:m.is_cover}]), 11298 key: m.id 11299 }, [ 11300 (m.is_cover) 11301 ? (_openBlock(), _createElementBlock("div", _hoisted_13, "Ø§ÙØºÙØ§Ù Ø§ÙØØ§ÙÙ")) 11302 : _createCommentVNode("", true), 11303 (!isVideo(m)) 11304 ? (_openBlock(), _createElementBlock("img", { 11305 key: 1, 11306 src: mediaSrc(m), 11307 loading: "lazy", 11308 alt: "ØµÙØ±Ø© اÙÙØ¹Ø§ÙÙØ©" 11309 }, null, 8, _hoisted_14)) 11310 : (_openBlock(), _createElementBlock("video", { 11311 key: 2, 11312 src: m.file_url, 11313 controls: "", 11314 preload: "metadata" 11315 }, null, 8, _hoisted_15)), 11316 _createElementVNode("figcaption", null, [_createElementVNode("b", null, _toDisplayString(m.filename || mediaKindName(m.kind)), 1), _createElementVNode("small", null, _toDisplayString(mediaKindName(m.kind)) + " â " + _toDisplayString(fileMB(m.size_bytes)), 1)]), 11317 _createElementVNode("div", _hoisted_16, [(String(m.kind)==='image'&&!m.is_cover) 11318 ? (_openBlock(), _createElementBlock("button", { 11319 key: 0, 11320 class: "smallbtn secondary", 11321 onClick: $event => (setCover(m)) 11322 }, "تعÙÙÙ ÙØºÙاÙ", 8, _hoisted_17)) 11323 : _createCommentVNode("", true), _createElementVNode("button", { 11324 class: "smallbtn danger", 11325 onClick: $event => (archiveMedia(m)) 11326 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_18), _createElementVNode("button", { 11327 class: "smallbtn danger", 11328 onClick: $event => (deleteMedia(m)) 11329 }, "ØØ°Ù", 8, _hoisted_19)]) 11330 ], 2)) 11331 }), 128))])), 11332 (archivedMedia.length) 11333 ? (_openBlock(), _createElementBlock("details", _hoisted_20, [_createElementVNode("summary", null, "اÙÙØ³Ø§Ø¦Ø· اÙÙ Ø¤Ø±Ø´ÙØ©: " + _toDisplayString(archivedMedia.length), 1), _createElementVNode("div", _hoisted_21, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(archivedMedia, (m) => { 11334 return (_openBlock(), _createElementBlock("figure", { 11335 class: "albumItem", 11336 key: m.id 11337 }, [(!isVideo(m)) 11338 ? (_openBlock(), _createElementBlock("img", { 11339 key: 0, 11340 src: mediaSrc(m), 11341 loading: "lazy" 11342 }, null, 8, _hoisted_22)) 11343 : (_openBlock(), _createElementBlock("video", { 11344 key: 1, 11345 src: m.file_url, 11346 controls: "", 11347 preload: "metadata" 11348 }, null, 8, _hoisted_23)), _createElementVNode("figcaption", null, [_createElementVNode("b", null, _toDisplayString(m.filename || mediaKindName(m.kind)), 1), _createElementVNode("small", null, _toDisplayString(fileMB(m.size_bytes)), 1)]), _createElementVNode("button", { 11349 class: "smallbtn", 11350 onClick: $event => (restoreMedia(m)) 11351 }, "استرجاع", 8, _hoisted_24)])) 11352 }), 128))])])) 11353 : _createCommentVNode("", true), 11354 _createElementVNode("details", _hoisted_25, [_cache[14] || (_cache[14] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø£Ø¯ÙØ§Øª إضاÙÙØ©"), _createElementVNode("span", null, "ÙÙØ¯Ù٠اÙÙ ÙØ®Øµ ÙØ§ÙØµÙØªÙات")], -1)), _createElementVNode("div", _hoisted_26, [_createElementVNode("section", _hoisted_27, [ 11355 _cache[9] || (_cache[9] = _createElementVNode("h3", null, "ÙÙØ¯ÙÙ Ù ÙØ®Øµ اÙÙØ¹Ø§ÙÙØ©", -1)), 11356 _cache[10] || (_cache[10] = _createElementVNode("p", { class: "hint" }, "ÙØ³ØªØ®Ø¯Ù Ø§ÙØµÙر اÙÙ ÙØ¬Ùدة ÙÙ Ø§ÙØ£ÙبÙÙ ÙÙØØªØ§Ø¬ ØµÙØ±ØªÙ٠عÙÙ Ø§ÙØ£ÙÙ.", -1)), 11357 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((selectedAudioId) = $event) }, [_cache[8] || (_cache[8] = _createElementVNode("option", { value: "" }, "بدÙÙ Ù ÙÙ ØµÙØªÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.eventAudio, (a) => { 11358 return (_openBlock(), _createElementBlock("option", { 11359 value: a.id, 11360 key: a.id 11361 }, _toDisplayString(a.title) + " â " + _toDisplayString(a.audio_type), 9, _hoisted_29)) 11362 }), 128))], 8, _hoisted_28), [[_vModelSelect, selectedAudioId]]), 11363 _createElementVNode("button", { 11364 class: "btn loadMore", 11365 onClick: createSlideshow 11366 }, "Ø¥ÙØ´Ø§Ø¡ ÙÙØ¯Ù٠اÙÙ ÙØ®Øµ", 8, _hoisted_30), 11367 (event.slideshow_url) 11368 ? (_openBlock(), _createElementBlock("a", { 11369 key: 0, 11370 class: "btn secondary loadMore", 11371 href: event.slideshow_url, 11372 target: "_blank" 11373 }, "ÙØªØ ÙÙØ¯Ù٠اÙÙ ÙØ®Øµ Ø§ÙØØ§ÙÙ", 8, _hoisted_31)) 11374 : _createCommentVNode("", true) 11375 ]), _createElementVNode("section", _hoisted_32, [ 11376 _cache[13] || (_cache[13] = _createElementVNode("h3", null, "Ù ÙØªØ¨Ø© Ø§ÙØµÙØªÙØ§Øª", -1)), 11377 _createElementVNode("div", _hoisted_33, [_withDirectives(_createElementVNode("input", { 11378 "onUpdate:modelValue": $event => ((audioTitle) = $event), 11379 placeholder: "اس٠اÙÙ ÙÙ Ø§ÙØµÙتÙ" 11380 }, null, 8, _hoisted_34), [[_vModelText, audioTitle]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((audioType) = $event) }, _cache[11] || (_cache[11] = [_createElementVNode("option", { value: "national" }, "ÙØ·ÙÙ", -1), _createElementVNode("option", { value: "event" }, "ÙØ¹Ø§ÙÙØ©", -1), _createElementVNode("option", { value: "background" }, "Ø®ÙÙÙØ©", -1)]), 8, _hoisted_35), [[_vModelSelect, audioType]])]), 11381 _createElementVNode("label", _hoisted_36, [_createElementVNode("input", { 11382 type: "file", 11383 accept: "audio/*,.mp3,.wav,.m4a,.aac,.ogg", 11384 onChange: onAudio 11385 }
11385, null, 40, _hoisted_37), _cache[12] || (_cache[12] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± Ù ÙÙ ØµÙØªÙ", -1)), _createElementVNode("em", null, _toDisplayString(audioFile?audioFile.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± Ù ÙÙ'), 1)]), 11386 _createElementVNode("button", { 11387 class: "btn loadMore", 11388 onClick: uploadAudio 11389 }, "Ø±ÙØ¹ Ù ÙÙ ØµÙØªÙ", 8, _hoisted_38), 11390 (store.state.eventAudio.length) 11391 ? (_openBlock(), _createElementBlock("div", _hoisted_39, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.eventAudio, (a) => { 11392 return (_openBlock(), _createElementBlock("div", { 11393 class: "audioRow", 11394 key: a.id 11395 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(a.title), 1), _createElementVNode("small", null, _toDisplayString(a.audio_type) + " â " + _toDisplayString(fileMB(a.size_bytes)) + " â " + _toDisplayString(shortDate(a.created_at)), 1)]), _createElementVNode("audio", { 11396 src: a.file_url, 11397 controls: "", 11398 preload: "none" 11399 }, null, 8, _hoisted_40), _createElementVNode("button", { 11400 class: "smallbtn danger", 11401 onClick: $event => (archiveAudio(a)) 11402 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_41)])) 11403 }), 128))])) 11404 : _createCommentVNode("", true) 11405 ])])]) 11406 ]), 11407 _: 1 11408 })) 11409 } 11410} 11411})() 11412 }; 11413 11414 const AdminMediaLibraryPage={ 11415 components:{AdminFrame}, 11416 setup(){ 11417 const store=useGzcStore();const router=useRouter(); 11418 const filters=reactive({scope:'all',kind:'all',search:'',limit:40}); 11419 async function load(){if(await store.requireAdmin(router)){await store.loadMediaLibrary(filters,router);}} 11420 onMounted(load); 11421 const lib=computed(()=>store.state.mediaLibrary||{totals:{},storage:{},items:[]}); 11422 const items=computed(()=>safeArray(lib.value.items)); 11423 const totals=computed(()=>lib.value.totals||{}); 11424 const storage=computed(()=>lib.value.storage||{}); 11425 function scopeLabel(v){return v==='event'?'ÙØ¹Ø§ÙÙØ©':v==='announcement'?'Ø¥Ø¹ÙØ§Ù/تع٠ÙÙ ':v==='case'?'ØØ§ÙØ©':'ÙØ³Ø§Ø¦Ø·';} 11426 function targetPath(m){if(!m)return '/admin/media';if(m.scope==='event'&&m.target_id)return '/admin/event/'+m.target_id+'/album';if(m.scope==='announcement')return '/admin/announcements';if(m.scope==='case')return '/admin/help';return '/admin/media';} 11427 function openMedia(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');} 11428 function isVideo(m){return String(m&&m.kind)==='video';} 11429 function isPdf(m){return String(m&&m.kind)==='pdf'||String(m&&m.mime_type||'').includes('pdf');} 11430 return {store,filters,load,lib,items,totals,storage,scopeLabel,targetPath,openMedia,isVideo,isPdf,mediaSrc,fileMB,shortDate}; 11431 }, 11432 render:(function(){ 11433const _Vue = Vue 11434const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 11435 11436const _hoisted_1 = { class: "card dashboardHeaderCard" } 11437const _hoisted_2 = ["onClick"] 11438const _hoisted_3 = { class: "healthGrid" } 11439const _hoisted_4 = { class: "card healthCard ok" } 11440const _hoisted_5 = { class: "card healthCard" } 11441const _hoisted_6 = { class: "card healthCard" } 11442const _hoisted_7 = { class: "card healthCard" } 11443const _hoisted_8 = { class: "card opsSummaryCard" } 11444const _hoisted_9 = { class: "opsFilterBar" } 11445const _hoisted_10 = ["onUpdate:modelValue"] 11446const _hoisted_11 = ["onUpdate:modelValue"] 11447const _hoisted_12 = ["onUpdate:modelValue"] 11448const _hoisted_13 = ["onClick"] 11449const _hoisted_14 = { 11450 key: 0, 11451 class: "card emptyCard" 11452} 11453const _hoisted_15 = { class: "albumGrid adminAlbumGrid" } 11454const _hoisted_16 = ["src"] 11455const _hoisted_17 = ["src"] 11456const _hoisted_18 = { 11457 key: 2, 11458 class: "card emptyCard" 11459} 11460const _hoisted_19 = { class: "mediaActions" } 11461const _hoisted_20 = ["onClick"] 11462const _hoisted_21 = ["onClick"] 11463 11464return function render(_ctx, _cache) { 11465 with (_ctx) {
11466 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 11467 11468 const _component_AdminFrame = _resolveComponent("AdminFrame") 11469 11470 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù ÙØªØ¨Ø© اÙÙØ³Ø§Ø¦Ø·" }, { 11471 default: _withCtx(() => [ 11472 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "Ù ÙØªØ¨Ø© اÙÙØ³Ø§Ø¦Ø·"), _createElementVNode("p", { class: "hint" }, "Ù Ø±ÙØ² Ù ÙØØ¯ Ù٠تابعة ÙØ³Ø§Ø¦Ø· اÙÙØ¹Ø§ÙÙØ§Øª ÙØ§ÙØ¥Ø¹ÙØ§Ùات ÙØ§Ùتع٠Ù٠ات ÙØØ§ÙØ§Øª اÙ٠ساعدة ÙØ§ÙØ·ÙØ§Ø±Ø¦Ø ٠ع ÙØªØ Ø§ÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØªÙصÙÙÙØ© ٠٠اÙÙØ³Ù اÙ٠ختص.")], -1)), _createElementVNode("button", { 11473 class: "smallbtn", 11474 onClick: load 11475 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), 11476 _createElementVNode("section", _hoisted_3, [ 11477 _createElementVNode("div", _hoisted_4, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "إج٠اÙ٠اÙÙØªØ§Ø¦Ø¬", -1)), _createElementVNode("b", null, _toDisplayString(totals.all || 0), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "ØØ³Ø¨ اÙÙÙØªØ± Ø§ÙØØ§ÙÙ", -1))]), 11478 _createElementVNode("div", _hoisted_5, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "ØµÙØ±", -1)), _createElementVNode("b", null, _toDisplayString(totals.images || 0), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "Thumbnails Ø¬Ø§ÙØ²Ø© ØÙØ« ٠تاØ", -1))]), 11479 _createElementVNode("div", _hoisted_6, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "ÙÙØ¯ÙÙÙØ§Øª", -1)), _createElementVNode("b", null, _toDisplayString(totals.videos || 0), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "تØÙ ÙÙ ÙØ³ÙÙ", -1))]), 11480 _createElementVNode("div", _hoisted_7, [_cache[7] || (_cache[7] = _createElementVNode("span", null, "Ø§ÙØªØ®Ø²ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(storage.total_mb || 0) + " MB", 1), _createElementVNode("small", null, _toDisplayString(storage.uploads_dir || 'uploads'), 1)]) 11481 ]), 11482 _createElementVNode("section", _hoisted_8, [_createElementVNode("div", _hoisted_9, [ 11483 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((filters.scope) = $event) }, _cache[8] || (_cache[8] = [ 11484 _createElementVNode("option", { value: "all" }, "Ù٠اÙ٠صادر", -1), 11485 _createElementVNode("option", { value: "events" }, "اÙÙØ¹Ø§ÙÙØ§Øª", -1), 11486 _createElementVNode("option", { value: "announcements" }, "Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª/Ø§ÙØªØ¹Ù Ù٠ات", -1), 11487 _createElementVNode("option", { value: "cases" }, "Ø§ÙØØ§ÙØ§Øª", -1) 11488 ]), 8, _hoisted_10), [[_vModelSelect, filters.scope]]), 11489 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((filters.kind) = $event) }, _cache[9] || (_cache[9] = [ 11490 _createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØ£ÙÙØ§Ø¹", -1), 11491 _createElementVNode("option", { value: "image" }, "ØµÙØ±", -1), 11492 _createElementVNode("option", { value: "video" }, "ÙÙØ¯ÙÙ", -1), 11493 _createElementVNode("option", { value: "pdf" }, "PDF", -1) 11494 ]), 8, _hoisted_11), [[_vModelSelect, filters.kind]]), 11495 _withDirectives(_createElementVNode("input", { 11496 "onUpdate:modelValue": $event => ((filters.search) = $event), 11497 placeholder: "Ø¨ØØ« باس٠اÙÙ ÙÙ Ø£Ù Ø§ÙØ±Ø§Ø¨Ø·" 11498 }, null, 8, _hoisted_12), [[_vModelText, filters.search]]), 11499 _createElementVNode("button", { 11500 class: "smallbtn", 11501 onClick: load 11502 }, "تطبÙÙ", 8, _hoisted_13) 11503 ])]), 11504 (!items.length&&!store.state.busy) 11505 ? (_openBlock(), _createElementBlock("section", _hoisted_14, "ÙØ§ ØªÙØ¬Ø¯ ÙØ³Ø§Ø¦Ø· Ù Ø·Ø§Ø¨ÙØ©.")) 11506 : _createCommentVNode("", true), 11507 _createElementVNode("section", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (m) => { 11508 return (_openBlock(), _createElementBlock("figure", { 11509 class: "albumItem", 11510 key: m.scope+'-'+m.id 11511 }, [(!isVideo(m)&&!isPdf(m)) 11512 ? (_openBlock(), _createElementBlock("img", { 11513 key: 0, 11514 src: mediaSrc(m), 11515 loading: "lazy", 11516 alt: "media" 11517 }, null, 8, _hoisted_16)) 11518 : (isVideo(m)) 11519 ? (_openBlock(), _createElementBlock("video", { 11520 key: 1, 11521 src: m.file_url, 11522 controls: "", 11523 preload: "metadata" 11524 }, null, 8, _hoisted_17)) 11525 : (_openBlock(), _createElementBlock("div", _hoisted_18, "PDF")), _createElementVNode("figcaption", null, [_createElementVNode("b", null, _toDisplayString(m.filename || scopeLabel(m.scope)), 1
11525), _createElementVNode("small", null, _toDisplayString(scopeLabel(m.scope)) + " â " + _toDisplayString(m.target_title || '-') + " â " + _toDisplayString(fileMB(m.size_bytes)) + " â " + _toDisplayString(shortDate(m.created_at)), 1)]), _createElementVNode("div", _hoisted_19, [_createElementVNode("button", { 11526 class: "smallbtn secondary", 11527 onClick: $event => (openMedia(m)) 11528 }, "ÙØªØ", 8, _hoisted_20), _createElementVNode("button", { 11529 class: "smallbtn", 11530 onClick: $event => ($router.push(targetPath(m))) 11531 }, "إدارة اÙ٠صدر", 8, _hoisted_21)])])) 11532 }), 128))]) 11533 ]), 11534 _: 1 11535 })) 11536 } 11537} 11538})() 11539 }; 11540 11541 const AdminContentIntakePage={ 11542 components:{AdminFrame}, 11543 setup(){ 11544 const store=useGzcStore(),router=useRouter(),route=useRoute(); 11545 const items=ref([]),intake=ref(null),communities=ref([]),categories=ref([]),sourceFile=ref(null),publishConfirmed=ref(false); 11546 const source=reactive({source_type:'image',source_text:'',source_url:'',admin_note:''}); 11547 const edit=reactive({title_ar:'',summary_ar:'',body_ar:'',content_type:'news',approved_destination:'announcement',source_name:'',source_country:'',source_date:'',source_url:'',confidence:'low',announcement_type:'news',announcement_target:'all',duration_days:14,action_url:'',approved_community_id:'',destination_category_id:''}); 11548 const checks=reactive({source_verified:false,content_verified:false,uncertainties_reviewed:false}); 11549 const detailId=computed(()=>Number(route.params.id||0)||0),isDetail=computed(()=>!!detailId.value),isDraft=computed(()=>intake.value&&intake.value.status==='draft'),isReview=computed(()=>intake.value&&intake.value.status==='in_review'); 11550 const destinationIsGuide=computed(()=>['china_guide','trade_shipping'].includes(edit.approved_destination)); 11551 const uploadedSourceEvidence=computed(()=>intake.value&&['image','pdf'].includes(String(intake.value.source_type||''))&&Array.isArray(intake.value.files)&&intake.value.files.length>0); 11552 const sourceReviewLabel=computed(()=>intake.value&&intake.value.source_type==='image'?'راجعت Ø§ÙØµÙرة Ø§ÙØ£ØµÙÙØ© ÙØ§ÙØ¬ÙØ© Ø§ÙØ¸Ø§Ùرة ÙÙÙØ§':intake.value&&intake.value.source_type==='pdf'?'راجعت Ù ÙÙ PDF Ø§ÙØ£ØµÙÙ ÙØ§ÙØ¬ÙØ© Ø§ÙØ¸Ø§Ùرة ÙÙÙ':intake.value&&intake.value.source_type==='url'?'راجعت Ø§ÙØ±Ø§Ø¨Ø· ÙØ§ÙØ¬ÙØ© اÙÙØ§Ø´Ø±Ø©':'راجعت اÙÙØµ اÙ٠صدر ÙØ§ÙØ¬ÙØ© اÙ٠ذÙÙØ±Ø© Ø¥Ù ÙØ¬Ø¯Øª'); 11553 const statusLabel=s=>({draft:'Ù Ø³ÙØ¯Ø©',in_review:'Ø¨Ø§ÙØªØ¸Ø§Ø± Ø§ÙØ§Ø¹ØªÙ اد',published:'Ù ÙØ´Ùر',handed_off:'Ø£ÙØ±Ø³Ù ÙÙØªØØ±Ùر',rejected:'٠رÙÙØ¶'}[String(s||'')]||String(s||'-')); 11554 const sourceLabel=s=>({image:'ØµÙØ±Ø©',pdf:'PDF',text:'ÙØµ',url:'رابط'}[String(s||'')]||String(s||'-')); 11555 const destinationLabel=s=>({announcement:'Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª',community:'ØµÙØØ© ٠جت٠ع',china_guide:'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ',trade_shipping:'Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ',sudan_digital:'ÙØ³Ù ÙØ¯ÙÙ Ù ØÙÙØ¸'}[String(s||'')]||String(s||'-')); 11556 function sync(row){intake.value=row||null;if(!row)return;Object.assign(edit,{title_ar:row.title_ar||'',summary_ar:row.summary_ar||'',body_ar:row.body_ar||'',content_type:row.content_type||'news',approved_destination:row.approved_destination||row.suggested_destination||'announcement',source_name:row.source_name||'',source_country:row.source_country||'',source_date:String(row.source_date||'').slice(0,10),source_url:row.extracted_source_url||'',confidence:row.confidence||'low',announcement_type:row.announcement_type||row.suggested_announcement_type||'news',announcement_target:row.announcement_target||'all',duration_days:Number(row.duration_days||14),action_url:row.action_url||'',approved_community_id:row.approved_community_id||'',destination_category_id:row.destination_category_id||''});Object.assign(checks,{source_verified:false,content_verified:false,uncertainties_reviewed:false});publishConfirmed.value=false;loadCategories();} 11557 async function loadList(){const r=await api('/api/admin/content-intakes');if(r.status===401){router.replace('/admin/login');return;}items.value=safeArray(r.intakes);} 11558 async function loadCommunities(){const r=await api('/api/admin/communities');communities.value=safeArray(r.communities);} 11559 async function loadCategories(){categories.value=[];
11559if(!destinationIsGuide.value)return;const r=await api('/api/china-guide/categories?hub='+encodeURIComponent(edit.approved_destination));categories.value=safeArray(r.categories);if(edit.destination_category_id&&!categories.value.some(x=>Number(x.id)===Number(edit.destination_category_id)))edit.destination_category_id='';} 11560 async function loadDetail(){if(!detailId.value){intake.value=null;return;}const r=await api('/api/admin/content-intakes/'+encodeURIComponent(detailId.value));if(r.status===401){router.replace('/admin/login');return;}if(r.ok)sync(r.intake);else store.state.msg=r.message||'تعذر ÙØªØ اÙÙ Ø³ÙØ¯Ø©';} 11561 async function load(){if(!await store.requireAdmin(router))return;await Promise.all([loadList(),loadCommunities()]);if(detailId.value)await loadDetail();} 11562 function pickFile(e){sourceFile.value=e&&e.target&&e.target.files&&e.target.files[0]||null;} 11563 async function createAndGenerate(){ 11564 store.state.busy=true;store.state.msg='ØÙظ اÙ٠صدر...';let created=null; 11565 if(['image','pdf'].includes(source.source_type)){ 11566 if(!sourceFile.value){store.state.busy=false;store.state.msg='اختر Ù Ù٠اÙ٠صدر Ø£ÙÙØ§Ù';return;} 11567 const fd=new FormData();fd.append('source_type',source.source_type);fd.append('admin_note',source.admin_note||'');fd.append('source',sourceFile.value); 11568 created=await uploadApi('/api/admin/content-intakes',{method:'POST',body:fd,headers:{Accept:'application/json'},uploadLabel:'Ø±ÙØ¹ ÙØÙØ¸ اÙ٠صدر'}); 11569 }else created=await api('/api/admin/content-intakes',{method:'POST',body:JSON.stringify({source_type:source.source_type,source_text:source.source_text,source_url:source.source_url,admin_note:source.admin_note})}); 11570 if(!created.ok){store.state.busy=false;store.state.msg=created.message||'تعذر ØÙظ اÙ٠صدر';return;} 11571 const id=created.intake&&created.intake.id;store.state.msg='ÙÙØ±Ø£ AI اÙ٠صدر ÙÙØ¬Ùز Ù Ø³ÙØ¯Ø© ÙÙ٠راجعة...'; 11572 const generated=await api('/api/admin/content-intakes/'+encodeURIComponent(id)+'/generate',{method:'POST',body:'{}',feedbackLabel:'Ø¥ÙØ´Ø§Ø¡ Ù Ø³ÙØ¯Ø© AI'}); 11573 store.state.busy=false;store.state.msg=generated.message||generated.error||'';await router.push('/admin/content-intake/'+encodeURIComponent(id));await loadList();await loadDetail(); 11574 } 11575 async function saveDraft(){if(!intake.value)return null;store.state.busy=true;const r=await api('/api/admin/content-intakes/'+intake.value.id+'/update',{method:'POST',body:JSON.stringify({...edit,approved_community_id:edit.approved_community_id||null,destination_category_id:edit.destination_category_id||null})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)sync(r.intake);return r;} 11576 async function regenerate(){if(!intake.value)return;if(!confirm('إعادة Ø¥ÙØ´Ø§Ø¡ اÙÙ Ø³ÙØ¯Ø© ٠٠اÙÙ ØµØ¯Ø±Ø ÙÙ ÙÙ٠تعدÙ٠اÙÙØ§ØªØ¬ Ø¨Ø¹Ø¯ÙØ§.'))return;store.state.busy=true;const r=await api('/api/admin/content-intakes/'+intake.value.id+'/generate',{method:'POST',body:'{}',feedbackLabel:'إعادة Ø¥ÙØ´Ø§Ø¡ Ù Ø³ÙØ¯Ø© AI'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)sync(r.intake);} 11577 async function submitReview(){const reviewChecks={source_verified:checks.source_verified===true,content_verified:checks.content_verified===true,uncertainties_reviewed:checks.uncertainties_reviewed===true};const saved=await saveDraft();if(!saved||!saved.ok||!intake.value||intake.value.status!=='draft')return;store.state.busy=true;const r=await api('/api/admin/content-intakes/'+intake.value.id+'/submit',{method:'POST',body:JSON.stringify(reviewChecks)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)sync(r.intake);} 11578 async function returnDraft(){if(!intake.value)return;const r=await api('/api/admin/content-intakes/'+intake.value.id+'/return',{method:'POST',body:JSON.stringify({note:'إعادة ÙÙØªØ¹Ø¯ÙÙ Ù Ù Ù Ø³Ø§ØØ© اÙ٠راجعة'})});store.state.msg=r.message||r.error||'';if(r.ok)sync(r.intake);} 11579 async function approve(){if(!intake.value||!publishConfirmed.value)return;const behavior=intake.value.destination_behavior||{};const ask=behavior.draft_only?'اعت٠اد ÙØ¥Ø±Ø³Ø§Ù ÙÙ Ø³ÙØ¯Ø© خاصة ÙÙ Ø³Ø§ØØ© Ø§ÙØªØØ±ÙرØ':'اعت٠اد ÙÙØ´Ø± اÙÙ ØØªÙÙ Ø§ÙØ¢ÙØ';if(!confirm(ask))return;store.state.busy=true;const r=await api('/api/admin/content-intakes/'+intake.value.id+'/publish',{method:'POST',body:JSON.stringify({publish_confirmed:true}),feedbackLabel:'اعت٠اد اÙÙ ØØªÙÙ'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)sync(r.intake);} 11580 async function reject(){if(!intake.value||!confirm('Ø±ÙØ¶ ÙØ°Ù اÙÙ Ø³ÙØ¯Ø© ٠ع Ø§ÙØ§ØØªÙاظ باÙ٠صدرØ'))return;const r=await api('/api/admin/content-intakes/'+intake.value.id+'/reject',{method:'POST',body:JSON.stringify({note:'Ø±ÙØ¶ Ø¨ÙØ§Ø³Ø·Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©'})});store.state.msg=r.message||r.error||'';if(r.ok){await loadList();sync(await (async()=>{const d=await api('/api/admin/content-intakes/'+intake.value.id);return d.intake;})());}}
11580 11581 function openItem(row){router.push('/admin/content-intake/'+encodeURIComponent(row.id));} 11582 function back(){router.push('/admin/content-intake');} 11583 function openDestination(){const row=intake.value;if(!row)return;const p=row.published_entity_type==='announcement'?'/admin/announcements':({china_guide:'/admin/china-guide',trade_shipping:'/admin/trade-shipping',sudan_digital:'/admin/sudan-digital'}[row.approved_destination]||'/admin/content-intake');router.push(p);} 11584 watch(()=>edit.approved_destination,loadCategories);watch(()=>route.params.id,loadDetail);onMounted(load); 11585 return{store,items,intake,communities,categories,source,sourceFile,edit,checks,publishConfirmed,isDetail,isDraft,isReview,destinationIsGuide,uploadedSourceEvidence,sourceReviewLabel,statusLabel,sourceLabel,destinationLabel,pickFile,createAndGenerate,saveDraft,regenerate,submitReview,returnDraft,approve,reject,openItem,back,openDestination,load,shortDate}; 11586 }, 11587 render:(function(){ 11588const _Vue = Vue 11589const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 11590 11591const _hoisted_1 = { class: "card dashboardHeaderCard contentIntakeHero" } 11592const _hoisted_2 = ["onClick"] 11593const _hoisted_3 = { class: "card formCard contentIntakeCreate" } 11594const _hoisted_4 = ["onUpdate:modelValue"] 11595const _hoisted_5 = { key: 0 } 11596const _hoisted_6 = ["onChange"] 11597const _hoisted_7 = { key: 1 } 11598const _hoisted_8 = ["onChange"] 11599const _hoisted_9 = { key: 2 } 11600const _hoisted_10 = ["onUpdate:modelValue"] 11601const _hoisted_11 = { key: 3 } 11602const _hoisted_12 = ["onUpdate:modelValue"] 11603const _hoisted_13 = ["onUpdate:modelValue"] 11604const _hoisted_14 = ["disabled", "onClick"] 11605const _hoisted_15 = { class: "contentIntakeQueue" } 11606const _hoisted_16 = { 11607 key: 0, 11608 class: "card emptyState" 11609} 11610const _hoisted_17 = ["onClick"] 11611const _hoisted_18 = ["src"] 11612const _hoisted_19 = { class: "contentIntakeCardBody" } 11613const _hoisted_20 = { class: "memberCardTop" } 11614const _hoisted_21 = { class: "statusPill" } 11615const _hoisted_22 = { 11616 key: 0, 11617 class: "inlineWarning" 11618} 11619const _hoisted_23 = ["onClick"] 11620const _hoisted_24 = { class: "contentIntakeWorkspace" } 11621const _hoisted_25 = { class: "card contentIntakeSource" } 11622const _hoisted_26 = { class: "memberCardTop" } 11623const _hoisted_27 = { class: "statusPill" } 11624const _hoisted_28 = ["src"] 11625const _hoisted_29 = ["href"] 11626const _hoisted_30 = { 11627 key: 1, 11628 class: "contentIntakeSourceText" 11629} 11630const _hoisted_31 = ["href"] 11631const _hoisted_32 = { 11632 key: 3, 11633 class: "hint" 11634} 11635const _hoisted_33 = { 11636 key: 4, 11637 class: "hint" 11638} 11639const _hoisted_34 = { class: "card formCard contentIntakeDraft" } 11640const _hoisted_35 = { class: "memberCardTop" } 11641const _hoisted_36 = { class: "statusPill" } 11642const _hoisted_37 = { 11643 key: 0, 11644 class: "inlineWarning" 11645} 11646const _hoisted_38 = { 11647 key: 1, 11648 class: "dangerBox" 11649} 11650const _hoisted_39 = { 11651 key: 2, 11652 class: "inlineWarning" 11653} 11654const _hoisted_40 = { 11655 key: 3, 11656 class: "intakeNotes" 11657} 11658const _hoisted_41 = ["disabled"] 11659const _hoisted_42 = ["onUpdate:modelValue"] 11660const _hoisted_43 = ["onUpdate:modelValue"] 11661const _hoisted_44 = ["onUpdate:modelValue"] 11662const _hoisted_45 = { class: "editGrid" } 11663const _hoisted_46 = ["onUpdate:modelValue"] 11664const _hoisted_47 = ["onUpdate:modelValue"] 11665const _hoisted_48 = ["onUpdate:modelValue", "placeholder"] 11666const _hoisted_49 = ["onUpdate:modelValue"] 11667const _hoisted_50 = ["onUpdate:modelValue"] 11668const _hoisted_51 = { key: 0 } 11669const _hoisted_52 = ["onUpdate:modelValue"] 11670const _hoisted_53 = ["onUpdate:modelValue"] 11671const _hoisted_54 = { key: 0 } 11672const _hoisted_55 = ["onUpdate:modelValue"] 11673const _hoisted_56 = ["value"] 11674const _hoisted_57 = { key: 1 } 11675const _hoisted_58 = ["onUpdate:modelValue"] 11676const _hoisted_59 = ["value"] 11677const _hoisted_60 = { 11678 key: 2, 11679 class: "editGrid" 11680} 11681const _hoisted_61 = ["onUpdate:modelValue"] 11682const _hoisted_62 = ["onUpdate:modelValue"] 11683const _hoisted_63 = ["onUpdate:modelValue"] 11684const _hoisted_64 = ["onUpdate:modelValue"] 11685const _hoisted_65 = { 11686 key: 4, 11687 class: "actionRow" 11688} 11689const _hoisted_66 = ["onClick"] 11690const _hoisted_67 = ["onClick"] 11691const _hoisted_68 = { class: "card contentIntakeReview" } 11692const _hoisted_69 = { class: "check" } 11693const _hoisted_70 = ["onUpdate:modelValue"] 11694const _hoisted_71 = { class: "check" } 11695const _hoisted_72 = ["onUpdate:modelValue"] 11696const _hoisted_73 = { 11697 key: 0, 11698 class: "check" 11699} 11700const _hoisted_74 = ["onUpdate:modelValue"] 11701const _hoisted_75 = ["onClick"] 11702const _hoisted_76 = { class: "check publishConfirm" } 11703const _hoisted_77 = ["onUpdate:modelValue"] 11704const _hoisted_78 = ["disabled", "onClick"] 11705const _hoisted_79 = ["onClick"] 11706const _hoisted_80 = { 11707 key: 0, 11708 class: "successBox" 11709} 11710const _hoisted_81 = ["onClick"] 11711const _hoisted_82 = ["onClick"] 11712 11713return function render(_ctx, _cache) { 11714 with (_ctx) {
11715 const { createElementVNode: _createElementVNode, vModelSelect: _vModelSelect, withDirectives: _withDirectives, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, vModelText: _vModelText, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, vModelCheckbox: _vModelCheckbox, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 11716 11717 const _component_AdminFrame = _resolveComponent("AdminFrame") 11718 11719 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙÙ ØØªÙÙ Ø§ÙØ°ÙÙ" }, { 11720 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "AI + Human Review"), _createElementVNode("h3", null, "Ø¥ÙØ´Ø§Ø¡ Ù ØØªÙÙ Ù Ù ØµÙØ±Ø© Ø£Ù PDF Ø£Ù ÙØµ أ٠رابط"), _createElementVNode("p", { class: "hint" }, "Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·Ùاع٠ÙÙØ´Ø¦ Ù Ø³ÙØ¯Ø© ÙÙØ·. اÙÙØ´Ø± Ø£Ù Ø§ÙØ¥Ø±Ø³Ø§Ù ÙÙ Ø³Ø§ØØ© Ø§ÙØªØØ±Ùر ÙØØªØ§Ø¬ ٠راجعة ÙØ§Ø¹ØªÙ Ø§Ø¯Ø§Ù Ø¨Ø´Ø±ÙØ§Ù ÙØ§Ø¶ØØ§Ù.")], -1)), _createElementVNode("button", { 11721 class: "smallbtn", 11722 onClick: load 11723 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), (!isDetail) 11724 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("section", _hoisted_3, [ 11725 _cache[8] || (_cache[8] = _createElementVNode("h3", null, "٠صدر Ø¬Ø¯ÙØ¯", -1)), 11726 _createElementVNode("label", null, [_cache[2] || (_cache[2] = _createTextVNode("ÙÙØ¹ اÙ٠صدر")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((source.source_type) = $event) }, _cache[1] || (_cache[1] = [ 11727 _createElementVNode("option", { value: "image" }, "ð· ØµÙرة", -1), 11728 _createElementVNode("option", { value: "pdf" }, "ð PDF", -1), 11729 _createElementVNode("option", { value: "text" }, "ð ÙØµ", -1), 11730 _createElementVNode("option", { value: "url" }, "ð Ø±Ø§Ø¨Ø·", -1) 11731 ]), 8, _hoisted_4), [[_vModelSelect, source.source_type]])]), 11732 (source.source_type==='image') 11733 ? (_openBlock(), _createElementBlock("label", _hoisted_5, [_cache[3] || (_cache[3] = _createTextVNode("Ø§ÙØµÙرة")), _createElementVNode("input", { 11734 type: "file", 11735 accept: "image/jpeg,image/png,image/webp", 11736 onChange: pickFile 11737 }, null, 40, _hoisted_6)])) 11738 : _createCommentVNode("", true), 11739 (source.source_type==='pdf') 11740 ? (_openBlock(), _createElementBlock("label", _hoisted_7, [_cache[4] || (_cache[4] = _createTextVNode("Ù ÙÙ PDF")), _createElementVNode("input", { 11741 type: "file", 11742 accept: "application/pdf", 11743 onChange: pickFile 11744 }, null, 40, _hoisted_8)])) 11745 : _createCommentVNode("", true), 11746 (source.source_type==='text') 11747 ? (_openBlock(), _createElementBlock("label", _hoisted_9, [_cache[5] || (_cache[5] = _createTextVNode("اÙÙØµ اÙ٠صدر")), _withDirectives(_createElementVNode("textarea", { 11748 "onUpdate:modelValue": $event => ((source.source_text) = $event), 11749 maxlength: "12000", 11750 placeholder: "Ø§ÙØµÙ Ø§ÙØªØ¹Ù ÙÙ Ø£Ù Ø§ÙØ®Ø¨Ø± Ù٠ا ÙØ±Ø¯..." 11751 }, null, 8, _hoisted_10), [[_vModelText, source.source_text]])])) 11752 : _createCommentVNode("", true), 11753 (source.source_type==='url') 11754 ? (_openBlock(), _createElementBlock("label", _hoisted_11, [_cache[6] || (_cache[6] = _createTextVNode("Ø§ÙØ±Ø§Ø¨Ø·")), _withDirectives(_createElementVNode("input", { 11755 type: "url", 11756 "onUpdate:modelValue": $event => ((source.source_url) = $event), 11757 placeholder: "https://..." 11758 }, null, 8, _hoisted_12), [[_vModelText, source.source_url]])])) 11759 : _createCommentVNode("", true), 11760 _createElementVNode("label", null, [_cache[7] || (_cache[7] = _
11760createTextVNode("Ù ÙØ§ØØ¸Ø© ÙÙØ¥ AI (Ø§Ø®ØªÙØ§Ø±Ù)")), _withDirectives(_createElementVNode("textarea", { 11761 "onUpdate:modelValue": $event => ((source.admin_note) = $event), 11762 placeholder: "Ù Ø«ÙØ§Ù: صغ Ø§ÙØ®Ø¨Ø± باختصار ٠ع إبراز Ù ØªØ·ÙØ¨Ø§Øª Ø§ÙØ³Ùر" 11763 }, null, 8, _hoisted_13), [[_vModelText, source.admin_note]])]), 11764 _createElementVNode("button", { 11765 class: "btn loadMore", 11766 disabled: store.state.busy, 11767 onClick: createAndGenerate 11768 }, "ØÙظ اÙ٠صدر ÙØ¥Ùشاء Ù Ø³ÙØ¯Ø© AI", 8, _hoisted_14), 11769 _cache[9] || (_cache[9] = _createElementVNode("p", { class: "hint" }, "ÙØ§ ÙÙØ¬Ø¯ Auto Publish. اÙ٠صدر Ø§ÙØ£ØµÙÙ ÙØ¨ÙÙ Ù ØÙÙØ¸Ø§Ù ÙØ¯ÙÙÙ.", -1)) 11770 ]), _createElementVNode("section", _hoisted_15, [_cache[10] || (_cache[10] = _createElementVNode("h3", null, "اÙÙ Ø³ÙØ¯Ø§Øª ÙØ§Ù٠راجعات", -1)), (!items.length) 11771 ? (_openBlock(), _createElementBlock("div", _hoisted_16, "ÙØ§ ØªÙØ¬Ø¯ Ù Ø³ÙØ¯Ø§Øª ØØ§ÙÙØ§Ù.")) 11772 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (row) => { 11773 return (_openBlock(), _createElementBlock("article", { 11774 class: "card contentIntakeCard", 11775 key: row.id, 11776 onClick: $event => (openItem(row)) 11777 }, [(row.thumb_url&&row.file_kind==='image') 11778 ? (_openBlock(), _createElementBlock("img", { 11779 key: 0, 11780 src: row.thumb_url, 11781 alt: "" 11782 }, null, 8, _hoisted_18)) 11783 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_19, [ 11784 _createElementVNode("div", _hoisted_20, [_createElementVNode("b", null, _toDisplayString(row.title_ar||'٠صدر Ø¬Ø¯ÙØ¯ â Ø¨Ø§Ùتظار AI'), 1), _createElementVNode("span", _hoisted_21, _toDisplayString(statusLabel(row.status)), 1)]), 11785 _createElementVNode("p", null, _toDisplayString(row.summary_ar||row.source_name||sourceLabel(row.source_type)), 1), 11786 _createElementVNode("small", null, _toDisplayString(sourceLabel(row.source_type)) + " · " + _toDisplayString(destinationLabel(row.approved_destination||row.suggested_destination)) + " · " + _toDisplayString(shortDate(row.updated_at)), 1), 11787 (row.duplicate_status==='conflict') 11788 ? (_openBlock(), _createElementBlock("div", _hoisted_22, "â Ø§ØØªÙ Ø§Ù ØªÙØ±Ø§Ø± ÙØØªØ§Ø¬ ٠راجعة")) 11789 : _createCommentVNode("", true) 11790 ])], 8, _hoisted_17)) 11791 }), 128))])], 64)) 11792 : intake 11793 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createElementVNode("button", { 11794 class: "smallbtn contentIntakeBack", 11795 onClick: back 11796 }, "â Ù٠اÙÙ Ø³ÙØ¯Ø§Øª", 8, _hoisted_23), _createElementVNode("section", _hoisted_24, [_createElementVNode("article", _hoisted_25, [ 11797 _createElementVNode("div", _hoisted_26, [_cache[11] || (_cache[11] = _createElementVNode("h3", null, "1. اÙ٠صدر Ø§ÙØ£ØµÙÙ", -1)), _createElementVNode("span", _hoisted_27, _toDisplayString(sourceLabel(intake.source_type)), 1)]), 11798 (intake.files&&intake.files.length) 11799 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [(intake.files[0].kind==='image') 11800 ? (_openBlock(), _createElementBlock("img", { 11801 key: 0, 11802 class: "contentIntakePreview", 11803 src: intake.files[0].preview_url, 11804 alt: "اÙ٠صدر Ø§ÙØ£ØµÙÙ" 11805 }, null, 8, _hoisted_28)) 11806 : (_openBlock(), _createElementBlock("a", { 11807 key: 1, 11808 class: "btn secondary", 11809 href: intake.files[0].file_url, 11810 target: "_blank", 11811 rel: "noopener" 11812 }, "ÙØªØ Ù ÙÙ PDF Ø§ÙØ£ØµÙÙ", 8, _hoisted_29))], 64)) 11813 : _createCommentVNode("", true), 11814 (intake.source_type==='text') 11815 ? (_openBlock(), _createElementBlock("pre", _hoisted_30, _toDisplayString(intake.source_text), 1)) 11816 : _createCommentVNode("", true), 11817 (intake.source_type==='url') 11818 ? (_openBlock(), _createElementBlock("a", { 11819 key: 2, 11820 href: intake.source_url, 11821 target: "_blank", 11822 rel: "noopener" 11823 }, _toDisplayString(intake.source_url), 9, _hoisted_31)) 11824 : _createCommentVNode("", true), 11825 uploadedSourceEvidence 11826 ? (_openBlock(), _createElementBlock("p", _hoisted_32, "Ø§ÙØµÙرة أ٠اÙÙ Ø³ØªÙØ¯ Ø§ÙØ£ØµÙÙ Ù٠دÙÙ٠اÙ٠صدر اÙÙ ØÙÙØ¸Ø ÙØ§ ØªØØªØ§Ø¬ ÙØ¥Ø¶Ø§ÙØ© رابط ٠صدر ÙØ¯ÙÙ.")) 11827 : (_openBlock(), _createElementBlock("p", _hoisted_33, "اÙ٠صدر Ù ØÙÙØ¸ Ù ÙÙØµÙا٠ع٠اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر ÙÙØ§ ÙØØ°Ù Ø¹ÙØ¯ Ø§ÙØ§Ø¹ØªÙ اد.")) 11828 ]), _createElementVNode("article", _hoisted_34, [ 11829 _createElementVNode("div", _hoisted_35, [_cache[12] || (_cache[12] = _createElementVNode("h3", null, "2. اÙÙ Ø³ÙØ¯Ø©", -1)), _createElementVNode("span", _hoisted_36, _toDisplayString(statusLabel(intake.status)), 1)]), 11830 (intake.ai_error) 11831 ? (_openBlock(), _createElementBlock("div", _hoisted_37, "تعذر AI Ø³Ø§Ø¨ÙØ§Ù: " + _toDisplayString(intake.ai_error), 1)) 11832 : _createCommentVNode("", true), 11833 (intake.duplicate_status==='conflict') 11834 ? (_openBlock(), _createElementBlock("div", _hoisted_38, "â ØªØ¹Ø§Ø±Ø¶ Ù ØØªÙ Ù: " + _toDisplayString(intake.duplicate_reason) + " â " + _toDisplayString(intake.duplicate_entity_type) + " #" + _toDisplayString(intake.duplicate_entity_id), 1)) 11835 : _createCommentVNode("", true), 11836 (intake.uncertain_fields&&intake.uncertain_fields.length) 11837 ? (_openBlock(), _createElementBlock("div", _hoisted_39, [_cache[13] || (_cache[13] = _createElementVNode("b", null, "ØÙÙÙ ØªØØªØ§Ø¬ ٠راجعة:", -1)), _createTextVNode(" " + _toDisplayString(intake.uncertain_fields.join('Ø ')), 1)])) 11838 : _createCommentVNode("", true), 11839 (intake.verification_notes&&intake.verification_notes.length) 11840 ? (_openBlock(), _createElementBlock("div", _hoisted_40, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(intake.verification_notes, (n, i) => { 11841 return (_openBlock(), _createElementBlock("p", { key: i }, "⢠" + _toDisplayString(n), 1)) 11842 }), 128))])) 11843 : _createCommentVNode("", true), 11844 _createElementVNode("fieldset", { disabled: !isDraft }, [ 11845 _createElementVNode("label", null, [_cache[14] || (_cache[14] = _createTextVNode("Ø§ÙØ¹ÙÙØ§Ù")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit.title_ar) = $event) }, null, 8, _hoisted_42), [[_vModelText, edit.title_ar]])]), 11846 _createElementVNode("label", null, [_cache[15] || (_cache[15] = _createTextVNode("اÙÙ ÙØ®Øµ")), _withDirectives(_createElementVNode("textarea", { "onUpdate:modelValue": $event => ((edit.summary_ar) = $event) }, null, 8, _hoisted_43), [[_vModelText, edit.summary_ar]])]), 11847 _createElementVNode("label", null, [_cache[16] || (_cache[16] = _createTextVNode("ÙØµ Ø§ÙØ®Ø¨Ø±")), _withDirectives(_createElementVNode("textarea", { 11848 class: "contentIntakeBody", 11849 "onUpdate:modelValue": $event => ((edit.body_ar) = $event) 11850 }, null, 8, _hoisted_44), [[_vModelText, edit.body_ar]])]), 11851 _createElementVNode("div", _hoisted_45, [ 11852 _createElementVNode("label", null, [_cache[18] || (_cache[18] = _createTextVNode("ÙÙØ¹ اÙÙ ØØªÙÙ")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.content_type) = $event) }, _cache[17] || (_cache[17] = [ 11853 _createElementVNode("option", { value: "news" }, "خبر", -1), 11854 _createElementVNode("option", { value: "official_notice" }, "تع٠Ù٠رس٠Ù", -1), 11855 _createElementVNode("option", { value: "travel" }, "Ø³ÙØ±", -1), 11856 _createElementVNode("option", { value: "community" }, "٠جت٠عÙ", -1), 11857 _createElementVNode("option", { value: "commercial" }, "تجارÙ", -1), 11858 _createElementVNode("option", { value: "service" }, "خد٠ة", -1), 11859 _createElementVNode("option", { value: "emergency" }, "عاجÙ", -1), 11860 _createElementVNode("option", { value: "event" }, "ÙØ¹Ø§ÙÙØ©", -1) 11861 ]), 8, _hoisted_46), [[_vModelSelect, edit.content_type]])]), 11862 _createElementVNode("label", null, [_cache[20] || (_cache[20] = _createTextVNode("Ø§ÙØ«ÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event =>
11862 ((edit.confidence) = $event) }, _cache[19] || (_cache[19] = [_createElementVNode("option", { value: "low" }, "Ù ÙØ®Ùضة", -1), _createElementVNode("option", { value: "medium" }, "Ù ØªÙØ³Ø·Ø©", -1), _createElementVNode("option", { value: "high" }, "عاÙÙØ©", -1)]), 8, _hoisted_47), [[_vModelSelect, edit.confidence]])]), 11863 _createElementVNode("label", null, [_createTextVNode(_toDisplayString(uploadedSourceEvidence?'Ø§ÙØ¬ÙØ© Ø§ÙØ¸Ø§Ùرة Ù٠اÙÙ Ø³ØªÙØ¯ (Ø§Ø®ØªÙØ§Ø±Ù)':'Ø§ÙØ¬ÙØ© / اÙ٠صدر'), 1), _withDirectives(_createElementVNode("input", { 11864 "onUpdate:modelValue": $event => ((edit.source_name) = $event), 11865 placeholder: uploadedSourceEvidence?'ÙØ³ØªØ®Ø±Ø¬Ùا AI Ø¥Ù ÙØ§Ùت ÙØ§Ø¶ØØ©':'Ø§ÙØ¬ÙØ© اÙÙØ§Ø´Ø±Ø© أ٠اÙ٠صدر' 11866 }, null, 8, _hoisted_48), [[_vModelText, edit.source_name]])]), 11867 _createElementVNode("label", null, [_cache[21] || (_cache[21] = _createTextVNode("Ø§ÙØ¯ÙÙØ©")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit.source_country) = $event) }, null, 8, _hoisted_49), [[_vModelText, edit.source_country]])]), 11868 _createElementVNode("label", null, [_cache[22] || (_cache[22] = _createTextVNode("ØªØ§Ø±ÙØ® اÙ٠صدر")), _withDirectives(_createElementVNode("input", { 11869 type: "date", 11870 "onUpdate:modelValue": $event => ((edit.source_date) = $event) 11871 }, null, 8, _hoisted_50), [[_vModelText, edit.source_date]])]), 11872 (!uploadedSourceEvidence) 11873 ? (_openBlock(), _createElementBlock("label", _hoisted_51, [_cache[23] || (_cache[23] = _createTextVNode("رابط اÙ٠صدر اÙ٠ستخرج")), _withDirectives(_createElementVNode("input", { 11874 type: "url", 11875 "onUpdate:modelValue": $event => ((edit.source_url) = $event) 11876 }, null, 8, _hoisted_52), [[_vModelText, edit.source_url]])])) 11877 : _createCommentVNode("", true) 11878 ]), 11879 _cache[36] || (_cache[36] = _createElementVNode("h4", null, "اÙÙØ¬ÙØ© بعد Ø§ÙØ§Ø¹ØªÙ اد", -1)), 11880 _createElementVNode("label", null, [_cache[25] || (_cache[25] = _createTextVNode("اÙÙØ¬ÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.approved_destination) = $event) }, _cache[24] || (_cache[24] = [ 11881 _createElementVNode("option", { value: "announcement" }, "Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª â ÙÙØ´Ø± بعد Ø§ÙØ§Ø¹ØªÙ اد", -1), 11882 _createElementVNode("option", { value: "community" }, "ØµÙØØ© ٠جت٠ع â ÙÙØ´Ø± بعد Ø§ÙØ§Ø¹ØªÙ اد", -1), 11883 _createElementVNode("option", { value: "china_guide" }, "دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ â Ù Ø³ÙØ¯Ø© ØªØØ±Ùر ÙÙØ·", -1), 11884 _createElementVNode("option", { value: "trade_shipping" }, "Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ â Ù Ø³ÙØ¯Ø© ØªØØ±Ùر ÙÙØ·", -1) 11885 ]), 8, _hoisted_53), [[_vModelSelect, edit.approved_destination]])]), 11886 (edit.approved_destination==='community') 11887 ? (_openBlock(), _createElementBlock("label", _hoisted_54, [_cache[27] || (_cache[27] = _createTextVNode("اÙ٠جت٠ع")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.approved_community_id) = $event) }, [_cache[26] || (_cache[26] = _createElementVNode("option", { value: "" }, "اختر اÙ٠جت٠ع", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(communities, (c) => { 11888 return (_openBlock(), _createElementBlock("option", { 11889 key: c.id, 11890 value: c.id 11891 }, _toDisplayString(c.name_ar), 9, _hoisted_56)) 11892 }), 128))], 8, _hoisted_55), [[_vModelSelect, edit.approved_community_id]])])) 11893 : _createCommentVNode("", true), 11894 destinationIsGuide 11895 ? (_openBlock(), _createElementBlock("label", _hoisted_57, [_cache[29] || (_cache[29] = _createTextVNode("Ø§ÙØªØµÙÙÙ (Ø§Ø®ØªÙØ§Ø±Ù)")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.destination_category_id) = $event) }, [_cache[28] || (_cache[28] = _createElementVNode("option", { value: "" }, "ÙØØ¯Ø¯ ÙØ§ØÙا٠ÙÙ Ù Ø³Ø§ØØ© Ø§ÙØªØØ±Ùر", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(categories, (c) => { 11896 return (_openBlock(), _createElementBlock("option", { 11897 key: c.id, 11898 value: c.id 11899 }, _toDisplayString(c.name_ar), 9, _hoisted_59)) 11900 }), 128))], 8, _hoisted_58), [[_vModelSelect, edit.destination_category_id]])])) 11901 : _createCommentVNode("", true), 11902 (['announcement','community'].includes(edit.approved_destination)) 11903 ? (_openBlock(), _createElementBlock("div", _hoisted_60, [ 11904 _createElementVNode("label", null, [_cache[31] || (_cache[31] = _createTextVNode("ÙÙØ¹ Ø§ÙØ¥Ø¹ÙاÙ")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.announcement_type) = $event) }, _cache[30] || (_cache[30] = [ 11905 _createElementVNode("option", { value: "news" }, "خبر", -1), 11906 _createElementVNode("option", { value: "general" }, "عا٠", -1), 11907 _createElementVNode("option", { value: "event" }, "ÙØ¹Ø§ÙÙØ©", -1), 11908 _createElementVNode("option", { value: "urgent" }, "عاجÙ", -1) 11909 ]), 8, _hoisted_61), [[_vModelSelect, edit.announcement_type]])]), 11910 _createElementVNode("label", null, [_cache[33] || (_cache[33] = _createTextVNode("Ø§ÙØ¬Ù ÙÙØ±")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.announcement_target) = $event) }, _cache[32] || (_cache[32] = [ 11911 _createElementVNode("option", { value: "all" }, "اÙÙÙ", -1), 11912 _createElementVNode("option", { value: "members" }, "Ø§ÙØ£Ø¹Ø¶Ø§Ø¡", -1), 11913 _createElementVNode("option", { value: "admins" }, "Ø§ÙØ¥Ø¯Ø§Ø±Ø©", -1), 11914 _createElementVNode("option", { value: "visitors" }, "Ø§ÙØ²Ùار", -1) 11915 ]), 8, _hoisted_62), [[_vModelSelect, edit.announcement_target]])]), 11916 _createElementVNode("label", null, [_cache[34] || (_cache[34] = _createTextVNode("٠دة Ø§ÙØ¹Ø±Ø¶ Ø¨Ø§ÙØ£Ùا٠")), _withDirectives(_createElementVNode("input", { 11917 type: "number", 11918 min: "1", 11919 max: "365", 11920 "onUpdate:modelValue": $event => ((edit.duration_days) = $event) 11921 }, null, 8, _hoisted_63), [[_vModelText, edit.duration_days]])]), 11922 _createElementVNode("label", null, [_cache[35] || (_cache[35] = _createTextVNode("رابط Ø§ÙØ¥Ø¬Ø±Ø§Ø¡")), _withDirectives(_createElementVNode("input", { 11923 "onUpdate:modelValue": $event => ((edit.action_url) = $event), 11924 placeholder: "Ø§Ø®ØªÙØ§Ø±Ù" 11925 }, null, 8, _hoisted_64), [[_vModelText, edit.action_url]])]) 11926 ])) 11927 : _createCommentVNode("", true) 11928 ], 8, _hoisted_41), 11929 isDraft 11930 ? (_openBlock(), _createElementBlock("div", _hoisted_65, [_
11930createElementVNode("button", { 11931 class: "btn secondary", 11932 onClick: saveDraft 11933 }, "ØÙظ اÙÙ Ø³ÙØ¯Ø©", 8, _hoisted_66), _createElementVNode("button", { 11934 class: "btn secondary", 11935 onClick: regenerate 11936 }, "إعادة اÙÙØ±Ø§Ø¡Ø© باÙÙ AI", 8, _hoisted_67)])) 11937 : _createCommentVNode("", true) 11938 ]), _createElementVNode("article", _hoisted_68, [_cache[41] || (_cache[41] = _createElementVNode("h3", null, "3. اÙ٠راجعة Ø§ÙØ¨Ø´Ø±ÙØ©", -1)), isDraft 11939 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 11940 _createElementVNode("label", _hoisted_69, [_withDirectives(_createElementVNode("input", { 11941 type: "checkbox", 11942 "onUpdate:modelValue": $event => ((checks.source_verified) = $event) 11943 }, null, 8, _hoisted_70), [[_vModelCheckbox, checks.source_verified]]), _createTextVNode(" " + _toDisplayString(sourceReviewLabel), 1)]), 11944 _createElementVNode("label", _hoisted_71, [_withDirectives(_createElementVNode("input", { 11945 type: "checkbox", 11946 "onUpdate:modelValue": $event => ((checks.content_verified) = $event) 11947 }, null, 8, _hoisted_72), [[_vModelCheckbox, checks.content_verified]]), _cache[37] || (_cache[37] = _createTextVNode(" راجعت Ø§ÙØ¹ÙÙØ§Ù ÙØ§ÙÙØµ ÙØ§ÙØ£Ø±ÙØ§Ù ÙØ§ÙÙ ØªØ·ÙØ¨Ø§Øª"))]), 11948 (intake.uncertain_fields&&intake.uncertain_fields.length) 11949 ? (_openBlock(), _createElementBlock("label", _hoisted_73, [_withDirectives(_createElementVNode("input", { 11950 type: "checkbox", 11951 "onUpdate:modelValue": $event => ((checks.uncertainties_reviewed) = $event) 11952 }, null, 8, _hoisted_74), [[_vModelCheckbox, checks.uncertainties_reviewed]]), _cache[38] || (_cache[38] = _createTextVNode(" راجعت Ø§ÙØÙÙÙ Ø§ÙØªÙ أشار AI Ø¥ÙÙ Ø¹Ø¯Ù ÙØ¶ÙØÙا"))])) 11953 : _createCommentVNode("", true), 11954 _createElementVNode("button", { 11955 class: "btn loadMore", 11956 onClick: submitReview 11957 }, "ÙÙ٠اÙÙ Ø³ÙØ¯Ø© ÙØ¥Ø±Ø³Ø§ÙÙØ§ ÙÙØ§Ø¹ØªÙ اد", 8, _hoisted_75) 11958 ], 64)) 11959 : isReview 11960 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 11961 _cache[40] || (_cache[40] = _createElementVNode("div", { class: "successBox" }, "اÙÙ Ø³ÙØ¯Ø© Ù ÙÙÙØ© ÙÙ٠راجعة. أ٠تعدÙÙ ÙØªØ·Ùب Ø¥Ø¹Ø§Ø¯ØªÙØ§ ÙÙÙ Ø³ÙØ¯Ø©.", -1)), 11962 _createElementVNode("label", _hoisted_76, [_withDirectives(_createElementVNode("input", { 11963 type: "checkbox", 11964 "onUpdate:modelValue": $event => ((publishConfirmed) = $event) 11965 }, null, 8, _hoisted_77), [[_vModelCheckbox, publishConfirmed]]), _cache[39] || (_cache[39] = _createTextVNode(" راجعت اÙÙØ³Ø®Ø© اÙÙÙØ§Ø¦ÙØ© ÙØ£ØªØÙ Ù ÙØ±Ø§Ø± Ø§ÙØ§Ø¹ØªÙ اد ÙÙØ°Ù اÙÙØ¬ÙØ©"))]), 11966 _createElementVNode("button", { 11967 class: "btn loadMore", 11968 disabled: !publishConfirmed, 11969 onClick: approve 11970 }, _toDisplayString(intake.destination_behavior&&intake.destination_behavior.draft_only?'اعت٠اد ÙØ¥Ø±Ø³Ø§Ù ÙÙ Ø³Ø§ØØ© Ø§ÙØªØØ±Ùر':'اعت٠اد ÙÙØ´Ø±'), 9, _hoisted_78), 11971 _createElementVNode("button", { 11972 class: "btn secondary", 11973 onClick: returnDraft 11974 }, "إعادة ÙÙÙ Ø³ÙØ¯Ø©", 8, _hoisted_79) 11975 ], 64)) 11976 : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [(['published','handed_off'].includes(intake.status)) 11977 ? (_openBlock(), _createElementBlock("div", _hoisted_80, "Ø§ÙØªÙ ÙØª ÙØ°Ù Ø§ÙØ¹Ù ÙÙØ© Ø¨ÙØ§Ø³Ø·Ø© اعت٠اد بشرÙ. " + _toDisplayString(intake.status==='published'?'ت٠اÙÙØ´Ø±':'ØªÙ Ø¥ÙØ´Ø§Ø¡ Ù Ø³ÙØ¯Ø© Ù٠اÙÙØ¬ÙØ© اÙ٠ختارة بدÙÙ ÙØ´Ø± عا٠') + ".", 1)) 11978 : _createCommentVNode("", true), (['published','handed_off'].includes(intake.status)) 11979 ? (_openBlock(), _createElementBlock("button", { 11980 key: 1, 11981 class: "btn secondary", 11982 onClick: openDestination 11983 }, "ÙØªØ اÙÙØ¬ÙØ©", 8, _hoisted_81)) 11984 : _createCommentVNode("", true)], 64)), (['draft','in_review'].includes(intake.status)) 11985 ? (_openBlock(), _createElementBlock("button", { 11986 key: 3, 11987 class: "smallbtn dangerBtn", 11988 onClick: reject 11989 }, "Ø±ÙØ¶ اÙÙ Ø³ÙØ¯Ø©", 8, _hoisted_82)) 11990 : _createCommentVNode("", true)])])], 64)) 11991 : _createCommentVNode("", true)]), 11992 _: 1 11993 })) 11994 } 11995} 11996})() 11997 }; 11998 11999 const AdminAnnouncementsPage={ 12000 components:{AdminFrame}, 12001 setup(){ 12002 const store=useGzcStore();const router=useRouter();const route=useRoute();const workspaceMode=computed(()=>!!route.params.id); 12003 const form=reactive({title:'',body:'',type:'general',target:'all',duration_days:14,action_url:'',verification_status:'unverified',verification_note:''}); 12004 const edit=reactive({title:'',body:'',type:'general',target:'all',action_url:'',verification_status:'unverified',verification_note:'',expires_at:''}); 12005 const editOpen=ref(false);const listMode=ref('active'); 12006 const files=ref([]);const fileLabel=computed(()=>mediaPreviewLabel(files.value)); 12007 const workspaceRows=computed(()=>store.state.announcements.filter(a=>String(a.id)===String(route.params.id))); 12008 const queueCounts=computed(()=>{const all=safeArray(store.state.announcements);return{all:all.length,active:all.filter(a=>!['expired','archived'].includes(String(a.status||''))).length,expired:all.filter(a=>String(a.status||'')==='expired').length};}); 12009 const rows=computed(()=>
12009{if(workspaceMode.value)return workspaceRows.value;const all=safeArray(store.state.announcements);if(listMode.value==='expired')return all.filter(a=>String(a.status||'')==='expired');if(listMode.value==='all')return all;return all.filter(a=>!['expired','archived'].includes(String(a.status||'')));}); 12010 function onFiles(e){files.value=Array.from((e.target&&e.target.files)||[]).slice(0,5);} 12011 function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');} 12012 function announcementStatusName(v){return ({published:'Ù ÙØ´Ùر',active:'Ù ÙØ´Ùر',draft:'Ù Ø³ÙØ¯Ø©',archived:'٠ؤرشÙ',expired:'Ù ÙØªÙÙ'}[String(v||'')])||String(v||'-');} 12013 function announcementTypeName(v){return ({general:'عا٠',service:'خد٠ة',event:'ÙØ¹Ø§ÙÙØ©',warning:'ØªÙØ¨ÙÙ',important:'Ù ÙÙ ',urgent:'عاجÙ',album:'ÙØ³Ø§Ø¦Ø· ÙØ¹Ø§ÙÙØ©',official:'رس٠Ù'}[String(v||'')])||String(v||'-');} 12014 function announcementTargetName(v){return ({all:'Ø§ÙØ¬Ù ÙØ¹',members:'Ø§ÙØ£Ø¹Ø¶Ø§Ø¡',admins:'Ø§ÙØ¥Ø¯Ø§Ø±Ø©',visitors:'Ø§ÙØ²Ùار'}[String(v||'')])||String(v||'-');} 12015 function adminVerificationLabel(a){return isVerifiedAnnouncement(a)?'٠عت٠د Ù Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø©':'Ù٠تت٠اÙ٠راجعة';} 12016 function dateInput(v){return String(v||'').slice(0,10);} 12017 function fillEdit(a){a=a||{};edit.title=String(a.title||'');edit.body=String(a.body||'');edit.type=String(a.type||'general');edit.target=String(a.target||'all');edit.action_url=String(a.action_url||'');edit.verification_status=String(a.verification_status||'unverified');edit.verification_note=String(a.verification_note||'');edit.expires_at=dateInput(a.expires_at);} 12018 function openWorkspace(a){if(a&&a.id)router.push('/admin/announcements/'+encodeURIComponent(a.id));} 12019 function closeWorkspace(){editOpen.value=false;router.push('/admin/announcements');} 12020 async function load(){if(await store.requireAdmin(router)){await store.loadAdminAnnouncements(router);if(workspaceMode.value){if(!workspaceRows.value.length)store.state.msg='Ø§ÙØ¥Ø¹ÙØ§Ù ØºÙØ± Ù ÙØ¬Ùد أ٠خارج ÙØ·Ø§Ù ØµÙØ§ØÙتÙ';else if(!editOpen.value)fillEdit(workspaceRows.value[0]);}}} 12021 onMounted(load);watch(()=>route.params.id,async()=>{editOpen.value=false;await load();}); 12022 async function publish(){const fd=new FormData();Object.keys(form).forEach(k=>fd.append(k,String(form[k]||'')));Array.from(files.value||[]).forEach(file=>fd.append('media',file));store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù ÙØ´Ø± Ø§ÙØ¥Ø¹ÙاÙ...';const r=await uploadApi('/api/admin/announcements',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ÙØ³Ø§Ø¦Ø· Ø§ÙØ¥Ø¹ÙاÙ'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){form.title='';form.body='';form.action_url='';form.duration_days=14;form.verification_status='unverified';form.verification_note='';files.value=[];await load();}} 12023 function beginEdit(a){fillEdit(a);editOpen.value=true;} 12024 async function saveEdit(a){if(!a||!a.id)return;store.state.busy=true;const payload={title:edit.title,body:edit.body,type:edit.type,target:edit.target,action_url:edit.action_url,verification_status:edit.verification_status,verification_note:edit.verification_note,expires_at:edit.expires_at};const r=await api('/api/admin/announcements/'+encodeURIComponent(a.id)+'/update',{method:'POST',body:JSON.stringify(payload)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){editOpen.value=false;await load();}} 12025 async function verify(a){if(!a||!a.id)return;store.state.busy=true;const r=await api('/api/admin/announcements/'+encodeURIComponent(a.id)+'/verify',{method:'POST',body:JSON.stringify({verification_note:edit.verification_note||a.verification_note||''})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)await load();} 12026 async function archive(a){if(!a||!a.id)return;if(!confirm('Ø£Ø±Ø´ÙØ© Ø§ÙØ¥Ø¹ÙØ§ÙØ'))return;store.state.busy=true;const r=await api('/api/admin/announcements/'+encodeURIComponent(a.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok&&workspaceMode.value){closeWorkspace();return;}await load();} 12027 return {store,form,edit,editOpen,listMode,queueCounts,files,fileLabel,workspaceMode,rows,onFiles,openAttachment,openWorkspace,closeWorkspace,publish,beginEdit,saveEdit,verify,archive,mediaSrc,isVideo,isPdf,isVerifiedAnnouncement,adminVerificationLabel,announcementStatusName,announcementTypeName,announcementTargetName,shortDate,adminRecordUpdatedAt,adminQueueOwner,announcementQueueNextAction}; 12028 }, 12029 render:(function(){ 12030const _Vue = Vue
12031const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 12032 12033const _hoisted_1 = { class: "card collapseSection formCard announcementComposer" } 12034const _hoisted_2 = { class: "collapseBody" } 12035const _hoisted_3 = ["onUpdate:modelValue"] 12036const _hoisted_4 = ["onUpdate:modelValue"] 12037const _hoisted_5 = { class: "editGrid" } 12038const _hoisted_6 = ["onUpdate:modelValue"] 12039const _hoisted_7 = ["value"] 12040const _hoisted_8 = ["onUpdate:modelValue"] 12041const _hoisted_9 = ["value"] 12042const _hoisted_10 = ["onUpdate:modelValue"] 12043const _hoisted_11 = ["onUpdate:modelValue"] 12044const _hoisted_12 = ["onUpdate:modelValue"] 12045const _hoisted_13 = ["onUpdate:modelValue"] 12046const _hoisted_14 = { class: "filePicker caseFilePicker" } 12047const _hoisted_15 = ["onChange"] 12048const _hoisted_16 = ["onClick"] 12049const _hoisted_17 = { class: "segmented announcementQueueFilters" } 12050const _hoisted_18 = ["onClick"] 12051const _hoisted_19 = ["onClick"] 12052const _hoisted_20 = ["onClick"] 12053const _hoisted_21 = { 12054 key: 1, 12055 class: "card adminQueueState adminQueueLoading" 12056} 12057const _hoisted_22 = { 12058 key: 2, 12059 class: "card emptyCard adminQueueState" 12060} 12061const _hoisted_23 = { 12062 key: 3, 12063 class: "adminQueueList announcementQueueList" 12064} 12065const _hoisted_24 = ["onClick", "onKeyup"] 12066const _hoisted_25 = { class: "adminQueueIdentity" } 12067const _hoisted_26 = { class: "adminQueueFacts adminWorkflowFacts" } 12068const _hoisted_27 = { class: "adminQueueNextAction" } 12069const _hoisted_28 = ["onClick"] 12070const _hoisted_29 = { 12071 key: 4, 12072 class: "opsList" 12073} 12074const _hoisted_30 = { class: "adminRecordWorkspaceTop announcementRecordTop" } 12075const _hoisted_31 = ["onClick"] 12076const _hoisted_32 = { class: "announcementWorkspaceHeader" } 12077const _hoisted_33 = { class: "announcementStateRow" } 12078const _hoisted_34 = { class: "statusPill" } 12079const _hoisted_35 = { class: "announcementActionBar" } 12080const _hoisted_36 = ["onClick"] 12081const _hoisted_37 = ["onClick"] 12082const _hoisted_38 = ["href"] 12083const _hoisted_39 = ["onClick"] 12084const _hoisted_40 = { 12085 key: 0, 12086 class: "announcementEditPanel" 12087} 12088const _hoisted_41 = { class: "memberSectionHead" } 12089const _hoisted_42 = ["onClick"] 12090const _hoisted_43 = ["onUpdate:modelValue"] 12091const _hoisted_44 = ["onUpdate:modelValue"] 12092const _hoisted_45 = { class: "editGrid" } 12093const _hoisted_46 = ["onUpdate:modelValue"] 12094const _hoisted_47 = ["value"] 12095const _hoisted_48 = ["onUpdate:modelValue"] 12096const _hoisted_49 = ["value"] 12097const _hoisted_50 = ["onUpdate:modelValue"] 12098const _hoisted_51 = ["onUpdate:modelValue"] 12099const _hoisted_52 = ["onUpdate:modelValue"] 12100const _hoisted_53 = ["onUpdate:modelValue"] 12101const _hoisted_54 = ["onClick"] 12102const _hoisted_55 = { class: "recordNarrative announcementNarrative" } 12103const _hoisted_56 = { 12104 key: 1, 12105 class: "announcementWorkspaceSection" 12106} 12107const _hoisted_57 = { class: "memberSectionHead" } 12108const _hoisted_58 = { class: "statusPill" } 12109const _hoisted_59 = { class: "announcementMediaGrid" } 12110const _hoisted_60 = ["onClick"] 12111const _hoisted_61 = ["src"] 12112const _hoisted_62 = ["src"] 12113const _hoisted_63 = { class: "announcementWorkspaceSection announcementMetaSection" } 12114const _hoisted_64 = { class: "memberDataGrid announcementMetaGrid" } 12115const _hoisted_65 = { class: "profileLine" } 12116const _hoisted_66 = { class: "profileLine" } 12117const _hoisted_67 = { class: "profileLine" } 12118const _hoisted_68 = { class: "profileLine" } 12119const _hoisted_69 = { class: "profileLine" } 12120const _hoisted_70 = { class: "profileLine" } 12121const _hoisted_71 = { 12122 key: 0, 12123 class: "profileLine announcementReviewNote" 12124} 12125 12126return function render(_ctx, _cache) { 12127 with (_ctx) { 12128 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, createCommentVNode: _createCommentVNode, withModifiers: _withModifiers, withKeys: _withKeys, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 12129
12130 const _component_AdminFrame = _resolveComponent("AdminFrame") 12131 12132 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª" }, { 12133 default: _withCtx(() => [(!workspaceMode) 12134 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("details", _hoisted_1, [_cache[3] || (_cache[3] = _createElementVNode("summary", null, [_createElementVNode("b", null, "+ ÙØ´Ø± Ø¥Ø¹ÙØ§Ù Ø¬Ø¯ÙØ¯"), _createElementVNode("span", null, "Ø§ÙØªØ اÙÙÙ ÙØ°Ø¬ Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©")], -1)), _createElementVNode("div", _hoisted_2, [ 12135 _cache[2] || (_cache[2] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª اÙÙ Ø¬ØªÙ Ø¹ÙØ© ÙÙØ·. Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ© تبÙÙ ÙÙ Ø§ÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ±Ø³Ù ÙØ©.", -1)), 12136 _withDirectives(_createElementVNode("input", { 12137 "onUpdate:modelValue": $event => ((form.title) = $event), 12138 placeholder: "عÙÙØ§Ù Ø§ÙØ¥Ø¹ÙاÙ" 12139 }, null, 8, _hoisted_3), [[_vModelText, form.title]]), 12140 _withDirectives(_createElementVNode("textarea", { 12141 "onUpdate:modelValue": $event => ((form.body) = $event), 12142 placeholder: "ÙØµ Ø§ÙØ¥Ø¹ÙاÙ" 12143 }, null, 8, _hoisted_4), [[_vModelText, form.body]]), 12144 _createElementVNode("div", _hoisted_5, [ 12145 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.type) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('announcement_type',form.type), (o) => { 12146 return (_openBlock(), _createElementBlock("option", { 12147 key: o.value, 12148 value: o.value 12149 }, _toDisplayString(o.label), 9, _hoisted_7)) 12150 }), 128))], 8, _hoisted_6), [[_vModelSelect, form.type]]), 12151 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.target) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('announcement_target',form.target), (o) => { 12152 return (_openBlock(), _createElementBlock("option", { 12153 key: o.value, 12154 value: o.value 12155 }, _toDisplayString(o.label), 9, _hoisted_9)) 12156 }), 128))], 8, _hoisted_8), [[_vModelSelect, form.target]]), 12157 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.verification_status) = $event) }, _cache[0] || (_cache[0] = [_createElementVNode("option", { value: "unverified" }, "Ù٠تت٠اÙ٠راجعة", -1), _createElementVNode("option", { value: "admin_verified" }, "٠عت٠د Ù Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø©", -1)]), 8, _hoisted_10), [[_vModelSelect, form.verification_status]]), 12158 _withDirectives(_createElementVNode("input", { 12159 type: "number", 12160 min: "1", 12161 max: "365", 12162 "onUpdate:modelValue": $event => ((form.duration_days) = $event), 12163 placeholder: "٠دة Ø§ÙØ¸ÙÙØ± Ø¨Ø§ÙØ£Ùا٠" 12164 }, null, 8, _hoisted_11), [[_vModelText, form.duration_days]]), 12165 _withDirectives(_createElementVNode("input", { 12166 "onUpdate:modelValue": $event => ((form.action_url) = $event), 12167 placeholder: "رابط إجراء Ø§Ø®ØªÙØ§Ø±Ù" 12168 }, null, 8, _hoisted_12), [[_vModelText, form.action_url]]), 12169 _withDirectives(_createElementVNode("input", { 12170 "onUpdate:modelValue": $event => ((form.verification_note) = $event), 12171 placeholder: "Ù ÙØ§ØØ¸Ø© ٠راجعة Ø§Ø®ØªÙØ§Ø±ÙØ©" 12172 }, null, 8, _hoisted_13), [[_vModelText, form.verification_note]]) 12173 ]), 12174 _createElementVNode("label", _hoisted_14, [_createElementVNode("input", { 12175 type: "file", 12176 multiple: "", 12177 accept: "image/jpeg,image/png,image/webp,application/pdf", 12178 onChange: onFiles 12179 }, null, 40, _hoisted_15), _cache[1] || (_cache[1] = _createElementVNode("span", null, "Ø¥Ø±ÙØ§Ù ØµÙØ± / PDF", -1)), _createElementVNode("em", null, _toDisplayString(fileLabel), 1)]), 12180 _createElementVNode("button", { 12181 class: "btn loadMore", 12182 onClick: publish 12183 }, "ÙØ´Ø± Ø§ÙØ¥Ø¹ÙاÙ", 8, _hoisted_16)
12184 ])]), _cache[7] || (_cache[7] = _createElementVNode("section", { class: "adminQueueIntro announcementQueueIntro" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر"), _createElementVNode("h2", null, "Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª"), _createElementVNode("p", null, "اÙÙØ§Ø¦Ù Ø© ÙÙÙØ±Ø² ÙÙØ·. Ø§ÙØªØ Ø§ÙØ¥Ø¹Ùا٠ÙÙ٠راجعة ÙØ§ÙتعدÙÙ ÙØ§Ùإجراء ÙÙ Ù Ø³Ø§ØØ© ÙØ§ØØ¯Ø©.")])], -1)), _createElementVNode("div", _hoisted_17, [_createElementVNode("button", { 12185 class: _normalizeClass({active:listMode==='active'}), 12186 onClick: $event => (listMode='active') 12187 }, [_cache[4] || (_cache[4] = _createTextVNode("اÙÙØ´Ø·Ø© ")), _createElementVNode("small", null, _toDisplayString(queueCounts.active), 1)], 10, _hoisted_18), _createElementVNode("button", { 12188 class: _normalizeClass({active:listMode==='expired'}), 12189 onClick: $event => (listMode='expired') 12190 }, [_cache[5] || (_cache[5] = _createTextVNode("اÙÙ ÙØªÙÙØ© ")), _createElementVNode("small", null, _toDisplayString(queueCounts.expired), 1)], 10, _hoisted_19), _createElementVNode("button", { 12191 class: _normalizeClass({active:listMode==='all'}), 12192 onClick: $event => (listMode='all') 12193 }, [_cache[6] || (_cache[6] = _createTextVNode("اÙÙÙ ")), _createElementVNode("small", null, _toDisplayString(queueCounts.all), 1)], 10, _hoisted_20)])], 64)) 12194 : _createCommentVNode("", true), (store.state.busy && !rows.length) 12195 ? (_openBlock(), _createElementBlock("div", _hoisted_21, "جار٠تØÙ ÙÙ Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª...")) 12196 : (!rows.length) 12197 ? (_openBlock(), _createElementBlock("div", _hoisted_22, _toDisplayString(workspaceMode?'Ø§ÙØ¥Ø¹ÙØ§Ù ØºÙØ± Ù ÙØ¬Ùد.':'ÙØ§ ØªÙØ¬Ø¯ Ø¥Ø¹ÙØ§Ùات ÙÙ ÙØ°Ø§ Ø§ÙØªØµÙÙÙ.'), 1)) 12198 : _createCommentVNode("", true), (!workspaceMode) 12199 ? (_openBlock(), _createElementBlock("div", _hoisted_23, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (a) => { 12200 return (_openBlock(), _createElementBlock("article", { 12201 class: "adminQueueRow announcementQueueRow", 12202 key: a.id, 12203 onClick: $event => (openWorkspace(a)), 12204 tabindex: "0", 12205 onKeyup: _withKeys($event => (openWorkspace(a)), ["enter"]) 12206 }, [_createElementVNode("div", _hoisted_25, [_cache[8] || (_cache[8] = _createElementVNode("div", { class: "memberThumb memberThumbPlaceholder" }, "ð£", -1)), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(a.title || 'Ø¥Ø¹ÙØ§Ù'), 1), _createElementVNode("small", null, _toDisplayString(String(a.body||'').slice(0,100) || 'بدÙÙ ÙØµ'), 1)])]), _createElementVNode("div", _hoisted_26, [ 12207 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(announcementStatusName(a.status)), 1), _createElementVNode("small", null, "Ø§ÙØØ§ÙØ© · " + _toDisplayString(adminVerificationLabel(a)), 1)]), 12208 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminQueueOwner('announcements',a)), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "اÙ٠سؤÙÙ", -1))]), 12209 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(adminRecordUpdatedAt(a)), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "آخر ØªØØ¯ÙØ«", -1))]), 12210 _createElementVNode("span", _hoisted_27, [_createElementVNode("b", null, _toDisplayString(announcementQueueNextAction(a)), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡ Ø§ÙØªØ§ÙÙ", -1))]) 12211 ]), _createElementVNode("button", { 12212 class: "smallbtn secondary adminQueueOpen", 12213 onClick: _withModifiers($event => (openWorkspace(a)), ["stop"]) 12214 }, "ÙØªØ Ø§ÙØ¥Ø¹ÙاÙ", 8, _hoisted_28)], 40, _hoisted_24)) 12215 }), 128))])) 12216 : (_openBlock(), _createElementBlock("div", _hoisted_29, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (a) => { 12217 return (_openBlock(), _createElementBlock("article", { 12218 class: "card announcementCard adminRecordWorkspace recordWorkspaceOnly announcementRecordWorkspace", 12219 key: a.id 12220 }, [ 12221 _createElementVNode("div", _hoisted_30, [_createElementVNode("button", { 12222 class: "smallbtn secondary compactBackButton", 12223 onClick: closeWorkspace 12224 }, "â Ø§ÙØ¥Ø¹ÙØ§Ùات", 8, _hoisted_31), _cache[12] || (_cache[12] = _createElementVNode("span", null, "Ø³Ø¬Ù Ø§ÙØ¥Ø¹ÙاÙ", -1))]), 12225 _createElementVNode("header", _hoisted_32, [_createElementVNode("div", null, [_cache[13] || (_cache[13] = _createElementVNode("span", { class: "adminEyebrow" }, "Ø¥Ø¹ÙØ§Ù", -1)), _createElementVNode("h3", null, _toDisplayString(a.title || 'Ø¥Ø¹ÙØ§Ù'), 1), _createElementVNode("div", _hoisted_33, [_createElementVNode("span", _hoisted_34, _toDisplayString(announcementStatusName(a.status)), 1), _createElementVNode("span", { class: _normalizeClass(["verifyStamp", isVerifiedAnnouncement(a)?'ok':'warn']) }, _toDisplayString(adminVerificationLabel(a)), 3)])])]), 12226 _createElementVNode("div", _hoisted_35, [ 12227 _createElementVNode("button", { 12228 class: "smallbtn secondary", 12229 onClick: $event => (beginEdit(a)) 12230 }, "تعدÙÙ", 8, _hoisted_36), 12231 (!isVerifiedAnnouncement(a)) 12232 ? (_openBlock(), _createElementBlock("button", { 12233 key: 0, 12234 class: "smallbtn", 12235 onClick: $event =>
12235 (verify(a)) 12236 }, "اعت٠اد بعد اÙ٠راجعة", 8, _hoisted_37)) 12237 : _createCommentVNode("", true), 12238 (a.action_url) 12239 ? (_openBlock(), _createElementBlock("a", { 12240 key: 1, 12241 class: "smallbtn secondary", 12242 href: a.action_url, 12243 target: "_blank", 12244 rel: "noopener noreferrer" 12245 }, "ÙØªØ Ø§ÙØ±Ø§Ø¨Ø·", 8, _hoisted_38)) 12246 : _createCommentVNode("", true), 12247 _createElementVNode("button", { 12248 class: "smallbtn danger", 12249 onClick: $event => (archive(a)) 12250 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_39) 12251 ]), 12252 editOpen 12253 ? (_openBlock(), _createElementBlock("section", _hoisted_40, [ 12254 _createElementVNode("div", _hoisted_41, [_cache[14] || (_cache[14] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ÙØ¶Ø¹ Ø§ÙØªØ¹Ø¯ÙÙ"), _createElementVNode("h3", null, "تعدÙÙ Ø§ÙØ¥Ø¹ÙاÙ")], -1)), _createElementVNode("button", { 12255 class: "smallbtn secondary", 12256 onClick: $event => (editOpen=false) 12257 }, "Ø¥ÙØºØ§Ø¡", 8, _hoisted_42)]), 12258 _withDirectives(_createElementVNode("input", { 12259 "onUpdate:modelValue": $event => ((edit.title) = $event), 12260 placeholder: "عÙÙØ§Ù Ø§ÙØ¥Ø¹ÙاÙ" 12261 }, null, 8, _hoisted_43), [[_vModelText, edit.title]]), 12262 _withDirectives(_createElementVNode("textarea", { 12263 "onUpdate:modelValue": $event => ((edit.body) = $event), 12264 placeholder: "ÙØµ Ø§ÙØ¥Ø¹ÙاÙ" 12265 }, null, 8, _hoisted_44), [[_vModelText, edit.body]]), 12266 _createElementVNode("div", _hoisted_45, [ 12267 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.type) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('announcement_type',edit.type), (o) => { 12268 return (_openBlock(), _createElementBlock("option", { 12269 key: o.value, 12270 value: o.value 12271 }, _toDisplayString(o.label), 9, _hoisted_47)) 12272 }), 128))], 8, _hoisted_46), [[_vModelSelect, edit.type]]), 12273 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.target) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('announcement_target',edit.target), (o) => { 12274 return (_openBlock(), _createElementBlock("option", { 12275 key: o.value, 12276 value: o.value 12277 }, _toDisplayString(o.label), 9, _hoisted_49)) 12278 }), 128))], 8, _hoisted_48), [[_vModelSelect, edit.target]]), 12279 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.verification_status) = $event) }, _cache[15] || (_cache[15] = [_createElementVNode("option", { value: "unverified" }, "Ù٠تت٠اÙ٠راجعة", -1), _createElementVNode("option", { value: "admin_verified" }, "٠عت٠د Ù Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø©", -1)]), 8, _hoisted_50), [[_vModelSelect, edit.verification_status]]), 12280 _withDirectives(_createElementVNode("input", { 12281 type: "date", 12282 "onUpdate:modelValue": $event => ((edit.expires_at) = $event) 12283 }, null, 8, _hoisted_51), [[_vModelText, edit.expires_at]]), 12284 _withDirectives(_createElementVNode("input", { 12285 "onUpdate:modelValue": $event => ((edit.action_url) = $event), 12286 placeholder: "رابط Ø§ÙØ¥Ø¬Ø±Ø§Ø¡" 12287 }, null, 8, _hoisted_52), [[_vModelText, edit.action_url]]), 12288 _withDirectives(_createElementVNode("input", { 12289 "onUpdate:modelValue": $event => ((edit.verification_note) = $event), 12290 placeholder: "Ù ÙØ§ØØ¸Ø© اÙ٠راجعة" 12291 }, null, 8, _hoisted_53), [[_vModelText, edit.verification_note]]) 12292 ]), 12293 _createElementVNode("button", { 12294 class: "btn loadMore", 12295 onClick: $event => (saveEdit(a)) 12296 }, "ØÙظ Ø§ÙØªØ¹Ø¯ÙÙØ§Øª", 8, _hoisted_54) 12297 ])) 12298 : _createCommentVNode("", true), 12299 _createElementVNode("section", _hoisted_55, [_cache[16] || (_cache[16] = _createElementVNode("h4", null, "اÙÙ ØØªÙÙ", -1)), _createElementVNode("p", null, _toDisplayString(a.body || 'ÙØ§ ÙÙØ¬Ø¯ ÙØµ.'), 1)]), 12300 (a.media&&a.media.length) 12301 ? (_openBlock(), _createElementBlock("section", _hoisted_56, [_createElementVNode("div", _hoisted_57, [_cache[17] || (_cache[17] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙØ³Ø§Ø¦Ø·"), _createElementVNode("h3", null, "اÙ٠رÙÙØ§Øª")], -1)), _createElementVNode("span", _hoisted_58, _toDisplayString(a.media.length), 1)]), _createElementVNode("div", _hoisted_59, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(a.media, (m) => { 12302 return (_openBlock(), _createElementBlock("button", { 12303 key: m.id, 12304 class: "announcementMediaItem", 12305 onClick: $event => (openAttachment(m)) 12306 }, [(!isVideo(m)) 12307 ? (_openBlock(), _createElementBlock("img", { 12308 key: 0, 12309 src: mediaSrc(m), 12310 loading: "lazy", 12311 alt: "" 12312 }, null, 8, _hoisted_61)) 12313 : (_openBlock(), _createElementBlock("video", { 12314 key: 1, 12315 src: m.file_url, 12316 controls: "", 12317 preload: "metadata" 12318 }, null, 8, _hoisted_62)), _createElementVNode("span", null, _toDisplayString(isPdf(m)?'PDF':(isVideo(m)?'ÙÙØ¯ÙÙ':'ØµÙØ±Ø©')), 1)], 8, _hoisted_60)) 12319 }), 128))])])) 12320 : _createCommentVNode("", true), 12321 _createElementVNode("section", _hoisted_63, [_cache[25] || (_cache[25] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "اÙÙØ´Ø± ÙØ§ÙØªÙØ§Ø±ÙØ®"), _createElementVNode("h3", null, "Ø¨ÙØ§Ùات Ø§ÙØ¥Ø¹ÙاÙ")])], -1)), _createElementVNode("div", _hoisted_64, [
12322 _createElementVNode("div", _hoisted_65, [_cache[18] || (_cache[18] = _createElementVNode("b", null, "اÙÙÙØ¹", -1)), _createElementVNode("span", null, _toDisplayString(announcementTypeName(a.type)), 1)]), 12323 _createElementVNode("div", _hoisted_66, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "Ø§ÙØ¬Ù ÙÙØ±", -1)), _createElementVNode("span", null, _toDisplayString(announcementTargetName(a.target)), 1)]), 12324 _createElementVNode("div", _hoisted_67, [_cache[20] || (_cache[20] = _createElementVNode("b", null, "ØªØ§Ø±ÙØ® اÙÙØ´Ø±", -1)), _createElementVNode("span", null, _toDisplayString(shortDate(a.created_at)), 1)]), 12325 _createElementVNode("div", _hoisted_68, [_cache[21] || (_cache[21] = _createElementVNode("b", null, "Ø§ÙØ§ÙØªÙØ§Ø¡", -1)), _createElementVNode("span", null, _toDisplayString(shortDate(a.expires_at)), 1)]), 12326 _createElementVNode("div", _hoisted_69, [_cache[22] || (_cache[22] = _createElementVNode("b", null, "آخر ØªØØ¯ÙØ«", -1)), _createElementVNode("span", null, _toDisplayString(shortDate(a.updated_at)), 1)]), 12327 _createElementVNode("div", _hoisted_70, [_cache[23] || (_cache[23] = _createElementVNode("b", null, "اÙ٠راجعة", -1)), _createElementVNode("span", null, _toDisplayString(adminVerificationLabel(a)), 1)]), 12328 (a.verification_note) 12329 ? (_openBlock(), _createElementBlock("div", _hoisted_71, [_cache[24] || (_cache[24] = _createElementVNode("b", null, "Ù ÙØ§ØØ¸Ø© اÙ٠راجعة", -1)), _createElementVNode("span", null, _toDisplayString(a.verification_note), 1)])) 12330 : _createCommentVNode("", true) 12331 ])]) 12332 ])) 12333 }), 128))]))]), 12334 _: 1 12335 })) 12336 } 12337} 12338})() 12339 }; 12340 12341 const AdminSystemPage={ 12342 components:{AdminFrame}, 12343 setup(){ 12344 const store=useGzcStore();const router=useRouter();const auditDays=ref(90);const msgDays=ref(30); 12345 const h=computed(()=>store.state.systemHealth||{}); 12346 const backupItems=computed(()=>safeArray(h.value.backups&&h.value.backups.items)); 12347 async function load(){if(await store.requireAdmin(router)) await store.loadSystemHealth(router);} 12348 onMounted(load); 12349 async function createBackup(){store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø¥ÙØ´Ø§Ø¡ ÙØ³Ø®Ø© Ø§ØØªÙØ§Ø·ÙØ©...';const r=await api('/api/admin/backups/create',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 12350 async function rotateLogs(){if(!confirm('تشغÙ٠تدÙÙØ± Ø§ÙØ³Ø¬Ùات Ø§ÙØ¢ÙØ'))return;store.state.busy=true;store.state.msg='جار٠تدÙÙØ± Ø§ÙØ³Ø¬Ùات...';const r=await api('/api/admin/log-rotation/run',{method:'POST',body:JSON.stringify({audit_days:auditDays.value,message_days:msgDays.value})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 12351 return {store,h,backupItems,auditDays,msgDays,load,createBackup,rotateLogs,healthLabel,shortDate,fmtMB}; 12352 }, 12353 render:(function(){ 12354const _Vue = Vue 12355const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 12356 12357const _hoisted_1 = { class: "healthGrid" } 12358const _hoisted_2 = { 12359 class: "card collapseSection formCard", 12360 open: "" 12361} 12362const _hoisted_3 = { class: "collapseBody" } 12363const _hoisted_4 = ["onClick"] 12364const _hoisted_5 = { class: "card collapseSection" } 12365const _hoisted_6 = { class: "collapseBody" } 12366const _hoisted_7 = { 12367 key: 0, 12368 class: "hint" 12369} 12370const _hoisted_8 = { class: "card collapseSection formCard" } 12371const _hoisted_9 = { class: "collapseBody" } 12372const _hoisted_10 = { class: "editGrid" } 12373const _hoisted_11 = ["onUpdate:modelValue"] 12374const _hoisted_12 = ["onUpdate:modelValue"] 12375const _hoisted_13 = ["onClick"] 12376 12377return function render(_ctx, _cache) { 12378 with (_ctx) { 12379 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, vModelText: _vModelText, withDirectives: _withDirectives, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 12380
12381 const _component_AdminFrame = _resolveComponent("AdminFrame") 12382 12383 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙÙØ¸Ø§Ù ÙØ§ÙÙØ³Ø® Ø§ÙØ§ØØªÙاطÙ" }, { 12384 default: _withCtx(() => [ 12385 _cache[12] || (_cache[12] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("h3", null, "Ù Ø±ÙØ² اÙÙØ¸Ø§Ù "), _createElementVNode("p", null, "ÙØØµ Ø§ÙØµØØ©Ø اÙÙØ³Ø® Ø§ÙØ§ØØªÙØ§Ø·ÙØ ÙØªØ¯ÙÙØ± Ø§ÙØ³Ø¬Ùات. ÙØ°Ù Ø§ÙØµÙØØ© ÙÙ٠سؤÙÙ Ø§ÙØªÙÙÙ ÙÙØ·.")], -1)), 12386 _createElementVNode("div", _hoisted_1, [ 12387 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.overall]) }, [_cache[0] || (_cache[0] = _createElementVNode("span", null, "Ø§ÙØØ§ÙØ© Ø§ÙØ¹Ø§Ù Ø©", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.overall)), 1), _createElementVNode("small", null, _toDisplayString(shortDate(h.checked_at)), 1)], 2), 12388 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.db&&h.db.status]) }, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "ÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.db&&h.db.status)), 1), _createElementVNode("small", null, _toDisplayString(h.db&&h.db.message), 1)], 2), 12389 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.whatsapp&&h.whatsapp.status]) }, [_cache[2] || (_cache[2] = _createElementVNode("span", null, "ÙØ§ØªØ³Ø§Ø¨", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.whatsapp&&h.whatsapp.status)), 1), _createElementVNode("small", null, _toDisplayString(h.whatsapp&&h.whatsapp.enabled?'Ù ÙØ¹Ù':'ØºÙØ± Ù ÙØªÙ Ù'), 1)], 2), 12390 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.backups&&h.backups.status]) }, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "اÙÙØ³Ø® Ø§ÙØ§ØØªÙاطÙ", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.backups&&h.backups.status)), 1), _createElementVNode("small", null, _toDisplayString(h.backups&&h.backups.message), 1)], 2), 12391 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.storage&&h.storage.status]) }, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "Ø§ÙØªØ®Ø²ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.storage&&h.storage.status)), 1), _createElementVNode("small", null, _toDisplayString(h.storage&&h.storage.message), 1)], 2), 12392 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.geoip&&h.geoip.status]) }, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "Ù ÙÙØ¹ Ø§ÙØ²Ø§Ø¦Ø±", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.geoip&&h.geoip.status)), 1), _createElementVNode("small", null, _toDisplayString(h.geoip&&h.geoip.message), 1)], 2), 12393 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.pwa&&h.pwa.status]) }, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "تطبÙ٠اÙÙØ§ØªÙ", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.pwa&&h.pwa.status)), 1), _createElementVNode("small", null, _toDisplayString(h.pwa&&h.pwa.message), 1)], 2) 12394 ]), 12395 _createElementVNode("details", _hoisted_2, [_cache[8] || (_cache[8] = _createElementVNode("summary", null, [_createElementVNode("b", null, "ÙØ³Ø®Ø© Ø§ØØªÙØ§Ø·ÙØ© ÙØ¯ÙÙØ©"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_3, [_cache[7] || (_cache[7] = _createElementVNode("p", { class: "hint" }, "تشغÙÙ pg_dump ÙØªØ³Ø¬ÙÙ Ø§ÙØ¹Ù ÙÙØ© ÙÙ Audit Log.", -1)), _createElementVNode("button", { 12396 class: "btn loadMore", 12397 onClick: createBackup 12398 }, "Ø¥ÙØ´Ø§Ø¡ ÙØ³Ø®Ø© Ø§ØØªÙØ§Ø·ÙØ© Ø§ÙØ¢Ù", 8, _hoisted_4)])]), 12399 _createElementVNode("details", _hoisted_5, [_cache[9] || (_cache[9] = _createElementVNode("summary", null, [_createElementVNode("b", null, "آخر اÙÙØ³Ø® Ø§ÙØ§ØØªÙØ§Ø·ÙØ©"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_6, [(!backupItems.length) 12400 ? (_openBlock(), _createElementBlock("div", _hoisted_7, "ÙØ§ ØªÙØ¬Ø¯ ÙØ³Ø® Ù Ø³Ø¬ÙØ©.")) 12401 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(backupItems, (b) => { 12402 return (_openBlock(), _createElementBlock("div", { 12403 class: "backupRow", 12404 key: b.id 12405 }, [_createElementVNode("span", null, _toDisplayString(b.file_name||'-'), 1), _createElementVNode("b", null, _toDisplayString(b.status), 1), _createElementVNode("small", null, _toDisplayString(fmtMB((b.file_size||0)/1024/1024)) + " â " + _toDisplayString(shortDate(b.created_at)), 1)])) 12406 }), 128))])]), 12407 _createElementVNode("details", _hoisted_8, [_cache[11] || (_cache[11] = _createElementVNode("summary", null, [_createElementVNode("b", null, "تدÙÙØ± Ø§ÙØ³Ø¬Ùات"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_9, [_cache[10] || (_cache[10] = _createElementVNode("p", { class: "hint" }, "ØØ°Ù Audit Logs اÙÙØ¯ÙÙ Ø© ÙMessage Logs اÙÙØ¯ÙÙ Ø© ØØ³Ø¨ عدد Ø§ÙØ£Ùا٠. ÙØ§ تشغÙÙØ§ Ø¥ÙØ§ Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©.", -1)), _createElementVNode("div", _hoisted_10, [_withDirectives(_createElementVNode("input", { 12408 type: "number", 12409 min: "30", 12410 "onUpdate:modelValue": $event => ((auditDays) = $event), 12411 placeholder: "Audit Ø£ÙØ§Ù " 12412 }, null, 8, _hoisted_11), [[_vModelText, auditDays]]), _withDirectives(_createElementVNode("input", { 12413 type: "number", 12414 min: "7", 12415 "onUpdate:modelValue": $event => ((msgDays) = $event), 12416 placeholder: "Ø±Ø³Ø§Ø¦Ù Ø£ÙØ§Ù " 12417 }, null, 8, _hoisted_12), [[_vModelText, msgDays]])]), _createElementVNode("button", { 12418 class: "btn dangerBtn", 12419 onClick: rotateLogs 12420 }, "تشغÙ٠تدÙÙØ± Ø§ÙØ³Ø¬Ùات", 8, _hoisted_13)])]) 12421 ]), 12422 _: 1, 12423 __: [12] 12424 })) 12425 } 12426} 12427})() 12428 }; 12429 12430 12431 const AdminSeoPage={ 12432 components:{AdminFrame}, 12433 setup(){ 12434 const store=useGzcStore();const router=useRouter(); 12435 const form=reactive({site_title:'',organization_name:'',public_base_url:'https://smt.smtd.ai',site_description:'',default_keywords:'',default_og_image:'',google_analytics_id:'',search_console_code:'',enable_indexing:'false',pages:[]}); 12436 const robots=computed(()=>store.state.seo&&store.state.seo.robots||''); 12437 const sitemap=computed(()=>store.state.seo&&store.state.seo.sitemap_preview||''); 12438 const coverage=computed(()=>store.state.seo&&store.state.seo.coverage||{static:0,communities:0,china_guide:0,trade_shipping:0,events:0,total:0}); 12439 const indexingEnabled=computed(()=>!!(store.state.seo&&store.state.seo.indexing_enabled)); 12440 const linking=computed(()=>store.state.seo&&store.state.seo.linking||{model_version:1,summary:{pages:0,links:0,orphan_pages:0,weak_pages:0,healthy_pages:0,average_inbound:0},opportunities:[],context_cross_links:0}); 12441 const linkingSummary=computed(()=>linking.value.summary||{}); 12442 const linkingOpportunities=computed(()=>safeArray(linking.value.opportunities)); 12443 const searchPerf=ref({connected:false,configured:false,summary:{pages:0,clicks:0,impressions:0,ctr_pct:0,average_position:0},pages:[],opportunities:[]}); 12444 const searchPerfLoading=ref(false); 12445 const searchPerfSummary=computed(()=>searchPerf.value&&searchPerf.value.summary||{}); 12446 const searchPerfPages=computed(()=>safeArray(searchPerf.value&&searchPerf.value.pages)); 12447 const searchPerfOpportunities=computed(()=>safeArray(searchPerf.value&&searchPerf.value.opportunities)); 12448 const searchPerfPriorities=computed(()=>safeArray(searchPerf.value&&searchPerf.value.growth_priorities)); 12449 const searchPerfMovers=computed(()=>searchPerf.value&&searchPerf.value.top_movers||{clicks_up:[],clicks_down:[],position_up:[],position_down:[]}); 12450 const searchPerfCache=computed(()=>searchPerf.value&&searchPerf.value.cache||{}); 12451 const searchConsoleStatus=computed(()=>store.state.seo&&store.state.seo.search_console_status||{}); 12452 const pages=computed(()=>form.pages||[]); 12453 function sync(){const seo=(store.state.seo&&store.state.seo.seo)||{};Object.assign(form,seo);form.pages=Array.isArray(seo.pages)?seo.pages:[];if(!form.public_base_url)form.public_base_url='https://smt.smtd.ai';if(form.enable_indexing!== 'true')form.enable_indexing='false';} 12454 function perfTypeLabel(v){return ({low_ctr:'CTR Ù ÙØ®Ùض',near_page_one:'ÙØ±Ùبة Ù Ù Ø§ÙØµÙØØ© Ø§ÙØ£ÙÙÙ',weak_internal_links:'ربط داخÙ٠ضعÙÙ',click_decline:'Ø§ÙØ®Ùاض اÙÙÙØ±Ø§Øª'}[String(v||'')])||'ÙØ±ØµØ© ØªØØ³ÙÙ';} 12455 function changeLabel(v,suffix='%'){const n=Number(v);if(!Number.isFinite(n))return 'â';return `${n>0?'+':''}${n}${suffix}`;} 12456 function priorityLabel(v){return ({high:'عاÙÙØ©',medium:'Ù ØªÙØ³Ø·Ø©',low:'Ù ÙØ®Ùضة'}[String(v||'')])||'Ù ØªÙØ³Ø·Ø©';} 12457 async function loadSearchPerformance(force=false){searchPerfLoading.value=true;try{const r=await api('/api/admin/seo/search-performance'+(force?'?refresh=1':''));if(r&&r.status===401){router.replace('/admin/login');return;}searchPerf.value=(r&&r.search_performance)||{connected:false,configured:false,summary:{},pages:[],opportunities:[]};}finally{searchPerfLoading.value=false;}} 12458 async function load(){if(await store.requireAdmin(router)){await store.loadSeo(router);sync();loadSearchPerformance(false);}} 12459 async function refreshSearchPerformance(){await loadSearchPerformance(true);} 12460 function addPage(){form.pages.push({path:'/',title:'',description:'',indexable:true});} 12461 function removePage(i){form.pages.splice(i,1);} 12462 async function save(){const payload=Object.assign({},form,{pages:form.pages});await store.saveSeo(payload,router);sync();} 12463 onMounted(load); 12464 return{store,form,pages,robots,sitemap,coverage,indexingEnabled,linking,linkingSummary,linkingOpportunities,searchPerf,searchPerfLoading,searchPerfSummary,searchPerfPages,searchPerfOpportunities,searchPerfPriorities,searchPerfMovers,searchPerfCache,searchConsoleStatus,perfTypeLabel,changeLabel,priorityLabel,shortDate,refreshSearchPerformance,load,save,addPage,removePage}; 12465 }, 12466 render:(function(){ 12467const _Vue = Vue
12468const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 12469 12470const _hoisted_1 = { class: "card dashboardHeaderCard" } 12471const _hoisted_2 = ["onClick"] 12472const _hoisted_3 = { class: "card" } 12473const _hoisted_4 = { class: "memberCardTop" } 12474const _hoisted_5 = { class: "statsGrid compactStats" } 12475const _hoisted_6 = { class: "card seoLinkingCard" } 12476const _hoisted_7 = { class: "memberCardTop" } 12477const _hoisted_8 = { class: "statsGrid compactStats" } 12478const _hoisted_9 = { 12479 key: 0, 12480 class: "seoLinkingOpportunities" 12481} 12482const _hoisted_10 = { 12483 key: 1, 12484 class: "hint" 12485} 12486const _hoisted_11 = { class: "card seoSearchPerformanceCard" } 12487const _hoisted_12 = { class: "memberCardTop" } 12488const _hoisted_13 = { class: "row" } 12489const _hoisted_14 = ["disabled", "onClick"] 12490const _hoisted_15 = { 12491 key: 0, 12492 class: "emptyState compactEmpty" 12493} 12494const _hoisted_16 = { class: "seoLiveMeta" } 12495const _hoisted_17 = { key: 0 } 12496const _hoisted_18 = { 12497 key: 1, 12498 class: "statusWarn" 12499} 12500const _hoisted_19 = { class: "statsGrid compactStats seoPerformanceStats" } 12501const _hoisted_20 = { 12502 key: 0, 12503 class: "seoGrowthPriorityBlock" 12504} 12505const _hoisted_21 = { class: "seoPriorityScore" } 12506const _hoisted_22 = { class: "seoPriorityBody" } 12507const _hoisted_23 = { class: "row seoPriorityHeadline" } 12508const _hoisted_24 = { class: "statusPill" } 12509const _hoisted_25 = { class: "hint compactHint" } 12510const _hoisted_26 = { 12511 key: 1, 12512 class: "seoLinkingOpportunities" 12513} 12514const _hoisted_27 = { class: "hint compactHint" } 12515const _hoisted_28 = { 12516 key: 2, 12517 class: "hint" 12518} 12519const _hoisted_29 = { 12520 key: 3, 12521 class: "collapseSection compactCollapse" 12522} 12523const _hoisted_30 = { class: "collapseBody seoMoversGrid" } 12524const _hoisted_31 = { 12525 key: 4, 12526 class: "collapseSection compactCollapse" 12527} 12528const _hoisted_32 = { class: "collapseBody" } 12529const _hoisted_33 = { class: "card formCard" } 12530const _hoisted_34 = { class: "editGrid" } 12531const _hoisted_35 = ["onUpdate:modelValue"] 12532const _hoisted_36 = ["onUpdate:modelValue"] 12533const _hoisted_37 = ["onUpdate:modelValue"] 12534const _hoisted_38 = ["onUpdate:modelValue"] 12535const _hoisted_39 = ["onUpdate:modelValue"] 12536const _hoisted_40 = ["onUpdate:modelValue"] 12537const _hoisted_41 = ["onUpdate:modelValue"] 12538const _hoisted_42 = ["onUpdate:modelValue"] 12539const _hoisted_43 = ["onUpdate:modelValue"] 12540const _hoisted_44 = ["onClick"] 12541const _hoisted_45 = { class: "card" } 12542const _hoisted_46 = { class: "memberCardTop" } 12543const _hoisted_47 = ["onClick"] 12544const _hoisted_48 = { class: "editGrid" } 12545const _hoisted_49 = ["onUpdate:modelValue"] 12546const _hoisted_50 = ["onUpdate:modelValue"] 12547const _hoisted_51 = ["onUpdate:modelValue"] 12548const _hoisted_52 = { class: "check" } 12549const _hoisted_53 = ["onUpdate:modelValue"] 12550const _hoisted_54 = ["onClick"] 12551const _hoisted_55 = { class: "card collapseSection" } 12552const _hoisted_56 = { class: "collapseBody" } 12553const _hoisted_57 = { class: "logBox" } 12554const _hoisted_58 = { class: "card collapseSection" } 12555const _hoisted_59 = { class: "collapseBody" } 12556const _hoisted_60 = { class: "logBox" } 12557 12558return function render(_ctx, _cache) { 12559 with (_ctx) { 12560 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createVNode: _createVNode, createCommentVNode: _createCommentVNode, vModelText: _vModelText, withDirectives: _withDirectives, vModelSelect: _vModelSelect, vModelCheckbox: _vModelCheckbox, createBlock: _createBlock } = _Vue 12561 12562 const _component_router_link = _resolveComponent("router-link") 12563 const _component_AdminFrame = _resolveComponent("AdminFrame") 12564 12565 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØ¸ÙÙØ± ÙÙ Ù ØØ±Ùات Ø§ÙØ¨ØØ«" }, { 12566 default: _withCtx(() => [ 12567 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "SEO"), _createElementVNode("h3", null, "Ø§ÙØ¸ÙÙØ± ÙÙ Ù ØØ±Ùات Ø§ÙØ¨ØØ«"), _createElementVNode("p", { class: "hint" }, "إدارة ÙÙØ±Ø³Ø© Ø§ÙØµÙØØ§Øª Ø§ÙØ¹Ø§Ù Ø© ÙÙØ·. ØµÙØØ§Øª Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ ÙØ§ÙØØ³Ø§Ø¨Ø§Øª ÙØ§ÙØ·ÙØ§Ø±Ø¦ ÙØ§ÙØ·ÙØ¨Ø§Øª ÙÙÙØØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø© تبÙ٠خارج Ù ØØ±Ùات Ø§ÙØ¨ØØ«.")], -1)), _createElementVNode("button", { 12568 class: "smallbtn", 12569 onClick: load 12570 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), 12571 _createElementVNode("section", _hoisted_3, [_createElementVNode("div", _hoisted_4, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "SEO Coverage â ØªØºØ·ÙØ© اÙÙÙØ±Ø³Ø©", -1)), _createElementVNode("b", { class: _normalizeClass(indexingEnabled?'statusOk':'statusWarn') }, _toDisplayString(indexingEnabled?'اÙÙÙØ±Ø³Ø© Ù ÙØ¹ÙÙØ©':'اÙÙÙØ±Ø³Ø© ٠تÙÙÙØ©'), 3)]), _createElementVNode("div", _hoisted_5, [ 12572 _createElementVNode("div", null, [_cache[2] || (_cache[2] = _createElementVNode("span", null, "إج٠اÙÙ Ø§ÙØ±Ùابط", -1)), _createElementVNode("b", null, _toDisplayString(coverage.total), 1)]), 12573 _createElementVNode("div", null, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "ØµÙØØ§Øª Ø£Ø³Ø§Ø³ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(coverage.static), 1
12573)]), 12574 _createElementVNode("div", null, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "Ø§ÙØ¬Ø§ÙÙØ§Øª", -1)), _createElementVNode("b", null, _toDisplayString(coverage.communities), 1)]), 12575 _createElementVNode("div", null, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(coverage.china_guide), 1)]), 12576 _createElementVNode("div", null, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(coverage.trade_shipping), 1)]), 12577 _createElementVNode("div", null, [_cache[7] || (_cache[7] = _createElementVNode("span", null, "اÙÙØ¹Ø§ÙÙØ§Øª", -1)), _createElementVNode("b", null, _toDisplayString(coverage.events), 1)]), 12578 _createElementVNode("div", null, [_cache[8] || (_cache[8] = _createElementVNode("span", null, "ØµÙØØ§Øª اÙ٠دÙ", -1)), _createElementVNode("b", null, _toDisplayString(coverage.guide_city||0), 1)]), 12579 _createElementVNode("div", null, [_cache[9] || (_cache[9] = _createElementVNode("span", null, "Ù ÙØ§Ø¶Ùع دÙÙÙ Ø§ÙØµÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(coverage.guide_topic||0), 1)]), 12580 _createElementVNode("div", null, [_cache[10] || (_cache[10] = _createElementVNode("span", null, "Ù ÙØ§Ø¶Ùع Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ", -1)), _createElementVNode("b", null, _toDisplayString(coverage.trade_topic||0), 1)]) 12581 ])]), 12582 _createElementVNode("section", _hoisted_6, [_createElementVNode("div", _hoisted_7, [_cache[11] || (_cache[11] = _createElementVNode("div", null, [_createElementVNode("h3", null, "Ø§ÙØ±Ø¨Ø· Ø§ÙØ¯Ø§Ø®ÙÙ"), _createElementVNode("p", { class: "hint compactHint" }, "Ø®Ø±ÙØ·Ø© Ù Ø´ØªÙØ© Ù Ù Ø§ÙØµÙØØ§Øª Ø§ÙØ¹Ø§Ù Ø© اÙÙ ÙØ«ÙØ© ÙÙØ·Ø ÙØªØØ¯Ùد Ø§ÙØµÙØØ§Øª Ø§ÙØªÙ ØªØØªØ§Ø¬ Ø±ÙØ§Ø¨Ø· داخÙÙØ© Ø£ÙØ¶Ø.")], -1)), _createElementVNode("b", { class: _normalizeClass(linkingSummary.orphan_pages?'statusWarn':'statusOk') }, _toDisplayString(linkingSummary.orphan_pages?linkingSummary.orphan_pages+' Ø¨ÙØ§ Ø±ÙØ§Ø¨Ø·':'Ø§ÙØªØºØ·ÙØ© ٠ترابطة'), 3)]), _createElementVNode("div", _hoisted_8, [ 12583 _createElementVNode("div", null, [_cache[12] || (_cache[12] = _createElementVNode("span", null, "ØµÙØØ§Øª Ø§ÙØ´Ø¨ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(linkingSummary.pages||0), 1)]), 12584 _createElementVNode("div", null, [_cache[13] || (_cache[13] = _createElementVNode("span", null, "Ø±ÙØ§Ø¨Ø· داخÙÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(linkingSummary.links||0), 1)]), 12585 _createElementVNode("div", null, [_cache[14] || (_cache[14] = _createElementVNode("span", null, "Ø¨ÙØ§ Ø±ÙØ§Ø¨Ø·", -1)), _createElementVNode("b", null, _toDisplayString(linkingSummary.orphan_pages||0), 1)]), 12586 _createElementVNode("div", null, [_cache[15] || (_cache[15] = _createElementVNode("span", null, "ضعÙÙØ© Ø§ÙØ±Ø¨Ø·", -1)), _createElementVNode("b", null, _toDisplayString(linkingSummary.weak_pages||0), 1)]), 12587 _createElementVNode("div", null, [_cache[16] || (_cache[16] = _createElementVNode("span", null, "سÙÙÙ Ø©", -1)), _createElementVNode("b", null, _toDisplayString(linkingSummary.healthy_pages||0), 1)]), 12588 _createElementVNode("div", null, [_cache[17] || (_cache[17] = _createElementVNode("span", null, "Ù ØªÙØ³Ø· Ø§ÙØ±Ùابط Ø§ÙØ¯Ø§Ø®ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(linkingSummary.average_inbound||0), 1)]) 12589 ]), (linkingOpportunities.length) 12590 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [_cache[19] || (_cache[19] = _createElementVNode("h4", null, "ØµÙØØ§Øª ØªØØªØ§Ø¬ تÙÙÙØ© Ø§ÙØ±Ø¨Ø·", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(linkingOpportunities.slice(0,8), (o) => { 12591 return (_openBlock(), _createElementBlock("article", { 12592 key: o.path, 12593 class: "miniCard seoLinkingOpportunity" 12594 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(o.title_ar||o.path), 1
12594), _createElementVNode("small", null, _toDisplayString(o.label) + " · " + _toDisplayString(o.inbound_links) + " رابط داخÙ", 1), _createElementVNode("p", null, _toDisplayString(o.reason), 1)]), _createVNode(_component_router_link, { 12595 to: o.path, 12596 class: "smallbtn secondary" 12597 }, { 12598 default: _withCtx(() => _cache[18] || (_cache[18] = [_createTextVNode("ÙØªØ Ø§ÙØµÙØØ©")])), 12599 _: 2, 12600 __: [18] 12601 }, 1032, ["to"])])) 12602 }), 128))])) 12603 : (_openBlock(), _createElementBlock("p", _hoisted_10, "ÙØ§ ØªÙØ¬Ø¯ ØØ§ÙÙØ§Ù ØµÙØØ§Øª عا٠ة ضعÙÙØ© Ø§ÙØ±Ø¨Ø· ض٠٠دÙÙÙ Ø§ÙØµÙÙ ÙØ§Ùتجارة ÙØ§ÙØ´ØÙ."))]), 12604 _createElementVNode("section", _hoisted_11, [_createElementVNode("div", _hoisted_12, [_cache[20] || (_cache[20] = _createElementVNode("div", null, [_createElementVNode("h3", null, "أداء Ø§ÙØ¸ÙÙØ± ÙÙ Google"), _createElementVNode("p", { class: "hint compactHint" }, "ÙØ±Ø§Ø¡Ø© Ø¥Ø¯Ø§Ø±ÙØ© ÙÙØ· ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØµÙØØ§Øª Ù Ù Search Console: ÙÙØ±Ø§ØªØ ظÙÙØ±Ø CTR ÙÙ ØªÙØ³Ø· Ø§ÙØªØ±ØªÙب. ÙØ§ ÙØªÙ Ø¬ÙØ¨ أ٠تخزÙ٠عبارات Ø§ÙØ¨ØØ« Ø§ÙØ®Ø§Ù .")], -1)), _createElementVNode("div", _hoisted_13, [_createElementVNode("b", { class: _normalizeClass(searchPerf.connected?(searchPerf.stale?'statusWarn':'statusOk'):'statusWarn') }, _toDisplayString(searchPerf.connected?(searchPerf.stale?'آخر Ø¨ÙØ§Ùات Ù ØªØ§ØØ©':'٠تص٠ØÙ'):(searchPerf.configured?'تعذر Ø§ÙØ§ØªØµØ§Ù':'ØºÙØ± ٠تصÙ')), 3), _createElementVNode("button", { 12605 class: "smallbtn", 12606 disabled: searchPerfLoading, 12607 onClick: refreshSearchPerformance 12608 }, _toDisplayString(searchPerfLoading?'Ø¬Ø§Ø±Ù Ø§ÙØªØØ¯ÙØ«...':'ØªØØ¯ÙØ« Ø§ÙØ¨ÙØ§ÙØ§Øª'), 9, _hoisted_14)])]), (!searchPerf.connected) 12609 ? (_openBlock(), _createElementBlock("div", _hoisted_15, [_
12609createElementVNode("b", null, _toDisplayString(searchPerf.configured?'تعذر Ø¬ÙØ¨ Ø¨ÙØ§Ùات Search Console ØØ§ÙÙØ§Ù':'Search Console API ØºÙØ± Ù Ø±Ø¨ÙØ· بعد'), 1), _createElementVNode("p", null, _toDisplayString(searchPerf.configured?'SEO Ø§ÙØØ§ÙÙ ÙØ¹Ù ٠بشÙÙ Ø·Ø¨ÙØ¹ÙØ ÙÙÙ Ù٠إعادة اÙÙ ØØ§ÙÙØ© ÙØ§ØÙاÙ.':'ÙØØªØ§Ø¬ ØØ³Ø§Ø¨ خد٠ة Search Console Ù Ø¶Ø¨ÙØ·Ø§Ù عÙÙ Ø§ÙØ®Ø§Ø¯Ù . اÙÙ ÙØ§ØªÙØ ÙØ§ ØªÙØÙØ¸ داخ٠اÙÙ ÙØµØ©.'), 1)])) 12610 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 12611 _createElementVNode("div", _hoisted_16, [ 12612 _createElementVNode("span", null, [_cache[21] || (_cache[21] = _createTextVNode("آخر Ø¬ÙØ¨: ")), _createElementVNode("b", null, _toDisplayString(shortDate(searchPerf.fetched_at)), 1)]), 12613 _createElementVNode("span", null, [_cache[22] || (_cache[22] = _createTextVNode("Ø§ÙØ¨ÙØ§ÙØ§Øª ØØªÙ: ")), _createElementVNode("b", null, _toDisplayString(searchPerf.data_through||'â'), 1)]), 12614 (searchPerfCache.hit) 12615 ? (_openBlock(), _createElementBlock("span", _hoisted_17, "Ù Ù Ø§ÙØ°Ø§Ùرة اÙÙ Ø¤ÙØªØ© · " + _toDisplayString(searchPerfCache.age_seconds||0) + "Ø«", 1)) 12616 : _createCommentVNode("", true), 12617 (searchPerf.stale) 12618 ? (_openBlock(), _createElementBlock("span", _hoisted_18, "تعذر Ø§ÙØªØØ¯ÙØ« Ø§ÙØÙØ ÙØ¹Ø±Ø¶ آخر snapshot Ø¢Ù Ù")) 12619 : _createCommentVNode("", true) 12620 ]), 12621 _createElementVNode("div", _hoisted_19, [ 12622 _createElementVNode("div", null, [_cache[23] || (_cache[23] = _createElementVNode("span", null, "اÙÙÙØ±Ø§Øª", -1)), _createElementVNode("b", null, _toDisplayString(searchPerfSummary.clicks||0), 1), _createElementVNode("small", null, _toDisplayString(changeLabel(searchPerfSummary.clicks_change_pct)) + " ع٠اÙÙØªØ±Ø© Ø§ÙØ³Ø§Ø¨ÙØ©", 1)]), 12623 _createElementVNode("div", null, [_cache[24] || (_cache[24] = _createElementVNode("span", null, "٠رات Ø§ÙØ¸ÙÙØ±", -1)), _createElementVNode("b", null, _toDisplayString(searchPerfSummary.impressions||0), 1), _createElementVNode("small", null, _toDisplayString(changeLabel(searchPerfSummary.impressions_change_pct)) + " ع٠اÙÙØªØ±Ø© Ø§ÙØ³Ø§Ø¨ÙØ©", 1)]), 12624 _createElementVNode("div", null, [_cache[25] || (_cache[25] = _createElementVNode("span", null, "CTR", -1)), _createElementVNode("b", null, _toDisplayString(searchPerfSummary.ctr_pct||0) + "%", 1), _createElementVNode("small", null, _toDisplayString(changeLabel(searchPerfSummary.ctr_change_points,' ÙÙØ·Ø©')), 1)]), 12625 _createElementVNode("div", null, [_cache[26] || (_cache[26] = _createElementVNode("span", null, "Ù ØªÙØ³Ø· Ø§ÙØªØ±ØªÙب", -1)), _createElementVNode("b", null, _toDisplayString(searchPerfSummary.average_position||0), 1), _createElementVNode("small", null, _toDisplayString(changeLabel(searchPerfSummary.position_change,' Ù Ø±ÙØ²')), 1)]), 12626 _createElementVNode("div", null, [_cache[27] || (_cache[27] = _createElementVNode("span", null, "Ø§ÙØµÙØØ§Øª اÙÙ ÙØ§Ø³Ø©", -1)), _createElementVNode("b", null, _toDisplayString(searchPerfSummary.pages||0), 1)]), 12627 _createElementVNode("div", null, [_cache[28] || (_cache[28] = _createElementVNode("span", null, "Ø£ÙÙÙÙØ§Øª اÙÙÙ Ù", -1)), _createElementVNode("b", null, _toDisplayString(searchPerfPriorities.length), 1)]) 12628 ]), 12629 (searchPerfPriorities.length) 12630 ? (_openBlock(), _createElementBlock("div", _hoisted_20, [_cache[32] || (_cache[32] = _createElementVNode("div", { class: "memberCardTop" }, [_createElementVNode("div", null, [_createElementVNode("h4", null, "Ø£ÙÙÙÙØ© اÙÙÙ Ù Ø§ÙØ¢Ù"), _createElementVNode("p", { class: "hint compactHint" }, "ØªØ±ØªÙØ¨ Ù Ø±ÙØ¨ Ù Ù Ø§ÙØ¸ÙÙØ± ÙCTR ÙØ§ÙØªØ±ØªÙØ¨ ÙØªØ±Ø§Ø¬Ø¹ اÙÙÙØ±Ø§Øª ÙÙÙØ© Ø§ÙØ±Ø¨Ø· Ø§ÙØ¯Ø§Ø®ÙÙ.")]), _createElementVNode("span", { class: "vueBadge" }, "Live Data")], -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(searchPerfPriorities.slice(0,6), (o) => { 12631 return (_openBlock(), _createElementBlock("article", { 12632 key: 'priority:'+o.path, 12633 class: "miniCard seoGrowthPriorityRow" 12634 }, [_createElementVNode("div", _hoisted_21, [_createElementVNode("b", null, _toDisplayString(o.score), 1), _cache[29] || (_cache[29] = _createElementVNode("small", null, "/100", -1))]), _createElementVNode("div", _hoisted_22, [ 12635 _createElementVNode("div", _hoisted_23, [_createElementVNode("b", null, _toDisplayString(o.path), 1
12635), _createElementVNode("span", _hoisted_24, _toDisplayString(priorityLabel(o.priority)), 1)]), 12636 _createElementVNode("small", null, _toDisplayString(o.impressions) + " ظÙÙØ± · " + _toDisplayString(o.clicks) + " ÙÙØ±Ø© · CTR " + _toDisplayString(o.ctr_pct) + "% · ØªØ±ØªÙØ¨ " + _toDisplayString(o.position), 1), 12637 _createElementVNode("p", null, _toDisplayString(o.reason), 1), 12638 _createElementVNode("p", _hoisted_25, [_cache[30] || (_cache[30] = _createElementVNode("b", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡:", -1)), _createTextVNode(" " + _toDisplayString(o.action), 1)]) 12639 ]), _createVNode(_component_router_link, { 12640 to: o.path, 12641 class: "smallbtn secondary" 12642 }, { 12643 default: _withCtx(() => _cache[31] || (_cache[31] = [_createTextVNode("ÙØªØ")])), 12644 _: 2, 12645 __: [31] 12646 }, 1032, ["to"])])) 12647 }), 128))])) 12648 : _createCommentVNode("", true), 12649 (searchPerfOpportunities.length) 12650 ? (_openBlock(), _createElementBlock("div", _hoisted_26, [_cache[34] || (_cache[34] = _createElementVNode("h4", null, "ØªÙØ§ØµÙÙ ÙØ±Øµ Ø§ÙØªØØ³ÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(searchPerfOpportunities.slice(0,8), (o) => { 12651 return (_openBlock(), _createElementBlock("article", { 12652 key: o.path+':'+o.type, 12653 class: "miniCard seoLinkingOpportunity" 12654 }, [_createElementVNode("div", null, [ 12655 _createElementVNode("b", null, _toDisplayString(perfTypeLabel(o.type)), 1), 12656 _createElementVNode("small", null, _toDisplayString(o.path) + " · " + _toDisplayString(o.impressions) + " ظÙÙØ± · ØªØ±ØªÙØ¨ " + _toDisplayString(o.position), 1), 12657 _createElementVNode("p", null, _toDisplayString(o.reason), 1), 12658 _createElementVNode("p", _hoisted_27, _toDisplayString(o.action), 1) 12659 ]), _createVNode(_component_router_link, { 12660 to: o.path, 12661 class: "smallbtn secondary" 12662 }, { 12663 default: _withCtx(() => _cache[33] || (_cache[33] = [_createTextVNode("ÙØªØ Ø§ÙØµÙØØ©")])), 12664 _: 2, 12665 __: [33] 12666 }, 1032, ["to"])])) 12667 }), 128))])) 12668 : (_openBlock(), _createElementBlock("p", _hoisted_28, "ÙØ§ ØªÙØ¬Ø¯ ÙØ±Øµ ÙØ§Ø¶ØØ© Ø¶Ù Ù Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØØ§ÙÙØ©.")), 12669 (searchPerfMovers.clicks_up&&searchPerfMovers.clicks_up.length) 12670 ? (_openBlock(), _createElementBlock("details", _hoisted_29, [_cache[37] || (_cache[37] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø£ÙØ¨Ø± Ø§ÙØªØØ±Ùات"), _createElementVNode("span", null, "28 ÙÙÙ Ù ÙØ§Ø¨Ù 28 ÙÙÙ ")], -1)), _createElementVNode("div", _hoisted_30, [_createElementVNode("div", null, [_cache[35] || (_cache[35] = _createElementVNode("h4", null, "ØµØ¹ÙØ¯ اÙÙÙØ±Ø§Øª", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(searchPerfMovers.clicks_up, (p) => { 12671 return (_openBlock(), _createElementBlock("article", { 12672 key: 'up:'+p.path, 12673 class: "miniCard" 12674 }, [_createElementVNode("b", null, _toDisplayString(p.path), 1), _createElementVNode("small", null, _toDisplayString(changeLabel(p.clicks_change_pct)) + " · " + _toDisplayString(p.clicks) + " ÙÙØ±Ø©", 1)])) 12675 }), 128))]), _createElementVNode("div", null, [_cache[36] || (_cache[36] = _createElementVNode("h4", null, "تراجع اÙÙÙØ±Ø§Øª", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(searchPerfMovers.clicks_down, (p) => { 12676 return (_openBlock(), _createElementBlock("article", { 12677 key: 'down:'+p.path, 12678 class: "miniCard" 12679 }
12679, [_createElementVNode("b", null, _toDisplayString(p.path), 1), _createElementVNode("small", null, _toDisplayString(changeLabel(p.clicks_change_pct)) + " · " + _toDisplayString(p.clicks) + " ÙÙØ±Ø©", 1)])) 12680 }), 128))])])])) 12681 : _createCommentVNode("", true), 12682 (searchPerfPages.length) 12683 ? (_openBlock(), _createElementBlock("details", _hoisted_31, [_createElementVNode("summary", null, [_cache[38] || (_cache[38] = _createElementVNode("b", null, "Ø£ÙØ¶Ù Ø§ÙØµÙØØ§Øª ØØ³Ø¨ Ø§ÙØ¸ÙÙØ±", -1)), _createElementVNode("span", null, _toDisplayString(searchPerfPages.length), 1)]), _createElementVNode("div", _hoisted_32, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(searchPerfPages.slice(0,12), (p) => { 12684 return (_openBlock(), _createElementBlock("article", { 12685 key: p.path, 12686 class: "miniCard seoPerfPageRow" 12687 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(p.path), 1), _createElementVNode("small", null, _toDisplayString(p.impressions) + " ظÙÙØ± · " + _toDisplayString(p.clicks) + " ÙÙØ±Ø© · CTR " + _toDisplayString(p.ctr_pct) + "% · ØªØ±ØªÙØ¨ " + _toDisplayString(p.position), 1)]), _createVNode(_component_router_link, { 12688 to: p.path, 12689 class: "smallbtn secondary" 12690 }, { 12691 default: _withCtx(() => _cache[39] || (_cache[39] = [_createTextVNode("ÙØªØ")])), 12692 _: 2, 12693 __: [39] 12694 }, 1032, ["to"])])) 12695 }), 128))])])) 12696 : _createCommentVNode("", true) 12697 ], 64))]), 12698 _createElementVNode("section", _hoisted_33, [ 12699 _cache[50] || (_cache[50] = _createElementVNode("h3", null, "Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª Ø§ÙØ±Ø¦ÙØ³ÙØ©", -1)), 12700 _createElementVNode("div", _hoisted_34, [ 12701 _createElementVNode("label", null, [_cache[40] || (_cache[40] = _createTextVNode("عÙÙØ§Ù اÙÙ ÙÙØ¹")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((form.site_title) = $event) }, null, 8, _hoisted_35), [[_vModelText, form.site_title]])]), 12702 _createElementVNode("label", null, [_cache[41] || (_cache[41] = _createTextVNode("Ø§ÙØ¬ÙØ© اÙÙ Ø´ØºÙØ©")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((form.organization_name) = $event) }, null, 8, _hoisted_36), [[_vModelText, form.organization_name]])]), 12703 _createElementVNode("label", null, [_cache[42] || (_cache[42] = _createTextVNode("Ø§ÙØ±Ø§Ø¨Ø· Ø§ÙØ¹Ø§Ù ")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((form.public_base_url) = $event) }, null, 8, _hoisted_37), [[_vModelText, form.public_base_url]])]), 12704 _createElementVNode("label", null, [_cache[43] || (_cache[43] = _createTextVNode("ØµÙØ±Ø© اÙÙ Ø´Ø§Ø±ÙØ© Ø§ÙØ§ÙØªØ±Ø§Ø¶ÙØ©")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((form.default_og_image) = $event) }, null, 8, _hoisted_38), [[_vModelText, form.default_og_image]])]), 12705 _createElementVNode("label", null, [_cache[44] || (_cache[44] = _createTextVNode("Google Analytics ID")), _withDirectives(_createElementVNode("input", { 12706 "onUpdate:modelValue": $event => ((form.google_analytics_id) = $event), 12707 placeholder: "Ø§Ø®ØªÙØ§Ø±Ù" 12708 }, null, 8, _hoisted_39), [[_vModelText, form.google_analytics_id]])]), 12709 _createElementVNode("label", null, [_cache[45] || (_cache[45] = _createTextVNode("Google Search Console")), _withDirectives(_createElementVNode("input", { 12710 "onUpdate:modelValue": $event => ((form.search_console_code) = $event), 12711 placeholder: "ر٠ز Ø§ÙØªØÙÙ" 12712 }, null, 8, _hoisted_40), [[_vModelText, form.search_console_code]])]) 12713 ]), 12714 _createElementVNode("label", null, [_cache[46] || (_cache[46] = _createTextVNode("ÙØµÙ اÙÙ ÙÙØ¹")), _withDirectives(_createElementVNode("textarea", { "onUpdate:modelValue": $event => ((form.site_description) = $event) }, null, 8, _hoisted_41), [[_vModelText, form.site_description]])]), 12715 _createElementVNode("label", null, [_cache[47] || (_cache[47] = _createTextVNode("ÙÙ٠ات Ù Ø±Ø¬Ø¹ÙØ© داخÙÙØ©")), _withDirectives(_createElementVNode("textarea", { "onUpdate:modelValue": $event => ((form.default_keywords) = $event) }, null, 8, _hoisted_42), [[_vModelText, form.default_keywords]])]), 12716 _createElementVNode("label", null, [_cache[49] || (_cache[49] = _createTextVNode("اÙÙÙØ±Ø³Ø©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.enable_indexing) = $event) }, _cache[48] || (_cache[48] = [_createElementVNode("option", { value: "false" }, "Ø¥ÙÙØ§Ù اÙÙÙØ±Ø³Ø© Ø§ÙØ¹Ø§Ù Ø©", -1), _createElementVNode("option", { value: "true" }, "ØªÙØ¹Ù٠اÙÙÙØ±Ø³Ø© Ø§ÙØ¹Ø§Ù Ø©", -1)]), 8, _hoisted_43), [[_vModelSelect, form.enable_indexing]])]),
12717 _cache[51] || (_cache[51] = _createElementVNode("p", { class: "hint" }, "اÙÙÙ٠ات اÙÙ Ø±Ø¬Ø¹ÙØ© ÙØ§ ØªÙØ±Ø³Ù ÙÙ meta keywordsØ ØªØ³ØªØ®Ø¯Ù ÙÙØ· Ù٠رجع ØªØØ±ÙرÙ. Ø®Ø±ÙØ·Ø© اÙÙ ÙÙØ¹ تش٠٠اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر ÙØ§ÙÙ ÙØ«Ù تÙÙØ§Ø¦ÙاÙ.", -1)), 12718 _createElementVNode("button", { 12719 class: "btn loadMore", 12720 onClick: save 12721 }, "ØÙظ إعدادات Ø§ÙØ¸ÙÙØ±", 8, _hoisted_44) 12722 ]), 12723 _createElementVNode("section", _hoisted_45, [_createElementVNode("div", _hoisted_46, [_cache[52] || (_cache[52] = _createElementVNode("h3", null, "Ø§ÙØµÙØØ§Øª Ø§ÙØ£Ø³Ø§Ø³ÙØ©", -1)), _createElementVNode("button", { 12724 class: "smallbtn", 12725 onClick: addPage 12726 }, "+ Ø¥Ø¶Ø§ÙØ© ØµÙØØ©", 8, _hoisted_47)]), _cache[54] || (_cache[54] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØ¹Ùاصر اÙÙ ÙØ´Ùرة ÙÙ Ø§ÙØ¯ÙÙÙ ÙØ§Ùتجارة ÙØ¨Ùابة Ø§ÙØ³ÙØ¯Ø§Ù ÙØ§ÙÙØ¹Ø§ÙÙØ§Øª ÙØ§ÙجاÙÙØ§Øª ØªÙØ¶Ø§Ù تÙÙØ§Ø¦Ùا٠إÙÙ sitemap ÙÙØ§ ØªØØªØ§Ø¬ Ø¥Ø¯Ø®Ø§ÙØ§Ù ÙØ¯ÙÙØ§Ù ÙÙØ§.", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(pages, (p, i) => { 12727 return (_openBlock(), _createElementBlock("div", { 12728 class: "miniCard seoPageRow", 12729 key: i 12730 }, [ 12731 _createElementVNode("div", _hoisted_48, [_withDirectives(_createElementVNode("input", { 12732 "onUpdate:modelValue": $event => ((p.path) = $event), 12733 placeholder: "/about" 12734 }, null, 8, _hoisted_49), [[_vModelText, p.path]]), _withDirectives(_createElementVNode("input", { 12735 "onUpdate:modelValue": $event => ((p.title) = $event), 12736 placeholder: "عÙÙØ§Ù Ù ØØ±Ù Ø§ÙØ¨ØØ«" 12737 }, null, 8, _hoisted_50), [[_vModelText, p.title]])]), 12738 _withDirectives(_createElementVNode("textarea", { 12739 "onUpdate:modelValue": $event => ((p.description) = $event), 12740 placeholder: "ÙØµÙ ٠ختصر ÙÙØµÙØØ©" 12741 }, null, 8, _hoisted_51), [[_vModelText, p.description]]), 12742 _createElementVNode("label", _hoisted_52, [_withDirectives(_createElementVNode("input", { 12743 type: "checkbox", 12744 "onUpdate:modelValue": $event => ((p.indexable) = $event) 12745 }, null, 8, _hoisted_53), [[_vModelCheckbox, p.indexable]]), _cache[53] || (_cache[53] = _createTextVNode(" ÙÙØ±Ø³Ø©"))]), 12746 _createElementVNode("button", { 12747 class: "smallbtn dangerBtn", 12748 onClick: $event => (removePage(i)) 12749 }, "ØØ°Ù", 8, _hoisted_54) 12750 ])) 12751 }), 128))]), 12752 _createElementVNode("details", _hoisted_55, [_cache[55] || (_cache[55] = _createElementVNode("summary", null, [_createElementVNode("b", null, "robots.txt"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_56, [_createElementVNode("pre", _hoisted_57, _toDisplayString(robots), 1)])]), 12753 _createElementVNode("details", _hoisted_58, [_createElementVNode("summary", null, [_cache[56] || (_cache[56] = _createElementVNode("b", null, "٠عاÙÙØ© sitemap.xml", -1)), _createElementVNode("span", null, _toDisplayString(coverage.total) + " رابط", 1)]), _createElementVNode("div", _hoisted_59, [_createElementVNode("pre", _hoisted_60, _toDisplayString(sitemap), 1)])]) 12754 ]), 12755 _: 1 12756 })) 12757 } 12758} 12759})() 12760 }; 12761 12762 12763 const AdminHealthPage={ 12764 components:{AdminFrame}, 12765 setup(){const store=useGzcStore();const router=useRouter();const h=computed(()=>store.state.systemHealth||{});async function load(){if(await store.requireAdmin(router)) await store.loadSystemHealth(router);}onMounted(load);return{store,h,load,healthLabel,shortDate};}, 12766 render:(function(){ 12767const _Vue = Vue 12768const { createElementVNode: _createElementVNode } = _Vue 12769 12770const _hoisted_1 = { class: "card dashboardHeaderCard" } 12771const _hoisted_2 = ["onClick"] 12772const _hoisted_3 = { class: "healthGrid" } 12773 12774return function render(_ctx, _cache) { 12775 with (_ctx) { 12776 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 12777
12778 const _component_AdminFrame = _resolveComponent("AdminFrame") 12779 12780 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ØØ§ÙØ© اÙÙØ¸Ø§Ù " }, { 12781 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù Ø±Ø§ÙØ¨Ø© Ø§ÙØ¥Ùتاج"), _createElementVNode("h3", null, "Ù Ø±ÙØ² ØµØØ© اÙÙØ¸Ø§Ù "), _createElementVNode("p", { class: "hint" }, "ÙØØµ Ø³Ø±ÙØ¹ ÙÙØ®Ø¯Ù Ø© ÙÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ§ÙتخزÙÙ ÙÙØ§ØªØ³Ø§Ø¨ ÙØªØ·Ø¨Ù٠اÙÙØ§ØªÙ ÙØ¨ÙØ§ÙØ§Øª Ù ÙÙØ¹ Ø§ÙØ²Ø§Ø¦Ø± ÙØ§ÙÙØ³Ø® Ø§ÙØ§ØØªÙاطÙ. ÙØ°Ù Ø§ÙØµÙØØ© ÙÙÙ Ø±Ø§ÙØ¨Ø© ÙÙØ·.")], -1)), _createElementVNode("button", { 12782 class: "smallbtn", 12783 onClick: load 12784 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), _createElementVNode("section", _hoisted_3, [ 12785 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.overall]) }, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "Ø§ÙØØ§ÙØ© Ø§ÙØ¹Ø§Ù Ø©", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.overall)), 1), _createElementVNode("small", null, _toDisplayString(shortDate(h.checked_at)), 1)], 2), 12786 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.db&&h.db.status]) }, [_cache[2] || (_cache[2] = _createElementVNode("span", null, "ÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.db&&h.db.status)), 1), _createElementVNode("small", null, _toDisplayString(h.db&&h.db.message), 1)], 2), 12787 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.storage&&h.storage.status]) }, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "Ø§ÙØªØ®Ø²ÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.storage&&h.storage.status)), 1), _createElementVNode("small", null, _toDisplayString(h.storage&&h.storage.message), 1)], 2), 12788 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.whatsapp&&h.whatsapp.status]) }, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "WhatsApp", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.whatsapp&&h.whatsapp.status)), 1), _createElementVNode("small", null, _toDisplayString(h.whatsapp&&h.whatsapp.enabled?'Ù ÙØ¹Ù':'Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª ØºÙØ± Ù ÙØªÙ ÙØ©'), 1)], 2), 12789 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.backups&&h.backups.status]) }, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "اÙÙØ³Ø® Ø§ÙØ§ØØªÙاطÙ", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.backups&&h.backups.status)), 1), _createElementVNode("small", null, _toDisplayString(h.backups&&h.backups.message), 1)], 2), 12790 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.offsite_backups&&h.offsite_backups.enabled?(h.offsite_backups.status==='ok'?'ok':'warn'):'ok']) }, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "اÙÙØ³Ø® Ø§ÙØ®Ø§Ø±Ø¬ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(h.offsite_backups&&h.offsite_backups.enabled?(h.offsite_backups.status==='ok'?'سÙÙÙ ':'ÙØØªØ§Ø¬ Ø§ÙØªØ¨Ø§Ù'):'Ø¬Ø§ÙØ²'), 1), _createElementVNode("small", null, _toDisplayString(h.offsite_backups&&h.offsite_backups.enabled?'Ù ÙØ¹ÙÙ':'ØºÙØ± Ù ÙØ¹ÙÙ'), 1)], 2), 12791 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.pwa&&h.pwa.status]) }, [_cache[7] || (_cache[7] = _createElementVNode("span", null, "تطبÙ٠اÙÙØ§ØªÙ", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.pwa&&h.pwa.status)), 1), _createElementVNode("small", null, _toDisplayString(h.pwa&&h.pwa.message), 1)], 2), 12792 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.geoip&&h.geoip.status]) }, [_cache[8] || (_cache[8] = _createElementVNode("span", null, "Ù ÙÙØ¹ Ø§ÙØ²Ø§Ø¦Ø±", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.geoip&&h.geoip.status)), 1), _createElementVNode("small", null, _toDisplayString(h.geoip&&h.geoip.message), 1)], 2), 12793 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.logs&&h.logs.status]) }, [_cache[9] || (_cache[9] = _createElementVNode("span", null, "Ø§ÙØ³Ø¬Ùات", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.logs&&h.logs.status)), 1), _createElementVNode("small", null, "Ø³Ø¬ÙØ§Øª Ø£ÙØ¯Ù Ù Ù 90 ÙÙ٠اÙ: " + _toDisplayString(h.logs&&h.logs.audit_90_days || 0), 1)], 2) 12794 ])]), 12795 _: 1 12796 })) 12797 } 12798} 12799})() 12800 }; 12801 12802 12803 const AdminBackupSettingsPage={ 12804 components:{AdminFrame}, 12805 setup(){ 12806 const store=useGzcStore();const router=useRouter(); 12807 const form=reactive({s3:{enabled:false,endpoint:'',region:'auto',bucket:'',prefix:'gzc',tiers:['weekly','monthly']},ssh:{enabled:false,host:'',port:22,user:'',base_path:'/var/backups/gzc',tiers:['weekly','monthly']}}); 12808 const r2Account=ref(''); 12809 const r2Keys=reactive({access_key_id:'',secret_access_key:''});const savingKeys=ref(false); 12810 async function saveKeys(){ 12811 if(savingKeys.value)return; 12812 if(!/^[a-f0-9]{32}$/i.test(r2Keys.access_key_id.trim())||!/^[a-f0-9]{64}$/i.test(r2Keys.secret_access_key.trim())){store.state.msg='أدخ٠Access Key ID Ù Ù 32 ØØ±Ùا٠ÙSecret Acce
12812ss Key Ù Ù 64 ØØ±ÙØ§Ù Ù Ù Ø¨ÙØ§Ùات R2 S3';return;} 12813 if(r2Account.value.trim()&&r2Account.value.trim()===r2Keys.access_key_id.trim()){store.state.msg='Account ID ٠ختÙ٠ع٠Access Key IDØ Ø±Ø§Ø¬Ø¹ Ø§ÙØÙÙÙÙ';return;} 12814 savingKeys.value=true; 12815 try{const r=await api('/api/admin/settings/r2-credentials',{method:'POST',body:JSON.stringify(r2Keys)});store.state.msg=r.message||'تعذر Ø§ÙØÙØ¸';if(r.ok)await store.loadOffsiteBackupSettings(router);} 12816 finally{r2Keys.access_key_id='';r2Keys.secret_access_key='';savingKeys.value=false;} 12817 } 12818 function applyR2(){const id=String(r2Account.value||'').trim();if(!/^[a-f0-9]{32}$/i.test(id)){store.state.msg='أدخ٠Cloudflare Account ID Ø§ÙØµØÙØ (٣٢ ØØ±ÙاÙ)';return;}form.s3.endpoint='https://'+id.toLowerCase()+'.r2.cloudflarestorage.com';form.s3.region='auto';store.state.msg='ت٠تجÙÙØ² عÙÙØ§Ù R2Ø Ø£Ø¯Ø®Ù Ø§Ø³Ù Ø§ÙØØ§ÙÙØ© ث٠اØÙظ Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª.';} 12819 const data=computed(()=>store.state.offsiteBackupSettings||{});const overview=computed(()=>data.value.overview||{}); 12820 function sync(){const c=data.value.config||{};const s3=c.s3||{},ssh=c.ssh||{};Object.assign(form.s3,{enabled:!!s3.enabled,endpoint:s3.endpoint||'',region:s3.region||'auto',bucket:s3.bucket||'',prefix:s3.prefix||'gzc',tiers:safeArray(s3.tiers).length?safeArray(s3.tiers):['weekly','monthly']});Object.assign(form.ssh,{enabled:!!ssh.enabled,host:ssh.host||'',port:Number(ssh.port||22),user:ssh.user||'',base_path:ssh.base_path||'/var/backups/gzc',tiers:safeArray(ssh.tiers).length?safeArray(ssh.tiers):['weekly','monthly']});} 12821 async function load(){if(await store.requireAdmin(router)){await store.loadOffsiteBackupSettings(router);sync();}} 12822 async function save(){const r=await store.saveOffsiteBackupSettings({s3:{...form.s3,account_id:r2Account.value.trim(),tiers:[...form.s3.tiers]},ssh:{...form.ssh,tiers:[...form.ssh.tiers]}},router);if(r&&r.ok)sync();} 12823 function toggleTier(target,tier){const arr=form[target].tiers;const i=arr.indexOf(tier);if(i>=0){if(arr.length>1)arr.splice(i,1);}else arr.push(tier);} 12824 function tierOn(target,tier){return form[target].tiers.includes(tier);} 12825 function stateLabel(x){return ({ok:'سÙÙÙ ',disabled:'ØºÙØ± Ù ÙØ¹ÙÙ',waiting:'Ø¨Ø§ÙØªØ¸Ø§Ø± Ø£ÙÙ ÙØ³Ø®Ø©',needs_credentials:'Ø¨ÙØ§Ùات Ø§ÙØ¯Ø®ÙÙ ÙØ§Ùصة',failed:'تعذر اÙÙØ³Ø®'}[String(x&&x.status||'')])||'ÙÙ ÙØªÙ Ø§ÙØªØÙÙ';} 12826 function lastLabel(x){const l=x&&x.last;if(!l)return 'ÙØ§ ØªÙØ¬Ø¯ ع٠ÙÙØ© Ø®Ø§Ø±Ø¬ÙØ© بعد';return (l.status==='success'?'آخر ÙØ³Ø®Ø© ÙØ§Ø¬ØØ©':'آخر Ù ØØ§ÙÙØ© ÙÙ ØªÙØ¬Ø')+' · '+shortDate(l.updated_at);} 12827 onMounted(load);return{store,form,data,overview,load,save,toggleTier,tierOn,stateLabel,lastLabel,r2Account,applyR2,r2Keys,savingKeys,saveKeys}; 12828 }, 12829 render:(function(){ 12830const _Vue = Vue 12831const { createElementVNode: _createElementVNode, createTextVNode: _createTextVNode } = _Vue 12832 12833const _hoisted_1 = { class: "card dashboardHeaderCard" } 12834const _hoisted_2 = ["onClick"] 12835const _hoisted_3 = { class: "card formCard" } 12836const _hoisted_4 = { class: "adminSectionHead" } 12837const _hoisted_5 = { class: "statusPill" } 12838const _hoisted_6 = { class: "checkLine" } 12839const _hoisted_7 = ["onUpdate:modelValue"] 12840const _hoisted_8 = { class: "editGrid" } 12841const _hoisted_9 = ["onUpdate:modelValue"] 12842const _hoisted_10 = ["onClick"] 12843const _hoisted_11 = { class: "editGrid" } 12844const _hoisted_12 = ["onUpdate:modelValue"] 12845const _hoisted_13 = ["onUpdate:modelValue"] 12846const _hoisted_14 = ["onUpdate:modelValue"] 12847const _hoisted_15 = ["onUpdate:modelValue"] 12848const _hoisted_16 = { class: "editGrid" } 12849const _hoisted_17 = ["onUpdate:modelValue"] 12850const _hoisted_18 = ["onUpdate:modelValue"] 12851const _hoisted_19 = ["disabled", "onClick"] 12852const _hoisted_20 = { class: "fieldLabel" } 12853const _hoisted_21 = { class: "row" } 12854const _hoisted_22 = ["onClick"] 12855const _hoisted_23 = ["onClick"] 12856const _hoisted_24 = ["onClick"] 12857const _hoisted_25 = { class: "hint" } 12858const _hoisted_26 = { class: "hint" } 12859const _hoisted_27 = { class: "card formCard" } 12860const _hoisted_28 = { class: "adminSectionHead" } 12861const _hoisted_29 = { class: "statusPill" } 12862const _hoisted_30 = { class: "checkLine" } 12863const _hoisted_31 = ["onUpdate:modelValue"] 12864const _hoisted_32 = { class: "editGrid" } 12865const _hoisted_33 = ["onUpdate:modelValue"] 12866const _hoisted_34 = ["onUpdate:modelValue"] 12867const _hoisted_35 = ["onUpdate:modelValue"] 12868const _hoisted_36 = ["onUpdate:modelValue"] 12869const _hoisted_37 = { class: "fieldLabel" } 12870const _hoisted_38 = { class: "row" } 12871const _hoisted_39 = ["onClick"] 12872const _hoisted_40 = ["onClick"] 12873const _hoisted_41 = ["onClick"] 12874const _hoisted_42 = { class: "hint" } 12875const _hoisted_43 = { class: "hint" } 12876const _hoisted_44 = ["disabled", "onClick"] 12877 12878return function render(_ctx, _cache) { 12879 with (_ctx) {
12880 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, vModelCheckbox: _vModelCheckbox, withDirectives: _withDirectives, createTextVNode: _createTextVNode, vModelText: _vModelText, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 12881 12882 const _component_AdminFrame = _resolveComponent("AdminFrame") 12883 12884 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙÙØ³Ø® Ø§ÙØ®Ø§Ø±Ø¬ÙØ© ÙØ§ÙتعاÙÙ" }, { 12885 default: _withCtx(() => [ 12886 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ØÙ Ø§ÙØ© Ø§ÙØ¨ÙØ§ÙØ§Øª"), _createElementVNode("h3", null, "اÙÙØ³Ø® Ø§ÙØ®Ø§Ø±Ø¬ÙØ©"), _createElementVNode("p", { class: "hint" }, "ÙÙ ÙÙ Ø§ÙØ§ØØªÙاظ Ø¨ÙØ³Ø®Ø© خارج Ø§ÙØ³ÙØ±ÙØ± Ø§ÙØ±Ø¦Ùس٠عبر S3-compatible Ø£Ù Ø³ÙØ±Ùر Backup Ù ÙÙØµÙ.")], -1)), _createElementVNode("button", { 12887 class: "smallbtn", 12888 onClick: load 12889 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), 12890 _createElementVNode("section", _hoisted_3, [ 12891 _createElementVNode("div", _hoisted_4, [_cache[1] || (_cache[1] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "S3-compatible"), _createElementVNode("h3", null, "Cloudflare R2 / Object Storage")], -1)), _createElementVNode("span", _hoisted_5, _toDisplayString(stateLabel(overview.s3)), 1)]), 12892 _createElementVNode("label", _hoisted_6, [_withDirectives(_createElementVNode("input", { 12893 type: "checkbox", 12894 "onUpdate:modelValue": $event => ((form.s3.enabled) = $event) 12895 }, null, 8, _hoisted_7), [[_vModelCheckbox, form.s3.enabled]]), _cache[2] || (_cache[2] = _createTextVNode(" ØªÙØ¹Ù٠اÙÙØ³Ø® Ø¥ÙÙ R2 / S3"))]), 12896 _createElementVNode("div", _hoisted_8, [_createElementVNode("label", null, [_cache[3] || (_cache[3] = _createTextVNode("Cloudflare Account ID (Ø§Ø®ØªÙØ§Ø±Ù ÙØªØ¬ÙÙØ² Ø§ÙØ¹ÙÙØ§Ù)")), _withDirectives(_createElementVNode("input", { 12897 "onUpdate:modelValue": $event => ((r2Account) = $event), 12898 dir: "ltr", 12899 autocomplete: "off", 12900 placeholder: "٠عرÙÙ Ø§ÙØØ³Ø§Ø¨Ø ÙÙÙØ³ API Token" 12901 }, null, 8, _hoisted_9), [[_vModelText, r2Account]])]), _createElementVNode("button", { 12902 type: "button", 12903 class: "smallbtn secondary", 12904 onClick: applyR2 12905 }, "تجÙÙØ² إعدادات Cloudflare R2", 8, _hoisted_10)]), 12906 _cache[11] || (_cache[11] = _createElementVNode("p", { class: "hint" }, "R2 ÙØ³ØªØ®Ø¯Ù Region: auto. Ø§ÙØ³Ø® S3 API Endpoint ٠٠إعدادات Ø§ÙØØ§ÙÙØ©Ø ÙÙØ§ تستخد٠رابط Ø§ÙØ¹Ø±Ø¶ Ø§ÙØ¹Ø§Ù r2.dev. ÙÙØØ§ÙÙØ§Øª ذات ÙØ·Ø§Ù اختصاص خاص استخد٠عÙÙØ§ÙÙØ§ Ù٠ا ÙØ¸Ùر ÙÙ Cloudflare.", -1)), 12907 _createElementVNode("div", _hoisted_11, [ 12908 _createElementVNode("label", null, [_cache[4] || (_cache[4] = _createTextVNode("Endpoint")), _withDirectives(_createElementVNode("input", { 12909 "onUpdate:modelValue": $event => ((form.s3.endpoint) = $event), 12910 dir: "ltr", 12911 placeholder: "https://ACCOUNT_ID.r2.cloudflarestorage.com" 12912 }, null, 8, _hoisted_12), [[_vModelText, form.s3.endpoint]])]), 12913 _createElementVNode("label", null, [_cache[5] || (_cache[5] = _createTextVNode("Region")), _withDirectives(_createElementVNode("input", { 12914 "onUpdate:modelValue": $event => ((form.s3.region) = $event), 12915 dir: "ltr", 12916 placeholder: "auto" 12917 }, null, 8, _hoisted_13), [[_vModelText, form.s3.region]])]), 12918 _createElementVNode("label", null, [_cache[6] || (_cache[6] = _createTextVNode("Bucket")), _withDirectives(_createElementVNode("input", { 12919 "onUpdate:modelValue": $event => ((form.s3.bucket) = $event), 12920 dir: "ltr", 12921 placeholder: "smtsudan" 12922 }, null, 8, _hoisted_14), [[_vModelText, form.s3.bucket]])]), 12923 _createElementVNode("label", null, [_cache[7] || (_cache[7] = _
12923createTextVNode("Prefix")), _withDirectives(_createElementVNode("input", { 12924 "onUpdate:modelValue": $event => ((form.s3.prefix) = $event), 12925 dir: "ltr", 12926 placeholder: "gzc" 12927 }, null, 8, _hoisted_15), [[_vModelText, form.s3.prefix]])]) 12928 ]), 12929 _createElementVNode("div", _hoisted_16, [_createElementVNode("label", null, [_cache[8] || (_cache[8] = _createTextVNode("Access Key ID")), _withDirectives(_createElementVNode("input", { 12930 type: "password", 12931 "onUpdate:modelValue": $event => ((r2Keys.access_key_id) = $event), 12932 dir: "ltr", 12933 autocomplete: "new-password", 12934 spellcheck: "false", 12935 placeholder: "32 ØØ±Ùا٠â Ù ÙØªØ§Ø Ø§ÙØ¯Ø®ÙÙ ÙÙÙØ³ Account ID" 12936 }, null, 8, _hoisted_17), [[_vModelText, r2Keys.access_key_id]])]), _createElementVNode("label", null, [_cache[9] || (_cache[9] = _createTextVNode("Secret Access Key")), _withDirectives(_createElementVNode("input", { 12937 type: "password", 12938 "onUpdate:modelValue": $event => ((r2Keys.secret_access_key) = $event), 12939 dir: "ltr", 12940 autocomplete: "new-password", 12941 spellcheck: "false", 12942 placeholder: "64 ØØ±ÙØ§Ù â Ø§ÙÙ ÙØªØ§Ø Ø§ÙØ³Ø±Ù" 12943 }, null, 8, _hoisted_18), [[_vModelText, r2Keys.secret_access_key]])])]), 12944 _createElementVNode("button", { 12945 type: "button", 12946 class: "smallbtn", 12947 disabled: savingKeys, 12948 onClick: saveKeys 12949 }, _toDisplayString(savingKeys?'جار٠ØÙظ اÙÙ ÙØ§ØªÙØâ¦':'ØÙظ / Ø§Ø³ØªØ¨Ø¯Ø§Ù Ù ÙØ§ØªÙØ R2'), 9, _hoisted_19), 12950 _cache[12] || (_cache[12] = _createElementVNode("p", { class: "hint" }, "اØÙظ اÙÙ ÙØªØ§ØÙ٠أÙÙØ§ÙØ Ø«Ù Ø¥Ø¹Ø¯Ø§Ø¯Ø§Øª Ø§ÙØØ§ÙÙØ© ÙØ§ÙØªÙØ¹ÙÙ. Ø§ÙØÙÙ٠اÙÙØ§Ø±ØºØ© ÙØ§ ØªØØ°Ù اÙÙ ÙØ§ØªÙØ Ø§ÙÙ ØÙÙØ¸Ø©. ÙØ§ ÙØ¹Ùد عرض اÙÙ ÙØ§ØªÙØ Ø¨Ø¹Ø¯ Ø§ÙØÙØ¸. استخد٠Object Read & Write ÙÙØØ§ÙÙØ© اÙÙ Ø·ÙÙØ¨Ø©.", -1)), 12951 _createElementVNode("div", _hoisted_20, [_cache[10] || (_cache[10] = _createTextVNode("اÙÙØ³Ø® اÙÙ Ø·ÙÙØ¨Ø©")), _createElementVNode("div", _hoisted_21, [_createElementVNode("button", { 12952 type: "button", 12953 class: _normalizeClass(["smallbtn", {secondary:!tierOn('s3','daily')}]), 12954 onClick: $event => (toggleTier('s3','daily')) 12955 }, "ÙÙÙ Ù", 10, _hoisted_22), _createElementVNode("button", { 12956 type: "button", 12957 class: _normalizeClass(["smallbtn", {secondary:!tierOn('s3','weekly')}]), 12958 onClick: $event => (toggleTier('s3','weekly')) 12959 }, "Ø£Ø³Ø¨ÙØ¹Ù", 10, _hoisted_23), _createElementVNode("button", { 12960 type: "button", 12961 class: _normalizeClass(["smallbtn", {secondary:!tierOn('s3','monthly')}]), 12962 onClick: $event => (toggleTier('s3','monthly')) 12963 }, "Ø´ÙØ±Ù", 10, _hoisted_24)])]), 12964 _createElementVNode("p", _hoisted_25, "Ø¨ÙØ§Ùات Ø§ÙØ¯Ø®ÙÙ: " + _toDisplayString(overview.s3&&overview.s3.credentials&&overview.s3.credentials.ready?'Ù Ø¶Ø§ÙØ© عÙÙ Ø§ÙØ®Ø§Ø¯Ù ':'ØºÙØ± Ù Ø¶Ø§ÙØ© عÙÙ Ø§ÙØ®Ø§Ø¯Ù ') + ". ÙØ§ ÙØªÙ عرض اÙÙ ÙØ§ØªÙØ ÙÙØ§.", 1), 12965 _createElementVNode("p", _hoisted_26, _toDisplayString(lastLabel(overview.s3)), 1) 12966 ]), 12967 _createElementVNode("section", _hoisted_27, [ 12968 _createElementVNode("div", _hoisted_28, [_cache[13] || (_cache[13] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø³ÙØ±Ùر Backup Ù ÙÙØµÙ"), _createElementVNode("h3", null, "ÙØ³Ø® عبر SSH")], -1)), _createElementVNode("span", _hoisted_29, _toDisplayString(stateLabel(overview.ssh)), 1)]), 12969 _createElementVNode("label", _hoisted_30, [_withDirectives(_createElementVNode("input", { 12970 type: "checkbox", 12971 "onUpdate:modelValue": $event => ((form.ssh.enabled) = $event) 12972 }, null, 8, _hoisted_31), [[_vModelCheckbox, form.ssh.enabled]]), _cache[14] || (_cache[14] = _createTextVNode(" ØªÙØ¹Ù٠اÙÙØ³Ø® Ø¥ÙÙ Ø§ÙØ³ÙØ±ÙØ± اÙÙ ÙÙØµÙ"))]), 12973 _createElementVNode("div", _hoisted_32, [ 12974 _createElementVNode("label", null, [_cache[15] || (_cache[15] = _createTextVNode("Host")), _withDirectives(_createElementVNode("input", { 12975 "onUpdate:modelValue": $event => ((form.ssh.host) = $event), 12976 dir: "ltr", 12977 placeholder: "backup.example.com" 12978 }, null, 8, _hoisted_33), [[_vModelText, form.ssh.host]])]), 12979 _createElementVNode("label", null, [_cache[16] || (_cache[16] = _createTextVNode("Port")), _withDirectives(_createElementVNode("input", { 12980 type: "number", 12981 min: "1", 12982 max: "65535", 12983 "onUpdate:modelValue": $event => ((form.ssh.port) = $event) 12984 }, null, 8, _hoisted_34), [[ 12985 _vModelText, 12986 form.ssh.port, 12987 void 0, 12988 { number: true } 12989 ]])]), 12990 _createElementVNode("label", null, [_cache[17] || (_cache[17] = _createTextVNode("User")), _withDirectives(_createElementVNode("input", { 12991 "onUpdate:modelValue": $event => ((form.ssh.user) = $event), 12992 dir: "ltr", 12993 placeholder: "backup" 12994 }, null, 8, _hoisted_35), [[_vModelText, form.ssh.user]])]), 12995 _createElementVNode("label", null, [_cache[18] || (_cache[18] = _createTextVNode("Path")), _withDirectives(_createElementVNode("input", { 12996 "onUpdate:modelValue": $event => ((form.ssh.base_path) = $event), 12997 dir: "ltr", 12998 placeholder: "/var/backups/gzc" 12999 }, null, 8, _hoisted_36), [[_vModelText, form.ssh.base_path]])]) 13000 ]), 13001 _createElementVNode("div", _hoisted_37, [_cache[19] || (_cache[19] = _createTextVNode("اÙÙØ³Ø® اÙÙ Ø·ÙÙØ¨Ø©")), _createElementVNode("div", _hoisted_38, [_createElementVNode("button", { 13002 type: "button", 13003 class: _normalizeClass(["smallbtn", {secondary:!tierOn('ssh','daily')}]), 13004 onClick: $event => (toggleTier('ssh','daily')) 13005 }, "ÙÙÙ Ù", 10, _hoisted_39), _createElementVNode("button", { 13006 type: "button", 13007 class: _normalizeClass(["smallbtn", {secondary:!tierOn('ssh','weekly')}]), 13008 onClick: $event => (toggleTier('ssh','weekly')) 13009 }, "Ø£Ø³Ø¨ÙØ¹Ù", 10, _hoisted_40), _createElementVNode("button", { 13010 type: "button", 13011 class: _normalizeClass(["smallbtn", {secondary:!tierOn('ssh','monthly')}]), 13012 onClick: $event => (toggleTier('ssh','monthly')) 13013 }, "Ø´ÙØ±Ù", 10, _hoisted_41)])]), 13014 _createElementVNode("p", _hoisted_42, "Ù ÙØªØ§Ø SSH Ùknown_hosts: " + _toDisplayString(overview.ssh&&overview.ssh.credentials&&overview.ssh.credentials.ready?'Ù Ø¶Ø§ÙØ§Ù عÙÙ Ø§ÙØ®Ø§Ø¯Ù ':'ØºÙØ± Ù ÙØªÙ ÙÙ٠عÙÙ Ø§ÙØ®Ø§Ø¯Ù ') + ".", 1), 13015 _createElementVNode("p", _hoisted_43, _toDisplayString(lastLabel(overview.ssh)), 1) 13016 ]), 13017 _createElementVNode("button", { 13018 class: "btn loadMore", 13019 disabled: store.state.busy, 13020 onClick: save 13021 }, "ØÙظ إعدادات اÙÙØ³Ø® Ø§ÙØ®Ø§Ø±Ø¬ÙØ©", 8, _hoisted_44) 13022 ]), 13023 _: 1 13024 })) 13025 } 13026} 13027})() 13028 }; 13029 13030 const AdminReleasePage={ 13031 components:{AdminFrame}, 13032 setup(){const store=useGzcStore();const router=useRouter();const r=computed(()=>store.state.releaseInfo&&store.state.releaseInfo.release||{});const h=computed(()=>store.state.releaseInfo&&store.state.releaseInfo.health||{});async function load(){if(await store.requireAdmin(router)) await store.loadReleaseInfo(router);}onMounted(load);return{store,r,h,load,shortDate,healthLabel};}, 13033 render:(function(){ 13034const _Vue = Vue
13035const { createElementVNode: _createElementVNode } = _Vue 13036 13037const _hoisted_1 = { class: "card dashboardHeaderCard" } 13038const _hoisted_2 = ["onClick"] 13039const _hoisted_3 = { class: "healthGrid" } 13040const _hoisted_4 = { class: "card healthCard ok" } 13041const _hoisted_5 = { class: "card healthCard ok" } 13042const _hoisted_6 = { class: "card healthCard ok" } 13043const _hoisted_7 = { class: "card healthCard" } 13044const _hoisted_8 = { class: "card healthCard" } 13045const _hoisted_9 = { class: "card healthCard" } 13046const _hoisted_10 = { class: "card healthCard" } 13047const _hoisted_11 = { class: "card" } 13048 13049return function render(_ctx, _cache) { 13050 with (_ctx) { 13051 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 13052 13053 const _component_AdminFrame = _resolveComponent("AdminFrame") 13054 13055 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù Ø±ÙØ² Ø§ÙØ¥ØµØ¯Ø§Ø±Ø§Øª" }, { 13056 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "Ù Ø±ÙØ² Ø§ÙØ¥ØµØ¯Ø§Ø±"), _createElementVNode("p", { class: "hint" }, "ÙØ¹Ø±Ø¶ رÙ٠اÙÙØ³Ø®Ø© ÙØ§ÙتخزÙ٠اÙÙ ØÙÙ ÙÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ¢Ø®Ø± ÙØ³Ø®Ø© Ø§ØØªÙØ§Ø·ÙØ© ÙØ¢Ø®Ø± ع٠ÙÙØ© ØªØ«Ø¨ÙØª Ù Ø³Ø¬ÙØ©.")], -1)), _createElementVNode("button", { 13057 class: "smallbtn", 13058 onClick: load 13059 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), _createElementVNode("section", _hoisted_3, [ 13060 _createElementVNode("div", _hoisted_4, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "اÙÙØ³Ø®Ø© Ø§ÙØØ§ÙÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(r.current_version||'-'), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, null, -1))]), 13061 _createElementVNode("div", _hoisted_5, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "ÙØ³Ø®Ø© Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(r.cache_version||'-'), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, null, -1))]), 13062 _createElementVNode("div", _hoisted_6, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "ÙØ³Ø®Ø© تطبÙ٠اÙÙØ§ØªÙ", -1)), _createElementVNode("b", null, _toDisplayString(r.pwa_version||'-'), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, null, -1))]), 13063 _createElementVNode("div", { class: _normalizeClass(["card healthCard", h.overall]) }, [_cache[7] || (_cache[7] = _createElementVNode("span", null, "ØØ§ÙØ© اÙÙØ¸Ø§Ù ", -1)), _createElementVNode("b", null, _toDisplayString(healthLabel(h.overall)), 1), _createElementVNode("small", null, _toDisplayString(shortDate(h.checked_at)), 1)], 2), 13064 _createElementVNode("div", _hoisted_7, [_cache[8] || (_cache[8] = _createElementVNode("span", null, "ÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª", -1)), _createElementVNode("b", null, _toDisplayString(r.database_version||'-'), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, null, -1))]), 13065 _createElementVNode("div", _hoisted_8, [_cache[10] || (_cache[10] = _createElementVNode("span", null, "ØªØ§Ø±ÙØ® Ø§ÙØªØ«Ø¨Ùت", -1)), _createElementVNode("b", null, _toDisplayString(shortDate(r.install_date)), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, null, -1))]), 13066 _createElementVNode("div", _hoisted_9, [_cache[12] || (_cache[12] = _createElementVNode("span", null, "آخر ÙØ³Ø®Ø© Ø§ØØªÙØ§Ø·ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(r.last_backup&&r.last_backup.status || '-'), 1), _createElementVNode("small", null, _toDisplayString(shortDate(r.last_backup&&r.last_backup.created_at)), 1)]), 13067 _createElementVNode("div", _hoisted_10, [_cache[13] || (_cache[13] = _createElementVNode("span", null, "آخر ØªØØ¯ÙØ« ÙÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª", -1)), _createElementVNode("b", null, _toDisplayString(r.last_migration&&r.last_migration.action || '-'), 1), _createElementVNode("small", null, _toDisplayString(shortDate(r.last_migration&&r.last_migration.created_at)), 1)]) 13068 ]), _createElementVNode("section", _hoisted_11, [_cache[14] || (_cache[14] = _createElementVNode("h3", null, "Ù ÙØ§ØØ¸Ø§Øª Ø§ÙØ¥ØµØ¯Ø§Ø±", -1)), _createElementVNode("p", null, _toDisplayString(r.release_notes), 1)])]), 13069 _: 1 13070 })) 13071 } 13072} 13073})() 13074 }; 13075 13076 const AdminAuditPage={ 13077 components:{AdminFrame}, 13078 setup(){ 13079 const store=useGzcStore();const router=useRouter();const openLogs=reactive({}); 13080 const f=reactive({search:'',actor_type:'',entity_type:'',action:'',limit:100}); 13081 async function load(){if(await store.requireAdmin(router)) await store.loadAuditLogs(f,router);} 13082 function toggleLog(id){openLogs[id]=!openLogs[id];} 13083 const auditStats=computed(()=>({total:safeArray(store.state.auditLogs).length,actions:safeArray(store.state.auditCounts).length,admins:safeArray(store.state.auditLogs).filter(x=>x.actor_type==='admin').length,members:safeArray(store.state.auditLogs).filter(x=>x.actor_type==='member').length})); 13084 onMounted(load); 13085 return {store,f,openLogs,auditStats,toggleLog,load,shortDate}; 13086 }, 13087 render:(function(){ 13088const _Vue = Vue
13089const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 13090 13091const _hoisted_1 = { class: "miniStats auditStats" } 13092const _hoisted_2 = { 13093 class: "card collapseSection formCard", 13094 open: "" 13095} 13096const _hoisted_3 = { class: "collapseBody" } 13097const _hoisted_4 = { class: "editGrid" } 13098const _hoisted_5 = ["onUpdate:modelValue", "onKeyup"] 13099const _hoisted_6 = ["onUpdate:modelValue"] 13100const _hoisted_7 = ["onUpdate:modelValue"] 13101const _hoisted_8 = ["onUpdate:modelValue"] 13102const _hoisted_9 = ["onUpdate:modelValue"] 13103const _hoisted_10 = ["onClick"] 13104const _hoisted_11 = { class: "card collapseSection" } 13105const _hoisted_12 = { class: "collapseBody" } 13106const _hoisted_13 = { class: "auditChips" } 13107const _hoisted_14 = { class: "auditListCompact" } 13108const _hoisted_15 = { class: "memberCardTop compactToggleRow" } 13109const _hoisted_16 = { class: "notifTitleBox" } 13110const _hoisted_17 = { class: "toggleSide" } 13111const _hoisted_18 = { class: "statusPill" } 13112const _hoisted_19 = ["onClick"] 13113const _hoisted_20 = { class: "compactSummaryBar notifSummary" } 13114const _hoisted_21 = { 13115 key: 0, 13116 class: "collapsibleBody" 13117} 13118const _hoisted_22 = { class: "notifyMeta" } 13119const _hoisted_23 = { class: "auditPre" } 13120 13121return function render(_ctx, _cache) { 13122 with (_ctx) { 13123 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, vModelText: _vModelText, withKeys: _withKeys, withDirectives: _withDirectives, vModelSelect: _vModelSelect, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createTextVNode: _createTextVNode, createCommentVNode: _createCommentVNode, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 13124 13125 const _component_AdminFrame = _resolveComponent("AdminFrame") 13126 13127 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Audit Log" }, { 13128 default: _withCtx(() => [ 13129 _cache[8] || (_cache[8] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "Ø³Ø¬Ù Ø§ÙØ¹Ù ÙÙØ§Øª"), _createElementVNode("p", null, "عرض ٠ختصر ÙÙØ³Ø¬Ù ٠ع ÙØªØ Ø§ÙØªÙاصÙÙ Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©. Ù ÙÙ ÙÙØ£Ù Ø§Ù ÙØ§Ù٠تابعة.")], -1)), 13130 _createElementVNode("div", _hoisted_1, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(auditStats.total), 1), _cache[0] || (_cache[0] = _createElementVNode("small", null, "ÙØªØ§Ø¦Ø¬", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(auditStats.admins), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "إدارة", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(auditStats.members), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "أعضاء", -1))])]), 13131 _createElementVNode("details", _hoisted_2, [_cache[4] || (_cache[4] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø¨ØØ« ÙÙ Ø³Ø¬Ù Ø§ÙØ¹Ù ÙÙØ§Øª"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_3, [_createElementVNode("div", _hoisted_4, [ 13132 _withDirectives(_createElementVNode("input", { 13133 "onUpdate:modelValue": $event => ((f.search) = $event), 13134 onKeyup: _withKeys(load, ["enter"]), 13135 placeholder: "Ø¨ØØ«: Ø¹Ø¶ÙØ رÙÙ Ø Ø¥Ø¬Ø±Ø§Ø¡Ø IP" 13136 }, null, 40, _hoisted_5), [[_vModelText, f.search]]), 13137 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((f.actor_type) = $event) }, _cache[3] || (_cache[3] = [ 13138 _createElementVNode("option", { value: "" }, "Ù٠اÙÙ ÙÙØ°ÙÙ", -1), 13139 _createElementVNode("option", { value: "admin" }, "Admin", -1), 13140 _createElementVNode("option", { value: "member" }, "Member", -1), 13141 _createElementVNode("option", { value: "anonymous" }, "Anonymous", -1), 13142 _createElementVNode("option", { value: "system" }, "System", -1) 13143 ]), 8, _hoisted_6), [[_vModelSelect, f.actor_type]]), 13144 _withDirectives(_createElementVNode("input", { 13145 "onUpdate:modelValue": $event => ((f.entity_type) = $event), 13146 placeholder: "ÙÙØ¹ اÙÙÙØ§Ù: member / case" 13147 }, null, 8, _hoisted_7), [[_vModelText, f.entity_type]]), 13148 _withDirectives(_createElementVNode("input", { 13149 "onUpdate:modelValue": $event => ((f.action) = $event), 13150 placeholder: "action" 13151 }, null, 8, _hoisted_8), [[_vModelText, f.action]]), 13152 _withDirectives(_createElementVNode("input", { 13153 type: "number", 13154 min: "1", 13155 max: "300", 13156 "onUpdate:modelValue": $event => ((f.limit) = $event), 13157 placeholder: "limit" 13158 }, null, 8, _hoisted_9), [[_vModelText, f.limit]]) 13159 ]), _createElementVNode("button", { 13160 class: "btn loadMore", 13161 onClick: load 13162 }, "Ø¨ØØ«", 8, _hoisted_10)])]), 13163 _createElementVNode("details", _hoisted_11, [_cache[5] || (_cache[5] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø£ÙØ«Ø± Ø§ÙØ¥Ø¬Ø±Ø§Ø¡Ø§Øª Ø®ÙØ§Ù 7 Ø£ÙØ§Ù "), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_12, [_createElementVNode("div", _hoisted_13, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.auditCounts, (c) => { 13164 return (_openBlock(), _createElementBlock("span", { key: c.action }, [_createElementVNode("b", null, _toDisplayString(c.n), 1), _createTextVNode(" " + _toDisplayString(c.action), 1)])) 13165 }), 128))])])]), 13166 _createElementVNode("div", _hoisted_14, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.auditLogs, (l) => { 13167 return (_openBlock(), _createElementBlock("div", { 13168 class: _normalizeClass(["card auditCard collapsibleCard auditCardCompact", {open:openLogs[l.id]}]), 13169 key: l.id 13170 }
13170, [_createElementVNode("div", _hoisted_15, [_createElementVNode("div", _hoisted_16, [_createElementVNode("h3", null, _toDisplayString(l.action), 1), _createElementVNode("small", null, _toDisplayString(shortDate(l.created_at)) + " â " + _toDisplayString(l.actor_name || '-'), 1)]), _createElementVNode("div", _hoisted_17, [_createElementVNode("span", _hoisted_18, _toDisplayString(l.actor_type), 1), _createElementVNode("button", { 13171 class: "smallbtn secondary", 13172 onClick: $event => (toggleLog(l.id)) 13173 }, _toDisplayString(openLogs[l.id]?'â Ø¥Ø®Ùاء':'+ Ø¥Ø¸ÙØ§Ø±'), 9, _hoisted_19)])]), _createElementVNode("div", _hoisted_20, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(l.entity_type || '-'), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "اÙÙÙØ§Ù", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(l.entity_id || '-'), 1), _cache[7] || (_cache[7] = _createElementVNode("small", null, "ID", -1))])]), (openLogs[l.id]) 13174 ? (_openBlock(), _createElementBlock("div", _hoisted_21, [_createElementVNode("div", _hoisted_22, [ 13175 _createElementVNode("span", null, _toDisplayString(l.actor_name || '-'), 1), 13176 _createElementVNode("span", null, _toDisplayString(l.entity_type) + ":" + _toDisplayString(l.entity_id), 1), 13177 _createElementVNode("span", null, _toDisplayString(shortDate(l.created_at)), 1), 13178 _createElementVNode("span", null, _toDisplayString(l.ip || '-'), 1) 13179 ]), _createElementVNode("pre", _hoisted_23, _toDisplayString(JSON.stringify(l.new_value || {}, null, 2)), 1)])) 13180 : _createCommentVNode("", true)], 2)) 13181 }), 128))]) 13182 ]), 13183 _: 1, 13184 __: [8] 13185 })) 13186 } 13187} 13188})() 13189 }; 13190 13191 const AdminWhatsappPage={ 13192 components:{AdminFrame}, 13193 setup(){ 13194 const store=useGzcStore();const router=useRouter();const route=useRoute();const queueStatus=ref('all');const testPhone=ref('');const cleanDays=ref(30); 13195 const technicalMode=computed(()=>route.path==='/admin/whatsapp-settings'); 13196 const pageTitle=computed(()=>technicalMode.value?'إعدادات ÙØ§ØªØ³Ø§Ø¨ Ø§ÙØªÙÙÙØ©':'ÙØ§ØªØ³Ø§Ø¨ ÙØ§ÙرسائÙ'); 13197 const tpl=reactive({otp:'',invite:'',profileComplete:'',memberApproved:'',event:'',arrival:'',help:'',emergency:'',announcement:'',officialAnnouncement:'',adminInvite:'',operations:''}); 13198 const wa=reactive({enabled:true,apiKey:'',sourceNumber:'',appName:'',publicUrl:'',apiKeyMasked:''});const notificationPolicy=reactive({enabled:true,domains:{},events:{}});const notificationTest=reactive({eventKey:'procurement.offer_published',audience:'member',phone:''}); 13199 const health=computed(()=>store.state.whatsappHealth||{}); 13200 const queue=computed(()=>store.state.whatsappQueue||{jobs:[],counts:[],audit:[],worker:{}}); 13201 const queueTabs=[{key:'all',label:'اÙÙÙ'},{key:'queued',label:'Ø§ÙØªØ¸Ø§Ø±'},{key:'failed',label:'إعادة ٠جدÙÙØ©'},{key:'dead',label:'٠راجعة'},{key:'sent',label:'Ù Ø±Ø³ÙØ©'},{key:'cancelled',label:'Ù ÙØºØ§Ø©'}]; 13202 const templateKeys=['otp','invite','profileComplete','memberApproved','event','arrival','help','emergency','announcement','officialAnnouncement','adminInvite','operations']; 13203 function templateLabel(k){return ({otp:'ر٠ز Ø§ÙØªØÙÙ / Ø§ÙØ¯Ø®ÙÙ',invite:'Ø¯Ø¹ÙØ© Ø§ÙØªØ³Ø¬ÙÙ',profileComplete:'Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª',memberApproved:'اعت٠اد Ø§ÙØ¹Ø¶Ù',event:'ÙØ¹Ø§ÙÙØ© Ø¬Ø¯ÙØ¯Ø©',arrival:'ÙØµÙÙ Ø¬Ø¯ÙØ¯',help:'Ø·ÙØ¨ ٠ساعدة',emergency:'Ø·ÙØ§Ø±Ø¦',announcement:'Ø¥Ø¹ÙØ§Ùات اÙÙ ÙØµØ©',officialAnnouncement:'تع٠Ù٠ات Ø§ÙØ³Ùارة ÙØ§ÙÙÙØµÙÙØ©',adminInvite:'Ø¯Ø¹ÙØ© اÙ٠شرÙÙÙ',operations:'إشعار تشغÙÙ٠عا٠(Ø§ÙØªÙØ±ÙØ¯ ÙØ§ÙØ·ÙØ¨Ø§Øª)'}[k])||k;} 13204 function issueLabel(x){return ({whatsapp_disabled:'ÙØ§ØªØ³Ø§Ø¨ ØºÙØ± Ù ÙØ¹Ù',api_key_missing:'API Key ØºÙØ± Ù ÙØ¬Ùد',source_number_missing:'Source Number ÙØ§Ùص',app_name_missing:'App Name ÙØ§Ùص',required_templates_missing:'ÙÙØ§Ùب تشغÙÙÙØ© Ø¥ÙØ²Ø§Ù ÙØ© ÙØ§Ùصة',queue_retry_scheduled:'ØªÙØ¬Ø¯ رسائ٠٠جدÙÙØ© ÙØ¥Ø¹Ø§Ø¯Ø© اÙÙ ØØ§ÙÙØ©',queue_dead_letter:'ØªÙØ¬Ø¯ Ø±Ø³Ø§Ø¦Ù ØªØØªØ§Ø¬ ٠راجعة ÙØ¯ÙÙØ©',queue_delivery_unknown:'ØªÙØ¬Ø¯ Ø±Ø³Ø§Ø¦Ù ØØ§ÙØ© تسÙÙÙ ÙØ§ ØºÙØ± ٠عرÙÙØ©',queue_stale_processing:'ØªÙØ¬Ø¯ رسائ٠عاÙÙØ© ÙÙØ¯ Ø§ÙØ¥Ø±Ø³Ø§Ù'}[x])||x;} 13205 const templateRows=computed(()=>templateKeys.map(k=>
13205({key:k,label:templateLabel(k),required:!['adminInvite','operations'].includes(k),ok:Object.prototype.hasOwnProperty.call(health.value.templateStatus||{},k)?!!health.value.templateStatus[k]:!!String(tpl[k]||'').trim()}))); 13206 const issues=computed(()=>safeArray(health.value.issues).map(issueLabel)); 13207 const queueMap=computed(()=>{const out={all:0,queued:0,processing:0,sent:0,failed:0,dead:0,cancelled:0};safeArray(queue.value.counts).forEach(c=>{out[c.status]=Number(c.n||0);out.all+=Number(c.n||0)});return out;}); 13208 const recentLogs=computed(()=>safeArray(health.value.recentLogs).slice(0,8)); 13209 const queueJobs=computed(()=>safeArray(queue.value.jobs).slice(0,80)); 13210 const worker=computed(()=>queue.value.worker||health.value.worker||{}); 13211 const notificationState=computed(()=>store.state.whatsappNotificationPolicy||{policy:{},catalog:{domains:[],events:[]}}); 13212 const notificationEvents=computed(()=>safeArray(notificationState.value.catalog&¬ificationState.value.catalog.events)); 13213 const notificationDomains=computed(()=>safeArray(notificationState.value.catalog&¬ificationState.value.catalog.domains).map(d=>({ ...d,events:notificationEvents.value.filter(e=>e.domain===d.key) }))); 13214 const selectedNotificationEvent=computed(()=>notificationEvents.value.find(e=>e.key===notificationTest.eventKey)||notificationEvents.value[0]||null); 13215 const selectedNotificationAudiences=computed(()=>safeArray(selectedNotificationEvent.value&&selectedNotificationEvent.value.audiences)); 13216 async function load(){if(await store.requireAdmin(router)){await Promise.all([store.loadWhatsappHealth(router),store.loadWhatsappQueue(queueStatus.value,router),store.loadWhatsappSettings(router),store.loadWhatsappNotificationPolicy(router)]);syncForms();}} 13217 function syncForms(){const s=store.state.whatsappSettings||{};Object.assign(tpl,s.templates||{});Object.assign(wa,s.whatsapp||{});wa.apiKey='';const p=(store.state.whatsappNotificationPolicy&&store.state.whatsappNotificationPolicy.policy)||{};notificationPolicy.enabled=p.enabled!==false;notificationPolicy.domains=JSON.parse(JSON.stringify(p.domains||{}));notificationPolicy.events=JSON.parse(JSON.stringify(p.events||{}));if(!notificationEvents.value.some(e=>e.key===notificationTest.eventKey)&¬ificationEvents.value.length)notificationTest.eventKey=notificationEvents.value[0].key;if(!selectedNotificationAudiences.value.includes(notificationTest.audience))notificationTest.audience=selectedNotificationAudiences.value[0]||'member';} 13218 onMounted(load);watch(queueStatus,()=>store.loadWhatsappQueue(queueStatus.value,router));watch(()=>notificationTest.eventKey,()=>{const allowed=selectedNotificationAudiences.value;if(!allowed.includes(notificationTest.audience))notificationTest.audience=allowed[0]||'member';}); 13219 async function saveTemplates(){const r=await runBusyAction(store,'whatsapp.save-templates',()=>api('/api/admin/settings/templates',{method:'POST',body:JSON.stringify(tpl)}));store.state.msg=r.message||r.error||'';await load();} 13220 async function saveWhatsapp(){const payload={enabled:!!wa.enabled,sourceNumber:wa.sourceNumber||'',appName:wa.appName||'',publicUrl:wa.publicUrl||'',apiKey:wa.apiKey||''};const r=await runBusyAction(store,'whatsapp.save-settings',()=>api('/api/admin/settings/whatsapp',{method:'POST',body:JSON.stringify(payload)}));store.state.msg=r.message||r.error||'';await load();} 13221 async function saveNotificationPolicy(){const payload={enabled:!!notificationPolicy.enabled,domains:notificationPolicy.domains||{},events:notificationPolicy.events||{}};const r=await runBusyAction(store,'whatsapp.save-notification-policy',()=>api('/api/admin/settings/whatsapp-notifications',{method:'POST',body:JSON.stringify(payload)}));store.state.msg=r.message||r.error||'';await load();} 13222 async function sendNotificationTest(){if(!notificationTest.eventKey)return;const r=await runBusyAction(store,'whatsapp.notification-test',()=>api('/api/admin/settings/whatsapp-notifications/test',{method:'POST',body:JSON.stringify({event_key:notificationTest.eventKe
13222y,audience:notificationTest.audience,phone:norm(notificationTest.phone)})}));store.state.msg=r.message||r.error||'';await load();} 13223 function eventPolicy(key){if(!notificationPolicy.events[key])notificationPolicy.events[key]={enabled:true,audiences:{}};return notificationPolicy.events[key];} 13224 function domainPolicy(key){if(!notificationPolicy.domains[key])notificationPolicy.domains[key]={enabled:true};return notificationPolicy.domains[key];} 13225 async function sendTest(){const r=await runBusyAction(store,'whatsapp.test',()=>api('/api/admin/settings/whatsapp/test',{method:'POST',body:JSON.stringify({phone:norm(testPhone.value)})}));store.state.msg=r.message||r.error||'';await load();} 13226 async function processQueue(){const r=await runBusyAction(store,'whatsapp.process-queue',()=>api('/api/admin/whatsapp-queue/process',{method:'POST'}));store.state.msg=r.message||r.error||('ت٠ت اÙÙ Ø¹Ø§ÙØ¬Ø©');await load();} 13227 async function retryJob(j){let confirmed=false;if(j.failure_class==='delivery_unknown'){confirmed=confirm('ØØ§ÙØ© Ø§ÙØªØ³ÙÙÙ ØºÙØ± ٠عرÙÙØ©. ÙØ¯ ÙÙÙ٠اÙ٠ستÙ٠استÙÙ Ø§ÙØ±Ø³Ø§ÙØ© ÙØ¹ÙØ§ÙØ ÙÙ ØªØ¤ÙØ¯ إعادة إرساÙÙØ§Ø');if(!confirmed)return;}const r=await runBusyAction(store,'whatsapp.retry-job',()=>api('/api/admin/whatsapp-queue/'+encodeURIComponent(j.id)+'/retry',{method:'POST',body:JSON.stringify({confirm_delivery_unknown:confirmed})}));store.state.msg=r.message||r.error||'';await store.loadWhatsappQueue(queueStatus.value,router);} 13228 async function cancelJob(j){const r=await runBusyAction(store,'whatsapp.cancel-job',()=>api('/api/admin/whatsapp-queue/'+encodeURIComponent(j.id)+'/cancel',{method:'POST'}));store.state.msg=r.message||r.error||'';await store.loadWhatsappQueue(queueStatus.value,router);} 13229 async function cleanup(){if(!confirm('ØªÙØ¸ÙÙ Ø±Ø³Ø§Ø¦Ù ÙØ§ØªØ³Ø§Ø¨ اÙÙØ¯ÙÙ Ø©Ø'))return;const r=await runBusyAction(store,'whatsapp.cleanup',()=>api('/api/admin/whatsapp-queue/cleanup',{method:'POST',body:JSON.stringify({days:cleanDays.value})}));store.state.msg=r.message||r.error||'';await load();} 13230 return {store,health,queue,queueJobs,queueMap,queueStatus,queueTabs,testPhone,cleanDays,tpl,wa,templateRows,issues,recentLogs,worker,technicalMode,pageTitle,notificationPolicy,notificationTest,notificationDomains,notificationEvents,selectedNotificationEvent,selectedNotificationAudiences,eventPolicy,domainPolicy,load,saveTemplates,saveWhatsapp,saveNotificationPolicy,sendNotificationTest,sendTest,processQueue,retryJob,cancelJob,cleanup,queueStatusName,queueFailureName,shortDate}; 13231 }, 13232 render:(function(){ 13233const _Vue = Vue 13234const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 13235 13236const _hoisted_1 = { class: "card waHero" } 13237const _hoisted_2 = { class: "vueBadge" } 13238const _hoisted_3 = ["onClick"] 13239const _hoisted_4 = { class: "waHealthGrid" } 13240const _hoisted_5 = { class: "card waHealthTile" } 13241const _hoisted_6 = { dir: "ltr" } 13242const _hoisted_7 = { class: "card waHealthTile" } 13243const _hoisted_8 = { class: "card waHealthTile" } 13244const _hoisted_9 = { class: "card waHealthTile" } 13245const _hoisted_10 = { 13246 key: 0, 13247 class: "card waIssueCard" 13248} 13249const _hoisted_11 = { class: "issueChips" } 13250const _hoisted_12 = { 13251 key: 1, 13252 class: "card collapseSection waConfigCard", 13253 open: "" 13254} 13255const _hoisted_13 = { class: "collapseBody" } 13256const _hoisted_14 = { class: "waSwitchRow" } 13257const _hoisted_15 = { class: "check" } 13258const _hoisted_16 = ["onUpdate:modelValue"] 13259const _hoisted_17 = { class: "apiMask" } 13260const _hoisted_18 = { class: "editGrid waFormGrid" } 13261const _hoisted_19 = ["onUpdate:modelValue"] 13262const _hoisted_20 = ["onUpdate:modelValue"] 13263const _hoisted_21 = ["onUpdate:modelValue"] 13264const _hoisted_22 = ["onUpdate:modelValue"] 13265const _hoisted_23 = ["onClick"] 13266const _hoisted_24 = { 13267 key: 2, 13268 class: "card collapseSection waPolicyCard", 13269 open: "" 13270} 13271const _hoisted_25 = { class: "collapseBody" } 13272const _hoisted_26 = { class: "waPolicyMaster" } 13273const _hoisted_27 = { class: "check" } 13274const _hoisted_28 = ["onUpdate:modelValue"] 13275const _hoisted_29 = { class: "waPolicyDomainHead" } 13276const _hoisted_30 = { class: "switchMini" } 13277const _hoisted_31 = ["onUpdate:modelValue"] 13278const _hoisted_32 = { class: "waPolicyEventTitle" } 13279const _hoisted_33 = { class: "check" } 13280const _hoisted_34 = ["onUpdate:modelValue"] 13281const _hoisted_35 = { dir: "ltr" } 13282const _hoisted_36 = { class: "waAudienceSwitches" } 13283const _hoisted_37 = { 13284 key: 0, 13285 class: "check" 13286} 13287const _hoisted_38 = ["onUpdate:modelValue"] 13288const _hoisted_39 = { 13289 key: 1, 13290 class: "check" 13291} 13292const _hoisted_40 = ["onUpdate:modelValue"] 13293const _hoisted_41 = ["onClick"] 13294const _hoisted_42 = { class: "waPolicyTest" } 13295const _hoisted_43 = { class: "editGrid" } 13296const _hoisted_44 = ["onUpdate:modelValue"] 13297const _hoisted_45 = ["value"] 13298const _hoisted_46 = ["onUpdate:modelValue"] 13299const _hoisted_47 = ["value"] 13300const _hoisted_48 = ["onUpdate:modelValue"] 13301const _hoisted_49 = ["onClick"] 13302const _hoisted_50 = { 13303 id: "wa-templates", 13304 class: "card collapseSection waTemplatesCard", 13305 open: "" 13306} 13307const _hoisted_51 = { class: "statusPill" } 13308const _hoisted_52 = { class: "collapseBody" } 13309const _hoisted_53 = { class: "templateRows" } 13310const _hoisted_54 = ["onUpdate:modelValue", "placeholder"] 13311const _hoisted_55 = ["onClick"] 13312const _hoisted_56 = { 13313 key: 3, 13314 class: "card collapseSection waTestCard" 13315} 13316const _hoisted_57 = { class: "collapseBody" } 13317const _hoisted_58 = { class: "editGrid" } 13318const _hoisted_59 = ["onUpdate:modelValue"] 13319const _hoisted_60 = ["onClick"] 13320const _hoisted_61 = { 13321 key: 4, 13322 class: "card collapseSection waQueueCard", 13323 open: "" 13324} 13325const _hoisted_62 = ["onClick"] 13326const _hoisted_63 = { class: "collapseBody" } 13327const _hoisted_64 = { class: "segmented queueSegmentPro" } 13328const _hoisted_65 = ["onClick"] 13329const _hoisted_66 = { class: "queueOps" } 13330const _hoisted_67 = ["onClick"] 13331const _hoisted_68 = ["onClick"] 13332const _hoisted_69 = ["onUpdate:modelValue"] 13333const _hoisted_70 = { 13334 key: 0, 13335 class: "queueCounts" 13336} 13337const _hoisted_71 = { 13338 key: 1, 13339 class: "hint" 13340} 13341const _hoisted_72 = { class: "memberCardTop" } 13342const _hoisted_73 = { class: "notifyMeta" } 13343const _hoisted_74 = { dir: "ltr" } 13344const _hoisted_75 = { key: 0 } 13345const _hoisted_76 = { key: 1 } 13346const _hoisted_77 = { key: 2 } 13347const _hoisted_78 = { 13348 key: 3, 13349 dir: "ltr" 13350} 13351const _hoisted_79 = { 13352 key: 0, 13353 class: "hint errorText" 13354} 13355const _hoisted_80 = { class: "memberActions" } 13356const _hoisted_81 = ["onClick"] 13357const _hoisted_82 = ["onClick"] 13358const _hoisted_83 = { 13359 key: 6, 13360 class: "card adminTechnicalPanel" 13361} 13362const _hoisted_84 = { class: "row" } 13363const _hoisted_85 = ["onClick"] 13364const _hoisted_86 = ["onClick"] 13365const _hoisted_87 = ["onUpdate:modelValue"] 13366const _hoisted_88 = { 13367 key: 0, 13368 class: "queueCounts" 13369} 13370const _hoisted_89 = { 13371 key: 7, 13372 class: "card collapseSection waRecentCard" 13373} 13374const _hoisted_90 = { class: "collapseBody" } 13375const _hoisted_91 = { key: 0 } 13376const _hoisted_92 = { key: 1 } 13377 13378return function render(_ctx, _cache) { 13379 with (_ctx) { 13380 const { toDisplayString: _toDisplayString, createElementVNode: _
13380createElementVNode, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, vModelCheckbox: _vModelCheckbox, withDirectives: _withDirectives, createTextVNode: _createTextVNode, vModelText: _vModelText, vModelSelect: _vModelSelect, withModifiers: _withModifiers, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 13381 13382 const _component_AdminFrame = _resolveComponent("AdminFrame") 13383 13384 return (_openBlock(), _createBlock(_component_AdminFrame, { title: pageTitle }, { 13385 default: _withCtx(() => [ 13386 _createElementVNode("div", _hoisted_1, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_2, _toDisplayString(technicalMode?'تشغÙ٠تÙÙÙ':'Ø§ÙØ§ØªØµØ§Ùات'), 1), _createElementVNode("h3", null, _toDisplayString(technicalMode?'إعدادات ÙØ§ØªØ³Ø§Ø¨ ÙØ§ÙØµÙØ§ÙØ©':'ÙØ§Ø¦Ù Ø© ÙØ§ØªØ³Ø§Ø¨ ÙØ§ÙÙÙØ§Ùب'), 1), _createElementVNode("p", null, _toDisplayString(technicalMode?'إعداد اÙÙ Ø²ÙØ¯Ø اختبار Ø§ÙØ§ØªØµØ§Ù ÙØµÙØ§ÙØ© Ø¹Ø§Ù Ù Ø§ÙØ¥Ø±Ø³Ø§Ù ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§ ÙÙØ·.':'راجع Ø§ÙØ±Ø³Ø§Ø¦Ù اÙÙ ÙØªØ¸Ø±Ø© أ٠اÙÙØ§Ø´ÙØ© ÙØ§ÙÙÙØ§Ùب Ø§ÙØªØ´ØºÙÙÙØ© Ù Ù Ù ÙØ§Ù ÙØ§ØØ¯.'), 1)]), _createElementVNode("button", { 13387 class: "smallbtn", 13388 onClick: load 13389 }, "ØªØØ¯ÙØ«", 8, _hoisted_3)]), 13390 _cache[23] || (_cache[23] = _createElementVNode("a", { 13391 class: "smallbtn secondary", 13392 href: "#wa-templates" 13393 }, "إعدادات ÙÙØ§Ùب ÙØ§ØªØ³Ø§Ø¨", -1)), 13394 _createElementVNode("div", _hoisted_4, [ 13395 _createElementVNode("div", { class: _normalizeClass(["card waStatusMain", health.status]) }, [_cache[0] || (_cache[0] = _createElementVNode("span", null, "Ø§ÙØØ§ÙØ© Ø§ÙØ¹Ø§Ù Ø©", -1)), _createElementVNode("b", null, _toDisplayString(health.status==='ok'?'سÙÙÙ ':'ÙØØªØ§Ø¬ ضبط'), 1), _createElementVNode("small", null, _toDisplayString(health.enabled?'ÙØ§ØªØ³Ø§Ø¨ Ù ÙØ¹Ù':'ÙØ§ØªØ³Ø§Ø¨ ØºÙØ± Ù ÙØ¹Ù'), 1)], 2), 13396 _createElementVNode("div", _hoisted_5, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "اÙÙÙØ§Ùب", -1)), _createElementVNode("b", _hoisted_6, _toDisplayString(health.templatesConfigured || 0) + " / " + _toDisplayString(health.templatesTotal || 0), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "اÙÙ ÙØªÙ ÙØ©", -1))]), 13397 _createElementVNode("div", _hoisted_7, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "ÙØ§Ø¦Ù Ø© Ø§ÙØ¥Ø±Ø³Ø§Ù", -1)), _createElementVNode("b", null, _toDisplayString(queueMap.all || 0), 1), _createElementVNode("small", null, "Ø§ÙØªØ¸Ø§Ø± " + _toDisplayString(queueMap.queued || 0) + " â Ø¥Ø¹Ø§Ø¯Ø© " + _toDisplayString(queueMap.failed || 0) + " â ٠راجعة " + _toDisplayString(queueMap.dead || 0), 1)]), 13398 _createElementVNode("div", _hoisted_8, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "Ù ÙØ¹ Ø§ÙØªÙرار", -1)), _createElementVNode("b", null, _toDisplayString((health.operations&&health.operations.dedupe_protected) || 0), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "رسائ٠٠ØÙ ÙØ© Ø¨Ù ÙØªØ§Ø ÙÙÙ Ù", -1))]), 13399 _createElementVNode("div", _hoisted_9, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "Ø§ÙØ¹Ø§Ù Ù", -1)), _createElementVNode("b", null, _toDisplayString(worker.running?'ÙØ¹Ù Ù':'Ø¬Ø§ÙØ²'), 1), _createElementVNode("small", null, "Batch " + _toDisplayString(worker.batch || '-') + " â Timeout " + _toDisplayString(Math.round((worker.provider_timeout_ms||0)/1000)||'-') + "s", 1)]) 13400 ]), 13401 (issues.length) 13402 ? (_openBlock(), _createElementBlock("div", _hoisted_10, [_cache[7] || (_cache[7] = _createElementVNode("h3", null, "ØªÙØ¨ÙÙØ§Øª ØªØØªØ§Ø¬ ضبط", -1)), _createElementVNode("div", _hoisted_11, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(issues, (x) => { 13403 return (_openBlock(), _createElementBlock("span", { key: x }, _toDisplayString(x), 1)) 13404 }), 128))])])) 13405 : _createCommentVNode("", true), 13406 technicalMode 13407 ? (_openBlock(), _createElementBlock("details", _hoisted_12, [_cache[9] || (_cache[9] = _createElementVNode("summary", null, [_createElementVNode("b", null, "إعدادات Ù Ø²ÙØ¯ ÙØ§ØªØ³Ø§Ø¨"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_13, [_createElementVNode("div", _hoisted_14, [_createElementVNode("label", _hoisted_15, [_withDirectives(_createElementVNode("input", { 13408 type: "checkbox", 13409 "onUpdate:modelValue": $event => ((wa.enabled) = $event), 13410 disabled: "" 13411 }, null, 8, _hoisted_16), [[_vModelCheckbox, wa.enabled]]), _cache[8] || (_cache[8] = _createTextVNode(" Ù Ø²ÙØ¯ ÙØ§ØªØ³Ø§Ø¨ ÙOTP (Ø¥ÙØ²Ø§Ù Ù)"))]), _createElementVNode("span", _hoisted_17, "API: " + _toDisplayString(wa.apiKeyMasked || (health.apiKeyPresent?'Ù ØÙÙØ¸':'ØºÙØ± Ù ØÙÙØ¸')), 1
13411)]), _createElementVNode("div", _hoisted_18, [ 13412 _withDirectives(_createElementVNode("input", { 13413 class: "ltr", 13414 "onUpdate:modelValue": $event => ((wa.sourceNumber) = $event), 13415 placeholder: "Source Number" 13416 }, null, 8, _hoisted_19), [[_vModelText, wa.sourceNumber]]), 13417 _withDirectives(_createElementVNode("input", { 13418 class: "ltr", 13419 "onUpdate:modelValue": $event => ((wa.appName) = $event), 13420 placeholder: "App Name" 13421 }, null, 8, _hoisted_20), [[_vModelText, wa.appName]]), 13422 _withDirectives(_createElementVNode("input", { 13423 class: "ltr", 13424 "onUpdate:modelValue": $event => ((wa.publicUrl) = $event), 13425 placeholder: "Public URL" 13426 }, null, 8, _hoisted_21), [[_vModelText, wa.publicUrl]]), 13427 _withDirectives(_createElementVNode("input", { 13428 class: "ltr", 13429 "onUpdate:modelValue": $event => ((wa.apiKey) = $event), 13430 placeholder: "API Key Ø¬Ø¯ÙØ¯ ÙÙØ·Ø اترÙÙ ÙØ§Ø±ØºØ§Ù ÙÙØ¥Ø¨Ùاء عÙ٠اÙÙØ¯ÙÙ " 13431 }, null, 8, _hoisted_22), [[_vModelText, wa.apiKey]]) 13432 ]), _createElementVNode("button", { 13433 class: "btn loadMore", 13434 onClick: saveWhatsapp 13435 }, "ØÙظ إعدادات ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_23)])])) 13436 : _createCommentVNode("", true), 13437 (!technicalMode) 13438 ? (_openBlock(), _createElementBlock("details", _hoisted_24, [_createElementVNode("summary", null, [_cache[10] || (_cache[10] = _createElementVNode("b", null, "Ù Ø±ÙØ² Ø§ÙØªØÙÙ Ù٠إشعارات ÙØ§ØªØ³Ø§Ø¨", -1)), _createElementVNode("span", { class: _normalizeClass(["statusPill", notificationPolicy.enabled?'sent':'cancelled']) }, _toDisplayString(notificationPolicy.enabled?'تشغÙÙ':'٠تÙÙÙ'), 3)]), _createElementVNode("div", _hoisted_25, [ 13439 _createElementVNode("div", _hoisted_26, [_createElementVNode("label", _hoisted_27, [_withDirectives(_createElementVNode("input", { 13440 type: "checkbox", 13441 "onUpdate:modelValue": $event => ((notificationPolicy.enabled) = $event) 13442 }, null, 8, _hoisted_28), [[_vModelCheckbox, notificationPolicy.enabled]]), _cache[11] || (_cache[11] = _createTextVNode(" تشغÙÙ Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª Ø§ÙØªØ´ØºÙÙÙØ© ÙÙÙ ÙØµØ©"))]), _cache[12] || (_cache[12] = _createElementVNode("small", null, "OTP ٠ستÙÙ ÙÙØ§ ÙØªØ£Ø«Ø± Ø¨ÙØ°Ø§ اÙÙ ÙØªØ§Ø.", -1))]), 13443 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(notificationDomains, (d) => { 13444 return (_openBlock(), _createElementBlock("div", { 13445 class: "waPolicyDomain", 13446 key: d.key 13447 }, [_createElementVNode("div", _hoisted_29, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(d.label), 1), _createElementVNode("small", null, _toDisplayString(d.events.length) + " إشعارات", 1)]), _createElementVNode("label", _hoisted_30, [_withDirectives(_createElementVNode("input", { 13448 type: "checkbox", 13449 "onUpdate:modelValue": $event => ((domainPolicy(d.key).enabled) = $event) 13450 }, null, 8, _hoisted_31), [[_vModelCheckbox, domainPolicy(d.key).enabled]]), _createElementVNode("span", null, _toDisplayString(domainPolicy(d.key).enabled?'ON':'OFF'), 1)])]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(d.events, (e) => { 13451 return (_openBlock(), _createElementBlock("div", { 13452 class: _normalizeClass(["waPolicyEvent", {muted:!notificationPolicy.enabled||!domainPolicy(d.key).enabled||!eventPolicy(e.key).enabled}]), 13453 key: e.key 13454 }, [_createElementVNode("div", _hoisted_32, [_createElementVNode("label", _hoisted_33, [_withDirectives(_createElementVNode("input", { 13455 type: "checkbox", 13456 "onUpdate:modelValue": $event => ((eventPolicy(e.key).enabled) = $event) 13457 }, null, 8, _hoisted_34), [[_vModelCheckbox, eventPolicy(e.key).enabled]]), _cache[13] || (_cache[13] = _createTextVNode()), _createElementVNode("b", null, _toDisplayString(e.label), 1)]), _createElementVNode("small", _hoisted_35, _toDisplayString(e.key), 1)]), _createElementVNode("div", _hoisted_36, [(e.audiences.includes('member')) 13458 ? (_openBlock(), _createElementBlock("label", _hoisted_37, [_withDirectives(_createElementVNode("input", { 13459 type: "checkbox", 13460 "onUpdate:modelValue": $event => ((eventPolicy(e.key).audiences.member) = $event) 13461 }, null, 8, _hoisted_38), [[_vModelCheckbox, eventPolicy(e.key).audiences.member]]), _cache[14] || (_cache[14] = _createTextVNode(" ÙÙØ¹Ø¶Ù"))])) 13462 : _createCommentVNode("", true), (e.audiences.includes('admin')) 13463 ? (_openBlock(), _createElementBlock("label", _hoisted_39, [_withDirectives(_createElementVNode("input", { 13464 type: "checkbox", 13465 "onUpdate:modelValue": $event => ((eventPolicy(e.key).audiences.admin) = $event) 13466 }, null, 8, _hoisted_40), [[_vModelCheckbox, eventPolicy(e.key).audiences.admin]]), _cache[15] || (_cache[15] = _createTextVNode(" ÙÙØ¥Ø¯Ø§Ø±Ø©"))])) 13467 : _createCommentVNode("", true)])], 2)) 13468 }), 128))])) 13469 }), 128)), 13470 _createElementVNode("button", { 13471 class: "btn loadMore", 13472 onClick: saveNotificationPolicy 13473 }, "ØÙظ Ø³ÙØ§Ø³Ø© Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª", 8, _hoisted_41), 13474 _createElementVNode("div", _hoisted_42, [_cache[16] || (_cache[16] = _createElementVNode("h4", null, "اختبار ØØ¯Ø«", -1)), _createElementVNode("div", _hoisted_43, [ 13475 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event =>
13475 ((notificationTest.eventKey) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(notificationEvents, (e) => { 13476 return (_openBlock(), _createElementBlock("option", { 13477 key: e.key, 13478 value: e.key 13479 }, _toDisplayString(e.label), 9, _hoisted_45)) 13480 }), 128))], 8, _hoisted_44), [[_vModelSelect, notificationTest.eventKey]]), 13481 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((notificationTest.audience) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(selectedNotificationAudiences, (a) => { 13482 return (_openBlock(), _createElementBlock("option", { 13483 key: a, 13484 value: a 13485 }, _toDisplayString(a==='member'?'عضÙ':'إدارة'), 9, _hoisted_47)) 13486 }), 128))], 8, _hoisted_46), [[_vModelSelect, notificationTest.audience]]), 13487 _withDirectives(_createElementVNode("input", { 13488 class: "ltr", 13489 "onUpdate:modelValue": $event => ((notificationTest.phone) = $event), 13490 placeholder: "رÙÙ Ø§ÙØ§Ø®ØªØ¨Ø§Ø±" 13491 }, null, 8, _hoisted_48), [[_vModelText, notificationTest.phone]]), 13492 _createElementVNode("button", { 13493 class: "btn secondary", 13494 onClick: sendNotificationTest 13495 }, "Ø¥Ø¶Ø§ÙØ© Ø±Ø³Ø§ÙØ© اختبار ÙÙÙØ§Ø¦Ù Ø©", 8, _hoisted_49) 13496 ])]) 13497 ])])) 13498 : _createCommentVNode("", true), 13499 _createElementVNode("details", _hoisted_50, [_createElementVNode("summary", null, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "إعدادات اÙÙÙØ§Ùب â Template IDs", -1)), _createElementVNode("span", _hoisted_51, _toDisplayString(health.templatesConfigured || 0) + "/" + _toDisplayString(health.templatesTotal || 0), 1)]), _createElementVNode("div", _hoisted_52, [_createElementVNode("div", _hoisted_53, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(templateRows, (r) => { 13500 return (_openBlock(), _createElementBlock("label", { 13501 key: r.key, 13502 class: _normalizeClass(["templateRow", {ready:r.ok}]) 13503 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(r.label), 1), _createElementVNode("small", null, _toDisplayString(r.required?'Ø¥ÙØ²Ø§Ù Ù':'Ø§Ø®ØªÙØ§Ø±Ù') + " â " + _toDisplayString(r.ok?'Ù ÙØªÙ Ù':'ÙØ§Ùص'), 1)]), _withDirectives(_createElementVNode("input", { 13504 class: "ltr", 13505 "onUpdate:modelValue": $event => ((tpl[r.key]) = $event), 13506 placeholder: r.key 13507 }, null, 8, _hoisted_54), [[_vModelText, tpl[r.key]]])], 2)) 13508 }), 128))]), _createElementVNode("button", { 13509 class: "btn loadMore", 13510 onClick: saveTemplates 13511 }, "ØÙظ اÙÙÙØ§Ùب", 8, _hoisted_55)])]), 13512 technicalMode 13513 ? (_openBlock(), _createElementBlock("details", _hoisted_56, [_cache[18] || (_cache[18] = _createElementVNode("summary", null, [_createElementVNode("b", null, "اختبار ÙØ§ØªØ³Ø§Ø¨"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_57, [_createElementVNode("div", _hoisted_58, [_withDirectives(_createElementVNode("input", { 13514 class: "ltr", 13515 "onUpdate:modelValue": $event => ((testPhone) = $event), 13516 placeholder: "رÙÙ Ø§ÙØ§Ø®ØªØ¨Ø§Ø± ٠ثا٠8613660699600" 13517 }, null, 8, _hoisted_59), [[_vModelText, testPhone]]), _createElementVNode("button", { 13518 class: "btn secondary", 13519 onClick: sendTest 13520 }, "إرسا٠ر٠ز تØÙÙ ØªØ¬Ø±ÙØ¨Ù", 8, _hoisted_60)])])])) 13521 : _createCommentVNode("", true), 13522 (!technicalMode) 13523 ? (_openBlock(), _createElementBlock("details", _hoisted_61, [_createElementVNode("summary", null, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "ÙØ§Ø¦Ù Ø© Ø§ÙØ¥Ø±Ø³Ø§Ù", -1)), _createElementVNode("button", { 13524 class: "smallbtn", 13525 onClick: _withModifiers($event => (store.loadWhatsappQueue(queueStatus,$router)), ["stop"]) 13526 }, "ØªØØ¯ÙØ«", 8, _hoisted_62)]), _createElementVNode("div", _hoisted_63, [ 13527 _createElementVNode("div", _hoisted_64, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(queueTabs, (s) => { 13528 return (_openBlock(), _createElementBlock("button", { 13529 key: s.key, 13530 class: _normalizeClass({active:queueStatus===s.key}), 13531 onClick: $event => (queueStatus=s.key) 13532 }, [_createElementVNode("b", null, _toDisplayString(s.label), 1), _createElementVNode("small", null, _toDisplayString(queueMap[s.key] || 0), 1)], 10, _hoisted_65)) 13533 }), 128))]), 13534 _createElementVNode("div", _hoisted_66, [_createElementVNode("button", { 13535 class: "btn secondary", 13536 onClick: processQueue 13537 }, "تشغÙÙ Ø§ÙØ¹Ø§Ù Ù Ø§ÙØ¢Ù", 8, _hoisted_67), _createElementVNode("button", { 13538 class: "btn dangerBtn", 13539 onClick: cleanup 13540 }, "ØªÙØ¸ÙÙ Ø£ÙØ¯Ù Ù Ù " + _toDisplayString(cleanDays) + " ÙÙÙ ", 9, _hoisted_68), _withDirectives(_createElementVNode("input", { 13541 type: "number", 13542 min: "7", 13543 max: "365", 13544 "onUpdate:modelValue": $event => ((cleanDays) = $event) 13545 }, null, 8, _hoisted_69), [[_vModelText, cleanDays]])]), 13546 (queue.counts&&queue.counts.length) 13547 ? (_openBlock(), _createElementBlock("div", _hoisted_70, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(queue.counts, (c) => { 13548 return (_openBlock(), _createElementBlock("span", { key: c.status }, [_createElementVNode("b", null, _toDisplayString(c.n), 1), _createTextVNode(" " + _toDisplayString(queueStatusName(c.status)), 1)])) 13549 }), 128))])) 13550 : _createCommentVNode("", true), 13551 (!queueJobs.length) 13552 ? (_openBlock(), _createElementBlock("p", _hoisted_71, "ÙØ§ ØªÙØ¬Ø¯ رسائ٠ÙÙ ÙØ°Ø§ اÙÙÙØªØ±.")) 13553 : _createCommentVNode("", true) 13554 ])])) 13555 : _createCommentVNode("", true), 13556 (!technicalMode) 13557 ? (_openBlock(true), _createElementBlock(_Fragment, { key: 5 }, _renderList(queueJobs, (j) => { 13558 return (_openBlock(), _createElementBlock("div", { 13559 class: "card queueJobPro", 13560 key: j.id 13561 }, [ 13562 _createElementVNode("div", _hoisted_72, [_createElementVNode("h3", null, _toDisplayString(j.template_name || 'template'), 1), _createElementVNode("span", { class: _normalizeClass(["statusPill", j.status]) }, _toDisplayString(queueStatusName(j.status)), 3)]), 13563 _createElementVNode("div", _hoisted_73, [ 13564 _createElementVNode("span", _hoisted_74, _toDisplayString(j.phone), 1), 13565 _createElementVNode("span", null, "Ù ØØ§ÙÙØ§Øª " + _toDisplayString(j.attempts) + "/" + _toDisplayString(j.max_attempts), 1), 13566 _createElementVNode("span", null, "Ø¥ÙØ´Ø§Ø¡ " + _toDisplayString(shortDate(j.created_at)), 1), 13567 (j.last_attempt_at) 13568 ? (_openBlock(), _createElementBlock("span", _hoisted_75, "آخر Ù ØØ§ÙÙØ© " + _toDisplayString(shortDate(j.last_attempt_at)), 1)) 13569 : _createCommentVNode("", true), 13570 (j.status==='failed'&&j.next_attempt_at) 13571 ? (_openBlock(), _createElementBlock("span", _hoisted_76, "Ø§ÙØªØ§ÙÙ " + _toDisplayString(shortDate(j.next_attempt_at)), 1)) 13572 : _createCommentVNode("", true), 13573 (j.failure_class) 13574 ? (_openBlock(), _createElementBlock("span", _hoisted_77, _toDisplayString(queueFailureName(j.failure_class)), 1)) 13575 : _createCommentVNode("", true), 13576 (j.provider_message_id) 13577 ? (_openBlock(), _createElementBlock("span", _hoisted_78, "Provider: " + _toDisplayString(j.provider_message_id), 1)) 13578 : _createCommentVNode("", true) 13579 ]), 13580 (j.last_error) 13581 ? (_openBlock(), _createElementBlock("p", _hoisted_79, _toDisplayString(j.last_error), 1)) 13582 : _createCommentVNode("", true), 13583 _createElementVNode("div", _hoisted_80, [(['failed','dead','cancelled'].includes(j.status)) 13584 ? (_openBlock(), _createElementBlock("button", { 13585 key: 0, 13586 class: "smallbtn", 13587 onClick: $event => (retryJob(j)) 13588 }, "إعادة ÙÙØ¥Ø±Ø³Ø§Ù", 8, _hoisted_81)) 13589 : _createCommentVNode("", true), (['queued','failed'].includes(j.status)) 13590 ? (_openBlock(), _createElementBlock("button", { 13591 key: 1, 13592 class: "smallbtn danger", 13593 onClick: $event => (cancelJob(j)) 13594 }, "Ø¥ÙØºØ§Ø¡", 8, _hoisted_82)) 13595 : _createCommentVNode("", true)]) 13596 ])) 13597 }), 128)) 13598 : _createCommentVNode("", true), 13599 technicalMode 13600 ? (_openBlock(), _createElementBlock("section", _hoisted_83, [ 13601 _cache[20] || (_cache[20] = _createElementVNode("h3", null, "ØµÙØ§ÙØ© Ø¹Ø§Ù Ù Ø§ÙØ¥Ø±Ø³Ø§Ù", -1)), 13602 _cache[21] || (_cache[21] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ù Ø§ÙØ¥Ø¬Ø±Ø§Ø¡Ø§Øª تشغÙÙÙØ© تÙÙÙØ© ÙÙØ§ ØªØ¸ÙØ± ÙÙ ØµÙØ¯ÙÙ Ø§ÙØ±Ø³Ø§Ø¦Ù اÙÙÙÙ Ù.", -1)), 13603 _createElementVNode("div", _hoisted_84, [_createElementVNode("button", { 13604 class: "btn secondary", 13605 onClick: processQueue 13606 }, "تشغÙÙ Ø§ÙØ¹Ø§Ù Ù Ø§ÙØ¢Ù", 8, _hoisted_85), _createElementVNode("button", { 13607 class: "btn dangerBtn", 13608 onClick: cleanup 13609 }, "ØªÙØ¸ÙÙ Ø§ÙØ³Ø¬Ùات اÙÙØ¯ÙÙ Ø©", 8, _hoisted_86), _withDirectives(_createElementVNode("input", { 13610 type: "number", 13611 min: "7", 13612 max: "365", 13613 "onUpdate:modelValue": $event => ((cleanDays) = $event), 13614 "aria-label": "عدد Ø§ÙØ£Ùا٠" 13615 }, null, 8, _hoisted_87), [[_vModelText, cleanDays]])]), 13616 (queue.counts&&queue.counts.length) 13617 ? (_openBlock(), _createElementBlock("div", _hoisted_88, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(queue.counts, (c) => { 13618 return (_openBlock(), _createElementBlock("span", { key: c.status }, [_createElementVNode("b", null, _toDisplayString(c.n), 1), _createTextVNode(" " + _toDisplayString(queueStatusName(c.status)), 1)])) 13619 }), 128))])) 13620 : _createCommentVNode("", true) 13621 ])) 13622 : _createCommentVNode("", true), 13623 (recentLogs.length) 13624 ? (_openBlock(), _createElementBlock("details", _hoisted_89, [_cache[22] || (_cache[22] = _createElementVNode("summary", null, [_createElementVNode("b", null, "آخر Ø³Ø¬ÙØ§Øª Ø§ÙØ¥Ø±Ø³Ø§Ù"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_90, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(recentLogs, (l) => { 13625 return (_openBlock(), _createElementBlock("div", { 13626 class: "logMini", 13627 key: (l.queue_id||'direct')+'-'+l.template_name+'-'+l.created_at 13628 }, [ 13629 _createElementVNode("b", null, _toDisplayString(l.template_name || '-'), 1), 13630 _createElementVNode("span", null, [_createTextVNode(_toDisplayString(l.status), 1), (l.attempt_no) 13631 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" â Ù ØØ§ÙÙØ© " + _toDisplayString(l.attempt_no), 1)], 64)) 13632 : _createCommentVNode("", true)]), 13633 _createElementVNode("small", null, _toDisplayString(shortDate(l.sent_at || l.created_at)), 1), 13634 (l.failure_class) 13635 ? (_openBlock(), _createElementBlock("em", _hoisted_91, _toDisplayString(queueFailureName(l.failure_class)), 1)) 13636 : _createCommentVNode("", true), 13637 (l.error_message) 13638 ? (_openBlock(), _createElementBlock("em", _hoisted_92, _toDisplayString(l.error_message), 1)) 13639 : _createCommentVNode("", true) 13640 ])) 13641 }), 128))])])) 13642 : _createCommentVNode("", true) 13643 ]), 13644 _: 1, 13645 __: [23] 13646 }, 8, ["title"])) 13647 } 13648} 13649})() 13650 }; 13651 13652 13653 13654 const AdminWorkflowPage={ 13655 components:{AdminFrame}, 13656 setup(){ 13657 const store=useGzcStore();const router=useRouter(); 13658 const workflows=computed(()=>safeArray(store.state.workflowHealth.workflows)); 13659 const missing=computed(()=>workflows.value.filter(w=>w.required&&!w.template_id_present)); 13660 const okCount=computed(()=>workflows.value.filter(w=>w.ok).length); 13661 async function load(){if(await store.requireAdmin(router))await store.loadWorkflowHealth(router);} 13662 onMounted(load); 13663 return {store,workflows,missing,okCount,load,shortDate,queueStatusName}; 13664 }, 13665 render:(function(){ 13666const _Vue = Vue
13667const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 13668 13669const _hoisted_1 = { class: "card waHero" } 13670const _hoisted_2 = ["onClick"] 13671const _hoisted_3 = { class: "waHealthGrid" } 13672const _hoisted_4 = { class: "card waHealthTile" } 13673const _hoisted_5 = { 13674 key: 0, 13675 class: "card waIssueCard" 13676} 13677const _hoisted_6 = { class: "issueChips" } 13678const _hoisted_7 = { class: "memberCardTop" } 13679const _hoisted_8 = { class: "notifyMeta" } 13680const _hoisted_9 = { class: "hint" } 13681const _hoisted_10 = { class: "hint ltr" } 13682const _hoisted_11 = { class: "collapseSection" } 13683const _hoisted_12 = { class: "collapseBody" } 13684const _hoisted_13 = { 13685 key: 0, 13686 class: "hint" 13687} 13688const _hoisted_14 = { class: "collapseSection" } 13689const _hoisted_15 = { class: "collapseBody" } 13690const _hoisted_16 = { 13691 key: 0, 13692 class: "hint" 13693} 13694 13695return function render(_ctx, _cache) { 13696 with (_ctx) { 13697 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 13698 13699 const _component_AdminFrame = _resolveComponent("AdminFrame") 13700 13701 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Workflow & WhatsApp" }, { 13702 default: _withCtx(() => [ 13703 _createElementVNode("div", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "Ø®Ø±ÙØ·Ø© Ø§ÙØ¥Ø¬Ø±Ø§Ø¡Ø§Øª اÙ٠رتبطة Ø¨ÙØ§ØªØ³Ø§Ø¨"), _createElementVNode("p", null, "تعرض ÙØ°Ù Ø§ÙØµÙØØ© ارتباط Ù٠إجراء Ø¨ÙØ§Ùب Ø§ÙØ±Ø³Ø§ÙØ© اÙÙ ÙØ§Ø³Ø¨Ø ÙØªÙØ¶Ø ØªÙÙØ± اÙÙØ§Ùب ÙÙØ¬Ùد Ø³Ø¬ÙØ§Øª Ø¥Ø±Ø³Ø§Ù ØØ¯Ùثة.")], -1)), _createElementVNode("button", { 13704 class: "smallbtn", 13705 onClick: load 13706 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), 13707 _cache[9] || (_cache[9] = _createElementVNode("a", { 13708 class: "smallbtn secondary", 13709 href: "#wa-templates" 13710 }, "إعدادات ÙÙØ§Ùب ÙØ§ØªØ³Ø§Ø¨", -1)), 13711 _createElementVNode("div", _hoisted_3, [_createElementVNode("div", { class: _normalizeClass(["card waStatusMain", missing.length?'warn':'ok']) }, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "ØØ§ÙØ© Ø§ÙØ±Ø¨Ø·", -1)), _createElementVNode("b", null, _toDisplayString(okCount) + " / " + _toDisplayString(workflows.length), 1), _createElementVNode("small", null, _toDisplayString(missing.length?missing.length+' ÙÙØ§Ùب ÙØ§Ùصة':'ÙÙ Ø§ÙØ¥ÙØ²Ø§Ù Ù Ù Ø¶Ø¨ÙØ·'), 1)], 2), _createElementVNode("div", _hoisted_4, [_cache[2] || (_cache[2] = _createElementVNode("span", null, "ÙØ§ØªØ³Ø§Ø¨", -1)), _createElementVNode("b", null, _toDisplayString(store.state.workflowHealth.whatsapp&&store.state.workflowHealth.whatsapp.enabled?'Ù ÙØ¹Ù':'ØºÙØ± Ù ÙØ¹Ù'), 1), _createElementVNode("small", null, _toDisplayString(store.state.workflowHealth.whatsapp&&store.state.workflowHealth.whatsapp.app_name), 1)])]), 13712 (missing.length) 13713 ? (_openBlock(), _createElementBlock("div", _hoisted_5, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, "ÙØ§Ùص Template ID", -1)), _createElementVNode("div", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(missing, (w) => { 13714 return (_openBlock(), _createElementBlock("span", { key: w.key }, _toDisplayString(w.name) + " â " + _toDisplayString(w.template), 1)) 13715 }), 128))]), _cache[4] || (_cache[4] = _createElementVNode("p", { class: "hint" }, "Ø§Ø¯Ø®Ù ØµÙØØ© ÙØ§ØªØ³Ø§Ø¨ ÙØ£Ø¶Ù Template ID اÙÙØ§Ùص.", -1))])) 13716 : _createCommentVNode("", true), 13717 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(workflows, (w) => { 13718 return (_openBlock(), _createElementBlock("div", { 13719 class: "card queueJobPro", 13720 key: w.key 13721 }, [ 13722 _createElementVNode("div", _hoisted_7, [_createElementVNode("h3", null, _toDisplayString(w.name), 1), _createElementVNode("span", { class: _normalizeClass(["statusPill", w.ok?'sent':'failed']) }, _toDisplayString(w.ok?'Ù Ø¶Ø¨ÙØ·':'ÙØ§Ùص'), 3)]), 13723 _createElementVNode("div", _hoisted_8, [_createElementVNode("span", null, "Template: " + _toDisplayString(w.template), 1), _createElementVNode("span", null, _toDisplayString(w.required?'Ø¥ÙØ²Ø§Ù Ù':'Ø§Ø®ØªÙØ§Ø±Ù'), 1), _createElementVNode("span", null, _toDisplayString(w.queue?'Queue':'Direct'), 1)]), 13724 _createElementVNode("p", _hoisted_9, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "Ø§ÙØ¥Ø¬Ø±Ø§Ø¡:", -1)), _createTextVNode(" " + _toDisplayString(w.trigger), 1)]), 13725 _createElementVNode("p", _hoisted_10, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "اÙ٠سار:", -1)), _createTextVNode(" " + _toDisplayString(w.endpoint), 1)]), 13726 _createElementVNode("details", _hoisted_11, [_cache[7] || (_cache[7] = _
13726createElementVNode("summary", null, [_createElementVNode("b", null, "آخر Ø§ÙØ³Ø¬Ùات"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_12, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(w.recent_logs, (l) => { 13727 return (_openBlock(), _createElementBlock("div", { 13728 class: "logMini", 13729 key: l.template_name+l.status 13730 }, [_createElementVNode("b", null, _toDisplayString(l.template_name), 1), _createElementVNode("span", null, _toDisplayString(l.status), 1), _createElementVNode("small", null, _toDisplayString(l.n) + " â " + _toDisplayString(shortDate(l.last_sent_at||l.last_created_at)), 1)])) 13731 }), 128)), (!w.recent_logs.length) 13732 ? (_openBlock(), _createElementBlock("p", _hoisted_13, "ÙØ§ ØªÙØ¬Ø¯ Ø³Ø¬ÙØ§Øª ØØ¯Ùثة ÙÙØ°Ø§ Ø§ÙØ¥Ø¬Ø±Ø§Ø¡.")) 13733 : _createCommentVNode("", true)])]), 13734 _createElementVNode("details", _hoisted_14, [_cache[8] || (_cache[8] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Queue"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(w.queue, (q) => { 13735 return (_openBlock(), _createElementBlock("div", { 13736 class: "logMini", 13737 key: q.template_name+q.status 13738 }, [_createElementVNode("b", null, _toDisplayString(q.template_name), 1), _createElementVNode("span", null, _toDisplayString(queueStatusName(q.status)), 1), _createElementVNode("small", null, _toDisplayString(q.n) + " â " + _toDisplayString(shortDate(q.last_created_at)), 1)])) 13739 }), 128)), (!w.queue.length) 13740 ? (_openBlock(), _createElementBlock("p", _hoisted_16, "ÙØ§ ØªÙØ¬Ø¯ رسائ٠Queue ØØ¯Ùثة ÙÙØ°Ø§ Ø§ÙØ¥Ø¬Ø±Ø§Ø¡.")) 13741 : _createCommentVNode("", true)])]) 13742 ])) 13743 }), 128)) 13744 ]), 13745 _: 1, 13746 __: [9] 13747 })) 13748 } 13749} 13750})() 13751 }; 13752 13753 const AdminOfficialAccountsPage={ 13754 components:{AdminFrame}, 13755 setup(){ 13756 const store=useGzcStore();const router=useRouter();const denied=ref(false);const sources=ref([]);const countries=ref([]);const sourceForm=reactive({country_code:'SD',authority_type:'embassy',name_ar:'',name_en:'',china_city:'Beijing',official_url:'',allowed_host:'',source_language:'ar',fetch_method:'html',trust_status:'pending',discovery_enabled:false,check_interval:'inherit',is_priority:false}); 13757 function channelName(c){return ({embassy:'تع٠Ù٠ات Ø§ÙØ³Ùارة',consulate:'تع٠Ù٠ات اÙÙÙØµÙÙØ©',general:'Ø¥Ø¹ÙØ§Ùات عا٠ة'}[String(c||'')])||String(c||'-');} 13758 function accountTypeName(t){return ({embassy:'Ø³ÙØ§Ø±Ø©',consulate:'ÙÙØµÙÙØ©'}[String(t||'')])||String(t||'-');} 13759 async function load(){if(!(await store.requireAdmin(router)))return;store.state.busy=true;const [r,src,ct]=await Promise.all([store.loadOfficialAccounts(router),api('/api/admin/official-sources'),api('/api/admin/platform-countries')]);store.state.busy=false;if(r&&r.status===403){denied.value=true;store.state.officialAccounts=[];store.state.msg=r.message||'ÙØ°Ù Ø§ÙØµÙØØ© Ù ØªØ§ØØ© ÙÙØ· ÙÙ Ø¯ÙØ± تÙÙÙØ© اÙ٠عÙÙ٠ات';return;}denied.value=false;sources.value=safeArray(src.sources);countries.value=safeArray(ct.countries);} 13760 function cleanPhones(a){return safeArray(a._phones).map(norm).filter(Boolean).slice(0,3);} 13761 async function savePhones(a){const phones=cleanPhones(a);if(!phones.length){store.state.msg='أدخ٠رÙÙ ÙØ§ØØ¯ عÙÙ Ø§ÙØ£ÙÙ';return;}store.state.busy=true;const r=await api('/api/admin/official-accounts/'+encodeURIComponent(a.id)+'/phones',{method:'POST',body:JSON.stringify({phones})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 13762 async function saveStatus(a){store.state.busy=true;const r=await api('/api/admin/official-accounts/'+encodeURIComponent(a.id)+'/status',{method:'POST',body:JSON.stringify({status:a._status,can_publish:!!a._can_publish})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 13763 async function resetTour(a,p){if(!confirm('إعادة جÙÙØ© Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù ÙÙØ°Ø§ Ø§ÙØ±ÙÙ Ø Ø³ØªØ¸ÙØ± ÙÙ Ø¹ÙØ¯ Ø£Ù٠دخÙÙ ÙØ§Ø¯Ù .'))return;store.state.busy=true;const r=await api('/api/admin/official-accounts/'+encodeURIComponent(a.id)+'/phones/'+encodeURIComponent(p.id)+'/tour/reset',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 13764 // UI-002: سبب ØªØ¹Ø°ÙØ± ØªÙØ¹ÙÙ Ø§ÙØ§Ùتشا٠â ٠رآة ÙØØ§Ø±Ø³ Ø§ÙØ®Ø§Ø¯Ù ÙÙÙÙØ¯ ÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª 13765 function sourceBlockReason(s){ 13766 if(!s)return ''; 13767 if(String(s.status||'')!=='active')return 'اÙ٠صدر ØºÙØ± Ù ÙØ¹ÙÙ'; 13768 if(String(s.trust_status||'')!=='trusted')return 'Ø§ÙØ«ÙØ© ÙÙØ³Øª Â«Ù ÙØ«ÙÙ»'; 13769 const url=String(s.official_url||''); 13770 if(!/^https:\/\//.test(url))return 'Ø§ÙØ±Ø§Ø¨Ø· Ø§ÙØ±Ø³Ù Ù ÙØ¬Ø¨ Ø£Ù ÙØ¨Ø¯Ø£ بÙhttps'; 13771 const host=String(s.allowed_host||'').trim().toLowerCase().replace(/^www\./,''); 13772 if(host.length<4)return 'اÙÙØ·Ø§Ù اÙÙ Ø³Ù ÙØ ØºÙØ± Ù ØØ¯Ø¯'; 13773 let h='';try{h=new URL(url).hostname.toLowerCase().replace(/^www\./,'');}catch(e){return 'Ø§ÙØ±Ø§Ø¨Ø· Ø§ÙØ±Ø³Ù Ù ØºÙØ± ØµØ§ÙØ';} 13774 if(!(h===host||h.endsWith('.'+host)))return 'اÙÙØ·Ø§Ù ÙØ§ ÙØ·Ø§Ø¨Ù Ø§ÙØ±Ø§Ø¨Ø· Ø§ÙØ±Ø³Ù Ù'; 13775 return ''; 13776 } 13777 function sourceHealth(s){ 13778 if(!s)return ''; 13779 const parts=['Ø§ÙØ¬Ùب: '+(s.fetch_method||'ØºÙØ± Ù ØØ¯Ø¯')]; 13780 parts.push(s.last_success_at?('آخر ÙØØµ ÙØ§Ø¬Ø '+shortDate(s.last_success_at)):'ÙÙ ÙÙÙØØµ بعد'); 13781 if(Number(s.failure_count||0)>0)parts.push('Ø¥Ø®ÙØ§Ùات ٠تتاÙÙØ© '+s.failure_count); 13782 if(s.last_error_text)parts.push('آخر خطأ: '+String(s.last_error_text).slice(0,80)); 13783 return parts.join(' · '); 13784 } 13785 async function addSource(){store.state.busy=true;const r=await api('/api/admin/official-sources',{method:'POST',body:JSON.stringify(sourceForm)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){sourceForm.name_ar='';sourceForm.name_en='';sourceForm.official_url='';sourceForm.allowed_host='';sourceForm.fetch_method='html';sourceForm.trust_status='pending';sourceForm.discovery_enabled=false;await load();}} 13786 async function saveSource(src){store.state.busy=true;const r=await api('/api/admin/official-sources/'+encodeURIComponent(src.id),{method:'POST',body:JSON.stringify(src)});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 13787 const circ=reactive({rows:[],total:0,status:'pending_review',busy:false,msg:'',drafts:{}}); 13788 async function loadCirc(){const r=await api('/api/admin/official-circulars/candidates?status='+encodeURIComponent(circ.status),{feedback:false});if(r&&r.ok){circ.rows=safeArray(r.rows);circ.total=r.total||0;for(const x of circ.rows)if(!circ.drafts[x.id])circ.drafts[x.id]={title:x.ai_title_ar||x.source_title||'',summary:x.summary_ar||'',confirm:false,note:''};}} 13789 async function decideCirc(x,action){const d=circ.drafts[x.id]||{};circ.busy=true;circ.msg='';const body={action,note:d.note,title:d.title,summary:d.summary,confirm_checked_against_source:!!d.c
13789onfirm,include_deadline:!!x.deadline_at};const r=await api('/api/admin/official-circulars/candidates/'+x.id+'/decision',{method:'POST',body:JSON.stringify(body),feedback:false});circ.busy=false;circ.msg=(r&&r.message)||'تعذر Ø§ÙØªÙÙÙØ°.';if(r&&r.ok)await loadCirc();} 13790 watch(()=>circ.status,loadCirc); 13791 onMounted(loadCirc); 13792 onMounted(load); 13793 return {circ,decideCirc,store,denied,sources,countries,sourceForm,load,savePhones,saveStatus,resetTour,addSource,saveSource,sourceBlockReason,sourceHealth,channelName,accountTypeName,shortDate,norm,safeArray}; 13794 }, 13795 render:(function(){ 13796const _Vue = Vue 13797const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 13798 13799const _hoisted_1 = { 13800 key: 0, 13801 class: "card" 13802} 13803const _hoisted_2 = { 13804 key: 1, 13805 class: "card formCard" 13806} 13807const _hoisted_3 = { class: "editGrid" } 13808const _hoisted_4 = ["onUpdate:modelValue"] 13809const _hoisted_5 = ["value"] 13810const _hoisted_6 = ["onUpdate:modelValue"] 13811const _hoisted_7 = ["onUpdate:modelValue"] 13812const _hoisted_8 = { class: "check" } 13813const _hoisted_9 = ["onUpdate:modelValue"] 13814const _hoisted_10 = ["onUpdate:modelValue"] 13815const _hoisted_11 = ["onUpdate:modelValue"] 13816const _hoisted_12 = ["onUpdate:modelValue"] 13817const _hoisted_13 = ["value"] 13818const _hoisted_14 = ["onUpdate:modelValue"] 13819const _hoisted_15 = ["onUpdate:modelValue"] 13820const _hoisted_16 = ["onUpdate:modelValue"] 13821const _hoisted_17 = ["onUpdate:modelValue"] 13822const _hoisted_18 = ["onUpdate:modelValue"] 13823const _hoisted_19 = { class: "check" } 13824const _hoisted_20 = ["onUpdate:modelValue"] 13825const _hoisted_21 = ["onClick"] 13826const _hoisted_22 = { class: "hint" } 13827const _hoisted_23 = { 13828 key: 0, 13829 class: "hint" 13830} 13831const _hoisted_24 = ["onUpdate:modelValue"] 13832const _hoisted_25 = ["onUpdate:modelValue"] 13833const _hoisted_26 = { class: "check" } 13834const _hoisted_27 = ["onUpdate:modelValue"] 13835const _hoisted_28 = ["onUpdate:modelValue"] 13836const _hoisted_29 = { class: "check" } 13837const _hoisted_30 = ["onUpdate:modelValue"] 13838const _hoisted_31 = ["onClick"] 13839const _hoisted_32 = { 13840 key: 2, 13841 class: "card formCard circReview" 13842} 13843const _hoisted_33 = { class: "row" } 13844const _hoisted_34 = ["onClick"] 13845const _hoisted_35 = { 13846 key: 0, 13847 class: "hint" 13848} 13849const _hoisted_36 = { class: "aiGapHead" } 13850const _hoisted_37 = { 13851 key: 0, 13852 class: "statusPill" 13853} 13854const _hoisted_38 = { class: "hint ltr" } 13855const _hoisted_39 = ["href"] 13856const _hoisted_40 = { class: "hint" } 13857const _hoisted_41 = { key: 0 } 13858const _hoisted_42 = ["onUpdate:modelValue"] 13859const _hoisted_43 = ["onUpdate:modelValue"] 13860const _hoisted_44 = ["onUpdate:modelValue"] 13861const _hoisted_45 = { class: "check" } 13862const _hoisted_46 = ["onUpdate:modelValue"] 13863const _hoisted_47 = { class: "row" } 13864const _hoisted_48 = ["disabled", "onClick"] 13865const _hoisted_49 = ["disabled", "onClick"] 13866const _hoisted_50 = ["disabled", "onClick"] 13867const _hoisted_51 = { 13868 key: 1, 13869 class: "row" 13870} 13871const _hoisted_52 = ["onUpdate:modelValue"] 13872const _hoisted_53 = ["disabled", "onClick"] 13873const _hoisted_54 = ["disabled", "onClick"] 13874const _hoisted_55 = { 13875 class: "hint", 13876 role: "status", 13877 "aria-live": "polite" 13878} 13879const _hoisted_56 = { 13880 key: 3, 13881 class: "officialAdminGrid" 13882} 13883const _hoisted_57 = { class: "memberCardTop" } 13884const _hoisted_58 = { class: "hint ltr" } 13885const _hoisted_59 = { class: "statusPill" } 13886const _hoisted_60 = { class: "compactSummaryBar" } 13887const _hoisted_61 = { 13888 class: "collapseSection officialInlineSection", 13889 open: "" 13890} 13891const _hoisted_62 = { class: "collapseBody" } 13892const _hoisted_63 = { class: "editGrid" } 13893const _hoisted_64 = ["onUpdate:modelValue"] 13894const _hoisted_65 = ["onUpdate:modelValue"] 13895const _hoisted_66 = ["onUpdate:modelValue"] 13896const _hoisted_67 = ["onClick"] 13897const _hoisted_68 = { class: "collapseSection officialInlineSection" } 13898const _hoisted_69 = { class: "collapseBody" } 13899const _hoisted_70 = { class: "editGrid" } 13900const _hoisted_71 = ["onUpdate:modelValue"] 13901const _hoisted_72 = { class: "check" } 13902const _hoisted_73 = ["onUpdate:modelValue"] 13903const _hoisted_74 = ["onClick"] 13904const _hoisted_75 = { 13905 key: 0, 13906 class: "collapseSection officialInlineSection" 13907} 13908const _hoisted_76 = { class: "collapseBody" } 13909const _hoisted_77 = { dir: "ltr" } 13910const _hoisted_78 = { class: "statusPill" } 13911const _hoisted_79 = ["onClick"] 13912 13913return function render(_ctx, _cache) { 13914 with (_ctx) {
13915 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelCheckbox: _vModelCheckbox, createTextVNode: _createTextVNode, vModelText: _vModelText, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 13916 13917 const _component_AdminFrame = _resolveComponent("AdminFrame") 13918 13919 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ±Ø³Ù ÙØ©" }, { 13920 default: _withCtx(() => [ 13921 _cache[28] || (_cache[28] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "Ø§ÙØ¬Ùات ÙØ§Ù٠صادر Ø§ÙØ±Ø³Ù ÙØ©"), _createElementVNode("p", null, "إدارة ØØ³Ø§Ø¨Ø§Øª Ø§ÙØ³Ùارات ÙØ§ÙÙÙØµÙÙØ§Øª Ù٠صادر Ø§ÙØªØ¹Ù Ù٠ات اÙÙ ÙØ«ÙÙØ© ÙÙ٠دÙÙØ©. Ø¨ØØ« AI ÙØ§ ÙØ¹Ù ٠عÙ٠أ٠٠صدر ÙØ¨Ù اعت٠اد٠Ù٠صدر Ù ÙØ«ÙÙ ÙØ±Ø¨Ø·Ù Ø¨ÙØ·Ø§Ù HTTPS Ù Ø³Ù ÙØ.")], -1)), 13922 denied 13923 ? (_openBlock(), _createElementBlock("div", _hoisted_1, _c
13923ache[0] || (_cache[0] = [_createElementVNode("h3", null, "Ù ØªØ§ØØ© ÙÙ Ø¯ÙØ± تÙÙÙØ© اÙ٠عÙÙ٠ات ÙÙØ·", -1), _createElementVNode("p", { class: "hint" }, "ØªÙØ¯Ø§Ø± Ø£Ø±ÙØ§Ù Ø§ÙØ³Ùارة ÙØ§ÙÙÙØµÙÙØ© Ù Ù ÙØ°Ù Ø§ÙØµÙØØ© ØØµØ±Ø§Ù Ø¨ÙØ§Ø³Ø·Ø© Ù Ø¯ÙØ± تÙÙÙØ© اÙ٠عÙÙÙ Ø§ØªØ ÙØ¶Ù ا٠تسجÙÙ Ù٠تعدÙÙ ÙÙ Ø³Ø¬Ù Ø§ÙØ¹Ù ÙÙØ§Øª.", -1)]))) 13924 : _createCommentVNode("", true), 13925 (!denied) 13926 ? (_openBlock(), _createElementBlock("section", _hoisted_2, [ 13927 _cache[12] || (_cache[12] = _createElementVNode("h3", null, "٠صادر Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©", -1)), 13928 _cache[13] || (_cache[13] = _createElementVNode("p", { class: "hint" }, "أض٠اÙÙ ÙÙØ¹ Ø§ÙØ±Ø³Ù ٠أÙÙØ§Ù. Ø§ØªØ±Ù Ø§ÙØ¨ØØ« Ø§ÙØ¢ÙÙ Ù ÙÙÙØ§Ù ØØªÙ ØªØªØ£ÙØ¯ ٠٠اÙÙØ·Ø§Ù ث٠غÙÙØ± Ø§ÙØ«ÙØ© Ø¥ÙÙ Ù ÙØ«ÙÙ ÙÙØ¹ÙÙ Ø§ÙØ¨ØØ«.", -1)), 13929 _createElementVNode("div", _hoisted_3, [ 13930 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((sourceForm.country_code) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(countries, (c) => { 13931 return (_openBlock(), _createElementBlock("option", { 13932 key: c.code, 13933 value: c.code 13934 }, _toDisplayString(c.name_ar) + " / " + _toDisplayString(c.name_en), 9, _hoisted_5)) 13935 }), 128))], 8, _hoisted_4), [[_vModelSelect, sourceForm.country_code]]), 13936 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((sourceForm.authority_type) = $event) }, _cache[1] || (_cache[1] = [ 13937 _createElementVNode("option", { value: "embassy" }, "Ø³ÙØ§Ø±Ø©", -1), 13938 _createElementVNode("option", { value: "consulate" }, "ÙÙØµÙÙØ©", -1), 13939 _createElementVNode("option", { value: "mission" }, "بعثة", -1), 13940 _createElementVNode("option", { value: "official_body" }, "Ø¬ÙØ© Ø±Ø³Ù ÙØ©", -1), 13941 _createElementVNode("option", { value: "foreign_ministry" }, "ÙØ²Ø§Ø±Ø© Ø®Ø§Ø±Ø¬ÙØ©", -1), 13942 _createElementVNode("option", { value: "government_authority" }, "Ø¬ÙØ© ØÙÙÙ ÙØ©", -1), 13943 _createElementVNode("option", { value: "chinese_authority" }, "Ø¬ÙØ© صÙÙÙØ©", -1), 13944 _createElementVNode("option", { value: "other_approved_official" }, "Ø¬ÙØ© Ø±Ø³Ù ÙØ© ٠عت٠دة أخرÙ", -1) 13945 ]), 8, _hoisted_6), [[_vModelSelect, sourceForm.authority_type]]), 13946 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((sourceForm.check_interval) = $event) }, _cache[2] || (_cache[2] = [ 13947 _createElementVNode("option", { value: "inherit" }, "اÙÙØØµ: ØØ³Ø¨ Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª", -1), 13948 _createElementVNode("option", { value: "6h" }, "ÙÙ 6 ساعات", -1), 13949 _createElementVNode("option", { value: "12h" }, "ÙÙ 12 ساعة", -1), 13950 _createElementVNode("option", { value: "24h" }, "ÙÙ 24 ساعة", -1), 13951 _createElementVNode("option", { value: "manual" }, "ÙØ¯ÙÙ ÙÙØ·", -1) 13952 ]), 8, _hoisted_7), [[_vModelSelect, sourceForm.check_interval]]), 13953 _createElementVNode("label", _hoisted_8, [_withDirectives(_createElementVNode("input", { 13954 type: "checkbox", 13955 "onUpdate:modelValue": $event => ((sourceForm.is_priority) = $event) 13956 }, null, 8, _hoisted_9), [[_vModelCheckbox, sourceForm.is_priority]]), _cache[3] || (_cache[3] = _createTextVNode(" ٠صدر Ø£ÙÙÙÙØ©"))]), 13957 _withDirectives(_createElementVNode("input", { 13958 "onUpdate:modelValue": $event => ((sourceForm.name_ar) = $event), 13959 placeholder: "Ø§Ø³Ù Ø§ÙØ¬ÙØ© Ø¨Ø§ÙØ¹Ø±Ø¨Ù" 13960 }, null, 8, _hoisted_10), [[_vModelText, sourceForm.name_ar]]), 13961 _withDirectives(_createElementVNode("input", { 13962 "onUpdate:modelValue": $event => ((sourceForm.name_en) = $event), 13963 placeholder: "Official name" 13964 }, null, 8, _hoisted_11), [[_vModelText, sourceForm.name_en]]), 13965 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((sourceForm.china_city) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(sourceForm.china_city), (c) => { 13966 return (_openBlock(), _createElementBlock("option", { 13967 key: c.value, 13968 value: c.value 13969 }, _toDisplayString(c.label), 9, _hoisted_13)) 13970 }), 128))], 8, _hoisted_12), [[_vModelSelect, sourceForm.china_city]]), 13971 _withDirectives(_createElementVNode("input", { 13972 class: "ltr", 13973 "onUpdate:modelValue": $event => ((sourceForm.official_url) = $event), 13974 placeholder: "https://official.example/..." 13975 }, null, 8, _hoisted_14), [[_vModelText, sourceForm.official_url]]), 13976 _withDirectives(_createElementVNode("input", { 13977 class: "ltr", 13978 "onUpdate:modelValue": $event => ((sourceForm.allowed_host) = $event), 13979 placeholder: "official.example" 13980 }, null, 8, _hoisted_15), [[_vModelText, sourceForm.allowed_host]]), 13981 _withDirectives(_createElementVNode("input", { 13982 "onUpdate:modelValue": $event => ((sourceForm.source_language) = $event), 13983 placeholder: "ar / en / fr" 13984 }, null, 8, _hoisted_16), [[_vModelText, sourceForm.source_language]]), 13985 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((sourceForm.fetch_method) = $event) }, _cache[4] || (_cache[4] = [ 13986 _createElementVNode("option", { value: "" }, "طرÙÙØ© Ø§ÙØ¬Ùب", -1), 13987 _createElementVNode("option", { value: "html" }, "HTML", -1), 13988 _createElementVNode("option", { value: "rss" }, "RSS", -1), 13989 _createElementVNode("option", { value: "sitemap" }, "Sitemap", -1), 13990 _createElementVNode("option", { value: "pdf" }, "PDF", -1) 13991 ]), 8, _hoisted_17), [[_vModelSelect, sourceForm.fetch_method]]), 13992 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((sourceForm.trust_status) = $event) }, _cache[5] || (_cache[5] = [ 13993 _createElementVNode("option", { value: "pending" }, "Ø¨Ø§ÙØªØ¸Ø§Ø± Ø§ÙØªØÙÙ", -1), 13994 _createElementVNode("option", { value: "trusted" }, "Ù ÙØ«ÙÙ", -1), 13995 _createElementVNode("option", { value: "suspended" }, "Ù ÙÙÙÙ", -1), 13996 _createElementVNode("option", { value: "rejected" }, "٠رÙÙØ¶", -1) 13997 ]), 8, _hoisted_18), [[_vModelSelect, sourceForm.trust_status]]), 13998 _createElementVNode("label", _hoisted_19, [_withDirectives(_createElementVNode("input", { 13999 type: "checkbox", 14000 "onUpdate:modelValue": $event => ((sourceForm.discovery_enabled) = $event) 14001 }, null, 8, _hoisted_20), [[_vModelCheckbox, sourceForm.discovery_enabled]]), _cache[6] || (_cache[6] = _createTextVNode(" ØªÙØ¹ÙÙ Ø¨ØØ« AI ÙÙØ°Ø§ اÙ٠صدر"))]) 14002 ]), 14003 _createElementVNode("button", { 14004 class: "btn", 14005 onClick: addSource 14006 }, "Ø¥Ø¶Ø§ÙØ© اÙ٠صدر", 8, _hoisted_21), 14007 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(sources, (src) => { 14008 return (_openBlock(), _createElementBlock("div", { 14009 class: "committeeRow", 14010 key: src.id 14011 }, [ 14012 _createElementVNode("div", null, [ 14013 _createElementVNode("b", null, _toDisplayString(src.country_name_ar) + " â " + _toDisplayString(src.name_ar), 1), 14014 _createElementVNode("small", null, _toDisplayString(src.authority_type) + " · " + _toDisplayString($cityLabel(src.china_city) || '-') + " · " + _toDisplayString(src.allowed_host || 'ÙÙ ÙØØ¯Ø¯ اÙÙØ·Ø§Ù بعد'), 1), 14015 _createElementVNode("small", _hoisted_22, _toDisplayString(sourceHealth(src)), 1), 14016 (sourceBlockReason(src)) 14017 ? (_openBlock(), _createElementBlock("small", _hoisted_23, "â " + _toDisplayString(sourceBlockReason(src)), 1)) 14018 : _createCommentVNode("", true) 14019 ]), 14020 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((src.fetch_method) = $event) }, _cache[7] || (_cache[7] = [ 14021 _createElementVNode("option", { value: "" }, "طرÙÙØ© Ø§ÙØ¬Ùب", -1), 14022 _createElementVNode("option", { value: "html" }, "HTML", -1), 14023 _createElementVNode("option", { value: "rss" }, "RSS", -1), 14024 _createElementVNode("option", { value: "sitemap" }, "Sitemap", -1), 14025 _createElementVNode("option", { value: "pdf" }, "PDF", -1) 14026 ]), 8, _hoisted_24), [[_vModelSelect, src.fetch_method]]), 14027 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((src.check_interval) = $event) }, _cache[8] || (_cache[8] = [ 14028 _createElementVNode("option", { value: "inherit" }, "ØØ³Ø¨ Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª", -1), 14029 _createElementVNode("option", { value: "6h" }, "6 ساعات", -1), 14030 _createElementVNode("option", { value: "12h" }, "12 ساعة", -1), 14031 _createElementVNode("option", { value: "24h" }, "24 ساعة", -1), 14032 _createElementVNode("option", { value: "manual" }, "ÙØ¯ÙÙ", -1) 14033 ]), 8, _hoisted_25), [[_vModelSelect, src.check_interval]]), 14034 _createElementVNode("label", _hoisted_26, [_withDirectives(_createElementVNode("input", { 14035 type: "checkbox", 14036 "onUpdate:modelValue": $event => ((src.is_priority) = $event) 14037 }, null, 8, _hoisted_27), [[_vModelCheckbox, src.is_priority]]), _cache[9] || (_cache[9] = _createTextVNode(" Ø£ÙÙÙÙØ©"))]), 14038 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((src.trust_status) = $event) }, _cache[10] || (_cache[10] = [ 14039 _createElementVNode("option", { value: "pending" }, "Ø¨Ø§ÙØªØ¸Ø§Ø± Ø§ÙØªØÙÙ", -1), 14040 _createElementVNode("option", { value: "trusted" }, "Ù ÙØ«ÙÙ", -1), 14041 _createElementVNode("option", { value: "suspended" }, "Ù ÙÙÙÙ", -1), 14042 _createElementVNode("option", { value: "rejected" }, "٠رÙÙØ¶", -1) 14043 ]), 8, _hoisted_28), [[_vModelSelect, src.trust_status]]), 14044 _createElementVNode("label", _hoisted_29, [_withDirectives(_createElementVNode("input", { 14045 type: "checkbox", 14046 "onUpdate:modelValue": $event => ((src.discovery_enabled) = $event) 14047 }, null, 8, _hoisted_30), [[_vModelCheckbox, src.discovery_enabled]]), _cache[11] || (_cache[11] = _createTextVNode(" AI"))]), 14048 _createElementVNode("button", { 14049 class: "smallbtn secondary", 14050 onClick: $event => (saveSource(src)) 14051 }, "ØÙظ", 8, _hoisted_31) 14052 ])) 14053 }), 128)) 14054 ])) 14055 : _createCommentVNode("", true), 14056 (!denied) 14057 ? (_openBlock(), _createElementBlock("section", _hoisted_32, [ 14058 _cache[15] || (_cache[15] = _createElementVNode("h3", null, "٠راجعة Ø§ÙØªØ¹Ù Ù٠ات اÙÙ ÙØªØ±ØØ©", -1)), 14059 _cache[16] || (_cache[16] = _createElementVNode("p", { class: "hint" }, "ÙÙØªØ±Ø Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·Ùاع٠عÙÙØ§Ùا٠ÙÙ ÙØ®ØµØ§Ù ÙÙØ·. ÙØ§ ÙÙÙØ´Ø± Ø´ÙØ¡ ÙØ¨Ù أ٠تطاب٠اÙÙØµ ٠ع اÙ٠صدر Ø§ÙØ±Ø³Ù Ù ÙØªØ¤Ùد.", -1)), 14060 _createElementVNode("div", _hoisted_33, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(['pending_review','published','rejected','duplicate'], (s) => { 14061 return (_openBlock(), _createElementBlock("button", { 14062 key: s, 14063 type: "button", 14064 class: _normalizeClass(['smallbtn',circ.status===s?'':'secondary']), 14065 onClick: $event => (circ.status=s) 14066 }, _toDisplayString(({pending_review:'Ø¨Ø§ÙØªØ¸Ø§Ø± اÙ٠راجعة',published:'Ù ÙØ´Ùر',rejected:'٠رÙÙØ¶',duplicate:'Ù ÙØ±Ø±'})[s]), 11, _hoisted_34)) 14067 }), 128))]), 14068 (!circ.rows.length) 14069 ? (_openBlock(), _createElementBlock("p", _hoisted_35, "ÙØ§ Ø¹ÙØ§ØµØ±.")) 14070 : _createCommentVNode("", true), 14071 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(circ.rows, (x) => { 14072 return (_openBlock(), _createElementBlock("article", { 14073 key: x.id, 14074 class: "aiGapCard" 14075 }, [ 14076 _createElementVNode("div", _hoisted_36, [_createElementVNode("b", null, _toDisplayString(x.source_name_ar), 1), (x.content_changed_at) 14077 ? (_openBlock(), _createElementBlock("span", _hoisted_37, "تغÙÙØ± بعد Ø§ÙØ§Ø¹ØªÙ اد")) 14078 : _createCommentVNode("", true)]), 14079 _createElementVNode("small", _hoisted_38, [_createElementVNode("a", { 14080 href: x.source_url, 14081 target: "_blank", 14082 rel: "noopener noreferrer" 14083 }, _toDisplayString(x.source_title||x.source_url), 9, _hoisted_39)]),
14084 _createElementVNode("small", _hoisted_40, [_createTextVNode(_toDisplayString(x.classification||'-') + " · Ø£ÙÙ ÙØ© " + _toDisplayString(x.urgency) + " · Ø«ÙØ© " + _toDisplayString(x.confidence_score==null?'-':x.confidence_score), 1), (x.deadline_at) 14085 ? (_openBlock(), _createElementBlock("span", _hoisted_41, " · Ù ÙØ¹Ø¯ ٠ذÙÙØ±: " + _toDisplayString(shortDate(x.deadline_at)) + " (تØÙÙ Ù ÙÙ)", 1)) 14086 : _createCommentVNode("", true)]), 14087 (circ.drafts[x.id]&&(x.status==='pending_review'||x.status==='approved')) 14088 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 14089 _withDirectives(_createElementVNode("input", { 14090 "onUpdate:modelValue": $event => ((circ.drafts[x.id].title) = $event), 14091 maxlength: "300" 14092 }, null, 8, _hoisted_42), [[_vModelText, circ.drafts[x.id].title]]), 14093 _withDirectives(_createElementVNode("textarea", { 14094 "onUpdate:modelValue": $event => ((circ.drafts[x.id].summary) = $event), 14095 rows: "3", 14096 maxlength: "900" 14097 }, null, 8, _hoisted_43), [[_vModelText, circ.drafts[x.id].summary]]), 14098 _withDirectives(_createElementVNode("input", { 14099 "onUpdate:modelValue": $event => ((circ.drafts[x.id].note) = $event), 14100 placeholder: "سبب Ø§ÙØ±Ùض (ÙÙØ±Ùض ÙÙØ·)", 14101 maxlength: "300" 14102 }, null, 8, _hoisted_44), [[_vModelText, circ.drafts[x.id].note]]), 14103 _createElementVNode("label", _hoisted_45, [_withDirectives(_createElementVNode("input", { 14104 type: "checkbox", 14105 "onUpdate:modelValue": $event => ((circ.drafts[x.id].confirm) = $event) 14106 }, null, 8, _hoisted_46), [[_vModelCheckbox, circ.drafts[x.id].confirm]]), _cache[14] || (_cache[14] = _createTextVNode(" Ø·Ø§Ø¨ÙØª Ø§ÙØ¹ÙÙØ§Ù ÙØ§ÙÙ ÙØ®Øµ ٠ع اÙ٠صدر Ø§ÙØ±Ø³Ù Ù"))]), 14107 _createElementVNode("div", _hoisted_47, [_createElementVNode("button", { 14108 class: "smallbtn", 14109 type: "button", 14110 disabled: circ.busy||!circ.drafts[x.id].confirm, 14111 onClick: $event => (decideCirc(x,'publish')) 14112 }, "ÙØ´Ø±", 8, _hoisted_48), _createElementVNode("button", { 14113 class: "smallbtn secondary", 14114 type: "button", 14115 disabled: circ.busy, 14116 onClick: $event => (decideCirc(x,'reject')) 14117 }, "Ø±ÙØ¶", 8, _hoisted_49), _createElementVNode("button", { 14118 class: "smallbtn secondary", 14119 type: "button", 14120 disabled: circ.busy, 14121 onClick: $event => (decideCirc(x,'duplicate')) 14122 }, "Ù ÙØ±Ø±", 8, _hoisted_50)]) 14123 ], 64)) 14124 : _createCommentVNode("", true), 14125 (x.status==='published'&&x.content_changed_at&&circ.drafts[x.id]) 14126 ? (_openBlock(), _createElementBlock("div", _hoisted_51, [_withDirectives(_createElementVNode("input", { 14127 "onUpdate:modelValue": $event => ((circ.drafts[x.id].note) = $event), 14128 placeholder: "سبب Ø³ØØ¨ اÙÙØ´Ø±", 14129 maxlength: "300" 14130 }, null, 8, _hoisted_52), [[_vModelText, circ.drafts[x.id].note]]), _createElementVNode("button", { 14131 class: "smallbtn", 14132 type: "button", 14133 disabled: circ.busy, 14134 onClick: $event => (decideCirc(x,'acknowledge_change')) 14135 }, "سÙÙÙ ", 8, _hoisted_53), _createElementVNode("button", { 14136 class: "smallbtn secondary", 14137 type: "button", 14138 disabled: circ.busy||!circ.drafts[x.id].note, 14139 onClick: $event => (decideCirc(x,'unpublish')) 14140 }, "Ø³ØØ¨ اÙÙØ´Ø±", 8, _hoisted_54)])) 14141 : _createCommentVNode("", true) 14142 ])) 14143 }), 128)), 14144 _createElementVNode("p", _hoisted_55, _toDisplayString(circ.msg), 1) 14145 ])) 14146 : _createCommentVNode("", true), 14147 (!denied) 14148 ? (_openBlock(), _createElementBlock("div", _hoisted_56, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.officialAccounts, (a) => { 14149 return (_openBlock(), _createElementBlock("div", { 14150 class: "card supervisorCard officialAccountAdminCard", 14151 key: a.id 14152 }, [ 14153 _createElementVNode("div", _hoisted_57, [_createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(a.name_ar), 1), _createElementVNode("p", _hoisted_58, _toDisplayString(a.account_key), 1)]), _createElementVNode("span", _hoisted_59, _toDisplayString(a._status), 1)]), 14154 _createElementVNode("div", _hoisted_60, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(accountTypeName(a.account_type)), 1
14154), _cache[17] || (_cache[17] = _createElementVNode("small", null, "اÙÙÙØ¹", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(channelName(a.channel)), 1), _cache[18] || (_cache[18] = _createElementVNode("small", null, "ÙÙØ§Ø© اÙÙØ´Ø±", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(safeArray(a.phones).length), 1), _cache[19] || (_cache[19] = _createElementVNode("small", null, "Ø£Ø±ÙØ§Ù دخÙÙ", -1))])]), 14155 _createElementVNode("details", _hoisted_61, [_cache[21] || (_cache[21] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø£Ø±ÙØ§Ù Ø§ÙØ¯Ø®ÙÙ"), _createElementVNode("span", null, "ØØ¯ Ø£ÙØµÙ 3")], -1)), _createElementVNode("div", _hoisted_62, [_cache[20] || (_cache[20] = _createElementVNode("p", { class: "hint" }, "أ٠رÙÙ Ù Ù Ø§ÙØ«Ùاثة ÙÙØªØ ÙÙØ³ Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù. Ø§ÙØªØ¨ Ø§ÙØ£Ø±ÙØ§Ù Ø¨ØµÙØºØ© دÙÙÙØ© بدÙÙ +.", -1)), _createElementVNode("div", _hoisted_63, [_withDirectives(_createElementVNode("input", { 14156 class: "ltr", 14157 "onUpdate:modelValue": $event => ((a._phones[0]) = $event), 14158 placeholder: "رÙÙ Ø§ÙØ¯Ø®ÙÙ 1" 14159 }, null, 8, _hoisted_64), [[_vModelText, a._phones[0]]]), _withDirectives(_createElementVNode("input", { 14160 class: "ltr", 14161 "onUpdate:modelValue": $event => ((a._phones[1]) = $event), 14162 placeholder: "رÙÙ Ø§ÙØ¯Ø®ÙÙ 2" 14163 }, null, 8, _hoisted_65), [[_vModelText, a._phones[1]]]), _withDirectives(_createElementVNode("input", { 14164 class: "ltr", 14165 "onUpdate:modelValue": $event => ((a._phones[2]) = $event), 14166 placeholder: "رÙÙ Ø§ÙØ¯Ø®ÙÙ 3" 14167 }, null, 8, _hoisted_66), [[_vModelText, a._phones[2]]])]), _createElementVNode("button", { 14168 class: "btn loadMore", 14169 onClick: $event => (savePhones(a)) 14170 }, "ØÙظ Ø£Ø±ÙØ§Ù Ø§ÙØ¯Ø®ÙÙ", 8, _hoisted_67)])]), 14171 _createElementVNode("details", _hoisted_68, [_cache[25] || (_cache[25] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø§ÙØØ§ÙØ© ÙØ§ÙÙØ´Ø±"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_69, [_createElementVNode("div", _hoisted_70, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((a._status) = $event) }, _cache[22] || (_cache[22] = [_createElementVNode("option", { value: "active" }, "Ù ÙØ¹Ù", -1), _createElementVNode("option", { value: "disabled" }, "٠عطÙ", -1), _createElementVNode("option", { value: "archived" }, "٠ؤرشÙ", -1)]), 8, _hoisted_71), [[_vModelSelect, a._status]]), _createElementVNode("label", _hoisted_72, [_withDirectives(_createElementVNode("input", { 14172 type: "checkbox", 14173 "onUpdate:modelValue": $event => ((a._can_publish) = $event) 14174 }, null, 8, _hoisted_73), [[_vModelCheckbox, a._can_publish]]), _cache[23] || (_cache[23] = _createTextVNode(" Ø§ÙØ³Ù Ø§Ø Ø¨ÙØ´Ø± تع٠Ù٠رس٠Ù"))])]), _cache[24] || (_cache[24] = _createElementVNode("p", { class: "hint" }, "ØØªÙ ٠ع ØµÙØ§ØÙØ© اÙÙØ´Ø±Ø Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù ÙØ§ ÙØ³ØªØ·Ùع تعدÙÙ Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ Ø£Ù Ø§ÙØØ§ÙØ§Øª Ø£Ù Ø§ÙØ·Ùارئ.", -1)), _createElementVNode("button", { 14175 class: "btn secondary", 14176 onClick: $event =>
14176 (saveStatus(a)) 14177 }, "ØÙظ Ø§ÙØØ§ÙØ©", 8, _hoisted_74)])]), 14178 (safeArray(a.phones).length) 14179 ? (_openBlock(), _createElementBlock("details", _hoisted_75, [_cache[27] || (_cache[27] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø§ÙØ£Ø±ÙØ§Ù Ø§ÙØØ§ÙÙØ©"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_76, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(a.phones, (p) => { 14180 return (_openBlock(), _createElementBlock("div", { 14181 class: "committeeRow", 14182 key: p.id 14183 }, [_createElementVNode("div", null, [_createElementVNode("b", _hoisted_77, _toDisplayString(p.phone), 1), _createElementVNode("small", null, [_createTextVNode(_toDisplayString(p.label || '-') + " â Ø¢Ø®Ø± ØªØØ¯ÙØ« " + _toDisplayString(shortDate(p.updated_at || p.created_at)), 1), _cache[26] || (_cache[26] = _createElementVNode("br", null, null, -1)), _createTextVNode("Ø§ÙØ¬ÙÙØ©: " + _toDisplayString(p.tour_seen_at ? ('ت٠ت ' + shortDate(p.tour_seen_at)) : 'ÙÙ ØªØ¸ÙØ± بعد / Ø³ØªØ¸ÙØ± Ø¹ÙØ¯ Ø§ÙØ¯Ø®Ù٠اÙÙØ§Ø¯Ù '), 1)])]), _createElementVNode("span", _hoisted_78, _toDisplayString(p.status), 1), _createElementVNode("button", { 14184 class: "smallbtn secondary", 14185 onClick: $event => (resetTour(a,p)) 14186 }, "إعادة Ø§ÙØ¬ÙÙØ©", 8, _hoisted_79)])) 14187 }), 128))])])) 14188 : _createCommentVNode("", true) 14189 ])) 14190 }), 128))])) 14191 : _createCommentVNode("", true) 14192 ]), 14193 _: 1, 14194 __: [28] 14195 })) 14196 } 14197} 14198})() 14199 }; 14200 14201 14202 const AdminOptionsPage={ 14203 components:{AdminFrame}, 14204 setup(){ 14205 const store=useGzcStore();const router=useRouter();const form=reactive({group_key:'china_city',parent_key:'',option_key:'',name_ar:'',name_en:'',sort_order:100}); 14206 const groups=computed(()=>safeArray(store.state.platformOptions.groups)); 14207 const options=computed(()=>store.state.platformOptions.options||{}); 14208 const currentRows=computed(()=>safeArray(options.value[form.group_key])); 14209 const cityParents=computed(()=>safeArray(options.value.china_city).filter(x=>x.status==='active')); 14210 const needsParent=computed(()=>form.group_key==='china_district'); 14211 function label(o){return (o.name_ar||o.name_en||o.option_key||'-')+(o.parent_key?' â '+o.parent_key:'');} 14212 async function load(){if(await store.requireAdmin(router)){await store.loadPlatformOptions(router);if(!groups.value.some(g=>g.key===form.group_key)&&groups.value[0])form.group_key=groups.value[0].key;}} 14213 function editOption(o){form.group_key=o.group_key;form.parent_key=o.parent_key||'';form.option_key=o.option_key||'';form.name_ar=o.name_ar||'';form.name_en=o.name_en||'';form.sort_order=o.sort_order||100;window.scrollTo({top:0,behavior:'smooth'});} 14214 function resetForm(){form.parent_key='';form.option_key='';form.name_ar='';form.name_en='';form.sort_order=100;} 14215 onMounted(load);watch(()=>form.group_key,()=>{if(!needsParent.value)form.parent_key='';}); 14216 async function save(){if(needsParent.value&&!form.parent_key){store.state.msg='اختر اÙ٠دÙÙØ© Ø£ÙÙØ§Ù ÙÙØ°Ø§ Ø§ÙØÙ';return;}store.state.busy=true;const r=await api('/api/admin/options',{method:'POST',body:JSON.stringify(form)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){resetForm();await load();}} 14217 async function setStatus(o,st){store.state.busy=true;const r=await api('/api/admin/options/'+encodeURIComponent(o.id)+'/status',{method:'POST',body:JSON.stringify({status:st})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 14218 return {store,form,groups,options,currentRows,cityParents,needsParent,label,load,save,setStatus,editOption,resetForm}; 14219 }, 14220 render:(function(){ 14221const _Vue = Vue 14222const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 14223 14224const _hoisted_1 = { 14225 class: "card collapseSection formCard", 14226 open: "" 14227} 14228const _hoisted_2 = { class: "collapseBody" } 14229const _hoisted_3 = { class: "editGrid" } 14230const _hoisted_4 = ["onUpdate:modelValue"] 14231const _hoisted_5 = ["value"] 14232const _hoisted_6 = ["onUpdate:modelValue"] 14233const _hoisted_7 = ["value"] 14234const _hoisted_8 = ["onUpdate:modelValue"] 14235const _hoisted_9 = ["onUpdate:modelValue"] 14236const _hoisted_10 = ["onUpdate:modelValue"] 14237const _hoisted_11 = ["onUpdate:modelValue"] 14238const _hoisted_12 = { class: "memberActions" } 14239const _hoisted_13 = ["onClick"] 14240const _hoisted_14 = ["onClick"] 14241const _hoisted_15 = { class: "card" } 14242const _hoisted_16 = { class: "segmented queueSegmentPro" } 14243const _hoisted_17 = ["onClick"] 14244const _hoisted_18 = { class: "ltr" } 14245const _hoisted_19 = { class: "memberActions" } 14246const _hoisted_20 = ["onClick"] 14247const _hoisted_21 = ["onClick"] 14248const _hoisted_22 = ["onClick"] 14249const _hoisted_23 = ["onClick"] 14250 14251return function render(_ctx, _cache) { 14252 with (_ctx) {
14253 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, createCommentVNode: _createCommentVNode, vModelText: _vModelText, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 14254 14255 const _component_AdminFrame = _resolveComponent("AdminFrame") 14256 14257 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "إدارة ÙÙØ§Ø¦Ù اÙÙØ¸Ø§Ù " }, { 14258 default: _withCtx(() => [ 14259 _cache[3] || (_cache[3] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "ÙÙ Ø®ÙØ§Ø±Ø§Øª اÙÙÙØ§Ø¦Ù Ù Ù ÙÙØ§"), _createElementVNode("p", null, "Ø£Ù ØÙÙ ÙÙ Ø®ÙØ§Ø±Ø§Øª ٠عرÙÙØ© ÙØªÙ Ø§ÙØªØÙÙ ÙÙÙ Ù Ù ÙØ°Ù Ø§ÙØµÙØØ©: اÙÙ Ø¯ÙØ Ø§ÙØ£ØÙØ§Ø¡Ø Ø§ÙØ¬ÙØ³Ø ÙÙØ¹ Ø§ÙØ¹Ø¶ÙØ ØØ§Ùات Ø§ÙØ·ÙØ¨Ø§ØªØ Ø§ÙÙØ¹Ø§ÙÙØ§ØªØ Ø§ÙØ¥Ø¹ÙØ§ÙØ§ØªØ ÙØ¯ÙÙÙ Ø§ÙØµÙÙ. ÙØ§ ÙØªØ§Ø¨Ø© ØØ±Ø© Ù٠اÙÙÙØ§Ø¦Ù بعد Ø§ÙØ¢Ù.")], -1)), 14260 _createElementVNode("details", _hoisted_1, [_cache[1] || (_cache[1] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø¥Ø¶Ø§ÙØ© / تعدÙÙ Ø®ÙØ§Ø±"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_2, [_createElementVNode("div", _hoisted_3, [ 14261 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.group_key) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(groups, (g) => { 14262 return (_openBlock(), _createElementBlock("option", { 14263 value: g.key, 14264 key: g.key 14265 }, _toDisplayString(g.name || g.key) + " â " + _toDisplayString(g.key), 9, _hoisted_5)) 14266 }), 128))], 8, _hoisted_4), [[_vModelSelect, form.group_key]]), 14267 needsParent 14268 ? _withDirectives((_openBlock(), _createElementBlock("select", { 14269 key: 0, 14270 "onUpdate:modelValue": $event => ((form.parent_key) = $event) 14271 }, [_cache[0] || (_cache[0] = _createElementVNode("option", { value: "" }, "اختر اÙ٠دÙÙØ© Ø§ÙØªØ§Ø¨Ø¹Ø©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(cityParents, (c) => { 14272 return (_openBlock(), _createElementBlock("option", { 14273 key: c.option_key, 14274 value: c.option_key 14275 }, _toDisplayString(c.name_ar || c.option_key), 9, _hoisted_7)) 14276 }), 128))], 8, _hoisted_6)), [[_vModelSelect, form.parent_key]]) 14277 : _createCommentVNode("", true), 14278 _withDirectives(_createElementVNode("input", { 14279 "onUpdate:modelValue": $event => ((form.name_ar) = $event), 14280 placeholder: "Ø§ÙØ§Ø³Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù" 14281 }, null, 8, _hoisted_8), [[_vModelText, form.name_ar]]), 14282 _withDirectives(_createElementVNode("input", { 14283 "onUpdate:modelValue": $event => ((form.name_en) = $event), 14284 placeholder: "English name" 14285 }, null, 8, _hoisted_9), [[_vModelText, form.name_en]]), 14286 _withDirectives(_createElementVNode("input", { 14287 class: "ltr", 14288 "onUpdate:modelValue": $event => ((form.option_key) = $event), 14289 placeholder: "option_key Ø§Ø®ØªÙØ§Ø±Ù" 14290 }, null, 8, _hoisted_10), [[_vModelText, form.option_key]]), 14291 _withDirectives(_createElementVNode("input", { 14292 type: "number", 14293 "onUpdate:modelValue": $event => ((form.sort_order) = $event), 14294 placeholder: "Ø§ÙØªØ±ØªÙب" 14295 }, null, 8, _hoisted_11), [[_vModelText, form.sort_order]]) 14296 ]), _createElementVNode("div", _hoisted_12, [_createElementVNode("button", { 14297 class: "btn", 14298 onClick: save 14299 }, "ØÙظ Ø§ÙØ®Ùار", 8, _hoisted_13), _createElementVNode("button", { 14300 class: "btn secondary", 14301 onClick: resetForm 14302 }, "ØªÙØ±Ùغ", 8, _hoisted_14)])])]),
14303 _createElementVNode("div", _hoisted_15, [_cache[2] || (_cache[2] = _createElementVNode("h3", null, "اÙÙÙØ§Ø¦Ù ", -1)), _createElementVNode("div", _hoisted_16, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(groups, (g) => { 14304 return (_openBlock(), _createElementBlock("button", { 14305 key: g.key, 14306 class: _normalizeClass({active:form.group_key===g.key}), 14307 onClick: $event => (form.group_key=g.key) 14308 }, [_createElementVNode("b", null, _toDisplayString(g.name), 1), _createElementVNode("small", null, _toDisplayString(g.count), 1)], 10, _hoisted_17)) 14309 }), 128))])]), 14310 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(currentRows, (o) => { 14311 return (_openBlock(), _createElementBlock("div", { 14312 class: "card optionAdminRow", 14313 key: o.id||o.option_key 14314 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(label(o)), 1), _createElementVNode("small", _hoisted_18, _toDisplayString(o.group_key) + " / " + _toDisplayString(o.parent_key || '-') + " / " + _toDisplayString(o.option_key), 1)]), _createElementVNode("span", { class: _normalizeClass(["statusPill", o.status]) }, _toDisplayString(o.status), 3), _createElementVNode("div", _hoisted_19, [ 14315 _createElementVNode("button", { 14316 class: "smallbtn", 14317 onClick: $event => (editOption(o)) 14318 }, "تعدÙÙ", 8, _hoisted_20), 14319 (o.status!=='active') 14320 ? (_openBlock(), _createElementBlock("button", { 14321 key: 0, 14322 class: "smallbtn", 14323 onClick: $event => (setStatus(o,'active')) 14324 }, "ØªÙØ¹ÙÙ", 8, _hoisted_21)) 14325 : _createCommentVNode("", true), 14326 (o.status==='active') 14327 ? (_openBlock(), _createElementBlock("button", { 14328 key: 1, 14329 class: "smallbtn", 14330 onClick: $event => (setStatus(o,'disabled')) 14331 }, "تعطÙÙ", 8, _hoisted_22)) 14332 : _createCommentVNode("", true), 14333 _createElementVNode("button", { 14334 class: "smallbtn danger", 14335 onClick: $event => (setStatus(o,'archived')) 14336 }, "ØØ°Ù", 8, _hoisted_23) 14337 ])])) 14338 }), 128)) 14339 ]), 14340 _: 1, 14341 __: [3] 14342 })) 14343 } 14344} 14345})() 14346 }; 14347 14348 const IdentityAdminNav={ 14349 setup(){const route=useRoute();function active(p){return route.path===p;}return{active};}, 14350 render:(function(){ 14351const _Vue = Vue 14352const { createVNode: _createVNode, createTextVNode: _createTextVNode } = _Vue 14353 14354const _hoisted_1 = { 14355 class: "identityAdminNav", 14356 "aria-label": "Ù Ø±ÙØ² ÙÙÙØ© اÙÙ ÙØµØ©" 14357} 14358 14359return function render(_ctx, _cache) { 14360 with (_ctx) { 14361 const { createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, normalizeClass: _normalizeClass, withCtx: _withCtx, createVNode: _createVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue 14362 14363 const _component_router_link = _resolveComponent("router-link") 14364 14365 return (_openBlock(), _createElementBlock("nav", _hoisted_1, [ 14366 _createVNode(_component_router_link, { 14367 to: "/admin/platform", 14368 class: _normalizeClass({active:active('/admin/platform')}) 14369 }, { 14370 default: _withCtx(() => _cache[0] || (_cache[0] = [_createTextVNode("ÙÙÙØ© اÙÙ ÙØµØ©")])), 14371 _: 1, 14372 __: [0] 14373 }, 8, ["class"]), 14374 _createVNode(_component_router_link, { 14375 to: "/admin/community", 14376 class: _normalizeClass({active:active('/admin/community')}) 14377 }, { 14378 default: _withCtx(() => _cache[1] || (_cache[1] = [_createTextVNode("ع٠اÙÙ ÙØµØ©")])), 14379 _: 1, 14380 __: [1] 14381 }, 8, ["class"]), 14382 _createVNode(_component_router_link, { 14383 to: "/admin/communities", 14384 class: _normalizeClass({active:active('/admin/communities')}) 14385 }, { 14386 default: _withCtx(() => _cache[2] || (_cache[2] = [_createTextVNode("اÙ٠جت٠عات")])), 14387 _: 1, 14388 __: [2] 14389 }, 8, ["class"]), 14390 _createVNode(_component_router_link, { 14391 to: "/admin/brand-assets", 14392 class: _normalizeClass({active:active('/admin/brand-assets')}) 14393 }, { 14394 default: _withCtx(() => _cache[3] || (_cache[3] = [_createTextVNode("Ø§ÙØ£ØµÙÙ Ø§ÙØ¨ØµØ±ÙØ©")])), 14395 _: 1, 14396 __: [3] 14397 }, 8, ["class"]) 14398 ])) 14399 } 14400} 14401})() 14402 }; 14403 14404 const AdminCommunitiesPage={ 14405 components:{AdminFrame,IdentityAdminNav}, 14406 setup(){ 14407 const store=useGzcStore();const router=useRouter(); 14408 const form=reactive({id:null,name_ar:'',name_en:'',slug:'',main_city:'',coverage_cities:'',about_ar:'',about_en:'',hero_image_url:'',sort_order:100,status:'active'}); 14409 const heroFile=ref(null), heroName=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©'); 14410 async function load(){if(await store.requireAdmin(router))await store.loadCommunities(router);} 14411 function edit(c){Object.assign(form,{id:c.id,name_ar:c.name_ar||'',name_en:c.name_en||'',slug:c.slug||'',main_city:c.main_city||'',coverage_cities:safeArray(c.coverage_cities).join(', '),about_ar:c.about_ar||'',about_en:c.about_en||'',hero_image_url:c.hero_image_url||'',sort_order:c.sort_order||100,status:c.status||'active'});heroFile.value=null;heroName.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';window.scrollTo({top:0,behavior:'smooth'});} 14412 function clear(){Object.assign(form,{id:null,name_ar:'',name_en:'',slug:'',main_city:'',coverage_cities:'',about_ar:'',about_en:'',hero_image_url:'',sort_order:100,status:'active'});heroFile.value=null;heroName.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';} 14413 function onHeroFile(e){const f=e.target.files&&e.target.files[0];heroFile.value=f||null;heroName.value=f?f.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';} 14414 async function uploadHero(id){if(!heroFile.value||!id)return null;const fd=new FormData();fd.append('file',heroFile.value);return await uploadApi('/api/admin/communities/'+encodeURIComponent(id)+'/hero',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ØµÙØ±Ø© اÙ٠جت٠ع'});}
14415 async function save(){store.state.busy=true;const payload=Object.assign({},form,{coverage_cities:String(form.coverage_cities||'').split(',').map(x=>x.trim()).filter(Boolean)});let r=await api('/api/admin/communities',{method:'POST',body:JSON.stringify(payload)});let msg=r.message||r.error||'';if(r.ok&&heroFile.value&&r.community&&r.community.id){const up=await uploadHero(r.community.id);msg=(up&&up.message)||msg;}store.state.busy=false;store.state.msg=msg;if(r.ok){clear();await load();}} 14416 async function archive(c){if(!confirm('Ø£Ø±Ø´ÙØ© '+(c.name_ar||'اÙ٠جت٠ع')+'Ø'))return;store.state.busy=true;const r=await api('/api/admin/communities/'+encodeURIComponent(c.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 14417 onMounted(load); 14418 return{store,form,heroName,load,edit,clear,save,archive,onHeroFile,safeArray}; 14419 }, 14420 render:(function(){ 14421const _Vue = Vue 14422const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 14423 14424const _hoisted_1 = { class: "card formCard" } 14425const _hoisted_2 = { class: "editGrid" } 14426const _hoisted_3 = ["onUpdate:modelValue"] 14427const _hoisted_4 = ["onUpdate:modelValue"] 14428const _hoisted_5 = ["onUpdate:modelValue"] 14429const _hoisted_6 = ["onUpdate:modelValue"] 14430const _hoisted_7 = ["onUpdate:modelValue"] 14431const _hoisted_8 = ["onUpdate:modelValue"] 14432const _hoisted_9 = ["onUpdate:modelValue"] 14433const _hoisted_10 = ["onUpdate:modelValue"] 14434const _hoisted_11 = { 14435 key: 0, 14436 class: "heroAdminPreview" 14437} 14438const _hoisted_12 = ["src"] 14439const _hoisted_13 = { class: "filePicker" } 14440const _hoisted_14 = ["onChange"] 14441const _hoisted_15 = { class: "row" } 14442const _hoisted_16 = ["onClick"] 14443const _hoisted_17 = ["onClick"] 14444const _hoisted_18 = { class: "grid cardsGrid" } 14445const _hoisted_19 = ["src"] 14446const _hoisted_20 = { class: "memberCardTop" } 14447const _hoisted_21 = { class: "statusPill" } 14448const _hoisted_22 = { class: "hint" } 14449const _hoisted_23 = { 14450 key: 1, 14451 class: "hint" 14452} 14453const _hoisted_24 = { class: "row" } 14454const _hoisted_25 = ["onClick"] 14455const _hoisted_26 = ["onClick"] 14456 14457return function render(_ctx, _cache) { 14458 with (_ctx) { 14459 const { resolveComponent: _resolveComponent, createVNode: _createVNode, createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, vModelText: _vModelText, withDirectives: _withDirectives, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, createTextVNode: _createTextVNode, withCtx: _withCtx, createBlock: _createBlock } = _Vue 14460 14461 const _component_IdentityAdminNav = _resolveComponent("IdentityAdminNav") 14462 const _component_AdminFrame = _resolveComponent("AdminFrame") 14463 14464 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙ٠جت٠عات اÙÙ ØÙÙØ©" }, { 14465 default: _withCtx(() => [ 14466 _createVNode(_component_IdentityAdminNav), 14467 _cache[3] || (_cache[3] = _createElementVNode("div", { class: "card noticeCard compactNotice identityBoundaryNote" }, [_createElementVNode("span", { class: "vueBadge" }, "اÙ٠جت٠عات اÙÙ ØÙÙØ©"), _createElementVNode("h3", null, "ÙÙØ§ÙØºØªØ´Ù ÙØ¥ÙÙÙ ÙØºÙØ±ÙØ§"), _createElementVNode("p", null, "ÙØ°Ù Ø§ÙØµÙØØ© تخص Ø¨ÙØ§Ùات ÙØµÙر Ù٠٠جت٠ع Ù ØÙÙ ÙÙØ·. ÙØ§ تغÙÙØ± Ø§Ø³Ù Ù ÙØµØ© SMT China ÙÙØ§ Ù ØØªÙÙ ØµÙØØ© «ع٠اÙÙ ÙØµØ©Â» ÙÙØ§ Ø£ÙÙÙÙØ© Ø§ÙØªØ·Ø¨ÙÙ.")], -1)), 14468 _createElementVNode("section", _hoisted_1, [ 14469 _createElementVNode("h3", null, _toDisplayString(form.id?'تعدÙ٠٠جت٠ع Ù ØÙÙ':'Ø¥Ø¶Ø§ÙØ© ٠جت٠ع Ù ØÙÙ'), 1), 14470 _createElementVNode("div", _hoisted_2, [ 14471 _withDirectives(_createElementVNode("input", { 14472 "onUpdate:modelValue": $event => ((form.name_ar) = $event), 14473 placeholder: "Ø§ÙØ§Ø³Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù: ٠جت٠ع ÙÙØ§ÙغتشÙ" 14474 }, null, 8, _hoisted_3), [[_vModelText, form.name_ar]]), 14475 _withDirectives(_createElementVNode("input", { 14476 "onUpdate:modelValue": $event => ((form.name_en) = $event), 14477 placeholder: "English name" 14478 }, null, 8, _hoisted_4), [[_vModelText, form.name_en]]), 14479 _withDirectives(_createElementVNode("input", { 14480 "onUpdate:modelValue": $event => ((form.slug) = $event), 14481 placeholder: "slug ٠ث٠guangzhou" 14482 }, null, 8, _hoisted_5), [[_vModelText, form.slug]]), 14483 _withDirectives(_createElementVNode("input", { 14484 "onUpdate:modelValue": $event => ((form.main_city) = $event), 14485 placeholder: "اÙ٠دÙÙØ© Ø§ÙØ±Ø¦ÙØ³ÙØ©" 14486 }, null, 8, _hoisted_6), [[_vModelText, form.main_city]]), 14487 _withDirectives(_createElementVNode("input", { 14488 "onUpdate:modelValue": $event => ((form.coverage_cities) = $event), 14489 placeholder: "اÙÙ Ø¯Ù Ø§ÙØªØ§Ø¨Ø¹Ø© Ù ÙØµÙÙØ© بÙÙØ§ØµÙ" 14490 }, null, 8, _hoisted_7), [[_vModelText, form.coverage_cities]]), 14491 _withDirectives(_createElementVNode("input", { 14492 type: "number", 14493 "onUpdate:modelValue": $event => ((form.sort_order) = $event), 14494 placeholder: "ØªØ±ØªÙØ¨" 14495 }, null, 8, _hoisted_8), [[_vModelText, form.sort_order]]) 14496 ]), 14497 _withDirectives(_createElementVNode("textarea", { 14498 "onUpdate:modelValue": $event => ((form.about_ar) = $event), 14499 placeholder: "ع٠اÙ٠جت٠ع اÙÙ ØÙÙ - ÙÙØ§Ùغتش٠/ Ø¥ÙÙÙ" 14500 }, null, 8, _hoisted_9), [[_vModelText, form.about_ar]]), 14501 _withDirectives(_createElementVNode("textarea", { 14502 "onUpdate:modelValue": $event => ((form.about_en) = $event), 14503 placeholder: "About this local community" 14504 }, null, 8, _hoisted_10), [[_vModelText, form.about_en]]), 14505 (form.hero_image_url) 14506 ? (_openBlock(), _createElementBlock("div", _hoisted_11, [_createElementVNode("img", { 14507 src: form.hero_image_url, 14508 loading: "lazy", 14509 alt: "" 14510 }, null, 8, _hoisted_12)])) 14511 : _createCommentVNode("", true), 14512 _createElementVNode("label", _hoisted_13, [_createElementVNode("input", { 14513 type: "file", 14514 accept: "image/jpeg,image/png,image/webp", 14515 onChange: onHeroFile 14516 }, null, 40, _hoisted_14), _cache[0] || (_cache[0] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø© Ù Ù ÙØ²Ø© ÙÙ٠جت٠ع", -1)), _createElementVNode("em", null, _toDisplayString(heroName), 1)]),
14517 _createElementVNode("div", _hoisted_15, [_createElementVNode("button", { 14518 class: "btn", 14519 onClick: save 14520 }, "ØÙظ", 8, _hoisted_16), _createElementVNode("button", { 14521 class: "btn secondary", 14522 onClick: clear 14523 }, "ØªÙØ±Ùغ", 8, _hoisted_17)]) 14524 ]), 14525 _createElementVNode("section", _hoisted_18, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.communities, (c) => { 14526 return (_openBlock(), _createElementBlock("article", { 14527 class: "card communityScopeCard", 14528 key: c.id 14529 }, [ 14530 (c.hero_image_url) 14531 ? (_openBlock(), _createElementBlock("img", { 14532 key: 0, 14533 class: "localCommunityHero", 14534 src: c.hero_image_url, 14535 loading: "lazy", 14536 alt: "" 14537 }, null, 8, _hoisted_19)) 14538 : _createCommentVNode("", true), 14539 _createElementVNode("div", _hoisted_20, [_createElementVNode("h3", null, _toDisplayString(c.name_ar), 1), _createElementVNode("span", _hoisted_21, _toDisplayString(c.slug), 1)]), 14540 _createElementVNode("p", _hoisted_22, _toDisplayString(c.name_en), 1), 14541 _createElementVNode("p", null, [_cache[1] || (_cache[1] = _createElementVNode("b", null, "اÙ٠دÙÙØ© Ø§ÙØ±Ø¦ÙØ³ÙØ©:", -1)), _createTextVNode(" " + _toDisplayString($cityLabel(c.main_city) || '-'), 1)]), 14542 _createElementVNode("p", null, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "اÙÙØ·Ø§Ù:", -1)), _createTextVNode(" " + _toDisplayString(safeArray(c.coverage_cities).map($cityLabel).join('Ø ') || '-'), 1)]), 14543 (c.about_ar) 14544 ? (_openBlock(), _createElementBlock("p", _hoisted_23, _toDisplayString(c.about_ar), 1)) 14545 : _createCommentVNode("", true), 14546 _createElementVNode("div", _hoisted_24, [_createElementVNode("button", { 14547 class: "smallbtn secondary", 14548 onClick: $event => (edit(c)) 14549 }, "تعدÙÙ", 8, _hoisted_25), (c.slug!=='all-china'&&(store.state.me&&store.state.me.admin&&store.state.me.admin.role==='super_admin')) 14550 ? (_openBlock(), _createElementBlock("button", { 14551 key: 0, 14552 class: "smallbtn danger", 14553 onClick: $event => (archive(c)) 14554 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_26)) 14555 : _createCommentVNode("", true)]) 14556 ])) 14557 }), 128))]) 14558 ]), 14559 _: 1, 14560 __: [3] 14561 })) 14562 } 14563} 14564})() 14565 }; 14566 14567 const AdminCommunityPage={ 14568 components:{AdminFrame,IdentityAdminNav}, 14569 setup(){ 14570 const store=useGzcStore();const router=useRouter(); 14571 const community=ref({profile:{},images:[],terms:[]}); 14572 const selectedCommunityId=ref(''); 14573 const profile=reactive({title_ar:'',title_en:'',body_ar:'',body_en:'',mission_ar:'',vision_ar:'',splash_enabled:true,splash_seconds:4}); 14574 const splashFile=ref(null);const splashName=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©'); 14575 const galleryFile=ref(null);const galleryName=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©');const imageTitle=ref(''); 14576 const term=reactive({title:'',period_label:'',is_current:false,sort_order:100}); 14577 const exec=reactive({term_id:'',name:'',position:'',sort_order:100});const execFile=ref(null);const execFileName=ref('Ø§Ø®ØªÙØ§Ø±Ù'); 14578 const images=computed(()=>selectedCommunityId.value?safeArray(community.value.images).filter(x=>!x.archived_at):[]); 14579 const communities=computed(()=>safeArray(community.value.communities||community.value.local_communities).filter(x=>!x.archived_at&&x.status!=='archived'&&String(x.slug)!=='all-china')); 14580 const terms=computed(()=>selectedCommunityId.value?safeArray(community.value.terms).filter(x=>!x.archived_at):[]); 14581 const selectedCommunity=computed(()=>communities.value.find(x=>String(x.id)===String(selectedCommunityId.value))||null); 14582 const currentTerm=computed(()=>terms.value.find(t=>t.is_current)||terms.value[0]||null); 14583 function applyProfile(p){Object.assign(profile,{title_ar:p.title_ar||'',title_en:p.title_en||'',body_ar:p.body_ar||'',body_en:p.body_en||'',mission_ar:p.mission_ar||'',vision_ar:p.vision_ar||'',splash_enabled:p.splash_enabled!==false,splash_seconds:Number(p.splash_seconds||4)});} 14584 async function load(){if(!(await store.requireAdmin(router)))return;store.state.busy=true;const qs=selectedCommunityId.value?('?community_id='+encodeURIComponent(selectedCommunityId.value)):'';const r=await api('/api/admin/community-profile'+qs);store.state.busy=false;if(r.status===401){router.replace('/admin/login');return;}community.value=(r&&r.community)||{profile:{},images:[],terms:[]};applyProfile(community.value.profile||{});if(selectedCommunityId.value&¤tTerm.value&&!exec.term_id)exec.term_id=currentTerm.value.id;if(!selectedCommunityId.value)exec.term_id='';} 14585 onMounted(load); 14586 function pickSplash(e){splashFile.value=(e.target.files&&e.target.files[0])||null;splashName.value=splashFile.value?splashFile.value.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';} 14587 function pickGallery(e){galleryFile.value=(e.target.files&&e.target.files[0])||null;galleryName.value=galleryFile.value?galleryFile.value.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';} 14588 function pickExec(e){execFile.value=(e.target.files&&e.target.files[0])||null;execFileName.value=execFile.value?execFile.value.name:'Ø§Ø®ØªÙØ§Ø±Ù';} 14589 async function saveProfile(){store.state.busy=true;store.state.msg='جار٠ØÙظ ØµÙØØ© ع٠اÙÙ ÙØµØ©...';const r=await api('/api/admin/community-profile',{method:'POST',body:JSON.stringify(profile)}
14589);store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 14590 async function uploadSplash(){if(!splashFile.value){store.state.msg='اختر ØµÙØ±Ø© Ø£ÙÙØ§Ù';return;}const fd=new FormData();fd.append('file',splashFile.value);store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø±ÙØ¹ ØµÙØ±Ø© ØµÙØØ© ع٠اÙÙ ÙØµØ©...';const r=await uploadApi('/api/admin/community-profile/splash',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ØµÙØ±Ø© ØµÙØØ© ع٠اÙÙ ÙØµØ©'});store.state.busy=false;store.state.msg=r.message||r.error||'';splashFile.value=null;splashName.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';await load();} 14591 async function uploadGallery(){if(!selectedCommunityId.value){store.state.msg='اختر اÙ٠جت٠ع اÙÙ ØÙ٠أÙÙØ§Ù';return;}if(!galleryFile.value){store.state.msg='اختر ØµÙØ±Ø© ÙÙØ£ÙبÙ٠أÙÙØ§Ù';return;}const fd=new FormData();fd.append('community_id',selectedCommunityId.value);fd.append('title',imageTitle.value||'');fd.append('file',galleryFile.value);store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø±ÙØ¹ ØµÙØ±Ø© Ø§ÙØ£ÙبÙÙ ...';const r=await uploadApi('/api/admin/community-images',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ØµÙØ±Ø© Ø£ÙØ¨Ù٠اÙ٠جت٠ع'});store.state.busy=false;store.state.msg=r.message||r.error||'';galleryFile.value=null;galleryName.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';imageTitle.value='';await load();} 14592 async function archiveImage(img){if(!confirm('Ø£Ø±Ø´ÙØ© Ø§ÙØµÙرةØ'))return;store.state.busy=true;const r=await api('/api/admin/community-images/'+encodeURIComponent(img.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 14593 async function createTerm(){if(!selectedCommunityId.value){store.state.msg='اختر اÙ٠جت٠ع اÙÙ ØÙ٠أÙÙØ§Ù';return;}if(!term.title.trim()){store.state.msg='Ø§Ø³Ù Ø§ÙØ¯Ùرة Ù Ø·ÙÙØ¨';return;}store.state.busy=true;const r=await api('/api/admin/executive-terms',{method:'POST',body:JSON.stringify({...term,community_id:selectedCommunityId.value})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){term.title='';term.period_label='';term.is_current=false;term.sort_order=100;}await load();} 14594 async function archiveTerm(t){if(!confirm('Ø£Ø±Ø´ÙØ© Ø§ÙØ¯ÙرةØ'))return;store.state.busy=true;const r=await api('/api/admin/executive-terms/'+encodeURIComponent(t.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 14595 async function createExec(){if(!selectedCommunityId.value){store.state.msg='اختر اÙ٠جت٠ع اÙÙ ØÙ٠أÙÙØ§Ù';return;}if(!exec.term_id||!exec.name.trim()){store.state.msg='Ø§ÙØ¯Ùرة ÙØ§Ùاس٠٠طÙÙØ¨Ø©';return;}const fd=new FormData();fd.append('community_id',selectedCommunityId.value);Object.keys(exec).forEach(k=>fd.append(k,exec[k]));if(execFile.value)fd.append('file',execFile.value);store.state.busy=true;const r=await uploadApi('/api/admin/executive-members',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ Ø¨ÙØ§Ùات ÙØµÙرة اÙ٠شرÙ'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){exec.name='';exec.position='';exec.sort_order=100;execFile.value=null;execFileName.value='Ø§Ø®ØªÙØ§Ø±Ù';}await load();} 14596 async function archiveExec(m){if(!confirm('Ø£Ø±Ø´ÙØ© عض٠اÙÙ ÙØªØ¨ Ø§ÙØªÙÙÙØ°ÙØ'))return;store.state.busy=true;const r=await api('/api/admin/executive-members/'+encodeURIComponent(m.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 14597 return {store,community,selectedCommunityId,selectedCommunity,profile,images,communities,terms,currentTerm,splashName,galleryName,imageTitle,term,exec,execFileName,load,pickSplash,pickGallery,pickExec,saveProfile,uploadSplash,uploadGallery,archiveImage,createTerm,archiveTerm,createExec,archiveExec,safeArray}; 14598 }, 14599 render:(function(){ 14600const _Vue = Vue
14601const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 14602 14603const _hoisted_1 = { class: "communityCmsGrid" } 14604const _hoisted_2 = { class: "card formCard communityProfileCard" } 14605const _hoisted_3 = ["onUpdate:modelValue"] 14606const _hoisted_4 = ["onUpdate:modelValue"] 14607const _hoisted_5 = ["onUpdate:modelValue"] 14608const _hoisted_6 = ["onUpdate:modelValue"] 14609const _hoisted_7 = ["onUpdate:modelValue"] 14610const _hoisted_8 = ["onClick"] 14611const _hoisted_9 = { class: "card communityCard communityPreviewCard" } 14612const _hoisted_10 = { class: "memberActions" } 14613const _hoisted_11 = ["onClick"] 14614const _hoisted_12 = ["onClick"] 14615const _hoisted_13 = { class: "card identityScopeChooser" } 14616const _hoisted_14 = { class: "editGrid" } 14617const _hoisted_15 = ["onUpdate:modelValue", "onChange"] 14618const _hoisted_16 = ["value"] 14619const _hoisted_17 = ["onClick"] 14620const _hoisted_18 = { 14621 key: 0, 14622 class: "identityScopeActive" 14623} 14624const _hoisted_19 = { 14625 key: 0, 14626 class: "card emptyCard identityEmptyScope" 14627} 14628const _hoisted_20 = { 14629 class: "card collapseSection", 14630 open: "" 14631} 14632const _hoisted_21 = { class: "collapseBody" } 14633const _hoisted_22 = { class: "editGrid" } 14634const _hoisted_23 = ["onUpdate:modelValue"] 14635const _hoisted_24 = { class: "filePicker" } 14636const _hoisted_25 = ["onChange"] 14637const _hoisted_26 = ["onClick"] 14638const _hoisted_27 = { 14639 key: 0, 14640 class: "communityImageGrid" 14641} 14642const _hoisted_28 = ["src"] 14643const _hoisted_29 = ["onClick"] 14644const _hoisted_30 = { 14645 key: 1, 14646 class: "hint" 14647} 14648const _hoisted_31 = { class: "card collapseSection" } 14649const _hoisted_32 = { class: "collapseBody" } 14650const _hoisted_33 = { class: "editGrid" } 14651const _hoisted_34 = ["onUpdate:modelValue"] 14652const _hoisted_35 = ["onUpdate:modelValue"] 14653const _hoisted_36 = ["onUpdate:modelValue"] 14654const _hoisted_37 = { class: "check" } 14655const _hoisted_38 = ["onUpdate:modelValue"] 14656const _hoisted_39 = ["onClick"] 14657const _hoisted_40 = { 14658 key: 0, 14659 class: "statusPill" 14660} 14661const _hoisted_41 = ["onClick"] 14662const _hoisted_42 = { class: "card collapseSection" } 14663const _hoisted_43 = { class: "collapseBody" } 14664const _hoisted_44 = { class: "editGrid" } 14665const _hoisted_45 = ["onUpdate:modelValue"] 14666const _hoisted_46 = ["value"] 14667const _hoisted_47 = ["onUpdate:modelValue"] 14668const _hoisted_48 = ["onUpdate:modelValue"] 14669const _hoisted_49 = ["onUpdate:modelValue"] 14670const _hoisted_50 = { class: "filePicker" } 14671const _hoisted_51 = ["onChange"] 14672const _hoisted_52 = ["onClick"] 14673const _hoisted_53 = { 14674 key: 0, 14675 class: "executiveGrid" 14676} 14677const _hoisted_54 = ["src"] 14678const _hoisted_55 = { 14679 key: 1, 14680 class: "avatar" 14681} 14682const _hoisted_56 = ["onClick"] 14683const _hoisted_57 = { 14684 key: 1, 14685 class: "hint" 14686} 14687 14688return function render(_ctx, _cache) { 14689 with (_ctx) { 14690 const { resolveComponent: _resolveComponent, createVNode: _createVNode, createElementVNode: _createElementVNode, createTextVNode: _createTextVNode, vModelText: _vModelText, withDirectives: _withDirectives, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, vModelSelect: _vModelSelect, createCommentVNode: _createCommentVNode, vModelCheckbox: _vModelCheckbox, withCtx: _withCtx, createBlock: _createBlock } = _Vue 14691 14692 const _component_IdentityAdminNav = _resolveComponent("IdentityAdminNav") 14693 const _component_AdminFrame = _resolveComponent("AdminFrame") 14694 14695 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ع٠اÙÙ ÙØµØ©" }, { 14696 default: _withCtx(() => [ 14697 _createVNode(_component_IdentityAdminNav), 14698 _cache[15] || (_cache[15] = _createElementVNode("div", { class: "card noticeCard compactNotice identityBoundaryNote" }, [_createElementVNode("span", { class: "vueBadge" }, "عا٠ÙÙ٠اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "ØµÙØØ© «ع٠اÙÙ ÙØµØ©Â» ٠ستÙÙØ© ع٠اÙ٠جت٠عات"), _createElementVNode("p", null, [_createTextVNode("Ø§ÙØ¹ÙÙØ§Ù ÙØ§ÙÙØ¨Ø°Ø© ÙØ§ÙØ±Ø³Ø§ÙØ© ÙØ§ÙØ±Ø¤ÙØ© Ø£Ø¯ÙØ§Ù تخص SMT China باÙÙØ§Ù Ù ÙØªØ¸Ùر ÙÙ "), _createElementVNode("b", null, "/about"), _createTextVNode(". Ø§Ø®ØªÙØ§Ø± ÙÙØ§Ùغتش٠أ٠إÙÙÙ ÙØ§ ÙØºÙÙØ± ÙØ°Ø§ اÙÙ ØØªÙÙ.")])], -1)), 14699 _createElementVNode("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, [ 14700 _cache[0] || (_cache[0] = _createElementVNode("h3", null, "Ù ØØªÙÙ ØµÙØØ© ع٠اÙÙ ÙØµØ©", -1)), 14701 _withDirectives(_createElementVNode("input", { 14702 "onUpdate:modelValue": $event => ((profile.title_ar) = $event), 14703 placeholder: "Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù" 14704 }, null, 8, _hoisted_3), [[_vModelText, profile.title_ar]]), 14705 _withDirectives(_createElementVNode("input", { 14706 "onUpdate:modelValue": $event => ((profile.title_en) = $event), 14707 placeholder: "English title" 14708 }, null, 8, _hoisted_4), [[_vModelText, profile.title_en]]), 14709 _withDirectives(_createElementVNode("textarea", { 14710 "onUpdate:modelValue": $event => ((profile.body_ar) = $event), 14711 placeholder: "ÙØ¨Ø°Ø© Ø¹Ù Ù ÙØµØ© SMT China" 14712 }, null, 8, _hoisted_5), [[_vModelText, profile.body_ar]]), 14713 _withDirectives(_createElementVNode("textarea", { 14714 "onUpdate:modelValue": $event => ((profile.mission_ar) = $event), 14715 placeholder: "Ø§ÙØ±Ø³Ø§ÙØ©" 14716 }, null, 8, _hoisted_6), [[_vModelText, profile.mission_ar]]), 14717 _withDirectives(_createElementVNode("textarea", { 14718 "onUpdate:modelValue": $event => ((profile.vision_ar) = $event), 14719 placeholder: "Ø§ÙØ±Ø¤ÙØ©" 14720 }, null, 8, _hoisted_7), [[_vModelText, profile.vision_ar]]), 14721 _cache[1] || (_cache[1] = _createElementVNode("p", { class: "hint" }, "شعار Ø§ÙØµÙØØ© ÙØªØ¨Ø¹ ÙÙÙØ© SMT اÙÙ Ø¹ØªÙ Ø¯Ø©Ø ÙÙÙØ³ شعار أ٠جاÙÙØ© أ٠٠جت٠ع Ù ØÙÙ.", -1)), 14722 _createElementVNode("button", { 14723 class: "btn loadMore", 14724 onClick: saveProfile 14725 }, "ØÙظ ØµÙØØ© ع٠اÙÙ ÙØµØ©", 8, _hoisted_8) 14726 ]), _createElementVNode("div", _hoisted_9, [ 14727 _cache[3] || (_cache[3] = _createElementVNode("h3", null, "٠عاÙÙØ© Ø§ÙØµÙØØ©", -1)), 14728 _cache[4] || (_cache[4] = _createElementVNode("img", { 14729 class: "communitySplashPreview platformAboutLogo", 14730 src: "/brand/smt-gold-v1/smt-logo-transparent.png", 14731 width: "160", 14732 height: "160", 14733 loading: "lazy", 14734 alt: "شعار Ù ÙØµØ© SMT China" 14735 }, null, -1)), 14736 _createElementVNode("b", null, _toDisplayString(profile.title_ar || 'Ø¹Ù Ù ÙØµØ© SMT China'), 1), 14737 _createElementVNode("p", null, _toDisplayString(profile.body_ar || 'ÙØ§ ÙÙØ¬Ø¯ ÙØµ بعد.'), 1), 14738 _createElementVNode("div", _hoisted_10, [_cache[2] || (_cache[2] = _createElementVNode("a", { 14739 class: "smallbtn", 14740 href: "/about", 14741 target: "_blank", 14742 rel: "noopener" 14743 }, "ÙØªØ ØµÙØØ© ع٠اÙÙ ÙØµØ©", -1)), _createElementVNode("button", { 14744 class: "smallbtn", 14745 onClick: $event => ($router.push('/admin/platform')) 14746 }, "ÙÙÙØ© اÙÙ ÙØµØ©", 8, _hoisted_11), _createElementVNode("button", { 14747 class: "smallbtn", 14748 onClick: $event => ($router.push('/admin/brand-assets')) 14749 }, "Ø§ÙØ£ØµÙÙ Ø§ÙØ¨ØµØ±ÙØ©", 8, _hoisted_12)]) 14750 ])]), 14751 _createElementVNode("section", _hoisted_13, [_cache[7] || (_cache[7] = _
14751createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù ØØªÙÙ Ù ØÙÙ"), _createElementVNode("h3", null, "Ø£ÙØ¨ÙÙ ÙÙ ÙØªØ¨ اÙ٠جت٠ع اÙÙ ØÙÙ"), _createElementVNode("p", null, "اختر ٠جت٠عا٠ÙÙØ· Ø¹ÙØ¯ إدارة ØµÙØ±Ù Ø£Ù Ø¯ÙØ±Ø§ØªÙ أ٠أعضاء Ù ÙØªØ¨Ù Ø§ÙØªÙÙÙØ°Ù. ÙØ°Ù Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ§ تغÙÙØ± ØµÙØØ© «ع٠اÙÙ ÙØµØ©Â» Ø§ÙØ¹Ø§Ù Ø©.")], -1)), _createElementVNode("div", _hoisted_14, [_withDirectives(_createElementVNode("select", { 14752 "onUpdate:modelValue": $event => ((selectedCommunityId) = $event), 14753 onChange: load 14754 }, [_cache[5] || (_cache[5] = _createElementVNode("option", { value: "" }, "اختر ٠جت٠عا٠٠ØÙÙØ§Ù", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(communities, (lc) => { 14755 return (_openBlock(), _createElementBlock("option", { 14756 key: lc.id, 14757 value: lc.id 14758 }, _toDisplayString(lc.name_ar), 9, _hoisted_16)) 14759 }), 128))], 40, _hoisted_15), [[_vModelSelect, selectedCommunityId]]), _createElementVNode("button", { 14760 class: "smallbtn secondary", 14761 onClick: $event => ($router.push('/admin/communities')) 14762 }, "إدارة اÙ٠جت٠عات", 8, _hoisted_17)]), selectedCommunity 14763 ? (_openBlock(), _createElementBlock("p", _hoisted_18, [_cache[6] || (_cache[6] = _createTextVNode("اÙÙØ·Ø§Ù Ø§ÙØØ§ÙÙ: ")), _createElementVNode("b", null, _toDisplayString(selectedCommunity.name_ar), 1), _createTextVNode(" â " + _toDisplayString($cityLabel(selectedCommunity.main_city)||'-'), 1)])) 14764 : _createCommentVNode("", true)]), 14765 (!selectedCommunityId) 14766 ? (_openBlock(), _createElementBlock("div", _hoisted_19, "اختر ٠جت٠عا٠٠ØÙÙØ§Ù Ù Ù Ø§ÙØ£Ø¹ÙÙ ÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ£ÙبÙÙ ÙØ§ÙÙ ÙØªØ¨ Ø§ÙØªÙÙÙØ°Ù.")) 14767 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createElementVNode("details", _hoisted_20, [_createElementVNode("summary", null, [_createElementVNode("b", null, "Ø£ÙØ¨ÙÙ " + _toDisplayString(selectedCommunity&&selectedCommunity.name_ar || 'اÙ٠جت٠ع'), 1), _cache[8] || (_cache[8] = _createElementVNode("span", null, null, -1))]), _createElementVNode("div", _hoisted_21, [_createElementVNode("div", _hoisted_22, [_withDirectives(_createElementVNode("input", { 14768 "onUpdate:modelValue": $event => ((imageTitle) = $event), 14769 placeholder: "عÙÙØ§Ù Ø§ÙØµÙرة" 14770 }, null, 8, _hoisted_23), [[_vModelText, imageTitle]]), _createElementVNode("label", _hoisted_24, [_createElementVNode("input", { 14771 type: "file", 14772 accept: "image/jpeg,image/png,image/webp", 14773 onChange: pickGallery 14774 }, null, 40, _hoisted_25), _cache[9] || (_cache[9] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©", -1)), _createElementVNode("em", null, _toDisplayString(galleryName), 1)])]), _createElementVNode("button", { 14775 class: "btn secondary", 14776 onClick: uploadGallery 14777 }, "Ø±ÙØ¹ Ø§ÙØµÙرة", 8, _hoisted_26), (images.length) 14778 ? (_openBlock(), _createElementBlock("div", _hoisted_27, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(images, (img) => { 14779 return (_openBlock(), _createElementBlock("figure", { key: img.id }, [_createElementVNode("img", { 14780 src: img.image_url, 14781 loading: "lazy", 14782 alt: "" 14783 }, null, 8, _hoisted_28), _createElementVNode("figcaption", null, _toDisplayString(img.title || 'ØµÙØ±Ø©'), 1), _createElementVNode("button", { 14784 class: "smallbtn danger", 14785 onClick: $event => (archiveImage(img)) 14786 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_29)])) 14787 }), 128))])) 14788 : (_openBlock(), _createElementBlock("p", _hoisted_30, "ÙØ§ ØªÙØ¬Ø¯ ØµÙØ± ÙÙ Ø£ÙØ¨ÙÙ ÙØ°Ø§ اÙ٠جت٠ع."))])]), _createElementVNode("details", _hoisted_31, [_cache[11] || (_cache[11] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø¯ÙØ±Ø§Øª اÙÙ ÙØªØ¨ Ø§ÙØªÙÙÙØ°Ù"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_32, [_createElementVNode("div", _hoisted_33, [ 14789 _withDirectives(_createElementVNode("input", { 14790 "onUpdate:modelValue": $event => ((term.title) = $event), 14791 placeholder: "Ø§Ø³Ù Ø§ÙØ¯Ùرة" 14792 }, null, 8, _hoisted_34), [[_vModelText, term.title]]), 14793 _withDirectives(_createElementVNode("input", { 14794 "onUpdate:modelValue": $event => ((term.period_label) = $event), 14795 placeholder: "اÙÙØªØ±Ø© ٠ثا٠2026 - 2027" 14796 }, null, 8, _hoisted_35), [[_vModelText, term.period_label]]), 14797 _withDirectives(_createElementVNode("input", { 14798 type: "number", 14799 "onUpdate:modelValue": $event => ((term.sort_order) = $event), 14800 placeholder: "ØªØ±ØªÙØ¨" 14801 }, null, 8, _hoisted_36), [[_vModelText, term.sort_order]]), 14802 _createElementVNode("label", _hoisted_37, [_withDirectives(_createElementVNode("input", { 14803 type: "checkbox", 14804 "onUpdate:modelValue": $event => ((term.is_current) = $event) 14805 }, null, 8, _hoisted_38), [[_vModelCheckbox, term.is_current]]), _cache[10] || (_cache[10] = _createTextVNode(" Ø§ÙØ¯Ùرة Ø§ÙØØ§ÙÙØ©"))]) 14806 ]), _createElementVNode("button", { 14807 class: "btn secondary", 14808 onClick: createTerm 14809 }, "ØÙظ Ø§ÙØ¯Ùرة", 8, _hoisted_39), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(terms, (t) => { 14810 return (_openBlock(), _createElementBlock("div", { 14811 class: "termAdmin", 14812 key: t.id 14813 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(t.title), 1), _createElementVNode("small", null, _toDisplayString(t.period_label || '-'), 1)]), (t.is_current) 14814 ? (_openBlock(), _createElementBlock("span", _hoisted_40, "Ø§ÙØØ§ÙÙØ©")) 14815 : _createCommentVNode("", true), _createElementVNode("button", { 14816 class: "smallbtn danger", 14817 onClick: $event => (archiveTerm(t)) 14818 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_41)])) 14819 }), 128))])]), _createElementVNode("details", _hoisted_42, [_cache[14] || (_cache[14] = _createElementVNode("summary", null, [_createElementVNode("b", null, "أعضاء اÙÙ ÙØªØ¨ Ø§ÙØªÙÙÙØ°Ù"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_43, [_createElementVNode("div", _hoisted_44, [ 14820 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((exec.term_id) = $event) }, [_cache[12] || (_cache[12] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØ¯Ùرة", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(terms, (t) => { 14821 return (_openBlock(), _createElementBlock("option", { 14822 key: t.id, 14823 value: t.id 14824 }, _toDisplayString(t.title), 9, _hoisted_46)) 14825 }), 128))], 8, _hoisted_45), [[_vModelSelect, exec.term_id]]), 14826 _withDirectives(_createElementVNode("input", { 14827 "onUpdate:modelValue": $event => ((exec.name) = $event), 14828 placeholder: "Ø§ÙØ§Ø³Ù " 14829 }, null, 8, _hoisted_47), [[_vModelText, exec.name]]), 14830 _withDirectives(_createElementVNode("input", { 14831 "onUpdate:modelValue": $event => ((exec.position) = $event), 14832 placeholder: "اÙÙ ÙØµØ¨" 14833 }, null, 8, _hoisted_48), [[_vModelText, exec.position]]), 14834 _withDirectives(_createElementVNode("input", { 14835 type: "number", 14836 "onUpdate:modelValue": $event => ((exec.sort_order) = $event), 14837 placeholder: "ØªØ±ØªÙØ¨" 14838 }, null, 8, _hoisted_49), [[_vModelText, exec.sort_order]]), 14839 _createElementVNode("label", _hoisted_50, [_createElementVNode("input", { 14840 type: "file", 14841 accept: "image/jpeg,image/png,image/webp", 14842 onChange: pickExec 14843 }, null, 40, _hoisted_51), _cache[13] || (_cache[13] = _createElementVNode("span", null, "ØµÙØ±Ø© Ø§ÙØ¹Ø¶Ù", -1)), _createElementVNode("em", null, _toDisplayString(execFileName), 1)]) 14844 ]), _createElementVNode("button", { 14845 class: "btn secondary", 14846 onClick: createExec 14847 }, "Ø¥Ø¶Ø§ÙØ© عضÙ", 8, _hoisted_52), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(terms, (t) => { 14848 return (_openBlock(), _createElementBlock("div", { 14849 class: "execAdminTerms",
14850 key: 'm'+t.id 14851 }, [_createElementVNode("h4", null, _toDisplayString(t.title), 1), (t.members&&t.members.length) 14852 ? (_openBlock(), _createElementBlock("div", _hoisted_53, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(t.members, (m) => { 14853 return (_openBlock(), _createElementBlock("div", { 14854 class: "execMini", 14855 key: m.id 14856 }, [ 14857 ($memberPhoto(m,'thumb')) 14858 ? (_openBlock(), _createElementBlock("img", { 14859 key: 0, 14860 src: $memberPhoto(m,'thumb'), 14861 loading: "lazy", 14862 alt: "" 14863 }, null, 8, _hoisted_54)) 14864 : (_openBlock(), _createElementBlock("div", _hoisted_55, "ð¤")), 14865 _createElementVNode("b", null, _toDisplayString(m.name), 1), 14866 _createElementVNode("small", null, _toDisplayString(m.position || 'عضÙ'), 1), 14867 _createElementVNode("button", { 14868 class: "smallbtn danger", 14869 onClick: $event => (archiveExec(m)) 14870 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_56) 14871 ])) 14872 }), 128))])) 14873 : (_openBlock(), _createElementBlock("p", _hoisted_57, "ÙØ§ ÙÙØ¬Ø¯ أعضاء ÙÙ ÙØ°Ù Ø§ÙØ¯Ùرة."))])) 14874 }), 128))])])], 64)) 14875 ]), 14876 _: 1, 14877 __: [15] 14878 })) 14879 } 14880} 14881})() 14882 }; 14883 14884 14885 14886 const PublicDemoPage={ 14887 setup(){ 14888 const store=useGzcStore(); 14889 const loading=ref(false),status=ref(null),loaded=ref(false); 14890 async function load(){status.value=await api('/api/demo-member/status');loaded.value=true;} 14891 async function start(){ 14892 loading.value=true;store.state.msg='جار٠تجÙÙØ² Ø§ÙØØ³Ø§Ø¨ Ø§ÙØªØ¬Ø±ÙبÙ...'; 14893 const r=await api('/api/demo-member/start',{method:'POST'}); 14894 loading.value=false; 14895 if(r.ok){store.state.msg=r.message||'ØªÙ ÙØªØ Ø§ÙØØ³Ø§Ø¨ Ø§ÙØªØ¬Ø±ÙبÙ';window.location.href=r.redirect||'/complete?demo=1';return;} 14896 status.value=r;loaded.value=true;store.state.msg=r.message||r.error||'Ø§ÙØ®Ø¯Ù Ø© Ø§ÙØªØ¬Ø±ÙØ¨ÙØ© ØºÙØ± Ù ØªØ§ØØ©'; 14897 } 14898 onMounted(load); 14899 return {store,loading,status,loaded,start,load,Math}; 14900 }, 14901 render:(function(){ 14902const _Vue = Vue 14903const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 14904 14905const _hoisted_1 = { class: "demoPublicPage" } 14906const _hoisted_2 = { class: "hero card" } 14907const _hoisted_3 = { 14908 key: 0, 14909 class: "hint" 14910} 14911const _hoisted_4 = { class: "demoBox" } 14912const _hoisted_5 = ["onClick", "disabled"] 14913const _hoisted_6 = ["onClick"] 14914const _hoisted_7 = ["onClick"] 14915const _hoisted_8 = { 14916 key: 0, 14917 class: "card" 14918} 14919 14920return function render(_ctx, _cache) { 14921 with (_ctx) { 14922 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, Fragment: _Fragment } = _Vue 14923 14924 return (_openBlock(), _createElementBlock("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_cache[5] || (_cache[5] = _createElementVNode("h2", null, "Ø§ÙØªØ¬Ø±Ø¨Ø© Ø§ÙØ¢Ù ÙØ© ÙÙÙ ÙØµØ©", -1)), (!loaded) 14925 ? (_openBlock(), _createElementBlock("p", _hoisted_3, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ٠٠٠تÙÙØ± Ø§ÙØªØ¬Ø±Ø¨Ø©...")) 14926 : (status&&status.ok) 14927 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 14928 _cache[3] || (_cache[3] = _createElementVNode("p", { class: "hint" }, "ØØ³Ø§Ø¨ ØªØ¬Ø±ÙØ¨Ù ٠خصص ÙÙØªØ¬Ø±Ø¨Ø©. ÙØ§ ØªØ³ØªØ®Ø¯Ù Ø¨ÙØ§Ùات Ø´Ø®ØµÙØ© ØÙÙÙÙØ©.", -1)), 14929 _createElementVNode("div", _hoisted_4, [ 14930 _cache[0] || (_cache[0] = _createElementVNode("b", null, "رÙÙ Ø§ÙØØ³Ø§Ø¨ Ø§ÙØªØ¬Ø±ÙبÙ:", -1)), 14931 _createTextVNode(" " + _toDisplayString(status.phone), 1), 14932 _cache[1] || (_cache[1] = _createElementVNode("br", null, null, -1)), 14933 _cache[2] || (_cache[2] = _createElementVNode("b", null, "ر٠ز Ø§ÙØªØÙÙ:", -1)), 14934 _createTextVNode(" " + _toDisplayString(status.code), 1) 14935 ]), 14936 _createElementVNode("button", { 14937 class: "btn", 14938 onClick: start, 14939 disabled: loading||status.busy 14940 }, _toDisplayString(loading?'Ø¬Ø§Ø±Ù Ø§ÙØªØ¬ÙÙØ²...':'ابدأ Ø§ÙØªØ¬Ø±Ø¨Ø© Ø§ÙØ¢Ù'), 9, _hoisted_5), 14941 _createElementVNode("button", { 14942 class: "smallbtn", 14943 onClick: load 14944 }, "ØªØØ¯ÙØ« Ø§ÙØØ§ÙØ©", 8, _hoisted_6) 14945 ], 64)) 14946 : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [_cache[4] || (_cache[4] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ¬Ø±Ø¨Ø© ØºÙØ± Ù ØªØ§ØØ© ØØ§ÙÙØ§Ù.", -1)), _createElementVNode("button", { 14947 class: "smallbtn", 14948 onClick: $event => ($router.push('/')) 14949 }, "Ø§ÙØ¹Ùدة ÙÙØ±Ø¦ÙØ³ÙØ©", 8, _hoisted_7)], 64))]), (status&&status.ok&&status.busy) 14950 ? (_openBlock(), _createElementBlock("div", _hoisted_8, [_cache[6] || (_cache[6] = _createElementVNode("h3", null, "Ø§ÙØØ³Ø§Ø¨ Ù Ø³ØªØ®Ø¯Ù Ø§ÙØ¢Ù", -1)), _createElementVNode("p", null, "Ø¬Ø±ÙØ¨ ٠رة أخر٠بعد ØÙاÙÙ " + _toDisplayString(Math.ceil((status.remaining_seconds||60)/60)) + " دÙÙÙØ©.", 1)])) 14951 : _createCommentVNode("", true)])) 14952 } 14953} 14954})() 14955 }; 14956 14957 const AdminDemoPage={ 14958 components:{AdminFrame}, 14959 setup(){ 14960 const store=useGzcStore(); const router=useRouter(); const demo=ref(null); const loading=ref(false); 14961 async function load(){if(!(await store.requireAdmin(router)))return;loading.value=true;const r=await api('/api/admin/demo-member?ts='+Date.now(),{cache:'no-store'});loading.value=false;if(r.status===401){router.replace('/admin/login');return;}demo.value=r;} 14962 async function reset(){loading.value=true;const r=await api('/api/admin/demo-member/reset',{method:'POST'});loading.value=false;store.state.msg=r.message||r.error||'';demo.value=Object.assign({},demo.value||{},r);}
14963 async function start(){if(!confirm('Ø³ÙØªÙ ÙØªØ Ø¬ÙØ³Ø© ÙØ¹Ø¶Ù ØªØ¬Ø±ÙØ¨Ù ÙÙØ¯ تخرج Ù Ù Ø¬ÙØ³Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø© ÙÙ ÙØ°Ø§ اÙÙ ØªØµÙØ. Ù ÙØ§ÙÙØ'))return;loading.value=true;const r=await api('/api/admin/demo-member/login',{method:'POST'});loading.value=false;if(r.ok){store.state.msg=r.message||'';window.location.href=r.redirect||'/complete?demo=1';return;}store.state.msg=r.message||r.error||'تعذر ÙØªØ Ø§ÙØØ³Ø§Ø¨ Ø§ÙØªØ¬Ø±ÙبÙ';} 14964 onMounted(load); 14965 return {store,demo,loading,load,reset,start}; 14966 }, 14967 render:(function(){ 14968const _Vue = Vue 14969const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 14970 14971const _hoisted_1 = { 14972 key: 0, 14973 class: "card" 14974} 14975const _hoisted_2 = { 14976 key: 1, 14977 class: "card formCard" 14978} 14979const _hoisted_3 = { class: "infoGrid" } 14980const _hoisted_4 = { class: "ltr" } 14981const _hoisted_5 = { class: "ltr" } 14982const _hoisted_6 = { class: "row" } 14983const _hoisted_7 = ["onClick"] 14984const _hoisted_8 = ["onClick"] 14985const _hoisted_9 = ["onClick"] 14986 14987return function render(_ctx, _cache) { 14988 with (_ctx) { 14989 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 14990 14991 const _component_AdminFrame = _resolveComponent("AdminFrame") 14992 14993 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ØØ³Ø§Ø¨ ØªØ¬Ø±ÙØ¨Ù ÙÙØ¹Ø¶Ù" }, { 14994 default: _withCtx(() => [ 14995 _cache[10] || (_cache[10] = _createElementVNode("section", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "اختبار Ø§ÙØ¹Ø¶ÙÙØ©"), _createElementVNode("h3", null, "اختبار تسجÙÙ Ø§ÙØ¹Ø¶Ù بدÙ٠رÙÙ Ø¬Ø¯ÙØ¯"), _createElementVNode("p", null, "ÙØ°Ù Ø§ÙØµÙØØ© ØªÙØ´Ø¦ ØØ³Ø§Ø¨ Ø¹Ø¶Ù ØªØ¬Ø±ÙØ¨Ù ثابت ÙØ§ ÙØ±Ø³Ù ÙØ§ØªØ³Ø§Ø¨ ÙÙØ§ ÙÙØ¨Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø©. Ø§Ø³ØªØ®Ø¯Ù Ù ÙØ§Ø®ØªØ¨Ø§Ø± رØÙØ© Ø§ÙØªØ³Ø¬ÙÙ ÙØ¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ§ÙØ¨Ø·Ø§ÙØ© دÙÙ Ø¥Ø¶Ø§ÙØ© رÙÙ ØÙÙÙÙ Ù٠٠رة.")], -1)), 14996 loading 14997 ? (_openBlock(), _createElementBlock("div", _hoisted_1, "جار٠تجÙÙØ² Ø§ÙØØ³Ø§Ø¨ Ø§ÙØªØ¬Ø±ÙبÙ...")) 14998 : _createCommentVNode("", true), 14999 demo 15000 ? (_openBlock(), _createElementBlock("section", _hoisted_2, [ 15001 _cache[8] || (_cache[8] = _createElementVNode("h3", null, "Ø¨ÙØ§Ùات Ø§ÙØØ³Ø§Ø¨ Ø§ÙØªØ¬Ø±ÙبÙ", -1)), 15002 _createElementVNode("div", _hoisted_3, [ 15003 _createElementVNode("p", null, [_cache[0] || (_cache[0] = _createElementVNode("b", null, "رÙÙ Ø§ÙØ§Ø®ØªØ¨Ø§Ø±:", -1)), _cache[1] || (_cache[1] = _createTextVNode()), _createElementVNode("span", _hoisted_4, _toDisplayString(demo.phone), 1)]), 15004 _createElementVNode("p", null, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "ر٠ز Ø§ÙØ¯Ø®ÙÙ:", -1)), _cache[3] || (_cache[3] = _createTextVNode()), _createElementVNode("span", _hoisted_5, _toDisplayString(demo.code || '000000'), 1)]), 15005 _createElementVNode("p", null, [_cache[4] || (_cache[4] = _createElementVNode("b", null, "ØØ§ÙØ© Ø§ÙØ¹Ø¶Ù:", -1)), _createTextVNode(" " + _toDisplayString(demo.member && demo.member.status || '-'), 1)]), 15006 _createElementVNode("p", null, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "ÙÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª:", -1)), _createTextVNode(" " + _toDisplayString(demo.member && demo.member.profile_locked ? 'Ù ÙÙÙÙØ©' : 'Ù ÙØªÙØØ©'), 1)]), 15007 _createElementVNode("p", null, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "Ø§ÙØ§Ø³Ù Ø§ÙØØ§ÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(demo.member && demo.member.full_name || '-'), 1)]), 15008 _createElementVNode("p", null, [_cache[7] || (_cache[7] = _createElementVNode("b", null, "اÙÙÙØ§Ø·:", -1)), _createTextVNode(" " + _toDisplayString(demo.points && demo.points.total_points || 0), 1)]) 15009 ]), 15010 _createElementVNode("div", _hoisted_6, [_createElementVNode("button", { 15011 class: "btn", 15012 onClick: reset 15013 }, "تصÙÙØ± Ø§ÙØØ³Ø§Ø¨", 8, _hoisted_7), _createElementVNode("button", { 15014 class: "btn secondary", 15015 onClick: start 15016 }, "ÙØªØ ÙØ¹Ø¶Ù ØªØ¬Ø±ÙØ¨Ù Ø§ÙØ¢Ù", 8, _hoisted_8), _createElementVNode("button", { 15017 class: "smallbtn", 15018 onClick: load 15019 }, "ØªØØ¯ÙØ«", 8, _hoisted_9)]), 15020 _cache[9] || (_cache[9] = _createElementVNode("p", { class: "hint" }, "ÙÙ ÙÙÙ Ø£ÙØ¶Ø§Ù ÙØªØ ØµÙØØ© دخÙÙ Ø§ÙØ¹Ø¶ÙÙØ© ÙØ§Ø³ØªØ®Ø¯Ø§Ù رÙÙ Ø§ÙØ§Ø®ØªØ¨Ø§Ø± ÙØ§Ùر٠ز اÙÙ ÙØ¶ØÙÙ Ø£Ø¹ÙØ§ÙØ Ø«Ù Ø§ÙØ¹Ùدة Ø¥ÙÙ ÙÙØ§ ÙØªØµÙÙØ± Ø§ÙØØ³Ø§Ø¨ بعد Ø§ÙØªÙاء Ø§ÙØ§Ø®ØªØ¨Ø§Ø±.", -1)) 15021 ])) 15022 : _createCommentVNode("", true), 15023 _cache[11] || (_cache[11] = _createElementVNode("section", { class: "card dangerZone" }, [_createElementVNode("h3", null, "Ù ÙØ§ØØ¸Ø§Øª Ù ÙÙ Ø©"), _createElementVNode("p", null, "Ø§ÙØØ³Ø§Ø¨ Ø§ÙØªØ¬Ø±Ùب٠٠ستبعد Ù Ù Ø±Ø³Ø§Ø¦Ù ÙØ§ØªØ³Ø§Ø¨ Ø§ÙØ¬Ù Ø§Ø¹ÙØ©. Ø¹ÙØ¯ Ø¥ÙÙ Ø§Ù Ø¨ÙØ§ÙØ§ØªÙ ÙØ§ ÙØªÙ Ø¥Ø±Ø³Ø§Ù ØªÙØ¨ÙÙ ÙÙØ¥Ø¯Ø§Ø±Ø© ÙÙØ§ ÙØªÙ Ø¥Ø±Ø³Ø§Ù ÙØ§Ùب رسائÙ. اÙÙØ¯Ù اختبار ÙØ§Ø¬ÙØ© Ø§ÙØ¹Ø¶Ù ÙÙØ·.")], -1)) 15024 ]), 15025 _: 1, 15026 __: [10,11] 15027 })) 15028 } 15029} 15030})() 15031 }; 15032 15033 const AdminAccountPage={ 15034 components:{AdminFrame}, 15035 setup(){ 15036 const store=useGzcStore(); 15037 const router=useRouter(); 15038 const committees=ref([]); 15039 const current=ref({}); 15040 const loading=ref(true); 15041 const error=ref(''); 15042 function baseAdmin(){return (store.state.me&&store.state.me.admin)||{};} 15043 function value(k,fb){const c=current.value||{};const b=baseAdmin();return c[k]||b[k]||fb||'';} 15044 function cName(k){const c=safeArray(committees.value).find(x=>
15044String(x.key)===String(k));return (c&&c.name_ar)||String(k||'-');} 15045 const displayName=computed(()=>String(value('name','Admin'))); 15046 const displayRole=computed(()=>String(value('role','admin'))); 15047 const displayWhatsapp=computed(()=>String(value('whatsapp',(store.state.me&&store.state.me.phone)||'-'))); 15048 const displayStatus=computed(()=>String(value('status','active'))); 15049 const displayCommittees=computed(()=>{const list=safeArray((current.value||{}).committees);return list.length?list.map(cName).join('Ø '):'ØØ³Ø¨ Ø§ÙØ¯Ùر';}); 15050 async function load(){ 15051 loading.value=true; error.value=''; 15052 try{ 15053 if(!(await store.requireAdmin(router))){loading.value=false;return;} 15054 current.value=baseAdmin(); 15055 const r=await api('/api/admin/account?ts='+Date.now(),{cache:'no-store'}); 15056 if(r.status===401){loading.value=false;router.replace('/admin/login');return;} 15057 if(!r||!r.ok){error.value=(r&&(r.message||r.error))||'تعذر تØÙ ÙÙ ØØ³Ø§Ø¨ Ø§ÙØ¥Ø¯Ø§Ø±Ø©';committees.value=[];} 15058 else{current.value=r.admin||baseAdmin();committees.value=safeArray(r.committees);} 15059 }catch(e){error.value='ØØ¯Ø« خطأ Ù٠عرض ØØ³Ø§Ø¨ Ø§ÙØ¥Ø¯Ø§Ø±Ø©: '+(e&&e.message?e.message:String(e));current.value=baseAdmin();} 15060 loading.value=false; 15061 } 15062 function goSupervisors(){router.push('/admin/supervisors');} 15063 onMounted(load); 15064 return {store,current,committees,loading,error,displayName,displayRole,displayWhatsapp,displayStatus,displayCommittees,goSupervisors,roleName,load}; 15065 }, 15066 render:(function(){ 15067const _Vue = Vue 15068const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 15069 15070const _hoisted_1 = { class: "card noticeCard compactNotice" } 15071const _hoisted_2 = ["onClick"] 15072const _hoisted_3 = { 15073 key: 0, 15074 class: "card" 15075} 15076const _hoisted_4 = { 15077 key: 1, 15078 class: "card errorCard" 15079} 15080const _hoisted_5 = ["onClick"] 15081const _hoisted_6 = { 15082 key: 2, 15083 class: "card accountAdminCard" 15084} 15085const _hoisted_7 = { class: "profileLine" } 15086const _hoisted_8 = { class: "profileLine" } 15087const _hoisted_9 = { class: "profileLine" } 15088const _hoisted_10 = { class: "profileLine" } 15089const _hoisted_11 = { class: "card" } 15090const _hoisted_12 = ["onClick"] 15091 15092return function render(_ctx, _cache) { 15093 with (_ctx) { 15094 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15095 15096 const _component_AdminFrame = _resolveComponent("AdminFrame") 15097 15098 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ØØ³Ø§Ø¨Ù" }, { 15099 default: _withCtx(() => [ 15100 _createElementVNode("div", _hoisted_1, [ 15101 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "ØØ³Ø§Ø¨ اÙ٠شرÙ", -1)), 15102 _cache[1] || (_cache[1] = _createElementVNode("h3", null, "ØØ³Ø§Ø¨Ù ÙÙ Ø§ÙØ¥Ø¯Ø§Ø±Ø©", -1)), 15103 _cache[2] || (_cache[2] = _createElementVNode("p", null, "عرض Ø¨ÙØ§Ùات اÙÙ Ø´Ø±Ù Ø§ÙØØ§Ù٠دÙÙ Ø§ÙØØ§Ø¬Ø© Ø¥ÙÙ ØµÙØ§ØÙØ© اÙÙ Ø¯ÙØ± Ø§ÙØ¹Ø§Ù ÙÙÙØ¸Ø§Ù .", -1)), 15104 _createElementVNode("button", { 15105 class: "smallbtn", 15106 onClick: load 15107 }, "ØªØØ¯ÙØ«", 8, _hoisted_2) 15108 ]), 15109 loading 15110 ? (_openBlock(), _createElementBlock("div", _hoisted_3, _cache[3] || (_cache[3] = [_createElementVNode("h3", null, "جار٠تØÙ ÙÙ Ø§ÙØØ³Ø§Ø¨...", -1), _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ¸Ø± ÙØØ¸Ø©.", -1)]))) 15111 : _createCommentVNode("", true), 15112 error 15113 ? (_openBlock(), _createElementBlock("div", _hoisted_4, [_cache[4] || (_cache[4] = _createElementVNode("h3", null, "تعذر ÙØªØ ØØ³Ø§Ø¨Ù", -1)), _createElementVNode("p", null, _toDisplayString(error), 1), _createElementVNode("button", { 15114 class: "btn secondary", 15115 onClick: load 15116 }
15116, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_5)])) 15117 : _createCommentVNode("", true), 15118 (!loading) 15119 ? (_openBlock(), _createElementBlock("div", _hoisted_6, [ 15120 _cache[9] || (_cache[9] = _createElementVNode("div", { class: "profileAvatar" }, "ð¤", -1)), 15121 _createElementVNode("h3", null, _toDisplayString(displayName), 1), 15122 _createElementVNode("div", _hoisted_7, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "Ø§ÙØ¯Ùر", -1)), _createElementVNode("span", null, _toDisplayString(roleName(displayRole)), 1)]), 15123 _createElementVNode("div", _hoisted_8, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "ÙØ§ØªØ³Ø§Ø¨", -1)), _createElementVNode("span", null, _toDisplayString(displayWhatsapp), 1)]), 15124 _createElementVNode("div", _hoisted_9, [_cache[7] || (_cache[7] = _createElementVNode("b", null, "Ø§ÙØØ§ÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(displayStatus), 1)]), 15125 _createElementVNode("div", _hoisted_10, [_cache[8] || (_cache[8] = _createElementVNode("b", null, "اÙÙØ¬Ø§Ù", -1)), _createElementVNode("span", null, _toDisplayString(displayCommittees), 1)]) 15126 ])) 15127 : _createCommentVNode("", true), 15128 _createElementVNode("div", _hoisted_11, [_cache[10] || (_cache[10] = _createElementVNode("h3", null, "ØªÙØ¨Ù٠أ٠اÙ", -1)), _cache[11] || (_cache[11] = _createElementVNode("p", { class: "hint" }, "إدارة Ø§ÙØµÙاØÙات ÙØ§ ØªØªÙ Ù Ù ÙØ°Ù Ø§ÙØµÙØØ©. Ø§Ø³ØªØ®Ø¯Ù ØµÙØØ© اÙ٠شرÙÙÙ ÙÙØ·Ø ÙÙØ¬Ø¨ أ٠تÙÙÙ Ù ØØµÙرة باÙÙ Ø¯ÙØ± Ø§ÙØ¹Ø§Ù ÙÙÙØ¸Ø§Ù .", -1)), _createElementVNode("button", { 15129 class: "btn secondary loadMore", 15130 onClick: goSupervisors 15131 }, "ÙØªØ إدارة اÙ٠شرÙÙÙ", 8, _hoisted_12)]) 15132 ]), 15133 _: 1 15134 })) 15135 } 15136} 15137})() 15138 }; 15139 15140 const AdminSupervisorsPage={ 15141 components:{AdminFrame}, 15142 setup(){ 15143 const store=useGzcStore(); const router=useRouter(); const admins=ref([]); const committees=ref([]); const denied=ref(false); const loading=ref(true); const error=ref(''); 15144 const roles=[['community_admin','Ù Ø¯ÙØ± ٠جت٠ع Ù ØÙÙ'],['membership','Ù Ø´Ø±Ù Ø§ÙØ¹Ø¶ÙÙØ©'],['arrival','٠شر٠اÙÙØµÙÙ'],['help','٠شر٠اÙ٠ساعدة'],['emergency','Ù Ø´Ø±Ù Ø§ÙØ·Ùارئ'],['events','٠شر٠اÙÙØ¹Ø§ÙÙØ§Øª'],['sports','Ù Ø´Ø±Ù Ø§ÙØ±Ùاضة'],['super_admin','اÙÙ Ø¯ÙØ± Ø§ÙØ¹Ø§Ù ÙÙÙØ¸Ø§Ù ']]; 15145 function normalizeAdmin(a){const cs=safeArray(a.committees);return Object.assign({},a,{edit_role:a.role||'membership',edit_community_id:a.community_id||'',edit_committees:cs.length?cs.slice():[a.role||'membership'],_open:false});} 15146 function cName(k){const c=safeArray(committees.value).find(x=>String(x.key)===String(k));return (c&&c.name_ar)||String(k||'-');} 15147 function activeCommitteeOptions(){return safeArray(committees.value).filter(c=>String(c.status||'active')==='active');} 15148 async function load(){ 15149 loading.value=true;error.value=''; 15150 try{ 15151 if(!(await store.requireAdmin(router)))return; 15152 const [ar,cr,cm]=await Promise.all([api('/api/admin/admins'),api('/api/admin/committees'),api('/api/admin/communities')]); 15153 if(ar.status===403||ar.status===401){denied.value=true;admins.value=[];return;} 15154 if(!ar.ok){error.value=ar.message||ar.error||'تعذر تØÙ Ù٠اÙ٠شرÙÙÙ';admins.value=[];return;} 15155 denied.value=false; 15156 committees.value=safeArray(cr&&cr.committees); 15157 if(cm&&cm.ok){store.state.communities=safeArray(cm.communities);store.state.platform=cm.platform||store.state.platform;} 15158 admins.value=safeArray(ar.admins).map(normalizeAdmin); 15159 }catch(e){ 15160 console.error('AdminSupervisorsPage load failed',e); 15161 error.value='تعذر تØÙ ÙÙ ØµÙØØ© اÙ٠ستخد٠ÙÙ ÙØ§ÙØµÙØ§ØÙات. أعد اÙÙ ØØ§ÙÙØ©.'; 15162 admins.value=[]; 15163 }finally{loading.value=false;} 15164 } 15165 onMounted(load); 15166 async function save(a){const body={role:a.edit_role,community_id:a.edit_role==='super_admin'?null:a.edit_community_id,committees:a.edit_role==='super_admin'?[]:safeArray(a.edit_committees)};store.state.busy=true;try{const r=await api('/api/admin/admins/'+encodeURIComponent(a.id)+'/role',{method:'POST',body:JSON.stringify(body)});store.state.msg=r.message||r.error||'';if(r.ok)await load();}finally{store.state.busy=false;}} 15167 function isSelf(a){return Number(store.state.me&&store.state.me.admin&&store.state.me.admin.id||0)===Number(a&&a.id||0);} 15168 async function demote(a){if(isSelf(a)){store.state.msg='ÙØ§ ÙÙ ÙÙÙ Ø¥Ø²Ø§ÙØ© ØµÙØ§ØÙات Ø¥Ø´Ø±Ø§Ù ØØ³Ø§Ø¨Ù Ø§ÙØØ§ÙÙ';return;}if(!confirm('Ø¥Ø²Ø§ÙØ© ÙØ°Ø§ Ø§ÙØØ³Ø§Ø¨ Ù Ù Ø§ÙØ¥Ø´Ø±Ø§ÙØ\n\nØ³ÙØªÙ Ø¥ÙÙØ§Ø¡ Ø¬ÙØ³Ø§Øª Ø§ÙØ¥Ø¯Ø§Ø±Ø© ÙØ³ØØ¨ اÙÙØ¬Ø§Ù ÙØ§ÙØµÙØ§ØÙØ§ØªØ ÙÙÙ Ø§ÙØ¹Ø¶ÙÙØ© Ø§ÙØ¹Ø§Ø¯ÙØ© ÙÙ ØªÙØØ°Ù.'))return;store.state.busy=true;try{const r=await api('/api/admin/admins/'+encodeURIComponent(a.id)+'/remove-supervision',{method:'POST'});store.state.msg=r.message||r.error||'';if(r.ok)await load();}finally{store.state.busy=false;}} 15169 function toggleOpen(a){a._open=!a._open;} return {store,admins,committees,denied,loading,error,roles,cName,roleName,adminStatusName,activeCommitteeOptions,save,demote,isSelf,toggleOpen,safeArray,load}; 15170 }, 15171 render:(function(){ 15172const _Vue = Vue
15173const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 15174 15175const _hoisted_1 = { 15176 key: 0, 15177 class: "card skeleton" 15178} 15179const _hoisted_2 = { 15180 key: 1, 15181 class: "card errorCard" 15182} 15183const _hoisted_3 = ["onClick"] 15184const _hoisted_4 = { 15185 key: 2, 15186 class: "card" 15187} 15188const _hoisted_5 = { 15189 key: 3, 15190 class: "card formCard" 15191} 15192const _hoisted_6 = { class: "memberCardTop" } 15193const _hoisted_7 = ["onClick"] 15194const _hoisted_8 = { class: "hint" } 15195const _hoisted_9 = { 15196 key: 4, 15197 class: "supervisorGrid" 15198} 15199const _hoisted_10 = { class: "memberCardTop compactToggleRow" } 15200const _hoisted_11 = { class: "hint ltr" } 15201const _hoisted_12 = { class: "toggleSide" } 15202const _hoisted_13 = ["onClick"] 15203const _hoisted_14 = { class: "compactSummaryBar" } 15204const _hoisted_15 = { 15205 key: 0, 15206 class: "collapsibleBody" 15207} 15208const _hoisted_16 = { class: "profileLine" } 15209const _hoisted_17 = { class: "profileLine" } 15210const _hoisted_18 = { class: "profileLine" } 15211const _hoisted_19 = ["onUpdate:modelValue"] 15212const _hoisted_20 = ["value"] 15213const _hoisted_21 = ["onUpdate:modelValue"] 15214const _hoisted_22 = ["value"] 15215const _hoisted_23 = { 15216 key: 1, 15217 class: "committeePick" 15218} 15219const _hoisted_24 = ["value", "onUpdate:modelValue"] 15220const _hoisted_25 = { 15221 key: 2, 15222 class: "hint" 15223} 15224const _hoisted_26 = { class: "memberActions" } 15225const _hoisted_27 = ["onClick"] 15226const _hoisted_28 = ["disabled", "onClick"] 15227 15228return function render(_ctx, _cache) { 15229 with (_ctx) { 15230 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelCheckbox: _vModelCheckbox, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15231 15232 const _component_AdminFrame = _resolveComponent("AdminFrame") 15233 15234 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙ٠شرÙÙÙ" }, { 15235 default: _withCtx(() => [ 15236 _cache[10] || (_cache[10] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "إدارة اÙ٠شرÙÙÙ"), _createElementVNode("p", null, "عرض اÙ٠شرÙÙ٠اÙÙØ´Ø·ÙÙØ تعدÙÙ Ø§ÙØ¯Ùر ÙØ§ÙÙØ¬Ø§ÙØ Ø£Ù Ø¥Ø²Ø§ÙØ© Ø§ÙØØ³Ø§Ø¨ Ù Ù Ø§ÙØ¥Ø´Ø±Ø§Ù بدÙÙ ØØ°Ù عضÙÙØªÙ. Ø§ÙØªØ¹Ø¯ÙÙ Ù ØªØ§Ø ÙÙÙ Ø¯ÙØ± Ø§ÙØ¹Ø§Ù ÙÙÙØ¸Ø§Ù ÙÙØ·.")], -1)), 15237 loading 15238 ? (_openBlock(), _createElementBlock("div", _hoisted_1, _c
15238ache[0] || (_cache[0] = [_createElementVNode("div", null, [_createElementVNode("h3", null, "جار٠تØÙ Ù٠اÙ٠ستخد٠ÙÙ ÙØ§ÙØµÙØ§ØÙات..."), _createElementVNode("p", { class: "hint" }, "ÙØªÙ Ø¬ÙØ¨ اÙ٠شرÙÙÙ ÙØ§ÙÙØ¬Ø§Ù ÙØ§ÙØµÙØ§ØÙات.")], -1)]))) 15239 : _createCommentVNode("", true), 15240 (!loading&&error) 15241 ? (_openBlock(), _createElementBlock("div", _hoisted_2, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "تعذر تØÙ Ù٠اÙ٠ستخد٠ÙÙ ÙØ§ÙØµÙØ§ØÙات", -1)), _createElementVNode("p", null, _toDisplayString(error), 1), _createElementVNode("button", { 15242 class: "btn secondary", 15243 onClick: load 15244 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_3)])) 15245 : _createCommentVNode("", true), 15246 (!loading&&!error&&denied) 15247 ? (_openBlock(), _createElementBlock("div", _hoisted_4, _cache[2] || (_cache[2] = [_createElementVNode("h3", null, "ØµÙØ§ØÙØ© ØºÙØ± ÙØ§ÙÙØ©", -1), _createElementVNode("p", { class: "hint" }, "ÙØ°Ù Ø§ÙØµÙØØ© ØªØªØ·ÙØ¨ ØµÙØ§ØÙØ© اÙÙ Ø¯ÙØ± Ø§ÙØ¹Ø§Ù ÙÙÙØ¸Ø§Ù . ÙÙ ÙÙ٠٠تابعة ØµÙØØ§Øª ÙØ¬Ùت٠ÙÙØ·.", -1)]))) 15248 : _createCommentVNode("", true), 15249 (!loading&&!error&&!denied) 15250 ? (_openBlock(), _createElementBlock("div", _hoisted_5, [_createElementVNode("div", _hoisted_6, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, "اÙ٠شرÙÙÙ Ø§ÙØØ§ÙÙÙÙ", -1)), _createElementVNode("button", { 15251 class: "smallbtn", 15252 onClick: $event => ($router.push('/admin/register')) 15253 }, "تسجÙÙ Ù Ø´Ø±Ù Ø¬Ø¯ÙØ¯", 8, _hoisted_7)]), _createElementVNode("p", _hoisted_8, "Ø§ÙØ¹Ø¯Ø¯: " + _toDisplayString(admins.length), 1)])) 15254 : _createCommentVNode("", true), 15255 (!loading&&!error&&!denied) 15256 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(admins, (a) => { 15257 return (_openBlock(), _createElementBlock("div", { 15258 class: _normalizeClass(["card supervisorCard collapsibleCard", {open:a._open}]), 15259 key: a.id 15260 }, [_createElementVNode("div", _hoisted_10, [_createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(a.name || '-'), 1), _createElementVNode("p", _hoisted_11, _toDisplayString(a.whatsapp || '-'), 1)]), _createElementVNode("div", _hoisted_12, [_createElementVNode("span", { class: _normalizeClass(["statusPill", a.status==='active'?'':'warn']) }, _toDisplayString(adminStatusName(a.status)), 3), _createElementVNode("button", { 15261 class: "smallbtn secondary", 15262 onClick: $event => (toggleOpen(a)) 15263 }, _toDisplayString(a._open?'â Ø¥Ø®Ùاء':'+ Ø¥Ø¸ÙØ§Ø±'), 9, _hoisted_13)])]), _createElementVNode("div", _hoisted_14, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(roleName(a.role)), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "Ø§ÙØ¯Ùر", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(safeArray(a.committees).length?safeArray(a.committees).length:'0'), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "عدد اÙÙØ¬Ø§Ù", -1))])]), (a._open) 15264 ? (_openBlock(), _createElementBlock("div", _hoisted_15, [ 15265 _createElementVNode("div", _hoisted_16, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "Ø§ÙØ¯Ùر Ø§ÙØØ§ÙÙ", -1)), _createElementVNode("span", null, _toDisplayString(roleName(a.role)), 1)]), 15266 _createElementVNode("div", _hoisted_17, [_cache[7] || (_cache[7] = _createElementVNode("b", null, "اÙ٠جت٠ع", -1)), _createElementVNode("span", null, _toDisplayString(a.community_name_ar || (a.role==='super_admin'?'ÙÙ Ø§ÙØµÙÙ':'ØºÙØ± Ù ØØ¯Ø¯')), 1)]), 15267 _createElementVNode("div", _hoisted_18, [_cache[8] || (_cache[8] = _createElementVNode("b", null, "اÙÙØ¬Ø§Ù Ø§ÙØØ§ÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(safeArray(a.committees).length?safeArray(a.committees).map(cName).join('Ø '):'â'), 1)]), 15268 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((a.edit_role) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(roles, (r) => { 15269 return (_openBlock(), _createElementBlock("option", { 15270 key: r[0], 15271 value: r[0] 15272 }
15272, _toDisplayString(r[1]), 9, _hoisted_20)) 15273 }), 128))], 8, _hoisted_19), [[_vModelSelect, a.edit_role]]), 15274 (a.edit_role!=='super_admin') 15275 ? _withDirectives((_openBlock(), _createElementBlock("select", { 15276 key: 0, 15277 "onUpdate:modelValue": $event => ((a.edit_community_id) = $event) 15278 }, [_cache[9] || (_cache[9] = _createElementVNode("option", { value: "" }, "اختر اÙ٠جت٠ع اÙÙ ØÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.communities.filter(x=>x.slug!=='all-china'), (c) => { 15279 return (_openBlock(), _createElementBlock("option", { 15280 key: c.id, 15281 value: c.id 15282 }, _toDisplayString(c.name_ar), 9, _hoisted_22)) 15283 }), 128))], 8, _hoisted_21)), [[_vModelSelect, a.edit_community_id]]) 15284 : _createCommentVNode("", true), 15285 (a.edit_role!=='super_admin') 15286 ? (_openBlock(), _createElementBlock("div", _hoisted_23, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(activeCommitteeOptions(), (c) => { 15287 return (_openBlock(), _createElementBlock("label", { 15288 class: "check", 15289 key: c.key 15290 }, [_withDirectives(_createElementVNode("input", { 15291 type: "checkbox", 15292 value: c.key, 15293 "onUpdate:modelValue": $event => ((a.edit_committees) = $event) 15294 }, null, 8, _hoisted_24), [[_vModelCheckbox, a.edit_committees]]), _createTextVNode(" " + _toDisplayString(c.name_ar || c.key), 1)])) 15295 }), 128))])) 15296 : (_openBlock(), _createElementBlock("p", _hoisted_25, "اÙÙ Ø¯ÙØ± Ø§ÙØ¹Ø§Ù ÙÙÙØ¸Ø§Ù ÙØ±Ù ÙÙØ¯Ùر Ø¬Ù ÙØ¹ Ø§ÙØ£Ùسا٠ÙÙØ§ ÙØØªØ§Ø¬ Ø¥ÙÙ Ø±Ø¨Ø·Ù Ø¨ÙØ¬ÙØ©.")), 15297 _createElementVNode("div", _hoisted_26, [_createElementVNode("button", { 15298 class: "smallbtn", 15299 onClick: $event => (save(a)) 15300 }, "ØÙظ Ø§ÙØµÙاØÙات", 8, _hoisted_27), _createElementVNode("button", { 15301 class: "smallbtn danger", 15302 disabled: isSelf(a), 15303 onClick: $event => (demote(a)) 15304 }, _toDisplayString(isSelf(a)?'ØØ³Ø§Ø¨Ù Ø§ÙØØ§ÙÙ':'Ø¥Ø²Ø§ÙØ© Ù Ù Ø§ÙØ¥Ø´Ø±Ø§Ù'), 9, _hoisted_28)]) 15305 ])) 15306 : _createCommentVNode("", true)], 2)) 15307 }), 128))])) 15308 : _createCommentVNode("", true) 15309 ]), 15310 _: 1, 15311 __: [10] 15312 })) 15313 } 15314} 15315})() 15316 }; 15317 15318 const AdminCommitteesPage={ 15319 components:{AdminFrame}, 15320 setup(){ 15321 const store=useGzcStore(); const router=useRouter(); const committees=ref([]); const denied=ref(false); const f=reactive({key:'',name_ar:'',name_en:''}); 15322 const core=['membership','arrival','help','emergency','events','sports']; 15323 async function load(){if(!(await store.requireAdmin(router)))return;store.state.busy=true;const r=await api('/api/admin/committees');store.state.busy=false;if(r.status===401){router.replace('/admin/login');return;}committees.value=safeArray(r.committees);} 15324 onMounted(load); 15325 async function save(){if(!f.key.trim()||!f.name_ar.trim()){store.state.msg='اÙÙ ÙØªØ§Ø ÙØ§ÙØ§Ø³Ù Ø§ÙØ¹Ø±Ø¨Ù Ù Ø·ÙÙØ¨Ø§Ù';return;}store.state.busy=true;const r=await api('/api/admin/committees',{method:'POST',body:JSON.stringify(f)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.status===403)denied.value=true;if(r.ok){f.key='';f.name_ar='';f.name_en='';}await load();} 15326 async function archive(c){if(core.includes(String(c.key))){store.state.msg='ÙØ§ ÙÙ ÙÙ ØØ°Ù ÙØ¬ÙØ© Ø£Ø³Ø§Ø³ÙØ©';return;}if(!confirm('Ø£Ø±Ø´ÙØ© اÙÙØ¬ÙØ©Ø'))return;store.state.busy=true;const r=await api('/api/admin/committees/'+encodeURIComponent(c.key)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.status===403)denied.value=true;await load();} 15327 return {store,committees,f,core,denied,save,archive}; 15328 }, 15329 render:(function(){ 15330const _Vue = Vue
15331const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 15332 15333const _hoisted_1 = { class: "card formCard" } 15334const _hoisted_2 = { 15335 key: 0, 15336 class: "hint" 15337} 15338const _hoisted_3 = { class: "editGrid" } 15339const _hoisted_4 = ["onUpdate:modelValue"] 15340const _hoisted_5 = ["onUpdate:modelValue"] 15341const _hoisted_6 = ["onUpdate:modelValue"] 15342const _hoisted_7 = ["onClick"] 15343const _hoisted_8 = { class: "card" } 15344const _hoisted_9 = { class: "ltr" } 15345const _hoisted_10 = { class: "statusPill" } 15346const _hoisted_11 = ["disabled", "onClick"] 15347 15348return function render(_ctx, _cache) { 15349 with (_ctx) { 15350 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, vModelText: _vModelText, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15351 15352 const _component_AdminFrame = _resolveComponent("AdminFrame") 15353 15354 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "اÙÙØ¬Ø§Ù" }, { 15355 default: _withCtx(() => [_cache[2] || (_cache[2] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "إدارة اÙÙØ¬Ø§Ù"), _createElementVNode("p", null, "اÙÙØ¬Ø§Ù Ù٠أساس Ø§ÙØµÙاØÙات: Ø§ÙØ¹Ø¶ÙÙØ©Ø اÙÙØµÙÙØ اÙÙ Ø³Ø§Ø¹Ø¯Ø©Ø Ø§ÙØ·ÙØ§Ø±Ø¦Ø Ø§ÙÙØ¹Ø§ÙÙØ§ØªØ ÙØ§ÙØ±ÙØ§Ø¶Ø©. ÙØ§ تضÙÙ ÙØ¬ÙØ© Ø¥ÙØ§ ÙÙ Ø¹ÙØ¯Ùا شغ٠ØÙÙÙÙ.")], -1)), _createElementVNode("div", _hoisted_1, [ 15356 _cache[0] || (_cache[0] = _createElementVNode("h3", null, "Ø¥Ø¶Ø§ÙØ© / ØªØØ¯ÙØ« ÙØ¬ÙØ©", -1)), 15357 denied 15358 ? (_openBlock(), _createElementBlock("p", _hoisted_2, "Ø§ÙØÙØ¸ ÙØªØ·Ùب ØµÙØ§ØÙØ© Ù Ø¯ÙØ± تÙÙÙØ© اÙ٠عÙÙÙ Ø§ØªØ Ø§ÙØ¹Ø±Ø¶ ÙÙØ· Ù ØªØ§Ø ØØ§ÙÙØ§Ù.")) 15359 : _createCommentVNode("", true), 15360 _createElementVNode("div", _hoisted_3, [_withDirectives(_createElementVNode("input", { 15361 "onUpdate:modelValue": $event => ((f.key) = $event), 15362 placeholder: "committee_key ٠ثا٠media_team" 15363 }, null, 8, _hoisted_4), [[_vModelText, f.key]]), _withDirectives(_createElementVNode("input", { 15364 "onUpdate:modelValue": $event => ((f.name_ar) = $event), 15365 placeholder: "اس٠اÙÙØ¬ÙØ© Ø¨Ø§ÙØ¹Ø±Ø¨Ù" 15366 }, null, 8, _hoisted_5), [[_vModelText, f.name_ar]]), _withDirectives(_createElementVNode("input", { 15367 "onUpdate:modelValue": $event => ((f.name_en) = $event), 15368 placeholder: "English name" 15369 }, null, 8, _hoisted_6), [[_vModelText, f.name_en]])]), 15370 _createElementVNode("button", { 15371 class: "btn loadMore", 15372 onClick: save 15373 }, "ØÙظ اÙÙØ¬ÙØ©", 8, _hoisted_7) 15374 ]), _createElementVNode("div", _hoisted_8, [_cache[1] || (_cache[1] = _createElementVNode("h3", null, "اÙÙØ¬Ø§Ù Ø§ÙØØ§ÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(committees, (c) => { 15375 return (_openBlock(), _createElementBlock("div", { 15376 class: "committeeRow", 15377 key: c.key 15378 }, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(c.name_ar || c.key), 1), _createElementVNode("small", _hoisted_9, _toDisplayString(c.key) + " â " + _toDisplayString(c.name_en || '-'), 1)]), _createElementVNode("span", _hoisted_10, _toDisplayString(c.status || 'active'), 1), _createElementVNode("button", { 15379 class: "smallbtn danger", 15380 disabled: core.includes(String(c.key)), 15381 onClick: $event => (archive(c)) 15382 }, _toDisplayString(core.includes(String(c.key))?'Ø£Ø³Ø§Ø³ÙØ©':'Ø£Ø±Ø´ÙØ©'), 9, _hoisted_11)])) 15383 }), 128))])]), 15384 _: 1, 15385 __: [2] 15386 })) 15387 } 15388} 15389})() 15390 }; 15391 15392 15393 const AdminPwaPage={ 15394 components:{AdminFrame}, 15395 setup(){ 15396 const store=useGzcStore(); const router=useRouter(); const pwa=reactive(pwaState());
15396 const Ù ØÙÙKeys=ref([]); 15397 function sync(e){Object.assign(pwa,(e&&e.detail)||pwaState());} 15398 async function loadCaches(){try{Ù ØÙÙKeys.value=window.caches?await window.caches.keys():[]}catch(e){Ù ØÙÙKeys.value=[];}} 15399 onMounted(async()=>{if(await store.requireAdmin(router)){sync();window.addEventListener('gzc-pwa-state',sync);await loadCaches();}}); 15400 async function activatePwa(){try{let r=window.__gzcActivatePwa?await window.__gzcActivatePwa():{ok:false,message:'أداة ØªÙØ¹ÙÙ Ø§ÙØªØ·Ø¨ÙÙ ØºÙØ± Ù ØªØ§ØØ©'};store.state.msg=r.message||'ØªÙ ØªÙØ¹ÙÙ Ø§ÙØªØ·Ø¨ÙÙ';sync();await loadCaches();}catch(e){store.state.msg='ÙØ´Ù ØªÙØ¹ÙÙ Ø§ÙØªØ·Ø¨ÙÙ: '+(e.message||e);}} 15401 async function updateWorker(){try{if(navigator.serviceWorker){const reg=await navigator.serviceWorker.getRegistration('/'); if(reg) await reg.update();} store.state.msg='ØªÙ Ø·ÙØ¨ ØªØØ¯ÙØ« Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ'; sync(); await loadCaches();}catch(e){store.state.msg='ÙØ´Ù ØªØØ¯ÙØ« Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ: '+(e.message||e);}} 15402 async function clearCaches(){try{let r=window.__gzcClearVueCaches?await window.__gzcClearVueCaches():{ok:false,message:'Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ ØºÙØ± ٠تاØ'};store.state.msg=r.message||'ØªÙ ØªÙØ¸Ù٠اÙÙØ§Ø´';await loadCaches();}catch(e){store.state.msg='تعذر ØªÙØ¸Ù٠اÙÙØ§Ø´';}} 15403 async function installApp(){const r=window.__gzcInstallApp?await window.__gzcInstallApp():{ok:false,message:iosInstallHint()};store.state.msg=r.message||iosInstallHint();sync();await loadCaches();} 15404 return {store,pwa,Ù ØÙÙKeys,activatePwa,updateWorker,clearCaches,installApp,pwaStatusName,iosInstallHint}; 15405 }, 15406 render:(function(){ 15407const _Vue = Vue 15408const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 15409 15410const _hoisted_1 = { class: "healthGrid pwaHealthGrid" } 15411const _hoisted_2 = { class: "card healthCard ok" } 15412const _hoisted_3 = { 15413 class: "card collapseSection formCard", 15414 open: "" 15415} 15416const _hoisted_4 = { class: "collapseBody" } 15417const _hoisted_5 = { class: "row" } 15418const _hoisted_6 = ["onClick"] 15419const _hoisted_7 = ["onClick"] 15420const _hoisted_8 = ["onClick"] 15421const _hoisted_9 = ["onClick"] 15422const _hoisted_10 = { class: "hint" } 15423const _hoisted_11 = { 15424 class: "card collapseSection", 15425 open: "" 15426} 15427const _hoisted_12 = { class: "collapseBody" } 15428const _hoisted_13 = { 15429 key: 0, 15430 class: "hint" 15431} 15432 15433return function render(_ctx, _cache) { 15434 with (_ctx) { 15435 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15436 15437 const _component_AdminFrame = _resolveComponent("AdminFrame") 15438 15439 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "تطبÙ٠اÙÙØ§ØªÙ ÙØ§Ùأداء" }, { 15440 default: _withCtx(() => [ 15441 _cache[13] || (_cache[13] = _createElementVNode("div", { class: "card noticeCard compactNotice" }, [_createElementVNode("span", { class: "vueBadge" }, "تطبÙ٠اÙÙØ§ØªÙ"), _createElementVNode("h3", null, "ØØ§ÙØ© تطبÙ٠اÙÙ ÙØµØ©"), _createElementVNode("p", null, "ÙØ°Ù Ø§ÙØµÙØØ© تتابع ØØ§ÙØ© Ø§ÙØªØ«Ø¨Ùت ÙØ§ÙتخزÙ٠اÙÙ ØÙÙ ÙÙÙ ÙØµØ©. عÙÙ iPhone ÙØªÙ Ø§ÙØªØ«Ø¨Ùت Ù Ù Safari عبر Share ث٠Add to Home Screen.")], -1)), 15442 _createElementVNode("div", _hoisted_1, [ 15443 _createElementVNode("div", { class: _normalizeClass(["card healthCard", pwa.online?'ok':'warn']) }, [_cache[0] || (_cache[0] = _createElementVNode("span", null, "Ø§ÙØ´Ø¨ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(pwa.online?'Online':'Offline'), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "ØØ§ÙØ© اÙÙ ØªØµÙØ Ø§ÙØØ§ÙÙØ©", -1))], 2), 15444 _createElementVNode("div", { class: _normalizeClass(["card healthCard", pwa.sw==='failed'?'bad':'ok']) }, [_cache[2] || (_cache[2] = _createElementVNode("span", null, "Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(pwaStatusName(pwa.sw)), 1), _createElementVNode("small", null, _toDisplayString(pwa.error || 'Ù ÙØ¹ÙÙ'), 1)], 2), 15445 _createElementVNode("div", { class: _normalizeClass(["card healthCard", pwa.activated?'ok':'warn']) }, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "Ø§ÙØªÙعÙ٠اÙÙ ØÙÙ", -1)), _createElementVNode("b", null, _toDisplayString(pwa.activated?'Ù ÙØ¹Ù':'ØºÙØ± Ù ÙØ¹Ù'), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "Cache + Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ", -1))], 2), 15446 _createElementVNode("div", { class: _normalizeClass(["card healthCard", pwa.standalone?'ok':'warn']) }, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "Ø§ÙØªØ«Ø¨Ùت", -1)), _createElementVNode("b", null, _toDisplayString(pwa.standalone?'٠ثبت':'ØºÙØ± ٠ثبت'), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "Standalone / Browser", -1))], 2), 15447 _createElementVNode("div", _hoisted_2, [_cache[7] || (_cache[7] = _
15447createElementVNode("span", null, "Ø§ÙØ¥ØµØ¯Ø§Ø±", -1)), _createElementVNode("b", null, _toDisplayString(pwa.version || '3.8.55'), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, null, -1))]) 15448 ]), 15449 _createElementVNode("details", _hoisted_3, [_cache[9] || (_cache[9] = _createElementVNode("summary", null, [_createElementVNode("b", null, "إجراءات Ø§ÙØªØ·Ø¨ÙÙ"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_4, [_createElementVNode("div", _hoisted_5, [ 15450 _createElementVNode("button", { 15451 class: "btn", 15452 onClick: activatePwa 15453 }, "ØªÙØ¹ÙÙ Ø§ÙØªØ·Ø¨ÙÙ Ø§ÙØ¢Ù", 8, _hoisted_6), 15454 _createElementVNode("button", { 15455 class: "btn secondary", 15456 onClick: installApp 15457 }, "ØªØ«Ø¨ÙØª Ø§ÙØªØ·Ø¨ÙÙ", 8, _hoisted_7), 15458 _createElementVNode("button", { 15459 class: "btn secondary", 15460 onClick: updateWorker 15461 }, "ØªØØ¯ÙØ« Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ", 8, _hoisted_8), 15462 _createElementVNode("button", { 15463 class: "btn dangerBtn", 15464 onClick: clearCaches 15465 }, "ØªÙØ¸ÙÙ Ø§ÙØªØ®Ø²Ù٠اÙÙ ØÙÙ", 8, _hoisted_9) 15466 ]), _createElementVNode("p", _hoisted_10, _toDisplayString(iosInstallHint()), 1)])]), 15467 _createElementVNode("details", _hoisted_11, [_cache[12] || (_cache[12] = _createElementVNode("summary", null, [_createElementVNode("b", null, "اÙÙØ§Ø´ اÙÙ ØÙÙ"), _createElementVNode("span")], -1)), _createElementVNode("div", _hoisted_12, [(!Ù ØÙÙKeys.length) 15468 ? (_openBlock(), _createElementBlock("div", _hoisted_13, "ÙØ§ ØªÙØ¬Ø¯ Ù ÙÙØ§Øª Ù ØÙÙØ¸Ø© Ù ØÙÙØ§Ù ØØ§ÙÙØ§Ù. اضغط ØªÙØ¹ÙÙ Ø§ÙØªØ·Ø¨ÙÙ Ø§ÙØ¢Ù.")) 15469 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(Ù ØÙÙKeys, (k) => { 15470 return (_openBlock(), _createElementBlock("div", { 15471 class: "backupRow", 15472 key: k 15473 }, [_createElementVNode("span", null, _toDisplayString(k), 1), _cache[10] || (_cache[10] = _createElementVNode("b", null, "Ù ØÙÙ", -1)), _cache[11] || (_cache[11] = _createElementVNode("small", null, "Ù ØÙ٠داخ٠اÙÙ ØªØµÙØ", -1))])) 15474 }), 128))])]), 15475 _cache[14] || (_cache[14] = _createElementVNode("details", { class: "card collapseSection" }, [_createElementVNode("summary", null, [_createElementVNode("b", null, "اختبار Ø³Ø±ÙØ¹"), _createElementVNode("span")]), _createElementVNode("div", { class: "collapseBody" }, [_createElementVNode("p", { class: "hint" }, "بعد ØªÙØ¹ÙÙ Ø§ÙØªØ·Ø¨ÙÙØ Ø§ÙØªØ اÙÙ ÙØµØ© ٠رة ÙØ§ØØ¯Ø©Ø Ø«Ù Ø¬Ø±ÙØ¨ Ø¶Ø¹Ù Ø§ÙØ´Ø¨ÙØ©. ÙØ¬Ø¨ Ø£Ù ØªØ¸ÙØ± اÙÙØ§Ø¬ÙØ© Ø£Ù ØµÙØØ© Ø¹Ø¯Ù Ø§ÙØ§ØªØµØ§Ù Ø¨ÙØ¶ÙØ. عÙÙ iPhone ÙØªÙ Ø§ÙØªØ«Ø¨Ùت عبر Add to Home Screen.")])], -1)) 15476 ]), 15477 _: 1, 15478 __: [13,14] 15479 })) 15480 } 15481} 15482})() 15483 }; 15484 15485 const AdminNotFoundPage={ 15486 components:{AdminFrame}, 15487 setup(){const router=useRouter();return{router};}, 15488 render:(function(){ 15489const _Vue = Vue 15490const { createElementVNode: _createElementVNode } = _Vue 15491 15492const _hoisted_1 = { class: "card emptyCard" } 15493const _hoisted_2 = ["onClick"] 15494 15495return function render(_ctx, _cache) { 15496 with (_ctx) { 15497 const { createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 15498 15499 const _component_AdminFrame = _resolveComponent("AdminFrame") 15500 15501 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØµÙØØ© ØºÙØ± Ù ÙØ¬Ùدة" }, { 15502 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("h3", null, "تعذر Ø§ÙØ¹Ø«Ùر عÙÙ ÙØ°Ù Ø§ÙØµÙØØ©", -1)), _cache[1] || (_cache[1] = _createElementVNode("p", { class: "hint" }, "ÙØ¯ ÙÙÙÙ Ø§ÙØ±Ø§Ø¨Ø· ÙØ¯ÙÙ Ø§Ù Ø£Ù ØºÙØ± Ù ØªØ§Ø ÙØµÙاØÙات ØØ³Ø§Ø¨Ù.", -1)), _createElementVNode("button", { 15503 class: "btn secondary", 15504 onClick: $event => (router.push('/admin')) 15505 }, "Ø§ÙØ¹Ùدة Ø¥ÙÙ ÙÙØØ© Ø§ÙØ¥Ø¯Ø§Ø±Ø©", 8, _hoisted_2)])]), 15506 _: 1 15507 })) 15508 } 15509} 15510})() 15511 }; 15512 15513 15514 const OfficialFrame={ 15515 props:['title'], 15516 setup(){const store=useGzcStore();const router=useRouter();const route=useRoute();const tabs=[['/official','Ø§ÙØ±Ø¦ÙØ³ÙØ©','â'],['/official/members','Ø§ÙØ¹Ø¶ÙÙØ©','ð¥'],['/official/cases','Ø§ÙØØ§ÙØ§Øª','ð'],['/official/emergency','Ø§ÙØ·Ùارئ','ð¨'],['/official/events','اÙÙØ¹Ø§ÙÙØ§Øª','ðï¸'],['/official/announcements','Ø§ÙØªØ¹Ù Ù٠ات','ð¢']];function active(p){return route.path===p||(p!=='/official'&&route.path.startsWith(p));}function go(p){router.push(p);}return{store,router,tabs,active,go};}, 15517 render:(function(){ 15518const _Vue = Vue
15519const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 15520 15521const _hoisted_1 = { class: "publicShell officialShell" } 15522const _hoisted_2 = { class: "top" } 15523const _hoisted_3 = ["onClick"] 15524const _hoisted_4 = { 15525 key: 0, 15526 class: "adminAccount officialAccount" 15527} 15528const _hoisted_5 = ["onClick"] 15529const _hoisted_6 = ["onClick"] 15530const _hoisted_7 = ["onClick"] 15531const _hoisted_8 = { 15532 class: "nav bottomPro", 15533 "aria-label": "Ø§ÙØªÙÙÙ Ø§ÙØ±Ø³Ù Ù" 15534} 15535const _hoisted_9 = ["onClick"] 15536const _hoisted_10 = { class: "navIcon" } 15537const _hoisted_11 = { class: "navText" } 15538 15539return function render(_ctx, _cache) { 15540 with (_ctx) { 15541 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderSlot: _renderSlot, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass } = _Vue 15542 15543 return (_openBlock(), _createElementBlock("section", _hoisted_1, [ 15544 _createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 15545 class: "back", 15546 onClick: $event => (go('/official')) 15547 }, "رس٠Ù", 8, _hoisted_3), _createElementVNode("h2", null, _toDisplayString(title), 1)]), 15548 (store.state.me&&store.state.me.official) 15549 ? (_openBlock(), _createElementBlock("div", _hoisted_4, [ 15550 _createElementVNode("span", null, _toDisplayString(store.state.me.official.name_ar), 1), 15551 _createElementVNode("button", { 15552 class: "smallbtn", 15553 onClick: $event => (go('/official/tour')) 15554 }, "دÙÙÙ Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù ", 8, _hoisted_5), 15555 _createElementVNode("button", { 15556 class: "smallbtn", 15557 onClick: $event => (go('/official/publish')) 15558 }, "ÙØ´Ø± تع٠ÙÙ ", 8, _hoisted_6), 15559 _createElementVNode("button", { 15560 class: "smallbtn danger", 15561 onClick: $event => (store.logout(router,'/official/login')) 15562 }, "Ø®Ø±ÙØ¬", 8, _hoisted_7) 15563 ])) 15564 : _createCommentVNode("", true), 15565 _renderSlot($slots, "default"), 15566 _createElementVNode("nav", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tabs, (t) => { 15567 return (_openBlock(), _createElementBlock("button", { 15568 key: t[0], 15569 class: _normalizeClass({active:active(t[0])}), 15570 onClick: $event => (go(t[0])) 15571 }, [_createElementVNode("span", _hoisted_10, _toDisplayString(t[2]), 1), _createElementVNode("span", _hoisted_11, _toDisplayString(t[1]), 1)], 10, _hoisted_9)) 15572 }), 128))]) 15573 ])) 15574 } 15575} 15576})() 15577 }; 15578 15579 const OfficialLoginPage={ 15580 components:{PublicFrame}, 15581 setup(){const store=useGzcStore();const router=useRouter();const phone=ref('');const code=ref('');const otp=ref(false);async function requestOtp(){store.state.busy=true;store.state.msg='جار٠إرسا٠ÙÙØ¯ Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù...';const r=await api('/api/auth/request-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),purpose:'official_login'})});store.state.busy=false;store.state.msg=r.message||r.error||'';otp.value=!!r.ok;}async function verifyOtp(){store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù Ø§ÙØªØÙÙ...';const r=await api('/api/auth/verify-otp',{method:'POST',body:JSON.stringify({phone:norm(phone.value),code:code.value,purpose:'official_login'})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){const me=await store.loadMe(true);router.replace(me&&me.official&&me.official.tour_required?'/official/tour':'/official');}}return{store,phone,code,otp,requestOtp,verifyOtp};}, 15582 render:(function(){ 15583const _Vue = Vue 15584const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 15585 15586const _hoisted_1 = { class: "card" } 15587const _hoisted_2 = ["onUpdate:modelValue"] 15588const _hoisted_3 = ["onClick"] 15589const _hoisted_4 = ["onUpdate:modelValue"] 15590const _hoisted_5 = ["onClick"] 15591 15592return function render(_ctx, _cache) { 15593 with (_ctx) {
15594 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15595 15596 const _component_PublicFrame = _resolveComponent("PublicFrame") 15597 15598 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "دخÙÙ Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù" }, { 15599 default: _withCtx(() => [_createElementVNode("div", _hoisted_1, [ 15600 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "ØØ³Ø§Ø¨Ø§Øª Ø§ÙØ³Ùارة / اÙÙÙØµÙÙØ©", -1)), 15601 _cache[1] || (_cache[1] = _createElementVNode("h3", null, "دخÙÙ Ø¬ÙØ© Ø±Ø³Ù ÙØ©", -1)), 15602 _cache[2] || (_cache[2] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ø§ Ø§ÙØ¯Ø®Ù٠٠خصص ÙÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ±Ø³Ù ÙØ© اÙÙ Ø³Ø¬ÙØ© Ù Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø©. ÙÙ ØØ³Ø§Ø¨ ÙÙ ÙÙÙ Ø§ÙØ¯Ø®ÙÙ Ø¨Ø«ÙØ§Ø«Ø© Ø£Ø±ÙØ§Ù .", -1)), 15603 _withDirectives(_createElementVNode("input", { 15604 class: "ltr", 15605 "onUpdate:modelValue": $event => ((phone) = $event), 15606 placeholder: "رÙÙ ÙØ§ØªØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù" 15607 }, null, 8, _hoisted_2), [[_vModelText, phone]]), 15608 _createElementVNode("button", { 15609 class: "btn loadMore", 15610 onClick: requestOtp 15611 }, "إرسا٠اÙÙÙØ¯", 8, _hoisted_3), 15612 otp 15613 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_withDirectives(_createElementVNode("input", { 15614 class: "ltr", 15615 "onUpdate:modelValue": $event => ((code) = $event), 15616 placeholder: "ر٠ز Ø§ÙØªØÙÙ" 15617 }, null, 8, _hoisted_4), [[_vModelText, code]]), _createElementVNode("button", { 15618 class: "btn loadMore", 15619 onClick: verifyOtp 15620 }, "تØÙÙ ÙØ¯Ø®ÙÙ", 8, _hoisted_5)], 64)) 15621 : _createCommentVNode("", true) 15622 ])]), 15623 _: 1 15624 })) 15625 } 15626} 15627})() 15628 }; 15629 15630 const OfficialTourPage={ 15631 components:{OfficialFrame}, 15632 setup(){ 15633 const store=useGzcStore(); const router=useRouter(); const route=useRoute(); const active=ref(0); 15634 const steps=[ 15635 {icon:'ðï¸',title:'Ø£ÙØª Ø¯Ø§Ø®Ù Ø¨Ø§Ø³Ù Ø¬ÙØ© Ø±Ø³Ù ÙØ©',body:'ÙØ°Ø§ Ø§ÙØØ³Ø§Ø¨ ٠خصص ÙÙØ³Ùارة أ٠اÙÙÙØµÙÙØ© Ø£Ù Ø£Ù Ø¬ÙØ© Ø±Ø³Ù ÙØ© ٠عت٠دة. Ù٠رÙ٠دخÙ٠٠رتبط بÙÙØ³ Ø§ÙØ¬ÙØ©Ø ÙÙÙ ÙØªÙ تسجÙ٠استخدا٠Ù٠رÙÙ ÙÙØØ¯Ù.'}, 15636 {icon:'ð¥',title:'Ø§ÙØ¹Ø¶ÙÙØ§Øª ÙÙØ¹Ø±Ø¶ ÙÙØ·',body:'ÙÙ ÙÙÙÙ Ø§ÙØ§Ø·Ùاع عÙÙ Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶ÙÙØ© ÙØ§ÙØØ§Ùات ØØ³Ø¨ Ø§ÙØµÙاØÙØ§ØªØ ÙÙÙ ÙØ§ ÙÙØ¬Ø¯ تعدÙÙ Ø£Ù ØØ°Ù ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ Ù Ù Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù.'}, 15637 {icon:'ð¢',title:'ÙØ´Ø± تع٠Ù٠رس٠Ù',body:'Ø§ÙØªØ¹Ù Ù٠اÙÙ ÙØ´Ùر ÙØ¸Ùر Ø¨Ø§Ø³Ù Ø§ÙØ¬ÙØ© Ø§ÙØ±Ø³Ù ÙØ© ÙÙÙ ÙÙØ§ØªÙا اÙÙ ØØ¯Ø¯Ø©: Ø§ÙØ³Ùارة أ٠اÙÙÙØµÙÙØ©. ÙÙ ÙÙ Ø¥Ø¶Ø§ÙØ© ÙØµØ Ø±Ø§Ø¨Ø·Ø ØµÙØ±Ø PDF Ø£Ù ÙÙØ¯ÙÙ ÙØµÙر.'}, 15638 {icon:'ð¬',title:'ÙØ§ØªØ³Ø§Ø¨ ÙØ§ÙÙÙØ§Ùب',body:'Ø¹ÙØ¯ ÙØ´Ø± تع٠ÙÙ Ø±Ø³Ù ÙØ اÙÙØ¸Ø§Ù ÙØ¶ÙÙ Ø±Ø³Ø§Ø¦Ù ÙØ§ØªØ³Ø§Ø¨ Ø¥ÙÙ ÙØ§Ø¦Ù Ø© Ø§ÙØ¥Ø±Ø³Ø§Ù إذا ÙØ§Ù ÙØ§Ùب official_announcement Ù Ø¶Ø¨ÙØ·Ø§Ù. ÙØ§ ÙØªÙ Ø§ÙØ¥Ø±Ø³Ø§Ù Ø§ÙØ¹Ø´Ùائ٠بدÙÙ ÙØ§Ùب.'}, 15639 {icon:'ð¨',title:'Ø§ÙØØ§ÙØ§Øª ÙØ§ÙØ·ÙØ§Ø±Ø¦',body:'Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù ÙØ³ØªØ·Ùع اÙ٠تابعة ÙØ§ÙØ§Ø·ÙØ§Ø¹ ØØ³Ø¨ Ø§ÙØµÙاØÙØ©. اÙÙ Ø¹Ø§ÙØ¬Ø© Ø§ÙØªØ´ØºÙÙÙØ© تبÙÙ Ø¹ÙØ¯ إدارة اÙÙ ÙØµØ© ÙØ§ÙÙØ¬Ø§Ù اÙ٠ختصة.'}, 15640 {icon:'ð',title:'Ø§ÙØ£Ù Ø§Ù ÙØªØºÙÙØ± اÙÙ ÙØ¸Ù',body:'Ù٠رÙÙ ØªØ¸ÙØ± ÙÙ ÙØ°Ù Ø§ÙØ¬ÙÙØ© Ø£Ù٠٠رة. ÙØ¥Ø°Ø§ ØªØºÙØ± اÙÙ ÙØ¸Ù Ù Ø³ØªÙØ¨ÙØ§ÙØ Ø§ÙØ¥Ø¯Ø§Ø±Ø© ØªØ³ØªØ·ÙØ¹ إعادة Ø§ÙØ¬ÙÙØ© ÙÙØ°Ø§ Ø§ÙØ±ÙÙ Ø ÙÙÙ ÙÙÙÙ ÙØªØ دÙÙÙ Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù Ù٠أ٠ÙÙØª Ù Ù Ø§ÙØ£Ø¹ÙÙ.'} 15641 ]; 15642 const current=computed(()=>steps[Math.max(0,Math.min(active.value,steps.length-1))]); 15643 const official=computed(()=>store.state.me&&store.state.me.official?store.state.me.official:{}); 15644 async function load(){const me=await store.loadMe();if(!me||!me.authenticated||!me.official){router.replace('/official/login');return;}} 15645 function next(){if(active.value<steps.length-1)active.value++;else finish();} 15646 function prev(){if(active.value>0)active.value--;} 15647 async function finish(){store.state.busy=true;const r=await api('/api/official/tour/seen',{method:'POST',body:JSON.stringify({version:'official-tour-v1'})});store.state.busy=false;store.state.msg=r.message||r.error||'';await store.loadMe();router.replace('/official');} 15648 onMounted(load); 15649 return{store,route,steps,active,current,official,next,prev,finish,shortDate}; 15650 }, 15651 render:(function(){ 15652const _Vue = Vue
15653const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 15654 15655const _hoisted_1 = { class: "card officialTourHero" } 15656const _hoisted_2 = { class: "officialTourMeta" } 15657const _hoisted_3 = { dir: "ltr" } 15658const _hoisted_4 = { key: 0 } 15659const _hoisted_5 = { key: 1 } 15660const _hoisted_6 = { class: "card officialTourStep" } 15661const _hoisted_7 = { class: "officialTourIcon" } 15662const _hoisted_8 = { class: "tourDots" } 15663const _hoisted_9 = ["onClick"] 15664const _hoisted_10 = { class: "memberActions tourActions" } 15665const _hoisted_11 = ["disabled", "onClick"] 15666const _hoisted_12 = ["onClick"] 15667 15668return function render(_ctx, _cache) { 15669 with (_ctx) { 15670 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15671 15672 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 15673 15674 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "جÙÙØ© Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù" }, { 15675 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [ 15676 _cache[1] || (_cache[1] = _createElementVNode("span", { class: "vueBadge" }, "دÙÙÙ Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù", -1)), 15677 _createElementVNode("h3", null, "Ù Ø±ØØ¨Ø§Ù " + _toDisplayString(official.name_ar || 'Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù'), 1), 15678 _cache[2] || (_cache[2] = _createElementVNode("p", null, "ÙØ°Ù Ø§ÙØ¬ÙÙØ© ØªØ¸ÙØ± ÙØ£Ù٠٠رة ÙÙ٠رÙ٠دخÙ٠رس٠Ù. اÙÙØ¯Ù ÙÙ ØªÙØ¶ÙØ ØØ¯Ùد Ø§ÙØµÙاØÙØ© ÙØ·Ø±ÙÙØ© اÙÙØ´Ø± ÙØ§Ù٠تابعة ÙÙÙ Ù Ø³ØªØ®Ø¯Ù Ø¬Ø¯ÙØ¯.", -1)), 15679 _createElementVNode("div", _hoisted_2, [_createElementVNode("span", null, [_cache[0] || (_cache[0] = _createTextVNode("رÙÙ Ø§ÙØ¯Ø®ÙÙ: ")), _createElementVNode("b", _hoisted_3, _toDisplayString(official.login_phone || '-'), 1)]), (official.phone_label) 15680 ? (_openBlock(), _createElementBlock("span", _hoisted_4, _toDisplayString(official.phone_label), 1)) 15681 : _createCommentVNode("", true), (official.tour_seen_at) 15682 ? (_openBlock(), _createElementBlock("span", _hoisted_5, "آخر Ù Ø´Ø§ÙØ¯Ø©: " + _toDisplayString(shortDate(official.tour_seen_at)), 1)) 15683 : _createCommentVNode("", true)]) 15684 ]), _createElementVNode("section", _hoisted_6, [ 15685 _createElementVNode("div", _hoisted_7, _toDisplayString(current.icon), 1), 15686 _createElementVNode("h2", null, _toDisplayString(current.title), 1), 15687 _createElementVNode("p", null, _toDisplayString(current.body), 1), 15688 _createElementVNode("div", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(steps, (s, i) => { 15689 return (_openBlock(), _createElementBlock("button", { 15690 key: i, 15691 class: _normalizeClass({active:i===active}), 15692 onClick: $event => (active=i) 15693 }, _toDisplayString(i+1), 11, _hoisted_9)) 15694 }), 128))]), 15695 _createElementVNode("div", _hoisted_10, [_createElementVNode("button", { 15696 class: "btn secondary", 15697 disabled: active===0, 15698 onClick: prev 15699 }, "Ø§ÙØ³Ø§Ø¨Ù", 8, _hoisted_11), _createElementVNode("button", { 15700 class: "btn loadMore", 15701 onClick: next 15702 }, _toDisplayString(active===steps.length-1?'ÙÙÙ ØªØ Ø§Ø¨Ø¯Ø£ Ø§ÙØ¹Ù Ù':'Ø§ÙØªØ§ÙÙ'), 9, _hoisted_12)]) 15703 ]), _cache[3] || (_cache[3] = _createElementVNode("section", { class: "card officialTourRules" }, [_createElementVNode("h3", null, "ÙÙØ§Ø¹Ø¯ ٠ختصرة ÙØ§Ø³ØªØ®Ø¯Ø§Ù Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù"), _createElementVNode("ul", null, [ 15704 _createElementVNode("li", null, "ÙØ§ ØªÙØ´Ø± تع٠ÙÙ Ø¥ÙØ§ إذا ÙØ§Ù صادر Ù Ù Ø§ÙØ¬ÙØ© Ø§ÙØ±Ø³Ù ÙØ© ÙØ¹ÙاÙ."), 15705 _createElementVNode("li", null, "ÙØ§ ØªÙØªØ¨ Ø¨ÙØ§Ùات Ø´Ø®ØµÙØ© ØØ³Ø§Ø³Ø© Ø¯Ø§Ø®Ù ÙØµ Ø§ÙØªØ¹Ù ÙÙ Ø§ÙØ¹Ø§Ù ."), 15706 _createElementVNode("li", null, "راجع Ø§ÙØ¹ÙÙØ§Ù ÙØ§ÙÙØµ ÙØ¨Ù اÙÙØ´Ø± ÙØ£Ù Ø§ÙØªØ¹Ù ÙÙ ÙØ¯ ÙØµÙ ÙØ§ØªØ³Ø§Ø¨ ÙÙØ£Ø¹Ø¶Ø§Ø¡."), 15707 _createElementVNode("li", null, "إذا ØªØºÙØ± اÙÙ ÙØ¸Ù اÙ٠سؤÙÙ Ø¹Ù Ø§ÙØ±ÙÙ Ø Ø§Ø·ÙØ¨ Ù Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø© إعادة Ø§ÙØ¬ÙÙØ© ÙÙØ°Ø§ Ø§ÙØ±ÙÙ .") 15708 ])], -1))]), 15709 _: 1, 15710 __: [3] 15711 })) 15712 } 15713} 15714})() 15715 }; 15716 15717 const OfficialDashboardPage={ 15718 components:{OfficialFrame}, 15719 setup(){const store=useGzcStore();const router=useRouter();onMounted(async()=>
15719{if(await store.requireOfficial(router))await store.loadOfficialDashboard(router);});const c=computed(()=>store.state.dash||{});return{store,c};}, 15720 render:(function(){ 15721const _Vue = Vue 15722const { createElementVNode: _createElementVNode } = _Vue 15723 15724const _hoisted_1 = { class: "publicHero" } 15725const _hoisted_2 = { class: "miniStats adminStatsPro" } 15726const _hoisted_3 = { class: "homeGrid" } 15727const _hoisted_4 = ["onClick"] 15728const _hoisted_5 = ["onClick"] 15729const _hoisted_6 = ["onClick"] 15730const _hoisted_7 = ["onClick"] 15731 15732return function render(_ctx, _cache) { 15733 with (_ctx) { 15734 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 15735 15736 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 15737 15738 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "ÙÙØØ© Ø§ÙØØ³Ø§Ø¨ Ø§ÙØ±Ø³Ù Ù" }, { 15739 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", { class: "heroBadge" }, "ØØ³Ø§Ø¨ رس٠Ù", -1)), _createElementVNode("h1", null, _toDisplayString(store.state.me&&store.state.me.official&&store.state.me.official.name_ar || 'ØØ³Ø§Ø¨ رس٠Ù'), 1), _cache[1] || (_cache[1] = _createElementVNode("p", null, "Ø§Ø·ÙØ§Ø¹ Ù ÙØ³Ø¹ عÙ٠اÙÙ ÙØµØ© + ÙØ´Ø± تع٠Ù٠ات Ø±Ø³Ù ÙØ© بدÙÙ ØµÙØ§ØÙات تعدÙÙ Ø£Ù ØØ°Ù.", -1))]), _createElementVNode("section", _hoisted_2, [ 15740 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(c.members||0), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "عضÙ", -1))]), 15741 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(c.approved_members||0), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "٠عت٠د", -1))]), 15742 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(c.open_cases||0), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "ØØ§Ùات", -1))]), 15743 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(c.emergencies||0), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "Ø·ÙØ§Ø±Ø¦", -1))]) 15744 ]), _createElementVNode("section", _hoisted_3, [ 15745 _createElementVNode("button", { 15746 class: "homeTile", 15747 onClick: $event => ($router.push('/official/members')) 15748 }, _cache[6] || (_cache[6] = [_createElementVNode("span", { class: "ico" }, "ð¥", -1), _createElementVNode("b", null, "Ø¨ÙØ§Ùات Ø§ÙØ£Ø¹Ø¶Ø§Ø¡", -1), _createElementVNode("small", null, "عرض ÙÙØ·", -1)]), 8, _hoisted_4), 15749 _createElementVNode("button", { 15750 class: "homeTile", 15751 onClick: $event => ($router.push('/official/cases')) 15752 }, _cache[7] || (_cache[7] = [_createElementVNode("span", { class: "ico" }, "ð", -1), _createElementVNode("b", null, "Ø§ÙØØ§ÙØ§Øª", -1), _createElementVNode("small", null, "ÙØµÙÙ Ù٠ساعدة", -1)]), 8, _hoisted_5), 15753 _createElementVNode("button", { 15754 class: "homeTile dangerTile", 15755 onClick: $event => ($router.push('/official/emergency')) 15756 }, _cache[8] || (_cache[8] = [_createElementVNode("span", { class: "ico" }, "ð¨", -1), _createElementVNode("b", null, "Ø§ÙØ·Ùارئ", -1), _createElementVNode("small", null, "عرض ÙÙØ·", -1)]), 8, _hoisted_6), 15757 _createElementVNode("button", { 15758 class: "homeTile", 15759 onClick: $event => ($router.push('/official/publish')) 15760 }, _cache[9] || (_cache[9] = [_createElementVNode("span", { class: "ico" }, "ð¢", -1), _createElementVNode("b", null, "ÙØ´Ø± تع٠Ù٠رس٠Ù", -1), _createElementVNode("small", null, "ÙÙ Ø®Ø§ÙØªÙÙ ÙÙØ·", -1)]), 8, _hoisted_7) 15761 ])]), 15762 _: 1 15763 })) 15764 } 15765} 15766})() 15767 }; 15768 15769 const OfficialMembersPage={ 15770 components:{OfficialFrame}, 15771 setup(){const store=useGzcStore();const router=useRouter();async function load(){if(await store.requireOfficial(router))await store.loadOfficialMembers(false,router);}onMounted(load);async function more(){store.state.memberPage++;await store.loadOfficialMembers(true,router);}watch(()=>[store.state.filters.search,store.state.filters.status],()=>{clearTimeout(window.__gzcOfficialMemberTimer);window.__gzcOfficialMemberTimer=setTimeout(load,350);});return{store,load,more,statusName};}, 15772 render:(function(){ 15773const _Vue = Vue
15774const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 15775 15776const _hoisted_1 = { class: "card formCard" } 15777const _hoisted_2 = { class: "editGrid" } 15778const _hoisted_3 = ["onUpdate:modelValue"] 15779const _hoisted_4 = ["onUpdate:modelValue"] 15780const _hoisted_5 = ["value"] 15781const _hoisted_6 = { class: "hint" } 15782const _hoisted_7 = { 15783 key: 0, 15784 class: "card emptyCard" 15785} 15786const _hoisted_8 = { class: "memberList" } 15787const _hoisted_9 = { class: "memberMiniIdentity" } 15788const _hoisted_10 = ["src"] 15789const _hoisted_11 = { 15790 key: 1, 15791 class: "memberThumb memberThumbPlaceholder" 15792} 15793const _hoisted_12 = { class: "memberIdentityInfo" } 15794const _hoisted_13 = { class: "memberMiniMeta" } 15795const _hoisted_14 = { dir: "ltr" } 15796const _hoisted_15 = { class: "memberMiniFoot" } 15797const _hoisted_16 = ["onClick"] 15798const _hoisted_17 = ["onClick"] 15799 15800return function render(_ctx, _cache) { 15801 with (_ctx) { 15802 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15803 15804 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 15805 15806 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "ÙØ§Ø¦Ù Ø© Ø§ÙØ¹Ø¶ÙÙØ§Øª" }, { 15807 default: _withCtx(() => [ 15808 _createElementVNode("div", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("h3", null, "Ø¨ØØ« Ø§ÙØ¹Ø¶ÙÙØ©", -1)), _createElementVNode("div", _hoisted_2, [_withDirectives(_createElementVNode("input", { 15809 "onUpdate:modelValue": $event => ((store.state.filters.search) = $event), 15810 placeholder: "Ø¨ØØ« Ø¨Ø§ÙØ§Ø³Ù / Ø§ÙØ±ÙÙ / GZC" 15811 }, null, 8, _hoisted_3), [[_vModelText, store.state.filters.search]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((store.state.filters.status) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('member_status',store.state.filters.status), (o) => { 15812 return (_openBlock(), _createElementBlock("option", { 15813 key: o.value, 15814 value: o.value 15815 }, _toDisplayString(o.label), 9, _hoisted_5)) 15816 }), 128))], 8, _hoisted_4), [[_vModelSelect, store.state.filters.status]])]), _createElementVNode("p", _hoisted_6, "Ø§ÙØ¹Ø¯Ø¯: " + _toDisplayString(store.state.memberTotal), 1)]), 15817 (!store.state.members.length&&!store.state.busy) 15818 ? (_openBlock(), _createElementBlock("div", _hoisted_7, "ÙØ§ ØªÙØ¬Ø¯ عضÙÙØ§Øª.")) 15819 : _createCommentVNode("", true), 15820 _createElementVNode("div", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.members, (m) => { 15821 return (_openBlock(), _createElementBlock("div", { 15822 class: "card memberRowPro", 15823 key: m.id 15824 }, [_createElementVNode("div", _hoisted_9, [($memberPhoto(m,'thumb')) 15825 ? (_openBlock(), _createElementBlock("img", { 15826 key: 0, 15827 class: "memberThumb", 15828 src: $memberPhoto(m,'thumb'), 15829 loading: "lazy", 15830 alt: "" 15831 }, null, 8, _hoisted_10)) 15832 : (_openBlock(), _createElementBlock("div", _hoisted_11, "ð¤")), _createElementVNode("div", _hoisted_12, [_createElementVNode("b", null, _toDisplayString(m.full_name||'عضÙ'), 1), _createElementVNode("div", _hoisted_13, [_createElementVNode("span", null, _toDisplayString(m.gzc_id||'-'), 1), _createElementVNode("span", _hoisted_14, _toDisplayString(m.whatsapp||'-'), 1)]), _createElementVNode("div", _hoisted_15, [_
15832createElementVNode("span", null, _toDisplayString(statusName(m.status)), 1), _createElementVNode("span", null, _toDisplayString($cityLabel(m.china_city)||'-'), 1), _createElementVNode("span", null, _toDisplayString(m.category||'-'), 1)])])]), _createElementVNode("button", { 15833 class: "smallbtn secondary", 15834 onClick: $event => ($router.push('/official/member/'+m.id)) 15835 }, "عرض", 8, _hoisted_16)])) 15836 }), 128))]), 15837 (store.state.memberHasMore) 15838 ? (_openBlock(), _createElementBlock("button", { 15839 key: 1, 15840 class: "btn secondary loadMore", 15841 onClick: more 15842 }, "تØÙ Ù٠اÙÙ Ø²ÙØ¯", 8, _hoisted_17)) 15843 : _createCommentVNode("", true) 15844 ]), 15845 _: 1 15846 })) 15847 } 15848} 15849})() 15850 }; 15851 15852 const OfficialMemberDetailPage={ 15853 components:{OfficialFrame}, 15854 setup(){const store=useGzcStore();const route=useRoute();const router=useRouter();async function load(){if(await store.requireOfficial(router))await store.loadOfficialMember(route.params.id,router);}onMounted(load);const m=computed(()=>store.state.selectedMember&&store.state.selectedMember.member);const cases=computed(()=>safeArray(store.state.selectedMember&&store.state.selectedMember.cases));const emergencies=computed(()=>safeArray(store.state.selectedMember&&store.state.selectedMember.emergencies));return{store,m,cases,emergencies,statusName,caseStatusName,caseTypeName,shortDate};}, 15855 render:(function(){ 15856const _Vue = Vue 15857const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 15858 15859const _hoisted_1 = { 15860 key: 0, 15861 class: "card skeleton" 15862} 15863const _hoisted_2 = { class: "card memberDetailHero" } 15864const _hoisted_3 = { class: "detailIdentity" } 15865const _hoisted_4 = ["src"] 15866const _hoisted_5 = { 15867 key: 1, 15868 class: "avatar placeholder" 15869} 15870const _hoisted_6 = { class: "memberMiniFoot" } 15871const _hoisted_7 = { class: "card memberDetailCard" } 15872const _hoisted_8 = { class: "profileLine" } 15873const _hoisted_9 = { dir: "ltr" } 15874const _hoisted_10 = { class: "profileLine" } 15875const _hoisted_11 = { dir: "ltr" } 15876const _hoisted_12 = { class: "profileLine" } 15877const _hoisted_13 = { class: "profileLine" } 15878const _hoisted_14 = { class: "profileLine" } 15879const _hoisted_15 = { class: "profileLine" } 15880const _hoisted_16 = { class: "profileLine" } 15881const _hoisted_17 = { class: "profileLine" } 15882const _hoisted_18 = { class: "card relatedCard" } 15883const _hoisted_19 = { 15884 key: 0, 15885 class: "hint" 15886} 15887 15888return function render(_ctx, _cache) { 15889 with (_ctx) { 15890 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15891 15892 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 15893 15894 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶Ù" }, { 15895 default: _withCtx(() => [(!m) 15896 ? (_openBlock(), _createElementBlock("div", _hoisted_1, "جار٠تØÙ ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª...")) 15897 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createElementVNode("div", _hoisted_2, [_createElementVNode("div", _hoisted_3, [($memberPhoto(m,'thumb')) 15898 ? (_openBlock(), _createElementBlock("img", { 15899 key: 0, 15900 src: $memberPhoto(m,'thumb'), 15901 loading: "lazy", 15902 alt: "" 15903 }, null, 8, _hoisted_4)) 15904 : (_openBlock(), _createElementBlock("div", _hoisted_5, "ð¤")), _createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(m.full_name||'عضÙ'), 1), _createElementVNode("div", _hoisted_6, [_createElementVNode("span", null, _toDisplayString(statusName(m.status)), 1), _createElementVNode("span", null, _toDisplayString(m.gzc_id||'-'), 1)])])])]), _createElementVNode("div", _hoisted_7, [ 15905 _cache[8] || (_cache[8] = _createElementVNode("h3", null, "Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶ÙÙØ©", -1)), 15906 _createElementVNode("div", _hoisted_8, [_cache[0] || (_cache[0] = _createElementVNode("b", null, "ÙØ§ØªØ³Ø§Ø¨", -1)), _createElementVNode("span", _hoisted_9, _toDisplayString(m.whatsapp||'-'), 1)]), 15907 _createElementVNode("div", _hoisted_10, [_cache[1] || (_cache[1] = _createElementVNode("b", null, "ÙØ§ØªÙ Ø§ÙØµÙÙ", -1)), _createElementVNode("span", _hoisted_11, _toDisplayString(m.china_ph
15907one||'-'), 1)]), 15908 _createElementVNode("div", _hoisted_12, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "WeChat", -1)), _createElementVNode("span", null, _toDisplayString(m.wechat||'-'), 1)]), 15909 _createElementVNode("div", _hoisted_13, [_cache[3] || (_cache[3] = _createElementVNode("b", null, "اÙ٠دÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString($cityLabel(m.china_city)||'-'), 1)]), 15910 _createElementVNode("div", _hoisted_14, [_cache[4] || (_cache[4] = _createElementVNode("b", null, "Ø§ÙØÙ", -1)), _createElementVNode("span", null, _toDisplayString(m.china_district||'-'), 1)]), 15911 _createElementVNode("div", _hoisted_15, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "ÙØ¦Ø© Ø§ÙØ¹Ø¶ÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(m.category||'-'), 1)]), 15912 _createElementVNode("div", _hoisted_16, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "اÙÙ ÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(m.profession||'-'), 1)]), 15913 _createElementVNode("div", _hoisted_17, [_cache[7] || (_cache[7] = _createElementVNode("b", null, "Ø§ÙØ£Ø³Ø±Ø©", -1)), _createElementVNode("span", null, _toDisplayString(m.family_count||0), 1)]) 15914 ]), _createElementVNode("div", _hoisted_18, [ 15915 _cache[9] || (_cache[9] = _createElementVNode("h3", null, "Ø§ÙØØ§ÙØ§Øª ÙØ§ÙØ·ÙØ§Ø±Ø¦ اÙ٠رتبطة", -1)), 15916 (!cases.length&&!emergencies.length) 15917 ? (_openBlock(), _createElementBlock("div", _hoisted_19, "ÙØ§ ØªÙØ¬Ø¯ ØØ§Ùات ٠رتبطة.")) 15918 : _createCommentVNode("", true), 15919 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(cases, (c) => { 15920 return (_openBlock(), _createElementBlock("div", { 15921 class: "relatedItem", 15922 key: 'c'+c.id 15923 }, [_createElementVNode("b", null, _toDisplayString(c.case_code), 1), _createElementVNode("span", null, _toDisplayString(caseTypeName(c.type)) + " â " + _toDisplayString(caseStatusName(c.status)), 1), _createElementVNode("small", null, _toDisplayString(shortDate(c.created_at)), 1)])) 15924 }), 128)), 15925 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(emergencies, (e) => { 15926 return (_openBlock(), _createElementBlock("div", { 15927 class: "relatedItem dangerRelated", 15928 key: 'e'+e.id 15929 }, [_createElementVNode("b", null, _toDisplayString(e.ticket_code), 1), _createElementVNode("span", null, _toDisplayString(e.type) + " â " + _toDisplayString(caseStatusName(e.status)) + " â " + _toDisplayString(e.priority), 1), _createElementVNode("small", null, _toDisplayString(shortDate(e.created_at)), 1)])) 15930 }), 128)) 15931 ])], 64))]), 15932 _: 1 15933 })) 15934 } 15935} 15936})() 15937 }; 15938 15939 const OfficialCasesPage={ 15940 components:{OfficialFrame}, 15941 setup(){const store=useGzcStore();const router=useRouter();const mode=ref('');function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');}async function load(){if(await store.requireOfficial(router))await store.loadOfficialCases(mode.value,router);}onMounted(load);watch(mode,load);return{store,mode,caseTypeName,caseStatusName,shortDate,mediaSrc,openAttachment};}, 15942 render:(function(){ 15943const _Vue = Vue 15944const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 15945 15946const _hoisted_1 = { class: "card opsSummaryCard" } 15947const _hoisted_2 = { class: "opsFilterBar" } 15948const _hoisted_3 = ["onClick"] 15949const _hoisted_4 = ["onClick"] 15950const _hoisted_5 = ["onClick"] 15951const _hoisted_6 = { 15952 key: 0, 15953 class: "card emptyCard" 15954} 15955const _hoisted_7 = { class: "opsList" } 15956const _hoisted_8 = { class: "memberCardTop" } 15957const _hoisted_9 = { class: "statusPill" } 15958const _hoisted_10 = { class: "hint" } 15959const _hoisted_11 = { 15960 key: 0, 15961 class: "announcementMediaGrid" 15962} 15963const _hoisted_12 = ["onClick"] 15964const _hoisted_13 = ["src"] 15965const _hoisted_14 = { class: "notifyMeta" } 15966const _hoisted_15 = { dir: "ltr" } 15967 15968return function render(_ctx, _cache) { 15969 with (_ctx) { 15970 const { normalizeClass: _normalizeClass, createElementVNode: _
15970createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 15971 15972 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 15973 15974 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "Ø§ÙØØ§ÙØ§Øª" }, { 15975 default: _withCtx(() => [_createElementVNode("div", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 15976 class: _normalizeClass(mode===''?'active':''), 15977 onClick: $event => (mode='') 15978 }, "اÙÙÙ", 10, _hoisted_3), _createElementVNode("button", { 15979 class: _normalizeClass(mode==='arrival'?'active':''), 15980 onClick: $event => (mode='arrival') 15981 }, "اÙÙØµÙÙ", 10, _hoisted_4), _createElementVNode("button", { 15982 class: _normalizeClass(mode==='help'?'active':''), 15983 onClick: $event => (mode='help') 15984 }, "اÙ٠ساعدة", 10, _hoisted_5)])]), (!store.state.adminCases.length&&!store.state.busy) 15985 ? (_openBlock(), _createElementBlock("div", _hoisted_6, "ÙØ§ ØªÙØ¬Ø¯ ØØ§Ùات.")) 15986 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.adminCases, (c) => { 15987 return (_openBlock(), _createElementBlock("div", { 15988 class: "card opsCard", 15989 key: c.id 15990 }, [ 15991 _createElementVNode("div", _hoisted_8, [_createElementVNode("h3", null, _toDisplayString(c.case_code||c.title||'ØØ§ÙØ©'), 1), _createElementVNode("span", _hoisted_9, _toDisplayString(caseStatusName(c.status)), 1)]), 15992 _createElementVNode("p", _hoisted_10, [_createElementVNode("b", null, _toDisplayString(caseTypeName(c.type)), 1), _createTextVNode(" â " + _toDisplayString(c.full_name||c.contact_name||'بدÙ٠اس٠'), 1)]), 15993 _createElementVNode("p", null, _toDisplayString(c.description||'ÙØ§ ÙÙØ¬Ø¯ ÙØµÙ.'), 1), 15994 (c.media&&c.media.length) 15995 ? (_openBlock(), _createElementBlock("div", _hoisted_11, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(c.media, (m) => { 15996 return (_openBlock(), _createElementBlock("button", { 15997 key: m.id, 15998 class: "announcementMediaItem", 15999 onClick: $event => (openAttachment(m)) 16000 }, [_createElementVNode("img", { 16001 src: mediaSrc(m), 16002 loading: "lazy", 16003 alt: "ØµÙØ±Ø© Ø§ÙØØ§ÙØ©" 16004 }, null, 8, _hoisted_13), _cache[0] || (_cache[0] = _createElementVNode("span", null, "ØµÙØ±Ø©", -1))], 8, _hoisted_12)) 16005 }), 128))])) 16006 : _createCommentVNode("", true), 16007 _createElementVNode("div", _hoisted_14, [_createElementVNode("span", _hoisted_15, _toDisplayString(c.whatsapp||c.contact_whatsapp||c.contact_china_phone||'-'), 1), _createElementVNode("span", null, _toDisplayString($cityLabel(c.china_city)||'-'), 1), _createElementVNode("span", null, _toDisplayString(shortDate(c.created_at)), 1)]) 16008 ])) 16009 }), 128))])]), 16010 _: 1 16011 })) 16012 } 16013} 16014})() 16015 }; 16016 16017 const OfficialEmergencyPage={ 16018 components:{OfficialFrame}, 16019 setup(){const store=useGzcStore();const router=useRouter();function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');}async function load(){if(await store.requireOfficial(router))await store.loadOfficialEmergencies(router);}onMounted(load);return{store,caseStatusName,shortDate,mediaSrc,openAttachment};}, 16020 render:(function(){ 16021const _Vue = Vue 16022const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 16023 16024const _hoisted_1 = { 16025 key: 0, 16026 class: "card emptyCard" 16027} 16028const _hoisted_2 = { class: "opsList" } 16029const _hoisted_3 = { class: "memberCardTop" } 16030const _hoisted_4 = { class: "statusPill" } 16031const _hoisted_5 = { class: "hint" } 16032const _hoisted_6 = { 16033 key: 0, 16034 class: "announcementMediaGrid" 16035} 16036const _hoisted_7 = ["onClick"] 16037const _hoisted_8 = ["src"] 16038const _hoisted_9 = { class: "notifyMeta" } 16039const _hoisted_10 = { dir: "ltr" } 16040 16041return function render(_ctx, _cache) { 16042 with (_ctx) { 16043 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _
16043createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 16044 16045 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 16046 16047 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "Ø§ÙØ·Ùارئ" }, { 16048 default: _withCtx(() => [(!store.state.emergencies.length&&!store.state.busy) 16049 ? (_openBlock(), _createElementBlock("div", _hoisted_1, "ÙØ§ ØªÙØ¬Ø¯ Ø¨ÙØ§ØºØ§Øª Ø·ÙØ§Ø±Ø¦.")) 16050 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_2, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.emergencies, (e) => { 16051 return (_openBlock(), _createElementBlock("div", { 16052 class: "card opsCard dangerRelated", 16053 key: e.id 16054 }, [ 16055 _createElementVNode("div", _hoisted_3, [_createElementVNode("h3", null, _toDisplayString(e.ticket_code||'Ø¨ÙØ§Øº Ø·ÙØ§Ø±Ø¦'), 1), _createElementVNode("span", _hoisted_4, _toDisplayString(caseStatusName(e.status)), 1)]), 16056 _createElementVNode("p", _hoisted_5, _toDisplayString(e.full_name||'عضÙ') + " â " + _toDisplayString(e.type) + " â " + _toDisplayString(e.priority), 1), 16057 _createElementVNode("p", null, _toDisplayString(e.description||'ÙØ§ ÙÙØ¬Ø¯ ÙØµÙ.'), 1), 16058 (e.media&&e.media.length) 16059 ? (_openBlock(), _createElementBlock("div", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(e.media, (m) => { 16060 return (_openBlock(), _createElementBlock("button", { 16061 key: m.id, 16062 class: "announcementMediaItem", 16063 onClick: $event => (openAttachment(m)) 16064 }, [_createElementVNode("img", { 16065 src: mediaSrc(m), 16066 loading: "lazy", 16067 alt: "ØµÙØ±Ø© Ø§ÙØ¨Ùاغ" 16068 }, null, 8, _hoisted_8), _cache[0] || (_cache[0] = _createElementVNode("span", null, "ØµÙØ±Ø©", -1))], 8, _hoisted_7)) 16069 }), 128))])) 16070 : _createCommentVNode("", true), 16071 _createElementVNode("div", _hoisted_9, [_createElementVNode("span", _hoisted_10, _toDisplayString(e.whatsapp||e.china_phone||'-'), 1), _createElementVNode("span", null, _toDisplayString(e.location_text||$cityLabel(e.china_city)||'-'), 1), _createElementVNode("span", null, _toDisplayString(shortDate(e.created_at)), 1)]) 16072 ])) 16073 }), 128))])]), 16074 _: 1 16075 })) 16076 } 16077} 16078})() 16079 }; 16080 16081 const OfficialEventsPage={ 16082 components:{OfficialFrame}, 16083 setup(){const store=useGzcStore();const router=useRouter();async function load(){if(await store.requireOfficial(router)){store.state.busy=true;const r=await api('/api/events?limit=30');store.state.events=safeArray(r.events);store.state.busy=false;}}onMounted(load);return{store,load,eventCategoryName};}, 16084 render:(function(){ 16085const _Vue = Vue 16086const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 16087 16088const _hoisted_1 = { 16089 key: 0, 16090 class: "card emptyCard" 16091} 16092const _hoisted_2 = ["src"] 16093const _hoisted_3 = { class: "memberCardTop" } 16094const _hoisted_4 = { class: "statusPill" } 16095const _hoisted_5 = { class: "hint" } 16096const _hoisted_6 = { class: "eventQuickMeta" } 16097const _hoisted_7 = { class: "metaRow" } 16098const _hoisted_8 = { class: "metaRow" } 16099const _hoisted_9 = { class: "miniStats mediaMini" } 16100const _hoisted_10 = ["onClick"] 16101 16102return function render(_ctx, _cache) { 16103 with (_ctx) { 16104 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 16105 16106 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 16107 16108 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "اÙÙØ¹Ø§ÙÙØ§Øª ÙØ§ÙØ£ÙØ¨Ù٠ات" }, {
16109 default: _withCtx(() => [(!store.state.events.length&&!store.state.busy) 16110 ? (_openBlock(), _createElementBlock("div", _hoisted_1, "ÙØ§ ØªÙØ¬Ø¯ ÙØ¹Ø§ÙÙØ§Øª.")) 16111 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.events, (e) => { 16112 return (_openBlock(), _createElementBlock("div", { 16113 class: "card eventLite eventLiteExpanded", 16114 key: e.id 16115 }, [ 16116 (e.cover_url) 16117 ? (_openBlock(), _createElementBlock("img", { 16118 key: 0, 16119 class: "eventCover", 16120 src: e.cover_url, 16121 loading: "lazy", 16122 alt: "" 16123 }, null, 8, _hoisted_2)) 16124 : _createCommentVNode("", true), 16125 _createElementVNode("div", _hoisted_3, [_createElementVNode("h3", null, _toDisplayString(e.title||'ÙØ¹Ø§ÙÙØ©'), 1), _createElementVNode("span", _hoisted_4, _toDisplayString(eventCategoryName(e.category)), 1)]), 16126 _createElementVNode("p", _hoisted_5, _toDisplayString(e.description||'-'), 1), 16127 _createElementVNode("div", _hoisted_6, [_createElementVNode("div", _hoisted_7, [_cache[0] || (_cache[0] = _createElementVNode("b", null, "Ø§ÙØªØ§Ø±ÙØ®", -1)), _createElementVNode("span", null, _toDisplayString(e.event_date||'-'), 1)]), _createElementVNode("div", _hoisted_8, [_cache[1] || (_cache[1] = _createElementVNode("b", null, "اÙÙ ÙÙØ¹", -1)), _createElementVNode("span", null, _toDisplayString(e.location||e.address_cn||'-'), 1)])]), 16128 _createElementVNode("div", _hoisted_9, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.photo_count||0), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "ØµÙØ±", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.video_count||0), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "ÙÙØ¯ÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.media_count||0), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "ÙØ³Ø§Ø¦Ø·", -1))])]), 16129 _createElementVNode("button", { 16130 class: "smallbtn secondary", 16131 onClick: $event => ($router.push('/events/'+e.id)) 16132 }, "ÙØªØ اÙÙØ¹Ø§ÙÙØ© ÙØ§ÙØ£ÙØ¨ÙÙ ", 8, _hoisted_10) 16133 ])) 16134 }), 128))]), 16135 _: 1 16136 })) 16137 } 16138} 16139})() 16140 }; 16141 16142 const OfficialAnnouncementsPage={ 16143 components:{OfficialFrame}, 16144 setup(){const store=useGzcStore();const router=useRouter();onMounted(async()=>{if(await store.requireOfficial(router))await store.loadOfficialAnnouncements(router);});function openAttachment(m){if(m&&m.file_url)window.open(m.file_url,'_blank','noopener');}return{store,channelName,shortDate,mediaSrc,isVideo,isPdf,openAttachment,isVerifiedAnnouncement,verificationLabel};}, 16145 render:(function(){ 16146const _Vue = Vue 16147const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 16148 16149const _hoisted_1 = { class: "card" } 16150const _hoisted_2 = ["onClick"] 16151const _hoisted_3 = { 16152 key: 0, 16153 class: "card emptyCard" 16154} 16155const _hoisted_4 = { class: "officialNoticeHead compact" } 16156const _hoisted_5 = ["src"] 16157const _hoisted_6 = { class: "statusPill" } 16158const _hoisted_7 = { 16159 key: 0, 16160 class: "verifyStamp ok" 16161} 16162const _hoisted_8 = { class: "hint" } 16163const _hoisted_9 = { 16164 key: 1, 16165 class: "announcementMediaGrid" 16166} 16167const _hoisted_10 = ["onClick"] 16168const _hoisted_11 = ["src"] 16169const _hoisted_12 = ["src"] 16170const _hoisted_13 = { class: "notifyMeta" } 16171const _hoisted_14 = { key: 0 } 16172const _hoisted_15 = ["href"] 16173 16174return function render(_ctx, _cache) { 16175 with (_ctx) { 16176 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 16177 16178 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 16179 16180 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "Ø§ÙØªØ¹Ù Ù٠ات اÙÙ ÙØ´Ùرة" }, { 16181 default: _withCtx(() => [_createElementVNode("div", _hoisted_1, [_createElementVNode("button", { 16182 class: "btn loadMore", 16183 onClick: $event => ($router.push('/official/publish')) 16184 }, "ÙØ´Ø± تع٠ÙÙ Ø±Ø³Ù Ù Ø¬Ø¯ÙØ¯", 8, _hoisted_2)]), (!store.state.announcements.length&&!store.state.busy) 16185 ? (_openBlock(), _createElementBlock("div", _hoisted_3, "ÙØ§ ØªÙØ¬Ø¯ تع٠Ù٠ات.")) 16186 : _createCommentVNode("", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(store.state.announcements, (a) => { 16187 return (_openBlock(), _createElementBlock("div", { 16188 class: "card announcementCard", 16189 key: a.id 16190 }, [ 16191 _createElementVNode("div", _hoisted_4, [(a.source_logo_url) 16192 ? (_openBlock(), _createElementBlock("img", { 16193 key: 0, 16194 src: a.source_logo_url, 16195 alt: "" 16196 }, null, 8, _hoisted_5)) 16197 : _createCommentVNode("", true), _createElementVNode("div", null, [_createElementVNode("span", _hoisted_6, _toDisplayString(channelName(a.channel)), 1), _createElementVNode("h3", null, _toDisplayString(a.title), 1)])]), 16198 (isVerifiedAnnouncement(a)) 16199 ? (_openBlock(), _createElementBlock("div", _hoisted_7, _toDisplayString(verificationLabel(a)), 1)) 16200 : _createCommentVNode("", true), 16201 _createElementVNode("p", _hoisted_8, _toDisplayString(a.body), 1), 16202 (a.media&&a.media.length) 16203 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(a.media, (m) => { 16204 return (_openBlock(), _createElementBlock("button", { 16205 key: m.id, 16206 class: "announcementMediaItem", 16207 onClick: $event => (openAttachment(m)) 16208 }, [(!isVideo(m)) 16209 ? (_openBlock(), _createElementBlock("img", { 16210 key: 0, 16211 src: mediaSrc(m), 16212 loading: "lazy", 16213 alt: "" 16214 }, null, 8, _hoisted_11)) 16215 : (_openBlock(), _createElementBlock("video", { 16216 key: 1, 16217 src: m.file_url, 16218 controls: "", 16219 preload: "metadata" 16220 }, null, 8, _hoisted_12)), _createElementVNode("span", null, _toDisplayString(isPdf(m)?'PDF':(isVideo(m)?'ÙÙØ¯ÙÙ':'ØµÙØ±Ø©')), 1)], 8, _hoisted_10)) 16221 }), 128))])) 16222 : _createCommentVNode("", true), 16223 _createElementVNode("div", _hoisted_13, [_createElementVNode("span", null, _toDisplayString(a.type||'-'), 1), _createElementVNode("span", null, _toDisplayString(shortDate(a.created_at)), 1), (a.expires_at) 16224 ? (_openBlock(), _createElementBlock("span", _hoisted_14, "ÙÙØªÙÙ " + _toDisplayString(String(a.expires_at).slice(0,10)), 1)) 16225 : _createCommentVNode("", true)]), 16226 (a.action_url) 16227 ? (_openBlock(), _createElementBlock("a", { 16228 key: 2, 16229 class: "btn secondary", 16230 href: a.action_url, 16231 target: "_blank" 16232 }, "ÙØªØ Ø§ÙØ±Ø§Ø¨Ø·", 8, _hoisted_15)) 16233 : _createCommentVNode("", true) 16234 ])) 16235 }), 128))]), 16236 _: 1 16237 })) 16238 } 16239} 16240})() 16241 }; 16242 16243 16244 16245 16246 const AdminFeedbackPage={ 16247 components:{AdminFrame}, 16248 setup(){ 16249 const store=useGzcStore();const router=useRouter();const route=useRoute();const targetFeedback=String((route.query||{}).feedback||'').trim();const status=ref(targetFeedback?'all':'open');const items=ref([]);const open=reactive({});const focusedId=ref(''); 16250 function statusLabel(v){return ({new:'Ø¬Ø¯ÙØ¯',reviewing:'ÙÙØ¯ اÙ٠راجعة',done:'ØªÙ Ø§ÙØªÙÙÙØ°',rejected:'٠رÙÙØ¶',archived:'٠ؤرشÙ'}[String(v||'')])||String(v||'-');} 16251 function typeLabel(v){return ({suggestion:'Ø§ÙØªØ±Ø§Ø',note:'Ù ÙØ§ØØ¸Ø©',bug:'Ù Ø´ÙÙØ© تÙÙÙØ©',correction:'تصØÙØ Ù Ø¹ÙÙÙ Ø©',feature:'Ø·ÙØ¨ Ø¥Ø¶Ø§ÙØ©',other:'أخرÙ'}[String(v||'')])||String(v||'-');} 16252 function toggle(x){open[x.id]=!open[x.id];}
16253 async function focusTarget(){if(!targetFeedback)return;const row=items.value.find(x=>String(x.id)===targetFeedback);if(!row)return;open[row.id]=true;focusedId.value=String(row.id);await nextTick();const el=document.querySelector('[data-task-id="feedback-'+String(row.id).replace(/[^0-9]/g,'')+'"]');if(el)el.scrollIntoView({behavior:'smooth',block:'center'});} 16254 async function load(){if(!(await store.requireAdmin(router)))return;store.state.busy=true;const r=await api('/api/admin/feedback?status='+encodeURIComponent(status.value));store.state.busy=false;if(r.status===401){router.replace('/admin/login');return;}items.value=safeArray(r.feedback);await focusTarget();} 16255 async function update(x,newStatus){store.state.busy=true;const r=await api('/api/admin/feedback/'+encodeURIComponent(x.id),{method:'POST',body:JSON.stringify({status:newStatus,admin_note:x.admin_note||''})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 16256 onMounted(load);watch(status,load); 16257 return{store,status,items,open,focusedId,statusLabel,typeLabel,toggle,load,update,shortDate}; 16258 }, 16259 render:(function(){ 16260const _Vue = Vue 16261const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 16262 16263const _hoisted_1 = { class: "card dashboardHeaderCard" } 16264const _hoisted_2 = ["onClick"] 16265const _hoisted_3 = { class: "segmented" } 16266const _hoisted_4 = ["onClick"] 16267const _hoisted_5 = ["onClick"] 16268const _hoisted_6 = ["onClick"] 16269const _hoisted_7 = { 16270 key: 0, 16271 class: "card emptyCard" 16272} 16273const _hoisted_8 = { class: "feedbackAdminList compactTaskList" } 16274const _hoisted_9 = ["data-task-id"] 16275const _hoisted_10 = ["onClick"] 16276const _hoisted_11 = { class: "statusPill" } 16277const _hoisted_12 = { 16278 key: 0, 16279 class: "compactTaskBody" 16280} 16281const _hoisted_13 = { class: "notifyMeta" } 16282const _hoisted_14 = { dir: "ltr" } 16283const _hoisted_15 = { class: "opsDesc" } 16284const _hoisted_16 = ["onUpdate:modelValue"] 16285const _hoisted_17 = { class: "row" } 16286const _hoisted_18 = ["onClick"] 16287const _hoisted_19 = ["onClick"] 16288const _hoisted_20 = ["onClick"] 16289const _hoisted_21 = ["onClick"] 16290 16291return function render(_ctx, _cache) { 16292 with (_ctx) { 16293 const { createElementVNode: _createElementVNode, normalizeClass: _normalizeClass, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, vModelText: _vModelText, withDirectives: _withDirectives, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 16294 16295 const _component_AdminFrame = _resolveComponent("AdminFrame") 16296 16297 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù ÙØ§ØØ¸Ø§Øª Ø§ÙØ£Ø¹Ø¶Ø§Ø¡" }, { 16298 default: _withCtx(() => [ 16299 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "إدارة اÙÙ ÙØµØ©"), _createElementVNode("h3", null, "Ù Ø±ÙØ² اÙÙ ÙØ§ØØ¸Ø§Øª ÙØ§ÙØ§ÙØªØ±Ø§ØØ§Øª"), _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ اÙÙ ÙØ§ØØ¸Ø© اÙÙ Ø·ÙÙØ¨Ø© ÙÙØ·Ø ØªÙØªÙÙ Ù ÙÙ ØªÙØ§ تÙÙØ§Ø¦ÙØ§Ù Ø¹ÙØ¯ Ø§ÙØªÙÙÙØ° Ø£Ù Ø§ÙØ±Ùض.")], -1)), _createElementVNode("button", { 16300 class: "smallbtn", 16301 onClick: load 16302 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), 16303 _createElementVNode("div", _hoisted_3, [_createElementVNode("button", { 16304 class: _normalizeClass({active:status==='open'}), 16305 onClick: $event => (status='open') 16306 }, "اÙÙ ÙØªÙØØ©", 10, _hoisted_4), _createElementVNode("button", { 16307 class: _normalizeClass({active:status==='all'}), 16308 onClick: $event => (status='all') 16309 }, "اÙÙÙ", 10, _hoisted_5), _createElementVNode("button", { 16310 class: _normalizeClass({active:status==='archived'}), 16311 onClick: $event => (status='archived') 16312 }, "اÙÙ Ø¤Ø±Ø´ÙØ©", 10, _hoisted_6)]), 16313 (!items.length&&!store.state.busy) 16314 ? (_openBlock(), _createElementBlock("section", _hoisted_7, "ÙØ§ ØªÙØ¬Ø¯ Ù ÙØ§ØØ¸Ø§Øª ØØ§ÙÙØ§Ù.")) 16315 : _createCommentVNode("", true), 16316 _createElementVNode("section", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (x) => { 16317 return (_openBlock(), _createElementBlock("article", { 16318 key: x.id, 16319 class: _normalizeClass(["card feedbackAdminCard compactTaskCard", {taskTarget:focusedId===String(x.id),open:open[x.id]}]), 16320 "data-task-id": 'feedback-'+x.id 16321 }, [_createElementVNode("button", { 16322 class: "compactTaskHead", 16323 onClick: $event => (toggle(x)) 16324 }, [_createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(x.title || typeLabel(x.feedback_type)), 1
16324), _createElementVNode("p", null, _toDisplayString(x.message), 1), _createElementVNode("small", null, _toDisplayString(x.full_name || '-') + " · " + _toDisplayString(shortDate(x.created_at)), 1)]), _createElementVNode("span", _hoisted_11, _toDisplayString(statusLabel(x.status)), 1), _createElementVNode("b", null, _toDisplayString(open[x.id]?'â':'+'), 1)], 8, _hoisted_10), (open[x.id]) 16325 ? (_openBlock(), _createElementBlock("div", _hoisted_12, [ 16326 _createElementVNode("div", _hoisted_13, [_createElementVNode("span", null, _toDisplayString(typeLabel(x.feedback_type)), 1), _createElementVNode("span", _hoisted_14, _toDisplayString(x.whatsapp || '-'), 1), _createElementVNode("span", null, _toDisplayString($cityLabel(x.china_city) || '-'), 1)]), 16327 _createElementVNode("p", _hoisted_15, _toDisplayString(x.message), 1), 16328 _withDirectives(_createElementVNode("textarea", { 16329 "onUpdate:modelValue": $event => ((x.admin_note) = $event), 16330 placeholder: "Ù ÙØ§ØØ¸Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø© / Ø§ÙØ±Ø¯ Ø§ÙØ¯Ø§Ø®ÙÙ" 16331 }, null, 8, _hoisted_16), [[_vModelText, x.admin_note]]), 16332 _createElementVNode("div", _hoisted_17, [ 16333 _createElementVNode("button", { 16334 class: "smallbtn", 16335 onClick: $event => (update(x,'reviewing')) 16336 }, "ÙÙØ¯ اÙ٠راجعة", 8, _hoisted_18), 16337 _createElementVNode("button", { 16338 class: "smallbtn secondary", 16339 onClick: $event => (update(x,'done')) 16340 }, "ØªÙ Ø§ÙØªÙÙÙØ°", 8, _hoisted_19), 16341 _createElementVNode("button", { 16342 class: "smallbtn danger", 16343 onClick: $event => (update(x,'rejected')) 16344 }, "Ø±ÙØ¶", 8, _hoisted_20), 16345 _createElementVNode("button", { 16346 class: "smallbtn danger", 16347 onClick: $event => (update(x,'archived')) 16348 }, "Ø£Ø±Ø´ÙØ©", 8, _hoisted_21) 16349 ]) 16350 ])) 16351 : _createCommentVNode("", true)], 10, _hoisted_9)) 16352 }), 128))]) 16353 ]), 16354 _: 1 16355 })) 16356 } 16357} 16358})() 16359 }; 16360 16361 const AiAdminCenterNav={ 16362 setup(){ 16363 const route=useRoute(); 16364 const hub=computed(()=>String((route.query||{}).hub||'china_guide')); 16365 const opsWorkspace=computed(()=>String((route.query||{}).workspace||'jobs')); 16366 function active(path,workspace){ 16367 if(route.path!==path)return false; 16368 if(path!=='/admin/ai-operations'||!workspace)return true; 16369 return opsWorkspace.value===workspace; 16370 } 16371 return{route,hub,active}; 16372 }, 16373 render:(function(){ 16374const _Vue = Vue 16375const { createVNode: _createVNode, createElementVNode: _createElementVNode } = _Vue 16376 16377const _hoisted_1 = { 16378 class: "card aiAdminCenterNav", 16379 "aria-label": "Ù Ø±ÙØ² Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ" 16380} 16381 16382return function render(_ctx, _cache) { 16383 with (_ctx) { 16384 const { createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, normalizeClass: _normalizeClass, withCtx: _withCtx, createVNode: _createVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue 16385 16386 const _component_router_link = _resolveComponent("router-link") 16387 16388 return (_openBlock(), _createElementBlock("nav", _hoisted_1, [ 16389 _createVNode(_component_router_link, { 16390 class: _normalizeClass({active:active('/admin/ai-research')}), 16391 to: {path:'/admin/ai-research',query:{hub:hub,workspace:'review'}} 16392 }, { 16393 default: _withCtx(() => _cache[0] || (_cache[0] = [_createElementVNode("b", null, "اÙ٠راجعة", -1), _createElementVNode("small", null, "ÙØ±Ø§Ø± بشرÙ", -1)])), 16394 _: 1, 16395 __: [0] 16396 }, 8, ["class", "to"]), 16397 _createVNode(_component_router_link, { 16398 class: _normalizeClass({active:active('/admin/ai-operations','jobs')}), 16399 to: {path:'/admin/ai-operations',query:{hub:hub,workspace:'jobs'}} 16400 }, { 16401 default: _withCtx(() => _cache[1] || (_cache[1] = [_createElementVNode("b", null, "تشغÙÙ Ø§ÙØ¨ØØ«", -1), _createElementVNode("small", null, "اÙÙ ÙØ§Ù ÙØ§ÙØØ§ÙØ©", -1)])), 16402 _: 1, 16403 __: [1] 16404 }, 8, ["class", "to"]), 16405 _createVNode(_component_router_link, { 16406 class: _normalizeClass({active:active('/admin/ai-efficiency')}), 16407 to: {path:'/admin/ai-efficiency',query:{hub:hub}} 16408 }, { 16409 default: _withCtx(() => _cache[2] || (_cache[2] = [_createElementVNode("b", null, "اÙÙÙØ§Ø¡Ø©", -1), _createElementVNode("small", null, "اÙÙ Ø±Ø¯ÙØ¯ ÙØ§ÙاستÙÙØ§Ù", -1)])), 16410 _: 1, 16411 __: [2] 16412 }, 8, ["class", "to"]), 16413 _createVNode(_component_router_link, { 16414 class: _normalizeClass({active:active('/admin/ai-operations','settings')}), 16415 to: {path:'/admin/ai-operations',query:{hub:hub,workspace:'settings'}} 16416 }, { 16417 default: _withCtx(() => _cache[3] || (_cache[3] = [_createElementVNode("b", null, "Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª", -1), _createElementVNode("small", null, "اÙÙ Ø²ÙØ¯ ÙØ§ÙØ³ÙØ§Ø³Ø§Øª", -1)])), 16418 _: 1, 16419 __: [3] 16420 }, 8, ["class", "to"]), 16421 _createVNode(_component_router_link, { 16422 class: _normalizeClass({active:active('/admin/engineering-advisor')}), 16423 to: "/admin/engineering-advisor" 16424 }, { 16425 default: _withCtx(() => _cache[4] || (_cache[4] = [_createElementVNode("b", null, "اÙ٠ستشار", -1), _createElementVNode("small", null, "ÙÙØ¯Ø³Ù · ÙØ±Ø§Ø¡Ø© ÙÙØ·", -1)])), 16426 _: 1, 16427 __: [4] 16428 }, 8, ["class"]) 16429 ])) 16430 } 16431} 16432})() 16433 }; 16434 16435 const AdminEngineeringAdvisorPage={ 16436 components:{AdminFrame,AiAdminCenterNav}, 16437 setup(){ 16438 const store=useGzcStore(),router=useRouter();const data=ref({runs:[],findings:[],release_links:[],learning:{}});const snapshot=ref(null);const loading=ref(false);const running=ref(false); 16439 const canOperate=computed(()=>adminIsSenior(store.state.me&&store.state.me.admin)); 16440 const outcomeOptions=[['improved','ØªØØ³ÙÙ'],['neutral','Ù ØØ§Ùد'],['regressed','تراجع'],['insufficient_evidence','Ø£Ø¯ÙØ© ØºÙØ± ÙØ§ÙÙØ©']]; 16441 function severityLabel(v){return ({info:'٠عÙÙÙ Ø©',low:'Ù ÙØ®Ùض',medium:'Ù ØªÙØ³Ø·',high:'Ù Ø±ØªÙØ¹',critical:'ØØ±Ø¬'}[String(v||'')])||String(v||'-');} 16442 function domainLabel(v){return ({performance:'Ø§ÙØ£Ø¯Ø§Ø¡',reliability:'Ø§ÙØ§Ø¹ØªÙ Ø§Ø¯ÙØ©',security:'Ø§ÙØ£Ù اÙ',database:'ÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª',workflow:'٠سار Ø§ÙØ¹Ù Ù',frontend:'اÙÙØ§Ø¬ÙØ©',operations:'Ø§ÙØªØ´ØºÙÙ',release:'Ø§ÙØ¥ØµØ¯Ø§Ø±Ø§Øª'}[String(v||'')])||String(v||'-');} 16443 function findingStatusLabel(v){return ({new:'Ø¬Ø¯ÙØ¯',reviewed:'ت٠ت اÙ٠راجعة',deferred:'٠ؤجÙ',rejected:'٠رÙÙØ¶',approved_for_development:'Ù ÙØ§ÙÙ ÙÙØªØ·ÙÙØ±'}[String(v||'')])||String(v||'-');} 16444 function outcomeLabel(v){return ({improved:'ØªØØ³ÙÙ',neutral:'Ù ØØ§Ùد',regressed:'تراجع',insufficient_evidence:'Ø£Ø¯ÙØ© ØºÙØ± ÙØ§ÙÙØ©'}[String(v||'')])||String(v||'-');} 16445 function releaseLinkFor(f){return (data.value.release_links||[]).find(x=>Number(x.finding_id)===Number(f.id))||null;} 16446 function releaseTuple(v){const m=String(v||'').match(/^(?:v)?(\d+)\.(\d+)\.(\d+)$/);return m?[+m[1],+m[2],+m[3]]:null;} 16447 function canEvaluateRelease(l){const a=releaseTuple(data.value.current_release),b=releaseTuple(l&&l.release_version);if(!a||!b)return false;for(let i=0;i<3;i++){if(a[i]!==b[i])return a[i]>b[i]}return true;} 16448 async function load(){if(!(await store.requireAdmin(router)))return;loading.value=true;const r=await api('/api/admin/engineering-advisor?limit=20&ts='+Date.now(),{cache:'no-store'});loading.value=false;if(r.status===401){router.replace('/admin/login');return;}if(!r.ok){store.state.msg=r.message||r.error||'تعذر تØÙ Ù٠اÙ٠ستشار اÙÙÙØ¯Ø³Ù';return;}data.value=r;}
16449 async function loadSnapshot(){const r=await api('/api/admin/engineering-advisor/snapshot?ts='+Date.now(),{cache:'no-store'});if(r.ok)snapshot.value=r.snapshot;else store.state.msg=r.message||r.error||'';} 16450 async function run(){if(!canOperate.value||running.value)return;if(!confirm('تشغÙ٠تØÙÙÙ ÙÙØ¯Ø³Ù Read-only Ø§ÙØ¢ÙØ ÙÙ ÙÙÙØ° AI أ٠تغÙÙØ± عÙÙ Production.'))return;running.value=true;const r=await api('/api/admin/engineering-advisor/run',{method:'POST',body:'{}'});running.value=false;store.state.msg=r.message||r.error||'';await load();await loadSnapshot();} 16451 async function review(f,action){if(!canOperate.value)return;const note=String(f._review_note||'').trim();if(action==='approve_for_development'&&!confirm('ÙØ°Ù Ù ÙØ§ÙÙØ© ÙÙØªØ·ÙÙØ± ÙÙØ· ÙÙØ§ تÙÙØ° Ø§ÙØªÙØµÙØ© تÙÙØ§Ø¦ÙاÙ. ٠تابعةØ'))return;const r=await api('/api/admin/engineering-advisor/findings/'+encodeURIComponent(f.id)+'/review',{method:'POST',body:JSON.stringify({action,note})});store.state.msg=r.message||r.error||'';if(r.ok)await load();} 16452 async function linkRelease(f){if(!canOperate.value)return;const release_version=String(f._release_version||f.suggested_release||'').trim();if(!release_version){store.state.msg='Ø§ÙØªØ¨ رÙÙ Ø§ÙØ¥ØµØ¯Ø§Ø± اÙÙ Ø³ØªÙØ¯Ù';return;}if(!confirm('Ø³ÙØªÙ ØÙظ Baseline Ø§ÙØØ§ÙÙ ÙØ±Ø¨Ø· Ø§ÙØªÙØµÙØ© Ø¨Ø§ÙØ¥ØµØ¯Ø§Ø± '+release_version+'. ٠تابعةØ'))return;const r=await api('/api/admin/engineering-advisor/findings/'+encodeURIComponent(f.id)+'/link-release',{method:'POST',body:JSON.stringify({release_version})});store.state.msg=r.message||r.error||'';if(r.ok)await load();} 16453 async function recordOutcome(l){if(!canOperate.value||!l)return;const outcome=String(l._outcome||'').trim(),note=String(l._outcome_note||'').trim(),evidence=String(l._outcome_evidence||'').split('\n').map(x=>x.trim()).filter(Boolean);if(!outcome){store.state.msg='اختر ÙØªÙجة Ø§ÙØªÙÙÙÙ ';return;}if(!note){store.state.msg='Ø§ÙØªØ¨ سبب Ø§ÙØªÙÙÙÙ ';return;}if(!confirm('تسجÙÙ ÙØªÙجة '+outcomeLabel(outcome)+' ÙØ¯ÙÙÙ ØªØ§Ø±ÙØ®Ù ÙÙØªÙØµÙØ§Øª اÙÙ Ø³ØªÙØ¨ÙÙØ©Ø'))return;const r=await api('/api/admin/engineering-advisor/release-links/'+encodeURIComponent(l.release_link_id)+'/outcome',{method:'POST',body:JSON.stringify({outcome,note,evidence})});store.state.msg=r.message||r.error||'';if(r.ok&&r.read_back_verified){if(r.learning)data.value.learning=r.learning;store.state.msg=(r.message||'ت٠تسجÙ٠اÙÙØªÙجة')+' â ØªÙ Ø§ÙØªØÙÙ Ù Ù Ø§ÙØ°Ø§Ùرة';await load();await loadSnapshot();}} 16454 onMounted(async()=>{await load();await loadSnapshot();}); 16455 return{store,data,snapshot,loading,running,canOperate,outcomeOptions,severityLabel,domainLabel,findingStatusLabel,outcomeLabel,releaseLinkFor,canEvaluateRelease,load,loadSnapshot,run,review,linkRelease,recordOutcome,shortDate}; 16456 }, 16457 render:(function(){ 16458const _Vue = Vue 16459const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 16460 16461const _hoisted_1 = { class: "card noticeCard compactNotice aiAdvisorHero" } 16462const _hoisted_2 = { class: "row" } 16463const _hoisted_3 = ["disabled", "onClick"] 16464const _hoisted_4 = ["onClick"] 16465const _hoisted_5 = ["onClick"] 16466const _hoisted_6 = { 16467 key: 0, 16468 class: "card" 16469} 16470const _hoisted_7 = { class: "memberCardTop" } 16471const _hoisted_8 = { class: "statusPill" } 16472const _hoisted_9 = { class: "miniStats" } 16473const _hoisted_10 = { 16474 key: 0, 16475 class: "miniStats" 16476} 16477const _hoisted_11 = { 16478 key: 1, 16479 class: "hint" 16480} 16481const _hoisted_12 = { class: "card" } 16482const _hoisted_13 = { class: "memberCardTop" } 16483const _hoisted_14 = { class: "statusPill" } 16484const _hoisted_15 = { class: "miniStats" } 16485const _hoisted_16 = { 16486 key: 0, 16487 class: "hint" 16488} 16489const _hoisted_17 = { 16490 key: 1, 16491 class: "card aiAdminDisclosure" 16492} 16493const _hoisted_18 = { class: "opsList aiDisclosureBody" } 16494const _hoisted_19 = { class: "memberCardTop" } 16495const _hoisted_20 = { class: "statusPill" } 16496const _hoisted_21 = { key: 0 } 16497const _hoisted_22 = { 16498 key: 1, 16499 class: "hint" 16500} 16501const _hoisted_23 = { class: "notifyMeta" } 16502const _hoisted_24 = { 16503 key: 2, 16504 class: "card emptyCard" 16505} 16506const _hoisted_25 = { 16507 key: 3, 16508 class: "opsList" 16509} 16510const _hoisted_26 = { class: "memberCardTop" } 16511const _hoisted_27 = { class: "vueBadge" } 16512const _hoisted_28 = { class: "statusPill" } 16513const _hoisted_29 = { 16514 key: 0, 16515 class: "cardInset" 16516} 16517const _hoisted_30 = { class: "hint" } 16518const _hoisted_31 = { class: "notifyMeta" } 16519const _hoisted_32 = ["onUpdate:modelValue"] 16520const _hoisted_33 = { class: "row" } 16521const _hoisted_34 = ["onClick"] 16522const _hoisted_35 = ["onClick"] 16523const _hoisted_36 = ["onClick"] 16524const _hoisted_37 = ["onClick"] 16525const _hoisted_38 = { 16526 key: 0, 16527 class: "cardInset" 16528} 16529const _hoisted_39 = { class: "row" } 16530const _hoisted_40 = ["onUpdate:modelValue", "placeholder"] 16531const _hoisted_41 = ["onClick"] 16532const _hoisted_42 = { 16533 key: 1, 16534 class: "cardInset" 16535} 16536const _hoisted_43 = { class: "memberCardTop" } 16537const _hoisted_44 = { class: "statusPill" } 16538const _hoisted_45 = { class: "hint" } 16539const _hoisted_46 = ["onUpdate:modelValue"] 16540const _hoisted_47 = ["value"] 16541const _hoisted_48 = ["onUpdate:modelValue"] 16542const _hoisted_49 = ["onUpdate:modelValue"] 16543const _hoisted_50 = ["disabled", "onClick"] 16544const _hoisted_51 = { 16545 key: 1, 16546 class: "hint" 16547} 16548const _hoisted_52 = { 16549 key: 2, 16550 class: "hint" 16551} 16552 16553return function render(_ctx, _cache) { 16554 with (_ctx) {
16555 const { resolveComponent: _resolveComponent, createVNode: _createVNode, createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, createTextVNode: _createTextVNode, vModelText: _vModelText, withDirectives: _withDirectives, vModelSelect: _vModelSelect, withCtx: _withCtx, createBlock: _createBlock } = _Vue 16556 16557 const _component_AiAdminCenterNav = _resolveComponent("AiAdminCenterNav") 16558 const _component_AdminFrame = _resolveComponent("AdminFrame") 16559 16560 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù Ø±ÙØ² AI â Ø§Ù٠ستشار اÙÙÙØ¯Ø³Ù" }, { 16561 default: _withCtx(() => [ 16562 _createVNode(_component_AiAdminCenterNav), 16563 _createElementVNode("section", _hoisted_1, [ 16564 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "Read-only Engineering Intelligence · ÙØ±Ø§Ø¡Ø© ÙØªØÙÙÙ ÙÙØ·", -1)), 16565 _cache[1] || (_cache[1] = _createElementVNode("h3", null, "اÙ٠ستشار اÙÙÙØ¯Ø³Ù AI", -1)), 16566 _cache[2] || (_cache[2] = _createElementVNode("p", null, "ÙØÙ٠٠ؤشرات اÙÙ ÙØµØ© ÙÙÙØ¯Ù ØªÙØµÙات ÙÙØ¯Ø³ÙØ© ٠دعÙÙ Ø© Ø¨Ø§ÙØ£Ø¯ÙØ©. ÙØ§ ÙÙ ÙÙ ØµÙØ§ØÙØ© تعدÙÙ Production Ø£Ù ÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª أ٠تÙÙÙØ° Ø£ÙØ§Ù ر Ø£Ù Deployment. اÙÙØ±Ø§Ø± ÙØ§ÙتÙÙÙØ° ÙØ¸Ùا٠بشرÙÙÙ.", -1)), 16567 _createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 16568 class: "btn", 16569 disabled: running||!canOperate, 16570 onClick: run 16571 }, _toDisplayString(running?'Ø¬Ø§Ø±Ù Ø§ÙØªØÙÙÙ...':'تشغÙ٠تØÙÙÙ ÙÙØ¯Ø³Ù'), 9, _hoisted_3), _createElementVNode("button", { 16572 class: "smallbtn secondary", 16573 onClick: load 16574 }, "ØªØØ¯ÙØ«", 8, _hoisted_4), _createElementVNode("button", { 16575 class: "smallbtn secondary", 16576 onClick: loadSnapshot 16577 }, "ØªØØ¯ÙØ« اÙ٠ؤشرات", 8, _hoisted_5)]) 16578 ]), 16579 snapshot 16580 ? (_openBlock(), _createElementBlock("section", _hoisted_6, [ 16581 _createElementVNode("div", _hoisted_7, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, "ÙÙØ·Ø© اÙ٠ؤشرات Ø§ÙØØ§ÙÙØ©", -1)), _createElementVNode("span", _hoisted_8, "v" + _toDisplayString(snapshot.platform&&snapshot.platform.version), 1)]), 16582 _createElementVNode("div", _hoisted_9, [ 16583 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.database&&snapshot.database.size_mb||0), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "MB ÙØ§Ø¹Ø¯Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª", -1))]), 16584 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.database&&snapshot.database.active_connections||0), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "Ø§ØªØµØ§ÙØ§Øª DB", -1))]), 16585 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.platform&&snapshot.platform.rss_mb||0), 1), _cache[6] || (_cache[6] = _createElementVNode("small", null, "MB Runtime", -1))]), 16586 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.audit&&snapshot.audit.events_24h||0), 1), _cache[7] || (_cache[7] = _createElementVNode("small", null, "Audit / 24h", -1))]) 16587 ]), 16588 (snapshot.performance) 16589 ? (_openBlock(), _createElementBlock("div", _hoisted_10, [ 16590 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.performance.api&&snapshot.performance.api.samples||0), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "API samples", -1))]), 16591 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.performance.api&&snapshot.performance.api.p95_ms!=null?snapshot.performance.api.p95_ms:'-'), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "API p95 ms", -1))]), 16592 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.performance.api&&snapshot.performance.api.error_5xx_rate_percent||0) + "%", 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "5xx rate", -1))]), 16593 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.performance.api&&snapshot.performance.api.unexpected_4xx_rate_percent||0) + "%", 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "Unexpected 4xx", -1))]), 16594 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.performance.api&&snapshot.performance.api.synthetic_samples||0), 1), _cache[12] || (_cache[12] = _createElementVNode("small", null, "QA/UAT excluded", -1))]), 16595 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(snapshot.performance.frontend&&snapshot.performance.frontend.samples||0), 1), _cache[13] || (_cache[13] = _createElementVNode("small", null, "Mobile/Web samples", -1))]) 16596 ])) 16597 : _createCommentVNode("", true), 16598 _cache[14] || (_cache[14] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ù Ø§ÙØ¨ÙØ§ÙØ§Øª ٠ج٠عة ÙÙØ§ ترس٠أس٠اء Ø§ÙØ£Ø¹Ø¶Ø§Ø¡ Ø£Ù Ø£Ø±ÙØ§Ù ÙÙ Ø£Ù Ù ØØªÙ٠خاصا٠إÙ٠اÙ٠ستشار. Performance telemetry ٠ج٠عة ØØ³Ø¨ اÙ٠سار ÙØ§Ùإصدار ÙÙØ§ تØÙظ member ID Ø£Ù session ID Ø£Ù IP Ø¯Ø§Ø®Ù Ø¨ÙØ§Ùات اÙÙÙØ§Ø³. QA/UAT synthetic traffic ٠ستبعد ٠٠٠ؤشرات ProductionØ Ù401/403 اÙ٠تÙÙØ¹Ø© ÙØºÙر اÙ٠سجÙÙÙ Ù ÙÙØµÙØ© ع٠unexpected 4xx.", -1)), 16599 (snapshot.release_evidence&&snapshot.release_evidence.latest) 16600 ? (_openBlock(), _createElementBlock("p", _hoisted_11, "آخر Evidence إصدار: " + _toDisplayString(snapshot.release_evidence.latest.release_version) + " · QA/UAT/Backup/Restore/Production Stability Ù ØÙÙØ¸Ø© ÙØ¯ÙÙ٠إصدار.", 1)) 16601 : _createCommentVNode("", true) 16602 ])) 16603 : _createCommentVNode("", true), 16604 _createElementVNode("section", _hoisted_12, [ 16605 _createElementVNode("div", _hoisted_13, [_cache[15] || (_cache[15] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Evidence-governed learning"), _createElementVNode("h3", null, "ØÙÙØ© ÙØªØ§Ø¦Ø¬ Ø§ÙØ¥ØµØ¯Ø§Ø±Ø§Øª")], -1)), _createElementVNode("span", _hoisted_14, _toDisplayString(data.learning&&data.learning.evaluated_total||0) + " تÙÙÙÙ ", 1)]), 16606 _cache[19] || (_cache[19] = _createElementVNode("p", { class: "hint" }, "Baseline ÙØ¨Ù Ø§ÙØªÙÙÙØ° â Ø¥ØµØ¯Ø§Ø± ٠عت٠د â ٠ؤشرات بعد Ø§ÙØ¥ØµØ¯Ø§Ø± â ØªÙÙÙ٠بشر٠ÙÙÙØªÙجة â ÙØ³ØªØ®Ø¯Ù Ø§ÙØªØ§Ø±ÙØ® ÙØ¯ÙÙÙ ÙÙ Ø§ÙØªÙØµÙØ§Øª اÙÙØ§ØÙØ©. ÙØ§ ÙÙØ¬Ø¯ Auto-apply.", -1)),
16607 _createElementVNode("div", _hoisted_15, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.learning&&data.learning.evaluated_total||0), 1), _cache[16] || (_cache[16] = _createElementVNode("small", null, "ÙØªØ§Ø¦Ø¬ Ù ÙØ«ÙØ©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.learning&&data.learning.pending_release_links||0), 1), _cache[17] || (_cache[17] = _createElementVNode("small", null, "Ø¨Ø§ÙØªØ¸Ø§Ø± Ø§ÙØªÙÙÙÙ ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.learning&&data.learning.integrity&&data.learning.integrity.status==='healthy'?'سÙÙÙ ':(data.learning&&data.learning.integrity&&data.learning.integrity.status||'-')), 1), _cache[18] || (_cache[18] = _createElementVNode("small", null, "Ø³ÙØ§Ù Ø© Ø°Ø§ÙØ±Ø© اÙÙØªØ§Ø¦Ø¬", -1))])]), 16608 (data.learning&&data.learning.integrity&&data.learning.integrity.status==='healthy') 16609 ? (_openBlock(), _createElementBlock("p", _hoisted_16, "عدد Outcome rows ÙØ·Ø§Ø¨Ù Ø·Ø¨ÙØ© اÙÙØ±Ø§Ø¡Ø© اÙ٠ستخد٠ة Ù٠اÙ٠ستشار.")) 16610 : _createCommentVNode("", true) 16611 ]), 16612 (data.runs&&data.runs.length) 16613 ? (_openBlock(), _createElementBlock("details", _hoisted_17, [_createElementVNode("summary", null, [_cache[20] || (_cache[20] = _createElementVNode("b", null, "Ø³Ø¬Ù Ø§ÙØªØÙÙÙØ§Øª Ø§ÙØ³Ø§Ø¨ÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(data.runs.length) + " تØÙÙÙ", 1)]), _createElementVNode("div", _hoisted_18, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.runs, (r) => { 16614 return (_openBlock(), _createElementBlock("article", { 16615 class: "opsCard", 16616 key: r.id 16617 }, [ 16618 _createElementVNode("div", _hoisted_19, [_createElementVNode("b", null, _toDisplayString(r.run_code), 1), _createElementVNode("span", _hoisted_20, _toDisplayString(r.status), 1)]), 16619 (r.summary) 16620 ? (_openBlock(), _createElementBlock("p", _hoisted_21, _toDisplayString(r.summary), 1)) 16621 : _createCommentVNode("", true), 16622 (r.failure_text) 16623 ? (_openBlock(), _createElementBlock("p", _hoisted_22, _toDisplayString(r.failure_text), 1)) 16624 : _createCommentVNode("", true), 16625 _createElementVNode("div", _hoisted_23, [ 16626 _createElementVNode("span", null, _toDisplayString(r.model||'-'), 1), 16627 _createElementVNode("span", null, _toDisplayString(r.duration_ms||0) + " ms", 1), 16628 _createElementVNode("span", null, _toDisplayString(shortDate(r.created_at)), 1), 16629 _cache[21] || (_cache[21] = _createElementVNode("span", null, "Read-only", -1)) 16630 ]) 16631 ])) 16632 }), 128))])])) 16633 : _createCommentVNode("", true), 16634 (!loading&&(!data.findings||!data.findings.length)) 16635 ? (_openBlock(), _createElementBlock("section", _hoisted_24, "ÙØ§ ØªÙØ¬Ø¯ ØªÙØµÙات ÙÙØ¯Ø³ÙØ© بعد. شغÙÙ Ø§ÙØªØÙÙÙ Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©.")) 16636 : _createCommentVNode("", true), 16637 (data.findings&&data.findings.length) 16638 ? (_openBlock(), _createElementBlock("section", _hoisted_25, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.findings, (f) => { 16639 return (_openBlock(), _createElementBlock("article", { 16640 class: "card opsCard", 16641 key: f.id 16642 }, [ 16643 _createElementVNode("div", _hoisted_26, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_27, _toDisplayString(domainLabel(f.domain)), 1), _createElementVNode("h3", null, _toDisplayString(f.title), 1)]), _createElementVNode("span", _hoisted_28, _toDisplayString(severityLabel(f.severity)
16643), 1)]), 16644 _createElementVNode("p", null, [_cache[22] || (_cache[22] = _createElementVNode("b", null, "اÙÙ ÙØ§ØØ¸Ø©:", -1)), _createTextVNode(" " + _toDisplayString(f.observation), 1)]), 16645 (f.evidence&&f.evidence.length) 16646 ? (_openBlock(), _createElementBlock("div", _hoisted_29, [_cache[23] || (_cache[23] = _createElementVNode("b", null, "Evidence", -1)), _createElementVNode("ul", null, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(f.evidence, (e, i) => { 16647 return (_openBlock(), _createElementBlock("li", { key: i }, _toDisplayString(e), 1)) 16648 }), 128))])])) 16649 : _createCommentVNode("", true), 16650 _createElementVNode("p", null, [_cache[24] || (_cache[24] = _createElementVNode("b", null, "Ø§ÙØªÙØµÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(f.recommendation), 1)]), 16651 _createElementVNode("p", _hoisted_30, [ 16652 _cache[25] || (_cache[25] = _createElementVNode("b", null, "Ø§ÙØ£Ø«Ø± اÙ٠تÙÙØ¹:", -1)), 16653 _createTextVNode(" " + _toDisplayString(f.expected_impact||'-') + " · ", 1), 16654 _cache[26] || (_cache[26] = _createElementVNode("b", null, "اÙÙØ·Ø§Ù:", -1)), 16655 _createTextVNode(" " + _toDisplayString(f.implementation_scope||'-') + " · ", 1), 16656 _cache[27] || (_cache[27] = _createElementVNode("b", null, "اÙ٠خاطر:", -1)), 16657 _createTextVNode(" " + _toDisplayString(f.risk_level) + " · ", 1), 16658 _cache[28] || (_cache[28] = _createElementVNode("b", null, "إصدار Ù ÙØªØ±Ø:", -1)), 16659 _createTextVNode(" " + _toDisplayString(f.suggested_release||'ÙØØ¯Ø¯ بعد اÙ٠راجعة'), 1) 16660 ]), 16661 _createElementVNode("div", _hoisted_31, [_createElementVNode("span", null, _toDisplayString(findingStatusLabel(f.status)), 1), _createElementVNode("span", null, "Ø«ÙØ© " + _toDisplayString(Math.round(Number(f.confidence||0)*100)) + "%", 1), _createElementVNode("span", null, _toDisplayString(shortDate(f.created_at)), 1)]), 16662 canOperate 16663 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 16664 _withDirectives(_createElementVNode("textarea", { 16665 "onUpdate:modelValue": $event => ((f._review_note) = $event), 16666 placeholder: "Ù ÙØ§ØØ¸Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø© (Ø§Ø®ØªÙØ§Ø±Ù)" 16667 }, null, 8, _hoisted_32), [[_vModelText, f._review_note]]), 16668 _createElementVNode("div", _hoisted_33, [ 16669 _createElementVNode("button", { 16670 class: "smallbtn", 16671 onClick: $event => (review(f,'review')) 16672 }, "ت٠ت اÙ٠راجعة", 8, _hoisted_34), 16673 _createElementVNode("button", { 16674 class: "smallbtn secondary", 16675 onClick: $event => (review(f,'defer')) 16676 }, "تأجÙÙ", 8, _hoisted_35), 16677 _createElementVNode("button", { 16678 class: "smallbtn danger", 16679 onClick: $event => (review(f,'reject')) 16680 }, "Ø±ÙØ¶", 8, _hoisted_36), 16681 _createElementVNode("button", { 16682 class: "smallbtn", 16683 onClick: $event => (review(f,'approve_for_development')) 16684 }, "Ù ÙØ§ÙÙØ© ÙÙØªØ·ÙÙØ±", 8, _hoisted_37) 16685 ]), 16686 _cache[34] || (_cache[34] = _createElementVNode("p", { class: "hint" }, "Ù ÙØ§ÙÙØ© ÙÙØªØ·ÙÙØ± ÙØ§ تشغ٠ÙÙØ¯Ø§Ù ÙÙØ§ ØªØºÙØ± ProductionØ ØªØµØ¨Ø Ø§ÙØªÙØµÙØ© Input ÙØ¥ØµØ¯Ø§Ø± ÙØ§ØÙ ÙÙØ·.", -1)), 16687 (f.status==='approved_for_development'&&!releaseLinkFor(f)) 16688 ? (_openBlock(), _createElementBlock("div", _hoisted_38, [_cache[29] || (_cache[29] = _createElementVNode("b", null, "ربط Ø§ÙØªÙØµÙØ© بإصدار", -1)), _cache[30] || (_cache[30] = _createElementVNode("p", { class: "hint" }, "ÙØªÙ Ø§ÙØªÙاط Baseline Ø§ÙØ¢Ù ÙØ¨Ù بدء Ø§ÙØªÙÙÙØ° اÙÙØ¹ÙÙ.", -1)), _createElementVNode("div", _hoisted_39, [_withDirectives(_createElementVNode("input", { 16689 "onUpdate:modelValue": $event => ((f._release_version) = $event), 16690 placeholder: f.suggested_release||'v3.8.30', 16691 dir: "ltr" 16692 }, null, 8, _hoisted_40), [[_vModelText, f._release_version]]), _createElementVNode("button", { 16693 class: "smallbtn", 16694 onClick: $event => (linkRelease(f)) 16695 }, "ربط ÙØÙØ¸ Baseline", 8, _hoisted_41)])])) 16696 : _createCommentVNode("", true), 16697 (releaseLinkFor(f)) 16698 ? (_openBlock(), _createElementBlock("div", _hoisted_42, [ 16699 _createElementVNode("div", _hoisted_43, [_createElementVNode("b", null, "Evidence / " + _toDisplayString(releaseLinkFor(f).release_version), 1), _createElementVNode("span", _hoisted_44, _toDisplayString(releaseLinkFor(f).outcome?outcomeLabel(releaseLinkFor(f).outcome):'Ø¨Ø§ÙØªØ¸Ø§Ø± اÙÙØªÙجة'), 1)]), 16700 _createElementVNode("p", _hoisted_45, [_createTextVNode("Baseline: " + _toDisplayString(shortDate(releaseLinkFor(f).linked_at)), 1), (releaseLinkFor(f).evaluated_at) 16701 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · آخر تÙÙÙÙ : " + _toDisplayString(shortDate(releaseLinkFor(f).evaluated_at)), 1)], 64)) 16702 : _createCommentVNode("", true)]), 16703 (canEvaluateRelease(releaseLinkFor(f))&&!releaseLinkFor(f).outcome) 16704 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 16705 _cache[32] || (_cache[32] = _createElementVNode("p", { class: "hint" }, [_createElementVNode("b", null, "ÙÙ ØªÙØ³Ø¬Ù ÙØªÙجة بعد."), _createTextVNode(" Ø§Ø®ØªÙØ§Ø± Improved/Neutral ÙØØ¯Ù ÙØ§ ÙØÙØ¸ Ø´ÙØ¦Ø§ÙØ ÙØ¬Ø¨ Ø§ÙØ¶ØºØ· عÙ٠«تسجÙ٠تÙÙÙ٠٠ا بعد Ø§ÙØ¥ØµØ¯Ø§Ø±Â» ÙÙØ¸Ùر ÙÙ Ø°Ø§ÙØ±Ø© اÙ٠ستشار.")], -1)), 16706 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((releaseLinkFor(f)._outcome) = $event) }, [_cache[31] || (_cache[31] = _createElementVNode("option", { value: "" }, "اختر اÙÙØªÙجة", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(outcomeOptions, (o) => { 16707 return (_openBlock(), _createElementBlock("option", { 16708 key: o[0], 16709 value: o[0] 16710 }, _toDisplayString(o[1]), 9, _hoisted_47)) 16711 }), 128))], 8, _hoisted_46), [[_vModelSelect, releaseLinkFor(f)._outcome]]), 16712 _withDirectives(_createElementVNode("textarea", { 16713 "onUpdate:modelValue": $event => ((releaseLinkFor(f)._outcome_note) = $event), 16714 placeholder: "Ù٠اذا ÙØ°Ù اÙÙØªÙجةØ" 16715 }, null, 8, _hoisted_48), [[_vModelText, releaseLinkFor(f)._outcome_note]]), 16716 _withDirectives(_createElementVNode("textarea", { 16717 "onUpdate:modelValue": $event =>
16717 ((releaseLinkFor(f)._outcome_evidence) = $event), 16718 placeholder: "Ø£Ø¯ÙØ© إضاÙÙØ© â Ø³Ø·Ø± ÙÙ٠دÙÙÙ (QA / Performance / Error rate...)" 16719 }, null, 8, _hoisted_49), [[_vModelText, releaseLinkFor(f)._outcome_evidence]]), 16720 _createElementVNode("button", { 16721 class: "smallbtn", 16722 disabled: !releaseLinkFor(f)._outcome||!String(releaseLinkFor(f)._outcome_note||'').trim(), 16723 onClick: $event => (recordOutcome(releaseLinkFor(f))) 16724 }, "تسجÙ٠تÙÙÙ٠٠ا بعد Ø§ÙØ¥ØµØ¯Ø§Ø±", 8, _hoisted_50) 16725 ], 64)) 16726 : _createCommentVNode("", true), 16727 (releaseLinkFor(f).outcome) 16728 ? (_openBlock(), _createElementBlock("p", _hoisted_51, [_cache[33] || (_cache[33] = _createElementVNode("b", null, "Outcome Ù ØÙÙØ¸ Ù٠تØÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(outcomeLabel(releaseLinkFor(f).outcome)) + ". ÙØ°Ø§ Ø§ÙØ³Ø¬Ù Ø¯Ø®Ù ÙØ¹ÙÙØ§Ù ÙÙ Ø°Ø§ÙØ±Ø© اÙ٠ستشار.", 1)])) 16729 : (_openBlock(), _createElementBlock("p", _hoisted_52, "Ø§ÙØªÙÙÙÙ ÙÙØªØ بعد ØªØ«Ø¨ÙØª Ø§ÙØ¥ØµØ¯Ø§Ø± اÙ٠رتبط أ٠إصدار Ø£ØØ¯Ø«.")) 16730 ])) 16731 : _createCommentVNode("", true) 16732 ], 64)) 16733 : _createCommentVNode("", true) 16734 ])) 16735 }), 128))])) 16736 : _createCommentVNode("", true) 16737 ]), 16738 _: 1 16739 })) 16740 } 16741} 16742})() 16743 }; 16744 16745 const AI_RESEARCH_HUB_OPTIONS=[ 16746 {key:'china_guide',label:'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ',short:'دÙÙÙ Ø§ÙØµÙÙ',icon:'ð§',adminPath:'/admin/china-guide',publicPath:'/china-guide'}, 16747 {key:'trade_shipping',label:'Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ',short:'Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ',icon:'ð¢',adminPath:'/admin/trade-shipping',publicPath:'/trade-shipping'} 16748 ]; 16749 const AI_RESEARCH_SERVICE_OPTIONS={ 16750 china_guide:[['general','عا٠'],['health','ØµØØ©'],['transport','Ù ÙØ§ØµÙات'],['housing','سÙÙ'],['finance','٠اÙÙ'],['markets','Ø£Ø³ÙØ§Ù ÙØªØ¬Ø§Ø±Ø©'],['exhibitions','اÙ٠عارض ÙØ§Ù٠ؤت٠رات'],['restaurants','٠طاع٠'],['hotels','ÙÙØ§Ø¯Ù ÙØ¥Ùا٠ة'],['services','خد٠ات'],['education','تعÙÙÙ '],['emergency','Ø·ÙØ§Ø±Ø¦'],['tips','ÙØµØ§Ø¦Ø'],['official_links','Ø±ÙØ§Ø¨Ø· Ù ÙÙ Ø©']], 16751 trade_shipping:[['general','عا٠'],['documents','Ù Ø³ØªÙØ¯Ø§Øª'],['customs','ج٠ارÙ'],['shipping','Ø´ØÙ Ø¨ØØ±Ù'],['clearance','تخÙÙØµ'],['ports','Ù ÙØ§Ùئ'],['export','ØªØµØ¯ÙØ±'],['import','Ø§Ø³ØªÙØ±Ø§Ø¯'],['warnings','ØªØØ°Ùرات'],['official_links','Ø±ÙØ§Ø¨Ø· Ø±Ø³Ù ÙØ©']] 16752 }; 16753 16754 // Patch 3: AI Research Center settings (global + per domain). One validated form over /api/admin/ai-research/settings. 16755 const AI_RS_MODE_LABELS={OFF:'٠تÙÙÙ (OFF)',MANUAL:'ÙØ¯ÙÙ (MANUAL)',SCHEDULED:'٠جدÙÙ (SCHEDULED)'}; 16756 const AI_RS_PROVIDER_MODE_LABELS={primary_fallback:'Ø£Ø³Ø§Ø³Ù Ø«Ù Ø§ØØªÙØ§Ø·Ù Ø¹ÙØ¯ اÙÙØ´Ù (Ù ÙØµÙ بÙ)',parallel_legacy:'Ù ØªÙØ§Ø²Ù ÙØ¯ÙÙ (ÙØ³ØªÙÙ٠٠زÙÙØ¯ÙÙ)'}; 16757 const AI_RS_BACKOFF_LABELS={none:'Ø¨ÙØ§ ØªØ£Ø®ÙØ±',linear:'خطÙ',exponential:'تصاعدÙ'}; 16758 const AI_RS_SCHEDULE_LABELS={manual:'ÙØ¯ÙÙ ÙÙØ·','6h':'ÙÙ 6 ساعات','12h':'ÙÙ 12 ساعة','24h':'ÙÙÙ ÙØ§Ù','48h':'ÙÙ ÙÙÙ ÙÙ','72h':'ÙÙ 3 Ø£ÙØ§Ù ','168h':'Ø£Ø³Ø¨ÙØ¹ÙاÙ'}; 16759 const AI_RS_SOURCE_POLICY_LABELS={reputable:'٠صادر عا٠ة (Ø¨ÙØ§ Ù ÙØµØ§Øª Ø§ÙØªÙاصÙ)',trusted_only:'٠صادر Ù ÙØ«ÙÙØ© ÙÙØ·',official_only:'Ø±Ø³Ù ÙØ© ÙÙØ·'}; 16760 const AI_RS_PROVIDER_LABELS={openai:'OpenAI',xai:'xAI (Grok)',deepseek:'DeepSeek'}; 16761 const AI_RS_DEEPSEEK_MODEL_LABELS={'deepseek-chat':'deepseek-chat (Ø³Ø±ÙØ¹Ø Ø§Ø³Ù ÙØ¯ÙÙ )','deepseek-flash':'deepseek-flash (ÙÙÙÙØ±Ø أبطأ)','deepseek-v4-pro':'deepseek-v4-pro (Ø§ÙØ£ÙÙÙ ÙØ§Ùأبطأ)','deepseek-reasoner':'deepseek-reasoner (تÙÙÙØ±Ø Ø§Ø³Ù ÙØ¯ÙÙ )'}; 16762 const AI_RS_SEARCH_LABELS={searxng:'SearXNG (٠جاÙÙØ ÙØªØ¹Ø·Ù ÙØ«ÙراÙ)',brave:'Brave Search API',serper:'Serper (ÙØªØ§Ø¦Ø¬ Google)',tavily:'Tavily',serpapi:'SerpApi (ÙØªØ§Ø¦Ø¬ GoogleØ Ù ÙØªØ§Ø 64 ØØ±ÙاÙ)'}; 16763 const AI_RS_GAP_PRIORITY_LABELS={HIGH:'عاÙÙØ© ÙÙØ·',MEDIUM:'Ù ØªÙØ³Ø·Ø© Ù٠ا ÙÙÙ',LOW:'اÙÙÙ'}; 16764 const AI_RS_STORAGE_LABELS={metadata_only:'Ø¨ÙØ§Ùات ÙØµÙÙØ© ÙÙØ·',summary_only:'Ù ÙØ®Øµ ٠عت٠د ÙÙØ·'}; 16765 const AI_RS_FIELDS={ 16766 global:[ 16767 ['mode','ÙØ¶Ø¹ Ø§ÙØªØ´ØºÙÙ','select','modes',AI_RS_MODE_LABELS],['primary_provider','اÙ٠زÙÙØ¯ Ø§ÙØ£Ø³Ø§Ø³Ù','
16767select','primary_providers',AI_RS_PROVIDER_LABELS],['fallback_enabled','ØªÙØ¹Ù٠اÙ٠زÙÙØ¯ Ø§ÙØ§ØØªÙاطÙ','bool'], 16768 ['fallback_provider','اÙ٠زÙÙØ¯ Ø§ÙØ§ØØªÙاطÙ','select','fallback_providers',AI_RS_PROVIDER_LABELS],['deepseek_model','Ù ÙØ¯ÙÙ DeepSeek ÙÙØ¨ØØ«','select','deepseek_models',AI_RS_DEEPSEEK_MODEL_LABELS],['ask_smt_provider','٠زÙÙØ¯ إجابات «اسأ٠SMT»','select','ask_smt_providers',AI_RS_PROVIDER_LABELS],['research_search_provider','٠زÙÙØ¯ Ø§ÙØ¨ØØ« ÙÙ DeepSeek','select','research_search_providers',AI_RS_SEARCH_LABELS],['provider_mode','Ø³ÙØ§Ø³Ø© اÙ٠زÙÙØ¯ÙÙ','select','provider_modes',AI_RS_PROVIDER_MODE_LABELS], 16769 ['cross_check_high_risk','تØÙÙ Ù Ø²Ø¯ÙØ¬ ÙÙØ¹Ùاصر عاÙÙØ© Ø§ÙØ®Ø·Ùرة','bool'],['daily_job_limit','Ø§ÙØØ¯ اÙÙÙÙ Ù ÙÙÙ ÙØ§Ù (Ù٠اÙÙØ·Ø§Ùات)','int'],['concurrent_job_limit','اÙÙ ÙØ§Ù اÙÙ ØªØ²Ø§Ù ÙØ©','int'], 16770 ['max_candidates_per_job','Ø£ÙØµÙ Ù ÙØªØ±ØØ§Øª ÙÙÙ Ù ÙÙ Ø©','int'],['max_queries_per_job','Ø£ÙØµÙ Ø§Ø³ØªØ¹ÙØ§Ù ات ÙÙÙ Ù ÙÙ Ø©','int'],['max_sources_per_query','Ø£ÙØµÙ ٠صادر ÙÙÙ Ø§Ø³ØªØ¹ÙØ§Ù ','int'], 16771 ['job_timeout_seconds','Ù ÙÙØ© اÙÙ ÙÙ Ø© (Ø«ÙØ§ÙÙ)','int'],['retry_limit','ØØ¯ إعادة اÙÙ ØØ§ÙÙØ© اÙÙØ¯ÙÙØ©','int'],['retry_backoff','ØªØ£Ø®ÙØ± إعادة اÙÙ ØØ§ÙÙØ©','select','backoffs',AI_RS_BACKOFF_LABELS], 16772 ['dedup_enabled','Ù ÙØ¹ اÙÙ ÙØ§Ù اÙÙ ÙØ±Ø±Ø©','bool'],['hash_skip_enabled','تخط٠اÙÙ ØØªÙÙ ØºÙØ± اÙÙ ØªØºÙØ± (hash)','bool'],['gap_driven_research','Ø§ÙØ¨ØØ« اÙ٠جدÙÙ ÙØ¨Ø¯Ø£ Ù Ù ÙØ¬Ùات اÙ٠خزÙÙ','bool'],['gap_cooldown_hours','Ù ÙÙØ© إعادة Ø¨ØØ« اÙÙØ¬ÙØ© (ساعات)','int'],['backlog_alert_threshold','ØªÙØ¨Ù٠تراÙ٠اÙ٠راجعة Ø¹ÙØ¯ (Ù ÙØªØ±Ø)','int'],['dry_run','ÙØ¶Ø¹ Ø§ÙØªØ¬Ø±Ø¨Ø© (Ø¨ÙØ§ استدعاء ٠زÙÙØ¯)','bool'], 16773 ['global_blocked_domains','ÙØ·Ø§Ùات Ù ØØ¸Ùرة عا٠ة','domains'],['guide_allowed_domains','ÙØ·Ø§Ùات Ù Ø³Ù ÙØØ© â Ø§ÙدÙÙÙ','domains'],['guide_blocked_domains','ÙØ·Ø§Ùات Ù ØØ¸Ùرة â Ø§ÙدÙÙÙ','domains'], 16774 ['trade_allowed_domains','ÙØ·Ø§Ùات Ù Ø³Ù ÙØØ© â Ø§Ùتجارة','domains'],['trade_blocked_domains','ÙØ·Ø§Ùات Ù ØØ¸Ùرة â Ø§Ùتجارة','domains'],['circular_allowlist_domains','ÙØ·Ø§Ùات Ø§ÙØªØ¹Ù Ù٠ات اÙÙ ÙØ«ÙÙØ©','domains'] 16775 ], 16776 china_guide:[ 16777 ['enabled','ØªÙØ¹ÙÙ Ø§ÙØ¨ØØ« ÙÙØ°Ø§ اÙÙØ·Ø§Ù','bool'],['schedule','Ø§ÙØ¬Ø¯ÙÙØ©','select','schedules',AI_RS_SCHEDULE_LABELS],['max_new_candidates_per_run','Ø£ÙØµÙ Ù ÙØªØ±ØØ§Øª Ø¬Ø¯ÙØ¯Ø© ÙÙ٠تشغÙÙ','int'], 16778 ['minimum_coverage_target','ÙØ¯Ù Ø§ÙØØ¯ Ø§ÙØ£Ø¯ÙÙ ÙÙØªØºØ·ÙØ©','int'],['recheck_stale_after_days','إعادة ÙØØµ اÙÙ ØØªÙ٠اÙÙØ¯Ù٠بعد (ÙÙÙ )','int'],['source_policy','Ø³ÙØ§Ø³Ø© اÙ٠صادر','select','source_policies',AI_RS_SOURCE_POLICY_LABELS], 16779 ['allow_research_without_image','Ø§ÙØ³Ù Ø§Ø Ø¨Ø§ÙØ¨ØØ« Ø¨ÙØ§ ØµÙØ±Ø©','bool'],['gap_pilot_daily_limit','تجربة اÙÙØ¬Ùات: Ø£ÙØµÙ Ù ÙØ§Ù ÙÙÙ ÙØ§Ù (0 = Ø¥ÙÙØ§Ù)','int'],['gap_pilot_min_priority','تجربة اÙÙØ¬Ùات: أدÙ٠أÙÙÙÙØ©','select','gap_priorities',AI_RS_GAP_PRIORITY_LABELS],['target_cities','اÙ٠د٠اÙÙ Ø³ØªÙØ¯ÙØ©','multi','cities'],['target_categories','Ø§ÙØªØµÙÙÙØ§Øª اÙÙ Ø³ØªÙØ¯ÙØ©','multi','categories'], 16780 ['target_company_sectors','ÙØ·Ø§Ø¹Ø§Øª Ø§ÙØ´Ø±Ùات اÙÙ Ø³ØªÙØ¯ÙØ©','multi','sectors'] 16781 ], 16782 trade_shipping:[ 16783 ['enabled','ØªÙØ¹ÙÙ Ø§ÙØ¨ØØ« ÙÙØ°Ø§ اÙÙØ·Ø§Ù','bool'],['schedule','Ø§ÙØ¬Ø¯ÙÙØ©','select','schedules',AI_RS_SCHEDULE_LABELS],['max_new_candidates_per_run','Ø£ÙØµÙ Ù ÙØªØ±ØØ§Øª Ø¬Ø¯ÙØ¯Ø© ÙÙ٠تشغÙÙ','int'], 16784 ['recheck_stale_after_days','إعادة ÙØØµ اÙÙ Ø¹Ø±ÙØ© اÙÙØ¯ÙÙ Ø© بعد (ÙÙÙ )','int'],['gap_pilot_daily_limit','تجربة اÙÙØ¬Ùات: Ø£ÙØµÙ Ù ÙØ§Ù ÙÙÙ ÙØ§Ù (0 = Ø¥ÙÙØ§Ù)','int'],['gap_pilot_min_priority','تجربة اÙÙØ¬Ùات: أدÙ٠أÙÙÙÙØ©','select','gap_priorities',AI_RS_GAP_PRIORITY_LABELS],['origin_countries','دÙ٠اÙÙ ÙØ´Ø£','multi','countries'],['de
16784stination_countries','دÙ٠اÙÙØ¬ÙØ©','multi','countries'], 16785 ['service_types','Ø§ÙØ®Ø¯Ù ات اÙÙ Ø³ØªÙØ¯ÙØ©','multi','services'],['official_required_fields','ØÙÙÙ ØªØªØ·ÙØ¨ Ù ØµØ¯Ø±Ø§Ù Ø±Ø³Ù ÙØ§Ù','multi','official_fields'] 16786 ], 16787 circulars:[ 16788 ['enabled','ØªÙØ¹ÙÙ Ø§ÙØªØ¹Ù Ù٠ات','bool'],['default_check_interval','ÙØªØ±Ø© اÙÙØØµ Ø§ÙØ¹Ø§Ø¯ÙØ©','select','circular_intervals',AI_RS_SCHEDULE_LABELS],['priority_check_interval','ÙØªØ±Ø© ÙØØµ اÙ٠صادر ذات Ø§ÙØ£ÙÙÙÙØ©','select','circular_intervals',AI_RS_SCHEDULE_LABELS], 16789 ['full_text_storage_mode','ÙØ¶Ø¹ Ø§ÙØªØ®Ø²ÙÙ','select','storage_modes',AI_RS_STORAGE_LABELS],['ai_summary_enabled','Ù ÙØ®Øµ AI','bool'],['translation_enabled','Ø§ÙØªØ±Ø¬Ù Ø©','bool'],['max_candidates_per_run','Ø£ÙØµÙ Ù ÙØªØ±ØØ§Øª ÙÙ٠تشغÙÙ','int'] 16790 ] 16791 }; 16792 const AI_RS_SECTIONS=[['global','Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª Ø§ÙØ¹Ø§Ù Ø©'],['china_guide','دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ'],['trade_shipping','Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ'],['circulars','Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©']]; 16793 const AiResearchSettingsPanel={setup(){ 16794 const state=reactive({loaded:false,error:'',saving:false,message:'',errors:{}}); 16795 const data=ref(null),form=reactive({global:{},china_guide:{},trade_shipping:{},circulars:{}}),domainText=reactive({}); 16796 const keyOf=(section,key)=>section+'.'+key; 16797 function toForm(settings){ 16798 for(const [section] of AI_RS_SECTIONS){ 16799 form[section]=JSON.parse(JSON.stringify(settings[section]||{})); 16800 for(const field of AI_RS_FIELDS[section])if(field[2]==='domains')domainText[keyOf(section,field[0])]=safeArray(form[section][field[0]]).join('\n'); 16801 } 16802 } 16803 async function load(){ 16804 state.error=''; 16805 const r=await api('/api/admin/ai-research/settings',{feedback:false}); 16806 if(!r||!r.ok){state.error=(r&&r.message)||'تعذر تØÙ Ù٠إعدادات Ø¨ØØ« Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ.';return;} 16807 data.value=r;toForm(r.settings);state.loaded=true; 16808 } 16809 const optionList=(field)=>{ 16810 const options=(data.value&&data.value.options)||{}; 16811 return safeArray(options[field[3]]).map(item=>typeof item==='string'?{key:item,label:(field[4]&&field[4][item])||item}:{key:item.key,label:item.label||item.key}); 16812 }; 16813 const enforcedBadge=(section,key)=>!(data.value&&data.value.enforced&&data.value.enforced[section]&&data.value.enforced[section][key]); 16814 function toggleMulti(section,key,value){ 16815 const list=safeArray(form[section][key]).slice();const index=list.indexOf(value); 16816 if(index>=0)list.splice(index,1);else list.push(value); 16817 form[section][key]=list; 16818 } 16819 function buildPatch(){ 16820 const patch={};const base=data.value.settings; 16821 for(const [section] of AI_RS_SECTIONS){ 16822 for(const field of AI_RS_FIELDS[section]){ 16823 const key=field[0];let value=form[section][key]; 16824 if(field[2]==='domains')value=String(domainText[keyOf(section,key)]||'').split(/[\n,\s]+/).map(x=>x.trim()).filter(Boolean); 16825 if(field[2]==='int'){if(value===''||value===null||value===undefined||!Number.isFinite(Number(value)))continue;value=Number(value);} 16826 if(JSON.stringify(value)!==JSON.stringify(base[section][key]))(patch[section]||(patch[section]={}))[key]=value; 16827 } 16828 } 16829 return patch; 16830 } 16831 const changeCount=computed(()=>data.value?Object.values(buildPatch()).reduce((n,fields)=>n+Object.keys(fields).length,0):0); 16832 async function save(){ 16833 state.message='';state.errors={}; 16834 const patch=buildPatch(); 16835 if(!Object.keys(patch).length){state.message='ÙØ§ ØªÙØ¬Ø¯ تعدÙÙØ§Øª.';return;} 16836 if(patch.global&&patch.global.dry_run===true&&!confirm('ÙØ¶Ø¹ Ø§ÙØªØ¬Ø±Ø¨Ø© ÙÙÙÙ Ù٠استدعاءات اÙ٠زÙÙØ¯ ب٠ا ÙÙÙØ§ اختبارات Ø§ÙØ¬Ø§ÙØ²ÙØ© ØØªÙ تعطÙÙÙ. ٠تابعةØ')){return;} 16837 state.saving=true; 16838 const r=await api('/api/admin/ai-research/settings',{method:'POST',body:JSON.stringify({patch}),feedback:false}); 16839 state.saving=false; 16840 if(!r||!r.ok){ 16841 state.message=(r&&r.message)||'تعذر Ø§ÙØÙØ¸.'; 16842 for(const error of safeArray(r&&r.errors))state.errors[error.path]=error.message||'ÙÙÙ Ø© ØºÙØ± ØµØ§ÙØØ©'; 16843 return; 16844 } 16845 state.message=r.message||'ØªÙ Ø§ÙØÙØ¸.';await load(); 16846 } 16847 function healthRows(){ 16848 const providers=(data.value&&data.value.provider_health&&data.value.provider_health.providers)||{}; 16849 return Object.keys(providers).map(key=>({key,...providers[key]})); 16850 } 16851 const fmtTime=value=>
16851value?new Date(value).toLocaleString('ar'):'â'; 16852 onMounted(load); 16853 return {state,data,form,domainText,AI_RS_SECTIONS,AI_RS_FIELDS,keyOf,optionList,enforcedBadge,toggleMulti,save,changeCount,healthRows,fmtTime,load}; 16854 }, 16855 render:(function(){ 16856const _Vue = Vue 16857const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 16858 16859const _hoisted_1 = { 16860 class: "card formCard aiResearchSettingsPanel", 16861 "aria-labelledby": "aiRsTitle" 16862} 16863const _hoisted_2 = { class: "aiAutomationHead" } 16864const _hoisted_3 = { 16865 key: 0, 16866 class: "statusPill" 16867} 16868const _hoisted_4 = { 16869 key: 0, 16870 class: "aiWorkflowError", 16871 role: "alert" 16872} 16873const _hoisted_5 = ["onClick"] 16874const _hoisted_6 = ["open"] 16875const _hoisted_7 = { class: "aiRsGrid" } 16876const _hoisted_8 = { 16877 key: 0, 16878 class: "aiRsLater" 16879} 16880const _hoisted_9 = { 16881 key: 1, 16882 class: "aiRsError", 16883 role: "alert" 16884} 16885const _hoisted_10 = ["onUpdate:modelValue"] 16886const _hoisted_11 = ["onUpdate:modelValue"] 16887const _hoisted_12 = ["value"] 16888const _hoisted_13 = ["onUpdate:modelValue"] 16889const _hoisted_14 = ["onUpdate:modelValue"] 16890const _hoisted_15 = { 16891 key: 4, 16892 class: "aiRsMulti" 16893} 16894const _hoisted_16 = ["aria-pressed", "onClick"] 16895const _hoisted_17 = { 16896 key: 0, 16897 class: "hint aiRsWide" 16898} 16899const _hoisted_18 = { class: "aiRsGroup" } 16900const _hoisted_19 = { 16901 key: 0, 16902 class: "hint" 16903} 16904const _hoisted_20 = { key: 0 } 16905const _hoisted_21 = { 16906 key: 1, 16907 class: "hint" 16908} 16909const _hoisted_22 = { class: "row aiRsActions" } 16910const _hoisted_23 = ["disabled", "onClick"] 16911const _hoisted_24 = ["disabled", "onClick"] 16912const _hoisted_25 = { 16913 class: "hint", 16914 role: "status", 16915 "aria-live": "polite" 16916} 16917const _hoisted_26 = { 16918 key: 2, 16919 class: "hint" 16920} 16921 16922return function render(_ctx, _cache) { 16923 with (_ctx) { 16924 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, renderList: _renderList, Fragment: _Fragment, vModelCheckbox: _vModelCheckbox, withDirectives: _withDirectives, vModelSelect: _vModelSelect, vModelText: _vModelText, normalizeClass: _normalizeClass } = _Vue 16925 16926 return (_openBlock(), _createElementBlock("section", _hoisted_1, [ 16927 _createElementVNode("div", _hoisted_2, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù Ø±ÙØ² Ø¨ØØ« Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ"), _createElementVNode("h3", { id: "aiRsTitle" }, "إعدادات Ø§ÙØ¨ØØ« (عا٠ة + ÙÙÙ ÙØ·Ø§Ù)")], -1)), (data&&data.settings) 16928 ? (_openBlock(), _createElementBlock("span", _hoisted_3, _toDisplayString(data.settings.global.mode), 1)) 16929 : _createCommentVNode("", true)]), 16930 _cache[3] || (_cache[3] = _createElementVNode("p", { class: "hint" }, [_createElementVNode("b", null, "AI ÙØ§ ÙÙØ´Ø± ٠باشرة."), _createTextVNode(" Ù٠تغÙÙØ± ÙÙØ§ ÙÙØ¯ÙÙÙÙ ÙÙ Ø§ÙØ³Ø¬Ù. Ø§ÙØÙÙ٠اÙÙ ÙØ³ÙÙ Ø© Â«ÙØ§ØÙاÙ» ØªÙØÙØ¸ Ø§ÙØ¢Ù ÙØªØ¨Ø¯Ø£ ÙØ§Ø¹ÙÙØªÙا Ù٠باتش ÙØ§ØÙ.")], -1)), 16931 (state.error) 16932 ? (_openBlock(), _createElementBlock("p", _hoisted_4, [_createTextVNode(_toDisplayString(state.error) + " ", 1), _createElementVNode("button", { 16933 class: "smallbtn", 16934 type: "button", 16935 onClick: load 16936 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_5)])) 16937 : _createCommentVNode("", true), 16938 (state.loaded&&data) 16939 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 16940 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(AI_RS_SECTIONS, (sec) => { 16941 return (_openBlock(), _createElementBlock("details", { 16942 class: "aiRsGroup", 16943 key: sec[0], 16944 open: sec[0]==='global' 16945 }, [_createElementVNode("summary", null, [_createElementVNode("b", null, _toDisplayString(sec[1]), 1)]), _createElementVNode("div", _hoisted_7, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(AI_RS_FIELDS[sec[0]], (f) => { 16946 return (_openBlock(), _createElementBlock("label", { 16947 key: f[0], 16948 class: _normalizeClass(["fieldLabel aiRsField", {aiRsWide:f[2]==='domains'||f[2]==='multi'}]) 16949 }, [_createElementVNode("span", null, [_createTextVNode(_toDisplayString(f[1]) + " ", 1), (enforcedBadge(sec[0],f[0])) 16950 ? (_openBlock(), _createElementBlock("small", _hoisted_8, "ÙØ§ØÙاÙ")) 16951 : _createCommentVNode("", true), (state.errors[keyOf(sec[0],f[0])]) 16952 ? (_openBlock(), _createElementBlock("small", _hoisted_9, " â " + _toDisplayString(state.errors[keyOf(sec[0],f[0])]), 1)) 16953 : _createCommentVNode("", true)]), (f[2]==='bool') 16954 ? _withDirectives((_openBlock(), _createElementBlock("input", { 16955 key: 0, 16956 type: "checkbox", 16957 "onUpdate:modelValue": $event => ((form[sec[0]][f[0]]) = $event) 16958 }, null, 8, _hoisted_10)), [[_vModelCheckbox, form[sec[0]][f[0]]]]) 16959 : (f[2]==='select') 16960 ? _withDirectives((_openBlock(), _createElementBlock("select", { 16961 key: 1, 16962 "onUpdate:modelValue": $event => ((form[sec[0]][f[0]]) = $event) 16963 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(optionList(f), (o) => { 16964 return (_openBlock(), _createElementBlock("option", { 16965 key: o.key, 16966 value: o.key 16967 }, _toDisplayString(o.label), 9, _hoisted_12)) 16968 }), 128))], 8, _hoisted_11)), [[_vModelSelect, form[sec[0]][f[0]]]]) 16969 : (f[2]==='int') 16970 ? _withDirectives((_openBlock(), _createElementBlock("input", { 16971 key: 2, 16972 type: "number", 16973 inputmode: "numeric", 16974 "onUpdate:modelValue": $event => ((form[sec[0]][f[0]]) = $event) 16975 }, null, 8, _hoisted_13)), [[ 16976 _vModelText, 16977 form[sec[0]][f[0]], 16978 void 0, 16979 { number: true } 16980 ]]) 16981 : (f[2]==='domains') 16982 ? _withDirectives((_openBlock(), _createElementBlock("textarea", { 16983 key: 3, 16984 rows: "3", 16985 "onUpdate:modelValue": $event => ((domainText[keyOf(sec[0],f[0])]) = $event), 16986 placeholder: "ÙØ·Ø§Ù ÙÙ ÙÙ Ø³Ø·Ø±Ø Ù Ø«Ø§Ù: example.com", 16987 dir: "ltr" 16988 }, null, 8, _hoisted_14)), [[_vModelText, domainText[keyOf(sec[0],f[0])]]]) 16989 : (_openBlock(), _createElementBlock("div", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(optionList(f), (o) => { 16990 return (_openBlock(), _createElementBlock("button", { 16991 key: o.key, 16992 type: "button", 16993 class: _normalizeClass(['smallbtn',(form[sec[0]][f[0]]||[]).includes(o.key)?'':'secondary']), 16994 "aria-pressed": (form[sec[0]][f[0]]||[]).includes(o.key), 16995 onClick: $event => (toggleMulti(sec[0],f[0],o.key)) 16996 }, _toDisplayString(o.label), 11, _hoisted_16)) 16997 }), 128))]))], 2)) 16998 }), 128)), (sec[0]==='circulars') 16999 ? (_openBlock(), _createElementBlock("p", _hoisted_17, "«اÙ٠صادر اÙÙ ÙØ«ÙÙØ© ÙÙØ·Â» Ù ÙÙ٠دائ٠ا٠ÙÙØ§ ÙÙ Ù٠تعطÙÙ٠٠٠اÙÙØ§Ø¬ÙØ©.")) 17000 : _createCommentVNode("", true)])], 8, _hoisted_6)) 17001 }), 128)), 17002 _createElementVNode("details", _hoisted_18, [ 17003 _cache[2] || (_cache[2] = _createElementVNode("summary", null, [_createElementVNode("b", null, "ØµØØ© اÙ٠زÙÙØ¯ÙÙ"), _createTextVNode(), _createElementVNode("small", { class: "hint" }, "ÙÙØ¥Ø¯Ø§Ø±Ø© ÙÙØ·")], -1)), 17004 (!healthRows().length) 17005 ? (_openBlock(), _createElementBlock("div", _hoisted_19, "ÙØ§ ØªÙØ¬Ø¯ ÙÙØ§Ø³Ø§Øª Ø¨Ø¹Ø¯Ø ØªÙØ³Ø¬ÙÙ٠٠ع Ø£ÙÙ Ù ÙÙ Ø© Ø¨ØØ«.")) 17006 : _createCommentVNode("", true), 17007 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(healthRows(), (h) => { 17008 return (_openBlock(), _createElementBlock("div", { 17009 key: h.key, 17010 class: "aiRsHealth" 17011 }, [ 17012 _createElementVNode("b", null, _toDisplayString(h.key), 1), 17013 _cache[1] || (_cache[1] = _createTextVNode()), 17014 _createElementVNode("span", { class: _normalizeClass(["statusPill", {canaryPill:!h.temporarily_degraded}]) }, _toDisplayString(h.temporarily_degraded?'٠تدÙÙØ± Ù Ø¤ÙØªØ§Ù':'سÙÙÙ '), 3), 17015 _createElementVNode("small", null, [_createTextVNode("آخر ÙØ¬Ø§Ø: " + _toDisplayString(fmtTime(h.last_success)) + " · آخر ÙØ´Ù: " + _toDisplayString(fmtTime(h.last_failure)) + " · Ø¥Ø®ÙØ§Ùات ٠تتاÙÙØ©: " + _toDisplayString(h.c
17015onsecutive_failures) + " · Ù ØªÙØ³Ø· Ø§ÙØ§Ø³ØªØ¬Ø§Ø¨Ø©: " + _toDisplayString(h.average_latency_ms) + " ms", 1), (h.recent_error_code) 17016 ? (_openBlock(), _createElementBlock("span", _hoisted_20, " · آخر خطأ: " + _toDisplayString(h.recent_error_code), 1)) 17017 : _createCommentVNode("", true)]) 17018 ])) 17019 }), 128)), 17020 (data.providers_configured) 17021 ? (_openBlock(), _createElementBlock("div", _hoisted_21, "اÙÙ ÙØ§ØªÙØ: OpenAI " + _toDisplayString(data.providers_configured.openai?'â':'â') + " · xAI " + _toDisplayString(data.providers_configured.xai?'â':'â'), 1)) 17022 : _createCommentVNode("", true) 17023 ]), 17024 _createElementVNode("div", _hoisted_22, [_createElementVNode("button", { 17025 class: "smallbtn", 17026 type: "button", 17027 disabled: state.saving||!changeCount, 17028 onClick: save 17029 }, _toDisplayString(state.saving?'Ø¬Ø§Ø±Ù Ø§ÙØÙØ¸â¦':'ØÙظ Ø§ÙØªØ¹Ø¯ÙÙØ§Øª ('+changeCount+')'), 9, _hoisted_23), _createElementVNode("button", { 17030 class: "smallbtn secondary", 17031 type: "button", 17032 disabled: state.saving, 17033 onClick: load 17034 }, "تراجع Ø¹Ù ØºÙØ± اÙÙ ØÙÙØ¸", 8, _hoisted_24)]), 17035 _createElementVNode("p", _hoisted_25, _toDisplayString(state.message), 1) 17036 ], 64)) 17037 : (!state.error) 17038 ? (_openBlock(), _createElementBlock("p", _hoisted_26, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙâ¦")) 17039 : _createCommentVNode("", true) 17040 ])) 17041 } 17042} 17043})()}; 17044 // Patch 4: knowledge gaps (inventory gap engine) â coverage summary, open gaps, and one-tap research (candidates only). 17045 const GAP_TYPE_LABELS={zero_coverage:'ÙØ§ ØªØºØ·ÙØ©',low_coverage:'ØªØºØ·ÙØ© ضعÙÙØ©',repeated_zero_results:'Ø¨ØØ« Ø¨ÙØ§ ÙØªÙجة',stale_coverage:'٠عÙÙ٠ات ÙØ¯ÙÙ Ø©',missing_taxonomy:'Ø¨ÙØ§ تصÙÙÙ',missing_route_service:'خد٠ة ٠سار ÙØ§Ùصة',missing_circular_source:'٠صدر تع٠ÙÙ ÙØ§Ùص',admin_manual:'ÙØ¯ÙÙØ©'}; 17046 const GAP_PRIORITY_LABELS={HIGH:'عاÙÙØ©',MEDIUM:'Ù ØªÙØ³Ø·Ø©',LOW:'Ù ÙØ®Ùضة'}; 17047 const AiKnowledgeGapsPanel={props:{hub:{type:String,default:'china_guide'}},setup(props){ 17048 const state=reactive({loading:true,error:'',busy:false,message:'',priority:'',status:'open'}); 17049 const rows=ref([]),total=ref(0),summary=ref(null),coverage=ref(null); 17050 let loadToken=0,coverageHub=''; 17051 async function load(){ 17052 const token=++loadToken; 17053 state.error='';state.loading=true; 17054 const qs=new URLSearchParams({domain:props.hub,status:state.status,limit:'12'});if(state.priority)qs.set('priority',state.priority); 17055 // The heavier coverage view only reloads when the hub (or an explicit refresh) changes it. 17056 const needCoverage=coverageHub!==props.hub||!coverage.value; 17057 const [g,c]=await Promise.all([api('/api/admin/ai-research/gaps?'+qs.toString(),{feedback:false}),needCoverage?api('/api/admin/ai-research/coverage',{feedback:false}):Promise.resolve(null)]); 17058 if(token!==loadToken)return; // a newer request superseded this one 17059 state.loading=false; 17060 if(!g||!g.ok){state.error=(g&&g.message)||'تعذر تØÙ Ù٠اÙÙØ¬Ùات.';return;} 17061 rows.value=safeArray(g.rows);total.value=g.total||0;summary.value=g.summary||null; 17062 if(c){coverage.value=c.ok?c:null;coverageHub=props.hub;} 17063 } 17064 const openCount=(priority)=>safeArray(summary.value&&summary.value.open_by_domain_priority).filter(x=>x.domain===props.hub&&x.priority===priority).reduce((n,x)=>n+x.n,0); 17065 async function act(path,body,done){ 17066 state.busy=true;state.message=''; 17067 const r=await api(path,{method:'POST',body:JSON.stringify(body||{}),feedback:false}); 17068 state.busy=false;state.message=(r&&r.message)||(r&&r.ok?done:'تعذر Ø§ÙØªÙÙÙØ°.'); 17069 if(r&&r.ok)await load(); 17070 } 17071 const batch=ref(null);let batchTimer=null; 17072 async function pollBatch(){ 17073 const r=await api('/api/admin/ai-research/gaps/research-batch',{feedback:false}); 17074 batch.value=r&&r.ok?r.batch:null; 17075 if(batch.value&&batch.value.running){batchTimer=setTimeout(pollBatch,4000);}else if(batchTimer){batchTimer=null;await load();} 17076 } 17077 async function researchAll(onlyManual,gapIds){ 17078 state.busy=true;state.message=''; 17079 const r=await api('/api/admin/ai-research/gaps/research-batch',{method:'POST',body:JSON.stringify({domain:props.hub,only_manual:!!onlyManual,limit:12,gap_ids:gapIds||undefined}),feedback:false}); 17080 state.busy=false;state.message=(r&&r.message)||'تعذر Ø§ÙØ¨Ø¯Ø¡.'; 17081 if(r&&r.ok){batchTimer=setTimeout(pollBatch,1500);} 17082 } 17083 onUnmounted(()=>
17083{if(batchTimer)clearTimeout(batchTimer);}); 17084 const BATCH_STOP_LABELS={global_daily_limit:'Ø¨ÙØºØª Ø§ÙØØ¯ اÙÙÙÙ Ù ÙÙÙ ÙØ§Ù ',concurrency_limit:'ÙÙØ¬Ø¯ Ø¨ØØ« آخر ÙÙØ¯ Ø§ÙØªÙÙÙØ°',domain_busy:'اÙÙØ·Ø§Ù ٠شغÙÙ Ø¨Ø¨ØØ« آخر',research_off:'Ø§ÙØ¨ØØ« ٠تÙÙÙ',domain_disabled:'اÙÙØ·Ø§Ù ٠عطÙÙ'}; 17085 const scan=()=>act('/api/admin/ai-research/gaps/scan',{},'Ø§ÙØªÙ Ù Ù Ø³Ø Ø§ÙÙØ¬Ùات.'); 17086 const research=(row,dry)=>dry?act('/api/admin/ai-research/gaps/'+row.id+'/research',{dry_run:true},'ت٠ت Ø§ÙØ¥Ø¶Ø§ÙØ©.'):researchAll(false,[row.id]); 17087 const decide=(row,action)=>act('/api/admin/ai-research/gaps/'+row.id,{action},'ØªÙ Ø§ÙØÙØ¸.'); 17088 const lastScan=computed(()=>summary.value&&summary.value.last_scan_at?new Date(summary.value.last_scan_at).toLocaleString('ar'):'ÙÙ ÙÙØ¬Ø±Ù بعد'); 17089 watch(()=>[props.hub,state.priority,state.status],load); 17090 onMounted(()=>{load();pollBatch();}); 17091 return {state,rows,total,summary,coverage,openCount,scan,research,decide,lastScan,GAP_TYPE_LABELS,GAP_PRIORITY_LABELS,load,batch,researchAll,pollBatch,BATCH_STOP_LABELS}; 17092 }, 17093 render:(function(){ 17094const _Vue = Vue 17095const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 17096 17097const _hoisted_1 = { 17098 class: "card aiGapsPanel", 17099 "aria-labelledby": "aiGapsTitle" 17100} 17101const _hoisted_2 = { class: "aiAutomationHead" } 17102const _hoisted_3 = { class: "row" } 17103const _hoisted_4 = ["disabled", "onClick"] 17104const _hoisted_5 = ["disabled", "onClick"] 17105const _hoisted_6 = ["disabled", "onClick"] 17106const _hoisted_7 = { 17107 key: 0, 17108 class: "hint aiGapsToast", 17109 role: "status", 17110 "aria-live": "polite" 17111} 17112const _hoisted_8 = { 17113 key: 1, 17114 class: "hint aiBatchStatus" 17115} 17116const _hoisted_9 = { class: "hint" } 17117const _hoisted_10 = { 17118 class: "aiGapsChips", 17119 role: "group", 17120 "aria-label": "تصÙÙØ© Ø§ÙØ£ÙÙÙÙØ©" 17121} 17122const _hoisted_11 = ["onClick"] 17123const _hoisted_12 = ["onClick"] 17124const _hoisted_13 = { 17125 key: 2, 17126 class: "hint" 17127} 17128const _hoisted_14 = { 17129 key: 3, 17130 class: "hint" 17131} 17132const _hoisted_15 = { 17133 key: 4, 17134 class: "aiWorkflowError", 17135 role: "alert" 17136} 17137const _hoisted_16 = { 17138 key: 5, 17139 class: "hint" 17140} 17141const _hoisted_17 = { 17142 key: 6, 17143 class: "hint" 17144} 17145const _hoisted_18 = { class: "aiGapHead" } 17146const _hoisted_19 = { 17147 key: 0, 17148 class: "hint" 17149} 17150const _hoisted_20 = { class: "hint" } 17151const _hoisted_21 = { key: 0 } 17152const _hoisted_22 = { key: 1 } 17153const _hoisted_23 = { class: "row aiGapActions" } 17154const _hoisted_24 = ["disabled", "onClick"] 17155const _hoisted_25 = ["disabled", "onClick"] 17156const _hoisted_26 = ["disabled", "onClick"] 17157const _hoisted_27 = ["disabled", "onClick"] 17158const _hoisted_28 = { 17159 key: 7, 17160 class: "hint" 17161} 17162 17163return function render(_ctx, _cache) { 17164 with (_ctx) { 17165 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, normalizeClass: _normalizeClass, renderList: _renderList } = _Vue 17166 17167 return (_openBlock(), _createElementBlock("section", _hoisted_1, [ 17168 _createElementVNode("div", _hoisted_2, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù ØØ±Ù ÙØ¬Ùات اÙ٠خزÙÙ"), _createElementVNode("h3", { id: "aiGapsTitle" }, "ÙØ¬Ùات اÙÙ Ø¹Ø±ÙØ©")], -1)), _createElementVNode("div", _hoisted_3, [_createElementVNode("button", { 17169 class: "smallbtn", 17170 type: "button", 17171 disabled: state.busy||(batch&&batch.running), 17172 onClick: $event => (researchAll(false)) 17173 }, "Ø§Ø¨ØØ« ÙÙ Ù٠اÙÙØ¬Ùات (ØØªÙ 12)", 8, _hoisted_4), _createElementVNode("button", { 17174 class: "smallbtn secondary", 17175 type: "button", 17176 disabled: state.busy||(batch&&batch.running), 17177 onClick: $event => (researchAll(true)) 17178 }, "ÙØ¬Ùات٠اÙÙØ¯ÙÙØ© ÙÙØ·", 8, _hoisted_5), _createElementVNode("button", { 17179 class: "smallbtn", 17180 type: "button", 17181 disabled: state.busy, 17182 onClick: scan 17183 }, "Ù Ø³Ø Ø§ÙØ¢Ù", 8, _hoisted_6)])]), 17184 (state.message) 17185 ? (_openBlock(), _createElementBlock("p", _hoisted_7, _toDisplayString(state.message), 1)) 17186 : _createCommentVNode("", true), 17187 (batch&&(batch.running||batch.total)) 17188 ? (_openBlock(), _createElementBlock("p", _hoisted_8, [_createTextVNode("Ø§ÙØ¨ØØ« Ø§ÙØ¬Ù اعÙ: " + _toDisplayString(batch.done) + " / " + _toDisplayString(batch.total), 1), (batch.running) 17189 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · جارÙâ¦")], 64)) 17190 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createTextVNode(" · Ø§ÙØªÙÙ")], 64)), (batch.stopped_reason) 17191 ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [_createTextVNode(" · تÙÙÙ: " + _toDisplayString(BATCH_STOP_LABELS[batch.stopped_reason]||batch.stopped_reason), 1)], 64)) 17192 : _createCommentVNode("", true)])) 17193 : _createCommentVNode("", true), 17194 _createElementVNode("p", _hoisted_9, "ÙÙÙØ³ اÙÙØ¸Ø§Ù ØªØºØ·ÙØ© ٠ا ÙÙ Ù ÙØ´Ùر ÙØ¹Ùا٠ث٠ÙÙØªØ±Ø Ø£ÙÙ ÙØ¨ØØ«. ÙØ§ ÙØ³ØªÙÙÙ AI ÙÙØ§ ÙÙØ´Ø± Ø´ÙØ¦Ø§ÙØ Ø§ÙØ¨ØØ« ÙÙÙØªØ¬ Ù ÙØªØ±ØØ§Øª ÙÙ٠راجعة ÙÙØ·. آخر ٠سØ: " + _toDisplayString(lastScan), 1), 17195 _createElementVNode("div", _hoisted_10, [_createElementVNode("button", { 17196 type: "button", 17197 class: _normalizeClass(['smallbtn',state.priority===''?'':'secondary']), 17198 onClick: $event => (state.priority='') 17199 }, "اÙÙÙ", 10, _hoisted_11), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(['HIGH','MEDIUM','LOW'], (p) => { 17200 return (_openBlock(), _createElementBlock("button", { 17201 key: p, 17202 type: "button", 17203 class: _normalizeClass(['smallbtn',state.priority===p?'':'secondary']), 17204 onClick: $event => (state.priority=p) 17205 }, _toDisplayString(GAP_PRIORITY_LABELS[p]) + " (" + _toDisplayString(openCount(p)) + ")", 11, _hoisted_12)) 17206 }), 128))]), 17207 (coverage&&hub==='china_guide') 17208 ? (_openBlock(), _createElementBlock("p", _hoisted_13, "ØªØºØ·ÙØ© Ø§ÙØ¯ÙÙÙ: " + _toDisplayString(coverage.china_guide.categories.length) + " تصÙÙÙØ§Ù · " + _toDisplayString(coverage.china_guide.company_
17208sectors.length) + " ÙØ·Ø§Ø¹ Ø´Ø±ÙØ§Øª · ÙØ¯ÙÙ Ø©: " + _toDisplayString(coverage.china_guide.stale_items) + " · Ø¨ÙØ§ تصÙÙÙ: " + _toDisplayString(coverage.china_guide.unclassified), 1)) 17209 : _createCommentVNode("", true), 17210 (coverage&&hub==='trade_shipping') 17211 ? (_openBlock(), _createElementBlock("p", _hoisted_14, "Ø§ÙØªØ¬Ø§Ø±Ø©: " + _toDisplayString(coverage.trade_shipping.routes) + " ٠سارا٠· " + _toDisplayString(coverage.trade_shipping.countries_research_enabled) + " دÙÙØ© Ø¨ØØ« · " + _toDisplayString(coverage.trade_shipping.services_research_enabled) + " خد٠ة Ø¨ØØ«", 1)) 17212 : _createCommentVNode("", true), 17213 (state.error) 17214 ? (_openBlock(), _createElementBlock("p", _hoisted_15, _toDisplayString(state.error), 1)) 17215 : (state.loading) 17216 ? (_openBlock(), _createElementBlock("p", _hoisted_16, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙâ¦")) 17217 : (!rows.length) 17218 ? (_openBlock(), _createElementBlock("p", _hoisted_17, "ÙØ§ ÙØ¬Ùات Ù ÙØªÙØØ© ÙÙØ°Ø§ اÙÙÙØªØ±. اضغط Â«Ù Ø³Ø Ø§ÙØ¢Ù» بعد تغÙÙØ± Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª.")) 17219 : _createCommentVNode("", true), 17220 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (row) => { 17221 return (_openBlock(), _createElementBlock("article", { 17222 key: row.id, 17223 class: "aiGapCard" 17224 }, [ 17225 _createElementVNode("div", _hoisted_18, [_createElementVNode("b", null, _toDisplayString(row.label_ar), 1), _createElementVNode("span", { class: _normalizeClass(["statusPill", {canaryPill:row.priority==='LOW'}]) }, _toDisplayString(GAP_PRIORITY_LABELS[row.priority_override||row.priority]), 3)]), 17226 (row.yield&&row.yield.jobs) 17227 ? (_openBlock(), _createElementBlock("small", _hoisted_19, "ÙØªØ§Ø¦Ø¬ Ø§ÙØ¨ØØ«: " + _toDisplayString(row.yield.pending) + " ÙÙ٠راجعة · " + _toDisplayString(row.yield.approved) + " ٠عت٠دة · " + _toDisplayString(row.yield.rejected) + " ٠رÙÙØ¶Ø© (" + _toDisplayString(row.yield.jobs) + " Ù ÙÙ Ø©)", 1)) 17228 : _createCommentVNode("", true), 17229 _createElementVNode("small", _hoisted_20, [_createTextVNode(_toDisplayString(GAP_TYPE_LABELS[row.gap_type]||row.gap_type) + " · ÙØ¯ÙÙØ§ " + _toDisplayString(row.existing_count) + " / اÙÙ Ø³ØªÙØ¯Ù " + _toDisplayString(row.target_count), 1), (row.demand_count) 17230 ? (_openBlock(), _createElementBlock("span", _hoisted_21, " · " + _toDisplayString(row.demand_count) + " Ø¨ØØ« Ø¨ÙØ§ ÙØªÙجة", 1)) 17231 : _createCommentVNode("", true)]), 17232 (row.queries&&row.queries.length) 17233 ? (_openBlock(), _createElementBlock("details", _hoisted_22, [_cache[1] || (_cache[1] = _createElementVNode("summary", null, "عبارات Ø§ÙØ¨ØØ«", -1)), _createElementVNode("ul", null, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row.queries, (query, i) => { 17234 return (_openBlock(), _createElementBlock("li", { 17235 key: i, 17236 dir: "auto" 17237 }, _toDisplayString(query), 1)) 17238 }), 128))])])) 17239 : _createCommentVNode("", true), 17240 _createElementVNode("div", _hoisted_23, [ 17241 (row.queries&&row.queries.length) 17242 ? (_openBlock(), _createElementBlock("button", { 17243 key: 0, 17244 class: "smallbtn", 17245 type: "button", 17246 disabled: state.busy, 17247 onClick: $event => (research(row,false)) 17248 }, "Ø§Ø¨ØØ« Ø§ÙØ¢Ù", 8, _hoisted_24)) 17249 : _createCommentVNode("", true), 17250 (row.queries&&row.queries.length) 17251 ? (_openBlock(), _createElementBlock("button", { 17252 key: 1, 17253 class: "smallbtn secondary", 17254 type: "button", 17255 disabled: state.busy, 17256 onClick: $event => (research(row,true)) 17257 }, "تجربة Ø¨ÙØ§ ٠زÙÙØ¯", 8, _hoisted_25)) 17258 : _createCommentVNode("", true), 17259 _createElementVNode("button", { 17260 class: "smallbtn secondary", 17261 type: "button", 17262 disabled: state.busy, 17263 onClick: $event => (decide(row,'snooze')) 17264 }, "تأجÙÙ", 8, _hoisted_26), 17265 _createElementVNode("button", { 17266 class: "smallbtn secondary", 17267 type: "button", 17268 disabled: state.busy, 17269 onClick: $event => (decide(row,'dismiss')) 17270 }, "تجاÙÙ", 8, _hoisted_27) 17271 ]) 17272 ])) 17273 }), 128)), 17274 (total>rows.length) 17275 ? (_openBlock(), _createElementBlock("small", _hoisted_28, "ÙØ¹Ø±Ø¶ Ø£ÙÙ " + _toDisplayString(rows.length) + " Ù Ù " + _toDisplayString(total) + " ÙØ¬ÙØ©.", 1)) 17276 : _createCommentVNode("", true) 17277 ])) 17278 } 17279} 17280})()}; 17281 const AiQualityPanel={props:{hub:{type:String,default:'china_guide'}},setup(props){ 17282 const state=reactive({loading:true,error:'',days:30}),d=ref(null); 17283 let token=0; 17284 async function load(){const t=++token;state.loading=true;state.error='';const r=await api('/api/admin/ai-research/quality?hub='+encodeURIComponent(props.hub)+'&days='+state.days,{feedback:false});if(t!==token)return;state.loading=false;if(!r||!r.ok){state.error=(r&&r.message)||'تعذر تØÙ Ù٠٠ؤشرات Ø§ÙØ¬Ùدة.';return;}d.value=r;syncPrices();} 17285 const prices=reactive({}),pricing=reactive({busy:false,msg:''}); 17286 function syncPrices(){for(const row of ((d.value&&d.value.cost&&d.value.cost.pricing_rows)||[])){const k=row.provider+'|'+row.model;if(!prices[k])prices[k]={input:row.price?row.price.input:'',output:row.price?row.price.output:''};}}
17287 async function savePrices(){const out={};for(const [k,v] of Object.entries(prices)){if(v.input===''||v.output===''||v.input==null||v.output==null)continue;out[k]={input:Number(v.input),output:Number(v.output)};}pricing.busy=true;pricing.msg='';const r=await api('/api/admin/ai-research/pricing',{method:'POST',body:JSON.stringify({prices:out}),feedback:false});pricing.busy=false;pricing.msg=(r&&r.message)||'تعذر Ø§ÙØÙØ¸.';if(r&&r.ok)await load();} 17288 const pct=v=>v==null?'â':Math.round(v*100)+'%'; 17289 const num=v=>v==null?'â':Number(v).toLocaleString('ar'); 17290 watch(()=>[props.hub,state.days],load);onMounted(load); 17291 const windows=computed(()=>d.value&&d.value.windows?d.value.windows:[7,14,30,90]); 17292 return {state,d,pct,num,load,windows,prices,pricing,savePrices}; 17293 }, 17294 render:(function(){ 17295const _Vue = Vue 17296const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 17297 17298const _hoisted_1 = { 17299 class: "card aiQualityPanel", 17300 "aria-labelledby": "aiQualityTitle" 17301} 17302const _hoisted_2 = { class: "aiAutomationHead" } 17303const _hoisted_3 = ["onUpdate:modelValue"] 17304const _hoisted_4 = ["value"] 17305const _hoisted_5 = { 17306 key: 0, 17307 class: "aiWorkflowError", 17308 role: "alert" 17309} 17310const _hoisted_6 = { 17311 key: 1, 17312 class: "hint" 17313} 17314const _hoisted_7 = { class: "compactSummaryBar" } 17315const _hoisted_8 = { class: "hint" } 17316const _hoisted_9 = { class: "hint" } 17317const _hoisted_10 = { class: "hint" } 17318const _hoisted_11 = { key: 0 } 17319const _hoisted_12 = { class: "hint" } 17320const _hoisted_13 = { key: 0 } 17321const _hoisted_14 = { key: 0 } 17322const _hoisted_15 = { key: 0 } 17323const _hoisted_16 = { dir: "ltr" } 17324const _hoisted_17 = { class: "hint" } 17325const _hoisted_18 = { key: 0 } 17326const _hoisted_19 = { class: "fieldLabel" } 17327const _hoisted_20 = ["onUpdate:modelValue"] 17328const _hoisted_21 = { class: "fieldLabel" } 17329const _hoisted_22 = ["onUpdate:modelValue"] 17330const _hoisted_23 = ["disabled", "onClick"] 17331const _hoisted_24 = { 17332 class: "hint", 17333 role: "status" 17334} 17335const _hoisted_25 = { 17336 key: 1, 17337 class: "hint" 17338} 17339const _hoisted_26 = { key: 2 } 17340const _hoisted_27 = { 17341 key: 3, 17342 class: "hint" 17343} 17344const _hoisted_28 = ["href"] 17345 17346return function render(_ctx, _cache) { 17347 with (_ctx) { 17348 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, vModelText: _vModelText } = _Vue 17349 17350 return (_openBlock(), _createElementBlock("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ø§ÙØ¬Ùدة ÙØ§ÙتÙÙÙØ©"), _createElementVNode("h3", { id: "aiQualityTitle" }, "Ø¬ÙØ¯Ø© Ø§ÙØ¨ØØ«")], -1)), _withDirectives(_createElementVNode("select", { 17351 "onUpdate:modelValue": $event => ((state.days) = $event), 17352 "aria-label": "اÙÙØªØ±Ø©" 17353 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(windows, (n) => { 17354 return (_openBlock(), _createElementBlock("option", { 17355 key: n, 17356 value: n 17357 }, "آخر " + _toDisplayString(n) + " ÙÙ٠اÙ", 9, _hoisted_4)) 17358 }), 128))], 8, _hoisted_3), [[ 17359 _vModelSelect, 17360 state.days, 17361 void 0, 17362 { number: true } 17363 ]])]), (state.error) 17364 ? (_openBlock(), _createElementBlock("p", _hoisted_5, _toDisplayString(state.error), 1)) 17365 : (state.loading&&!d) 17366 ? (_openBlock(), _createElementBlock("p", _hoisted_6, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙâ¦")) 17367 : _createCommentVNode("", true), d 17368 ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [ 17369 _createElementVNode("div", _hoisted_7, [ 17370 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(num(d.yield.candidates)), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "Ù ÙØªØ±ØØ§Øª", -1))]), 17371 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(pct(d.review.acceptance_rate)), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "ÙØ¨Ù٠٠٠اÙÙ ÙØ±Ø§Ø¬Ùع", -1))]), 17372 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(pct(d.yield.duplicate_rate)), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "ÙØ³Ø¨Ø© Ø§ÙØªÙرار", -1))]), 17373 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(num(d.review.open_now)), 1), _cache[4] || (_cache[4] = _createElementVNode("small", null, "Ø¨Ø§ÙØªØ¸Ø§Ø± اÙ٠راجعة", -1))]) 17374 ]), 17375 _createElementVNode("p", _hoisted_8, "Ù ÙØ§Ù ÙØ§Ø¬ØØ© " + _toDisplayString(num(d.jobs.completed)) + " · ÙØ§Ø´ÙØ© " + _toDisplayString(num(d.jobs.failed)) + " · عبر ÙØ¬Ùات " + _toDisplayString(num(d.jobs.gap_driven)) + " · ÙØ³ÙØ· ز٠٠اÙ٠راجعة " + _toDisplayString(d.review.median_review_hours) + " ساعة", 1), 17376 _createElementVNode("p", _hoisted_9, "استدعاءات AI " + _toDisplayString(num(d.cost.ai_calls)) + " · Ø±Ù ÙØ² ÙÙÙ Ù ÙØªØ±Ø " + _toDisplayString(num(d.cost.tokens_per_candidate)) + " · Ù ÙØ§Ù Ø§ØØªÙØ§Ø·ÙØ© " + _toDisplayString(num(d.cost.fallback_jobs)) + " · ØªØ®Ø·Ù Ù Ø²ÙØ¯ ٠تعط٠" + _toDisplayString(num(d.cost.primary_skipped_jobs)) + " · ØªØ®Ø·Ù Ø¨Ø§ÙØ¨ØµÙ Ø© " + _toDisplayString(num(d.yield.hash_skipped)), 1), 17377 _createElementVNode("p", _hoisted_10, [_createTextVNode("رÙÙØ¶ Ø¨Ø³ÙØ§Ø³Ø© اÙ٠صادر " + _toDisplayString(num(d.yield.rejected_by_source_policy)), 1), (d.hub_key==='trade_shipping') 17378 ? (_openBlock(), _createElementBlock("span", _hoisted_11, " (ÙÙØ§Ø¹Ø¯ Ø¨ÙØ§ ٠صدر رس٠٠" + _toDisplayString(num(d.yield.rejected_regulatory_unverified)) + ")", 1)) 17379 : _createCommentVNode("", true), _createTextVNode(" · ٠صادر Ø±Ø³Ù ÙØ© " + _toDisplayString(num(d.sources.official)) + " · Ù ÙØ«ÙÙØ© " + _toDisplayString(num(d.sources.trusted)) + " · ØºÙØ± ٠صÙÙØ© " + _toDisplayString(num(d.sources.unknown)), 1)]), 17380 _createElementVNode("p", _hoisted_12, [(d.cost.estimated_cost!=null) 17381 ? (_openBlock(), _createElementBlock("b", _hoisted_13, [_createTextVNode("Ø§ÙØªÙÙÙØ© Ø§ÙØªÙØ¯ÙØ±ÙØ©: " + _toDisplayString(d.cost.estimated_cost) + " دÙÙØ§Ø±", 1), (d.cost.cost_per_approved!=null) 17382 ? (_openBlock(), _createElementBlock("span", _hoisted_14, " · ÙÙÙ Ù ÙØªØ±Ø ٠عت٠د " + _toDisplayString(d.cost.cost_per_approved) + " دÙÙØ§Ø±", 1)) 17383 : _createCommentVNode("", true), _cache[5] || (_cache[5] = _createTextVNode(" â "))])) 17384 : _createCommentVNode("", true), _createTextVNode(_toDisplayString(d.cost.estimated_cost_note), 1)]), 17385 (d.cost.pricing_rows.length) 17386 ? (_openBlock(), _createElementBlock("details", _hoisted_15, [ 17387 _cache[8] || (_cache[8] = _createElementVNode("summary", null, "أسعار اÙÙ٠اذج (دÙÙØ§Ø± ÙÙÙ Ù ÙÙÙ٠ر٠ز)", -1)), 17388 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(d.cost.pricing_rows, (row) => { 17389 return (_openBlock(), _createElementBlock("div", { 17390 class: "aiPriceRow", 17391 key: row.provider+'|'+row.model 17392 }, [_createElementVNode("b", _hoisted_16, _toDisplayString(row.provider) + " · " + _toDisplayString(row.model||'â'), 1), _createElementVNode("small", _hoisted_17, [_createTextVNode(_toDisplayString(row.jobs) + " Ù ÙÙ Ø© · " + _toDisplayString(num(row.input_tokens)) + " دخ٠/ " + _toDisplayString(num(row.output_tokens)) + " خرج", 1), (row.mixed) 17393 ? (_openBlock(), _createElementBlock("span", _hoisted_18, " · Ù ÙØ§Ù Ù Ø®ØªÙØ·Ø© (Ø¨ÙØ§ ØªØ³Ø¹ÙØ±)")) 17394 : _createCommentVNode("", true)]), (!row.mixed&&prices[row.provider+'|'+row.model]) 17395 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("label", _hoisted_19, [_cache[6] || (_cache[6] = _createTextVNode("دخÙ")), _withDirectives(_createElementVNode("input", { 17396 type: "number", 17397 min: "0", 17398 max: "1000", 17399 step: "0.01", 17400 "onUpdate:modelValue": $event => ((prices[row.provider+'|'+row.model].input) = $event), 17401 dir: "ltr" 17402 }, null, 8, _hoisted_20), [[_vModelText, prices[row.provider+'|'+row.model].input]])]), _createElementVNode("label", _hoisted_21, [_cache[7] || (_cache[7] = _
17402createTextVNode("خرج")), _withDirectives(_createElementVNode("input", { 17403 type: "number", 17404 min: "0", 17405 max: "1000", 17406 step: "0.01", 17407 "onUpdate:modelValue": $event => ((prices[row.provider+'|'+row.model].output) = $event), 17408 dir: "ltr" 17409 }, null, 8, _hoisted_22), [[_vModelText, prices[row.provider+'|'+row.model].output]])])], 64)) 17410 : _createCommentVNode("", true)])) 17411 }), 128)), 17412 _createElementVNode("button", { 17413 class: "smallbtn", 17414 type: "button", 17415 disabled: pricing.busy, 17416 onClick: savePrices 17417 }, "ØÙظ Ø§ÙØ£Ø³Ø¹Ø§Ø±", 8, _hoisted_23), 17418 _createElementVNode("small", _hoisted_24, _toDisplayString(pricing.msg), 1) 17419 ])) 17420 : _createCommentVNode("", true), 17421 (d.providers.length) 17422 ? (_openBlock(), _createElementBlock("ul", _hoisted_25, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(d.providers, (p) => { 17423 return (_openBlock(), _createElementBlock("li", { key: p.provider }, _toDisplayString(p.provider) + ": " + _toDisplayString(p.degraded?'Ù ØªØ¹Ø·Ù Ù Ø¤ÙØªØ§Ù':'سÙÙÙ ') + " · Ø¥Ø®ÙØ§Ùات ٠تتاÙÙØ© " + _toDisplayString(p.consecutive_failures) + " · ز٠٠" + _toDisplayString(p.average_latency_ms) + "ms", 1)) 17424 }), 128))])) 17425 : _createCommentVNode("", true), 17426 (d.review_next.length) 17427 ? (_openBlock(), _createElementBlock("h4", _hoisted_26, "Ø§ÙØ£ÙÙ٠باÙ٠راجعة")) 17428 : _createCommentVNode("", true), 17429 (d.review_next.length) 17430 ? (_openBlock(), _createElementBlock("ol", _hoisted_27, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(d.review_next, (x) => { 17431 return (_openBlock(), _createElementBlock("li", { key: x.id }, [_createElementVNode("a", { href: x.review_path }, _toDisplayString(x.title), 9, _hoisted_28), _createTextVNode(" â Ø¹Ù ر " + _toDisplayString(x.age_days) + " ÙÙÙ ", 1)])) 17432 }), 128))])) 17433 : _createCommentVNode("", true) 17434 ], 64)) 17435 : _createCommentVNode("", true)])) 17436 } 17437} 17438})()}; 17439 const ExhibitionDatesPanel={setup(){ 17440 const state=reactive({loading:true,error:'',busy:false,message:'',status:'pending'}),rows=ref([]),summary=ref(null),run=ref(null); 17441 let token=0,poll=null; 17442 async function load(){const t=++token;state.loading=true;state.error='';const r=await api('/api/admin/exhibitions/dates?status='+encodeURIComponent(state.status),{feedback:false});if(t!==token)return;state.loading=false;if(!r||!r.ok){state.error=(r&&r.message)||'تعذر تØÙ ÙÙ ØªÙØ§Ø±ÙØ® اÙ٠عارض.';return;}rows.value=safeArray(r.rows);summary.value=r.summary||null;run.value=r.run||null;if(r.run&&r.run.running&&!poll)poll=setInterval(load,6000);if(!(r.run&&r.run.running)&&poll){clearInterval(poll);poll=null;}} 17443 async function act(path,body,done){state.busy=true;state.message='';const r=await api(path,{method:'POST',body:JSON.stringify(body||{}),feedback:false});state.busy=false;state.message=(r&&r.message)||(r&&r.ok?done:'تعذر Ø§ÙØªÙÙÙØ°.');if(r&&r.ok)await load();} 17444 const collect=()=>act('/api/admin/exhibitions/dates/collect',{},'بدأ Ø§ÙØ¬Ù ع.'); 17445 const decide=(row,action)=>act('/api/admin/exhibitions/dates/'+row.id+'/decision',{action},'ت٠.'); 17446 const STATUS_LABELS={pending:'ÙÙ٠راجعة',approved:'٠عت٠د',rejected:'٠رÙÙØ¶',not_event:'ÙÙØ³ ٠عرضاÙ',no_dates:'Ø¨ÙØ§ ØªÙØ§Ø±ÙØ®'}; 17447 watch(()=>state.status,load);onMounted(load);onUnmounted(()=>{if(poll)clearInterval(poll);}); 17448 return {state,rows,summary,run,collect,decide,STATUS_LABELS}; 17449 }, 17450 render:(function(){ 17451const _Vue = Vue 17452const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 17453 17454const _hoisted_1 = { 17455 class: "card exhibitionDatesPanel", 17456 "aria-labelledby": "exDatesTitle" 17457} 17458const _hoisted_2 = { class: "aiAutomationHead" } 17459const _hoisted_3 = ["disabled", "onClick"] 17460const _hoisted_4 = { 17461 key: 0, 17462 class: "hint" 17463} 17464const _hoisted_5 = { key: 0 } 17465const _hoisted_6 = { 17466 class: "aiGapsChips", 17467 role: "group", 17468 "aria-label": "Ø§ÙØØ§ÙØ©" 17469} 17470const _hoisted_7 = ["onClick"] 17471const _hoisted_8 = { 17472 key: 1, 17473 class: "aiWorkflowError", 17474 role: "alert" 17475} 17476const _hoisted_9 = { 17477 key: 2, 17478 class: "hint" 17479} 17480const _hoisted_10 = { class: "aiGapHead" } 17481const _hoisted_11 = { class: "statusPill" } 17482const _hoisted_12 = { 17483 key: 0, 17484 class: "routeStepChinese", 17485 dir: "ltr" 17486} 17487const _hoisted_13 = { key: 0 }
17488const _hoisted_14 = { key: 1 } 17489const _hoisted_15 = { 17490 key: 1, 17491 class: "hint" 17492} 17493const _hoisted_16 = { 17494 key: 2, 17495 class: "hint", 17496 dir: "auto" 17497} 17498const _hoisted_17 = { class: "hint ltr" } 17499const _hoisted_18 = ["href"] 17500const _hoisted_19 = { 17501 key: 3, 17502 class: "row aiGapActions" 17503} 17504const _hoisted_20 = ["disabled", "onClick"] 17505const _hoisted_21 = ["disabled", "onClick"] 17506const _hoisted_22 = { 17507 class: "hint", 17508 role: "status", 17509 "aria-live": "polite" 17510} 17511 17512return function render(_ctx, _cache) { 17513 with (_ctx) { 17514 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass } = _Vue 17515 17516 return (_openBlock(), _createElementBlock("section", _hoisted_1, [ 17517 _createElementVNode("div", _hoisted_2, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ØªÙØ§Ø±ÙØ® اÙ٠عارض"), _createElementVNode("h3", { id: "exDatesTitle" }, "Ø§ÙØ¹Ø¯Ù Ø§ÙØªÙازÙÙ ÙØØªØ§Ø¬ ØªÙØ§Ø±ÙØ®")], -1)), _createElementVNode("button", { 17518 class: "smallbtn", 17519 type: "button", 17520 disabled: state.busy||(run&&run.running), 17521 onClick: collect 17522 }, "اج٠ع Ø§ÙØªÙØ§Ø±ÙØ® ٠٠اÙ٠صادر", 8, _hoisted_3)]), 17523 _cache[2] || (_cache[2] = _createElementVNode("p", { class: "hint" }, "ÙÙØ±Ø£ اÙÙØ¸Ø§Ù ØµÙØØ© Ù٠٠عرض Ø§ÙØ±Ø³Ù ÙØ© ÙÙÙØªØ±Ø ØªÙØ§Ø±ÙØ® Ø§ÙØ¯Ùرة اÙÙØ§Ø¯Ù Ø© ٠ع Ø§ÙØ§Ùتباس Ø§ÙØ°Ù Ø°ÙØ±Ùا. ÙØ§ Ø´ÙØ¡ ÙØ¸Ùر ÙÙØ²Ùار ÙØ¨Ù اعت٠ادÙ.", -1)), 17524 summary 17525 ? (_openBlock(), _createElementBlock("p", _hoisted_4, [_createTextVNode(_toDisplayString(summary.published) + " Ø¹ÙØµØ±Ø§Ù Ù٠اÙ٠عارض · Ø¨ØªÙØ§Ø±ÙØ®: " + _toDisplayString(summary.with_dates) + " · ÙÙ٠راجعة: " + _toDisplayString(summary.pending) + " · ÙÙØ³Øª ٠عارض: " + _toDisplayString(summary.not_event) + " · Ø¨ÙØ§ ØªÙØ§Ø±ÙØ® Ù٠اÙ٠صدر: " + _toDisplayString(summary.no_dates), 1), (run&&run.running) 17526 ? (_openBlock(), _createElementBlock("span", _hoisted_5, " · Ø¬Ø§Ø±Ù Ø§ÙØ¬Ù ع " + _toDisplayString(run.done) + "/" + _toDisplayString(run.total) + "â¦", 1)) 17527 : _createCommentVNode("", true)])) 17528 : _createCommentVNode("", true), 17529 _createElementVNode("div", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(STATUS_LABELS, (label, key) => { 17530 return (_openBlock(), _createElementBlock("button", { 17531 key: key, 17532 type: "button", 17533 class: _normalizeClass(['smallbtn',state.status===key?'':'secondary']), 17534 onClick: $event => (state.status=key) 17535 }, _toDisplayString(label), 11, _hoisted_7)) 17536 }), 128))]), 17537 (state.error) 17538 ? (_openBlock(), _createElementBlock("p", _hoisted_8, _toDisplayString(state.error), 1)) 17539 : (!rows.length&&!state.loading) 17540 ? (_openBlock(), _createElementBlock("p", _hoisted_9, "ÙØ§ Ø¹ÙØ§ØµØ± ÙÙ ÙØ°Ù Ø§ÙØØ§ÙØ©.")) 17541 : _createCommentVNode("", true), 17542 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (row) => { 17543 return (_openBlock(), _createElementBlock("article", { 17544 key: row.id, 17545 class: "aiGapCard" 17546 }, [ 17547 _createElementVNode("div", _hoisted_10, [_createElementVNode("b", null, _toDisplayString(row.title_ar||row.title_en), 1), _createElementVNode("span", _hoisted_11, _toDisplayString(row.confidence?('Ø«ÙØ© '+row.confidence):STATUS_LABELS[row.status]), 1)]), 17548 (row.start_date) 17549 ? (_openBlock(), _createElementBlock("p", _hoisted_12, [ 17550 _createElementVNode("b", null, _toDisplayString(row.start_date) + " â " + _toDisplayString(row.end_date), 1), 17551 _cache[1] || (_cache[1] = _createTextVNode()), 17552 (row.edition_label) 17553 ? (_openBlock(), _createElementBlock("span", _hoisted_13, " · " + _toDisplayString(row.edition_label), 1)) 17554 : _createCommentVNode("", true), 17555 (row.venue) 17556 ? (_openBlock(), _createElementBlock("span", _hoisted_14, " · " + _toDisplayString(row.venue), 1)) 17557 : _createCommentVNode("", true) 17558 ])) 17559 : _createCommentVNode("", true), 17560 (row.current_start) 17561 ? (_openBlock(), _createElementBlock("small", _hoisted_15, "Ø§ÙØØ§ÙÙ ÙÙ Ø§ÙØ¹Ùصر: " + _toDisplayString(row.
17561current_start) + " â " + _toDisplayString(row.current_end), 1)) 17562 : _createCommentVNode("", true), 17563 (row.evidence_quote) 17564 ? (_openBlock(), _createElementBlock("blockquote", _hoisted_16, "«" + _toDisplayString(row.evidence_quote) + "»", 1)) 17565 : _createCommentVNode("", true), 17566 _createElementVNode("small", _hoisted_17, [(row.source_url) 17567 ? (_openBlock(), _createElementBlock("a", { 17568 key: 0, 17569 href: row.source_url, 17570 target: "_blank", 17571 rel: "noopener noreferrer" 17572 }, "اÙ٠صدر", 8, _hoisted_18)) 17573 : _createCommentVNode("", true)]), 17574 (row.status==='pending') 17575 ? (_openBlock(), _createElementBlock("div", _hoisted_19, [_createElementVNode("button", { 17576 class: "smallbtn", 17577 type: "button", 17578 disabled: state.busy, 17579 onClick: $event => (decide(row,'approve')) 17580 }, "اعت٠اد", 8, _hoisted_20), _createElementVNode("button", { 17581 class: "smallbtn secondary", 17582 type: "button", 17583 disabled: state.busy, 17584 onClick: $event => (decide(row,'reject')) 17585 }, "Ø±ÙØ¶", 8, _hoisted_21)])) 17586 : _createCommentVNode("", true) 17587 ])) 17588 }), 128)), 17589 _createElementVNode("p", _hoisted_22, _toDisplayString(state.message), 1) 17590 ])) 17591 } 17592} 17593})()}; 17594 const AdminAiResearchPage={ 17595 components:{AdminFrame,AiAdminCenterNav,AiResearchSettingsPanel,AiKnowledgeGapsPanel,AiQualityPanel,ExhibitionDatesPanel}, 17596 setup(){ 17597 const store=useGzcStore(); 17598 const router=useRouter(); 17599 const route=useRoute(); 17600 const requestedHub=String((route.query||{}).hub||''); 17601 const requestedStatus=String((route.query||{}).status||'pending'); 17602 const technicalRoute=computed(()=>route.path==='/admin/ai-operations'); 17603 const rawWorkspace=String((route.query||{}).workspace||(technicalRoute.value?'jobs':'review')); 17604 const requestedWorkspace=rawWorkspace==='suggestions'?'review':rawWorkspace; 17605 const targetSuggestion=String((route.query||{}).suggestion||''); 17606 const targetJob=String((route.query||{}).job||''); 17607 const selectedHub=ref(AI_RESEARCH_HUB_OPTIONS.some(item=>item.key===requestedHub)?requestedHub:'china_guide'); 17608 const allowedWorkspaces=technicalRoute.value?['jobs','settings']:['review','freshness','growth','inventory']; 17609 const workspace=ref(allowedWorkspaces.includes(requestedWorkspace)?requestedWorkspace:(technicalRoute.value?'jobs':'review')); 17610 const pageTitle=computed(()=>technicalRoute.value?(workspace.value==='settings'?'Ù Ø±ÙØ² AI â Ø§Ùإعدادات':'Ù Ø±ÙØ² AI â ØªØ´ØºÙÙ Ø§ÙØ¨ØØ«'):'Ù Ø±ÙØ² AI â Ø§Ù٠راجعة'); 17611 const suggestionStatus=ref(['pending','in_review','approved','rejected','all'].includes(requestedStatus)?requestedStatus:'pending'); 17612 const decisionFilter=ref(['all','new','update','image','high_risk','excluded'].includes(String((route.query||{}).decision||''))?String((route.query||{}).decision):'all'); 17613 const openSuggestionId=ref(targetSuggestion||''); 17614 const submittingSuggestionId=ref(''); 17615 const categories=ref([]); 17616 const reviewEditFields=['category_id','service_type','direction','title_ar','summary_ar','description_ar','source_name','source_url','risk_level','admin_note']; 17617 const research=reactive({ 17618 suggestions:[],jobs:[], 17619 stats:{total:0,pending:0,in_review:0,approved:0,rejected:0,high_risk:0,new_items:0,updates:0,dedup_conflicts:0,images_ready:0}, 17620 inventory:{hub_key:'china_guide',digest:'',item_count:0,category_count:0,gap_count:0,thin_count:0,incomplete_count:0,demand_bucket_count:0,demand_total:0,coverage:[],gaps:[],thin:[],incomplete:[],demand:[],quality:[]}, 17621 growth:{model_version:1,hub_key:'china_guide',total:0,summary:{urgent:0,high:0,medium:0,normal:0,demand_total:0,search_driven:0,coverage_driven:0},recommended:null,opportunities:[]}, 17622 freshness:{model_version:1,hub_key:'china_guide',total:0,summary:{urgent:0,high:0,medium:0,normal:0,overdue:0,due_soon:0,unverified:0,source_missing:0,current:0},recommended:null,opportunities:[]}, 17623 policy:{},settings:{},provider_state:{latest_failure:null},image_coverage:{hub_key:'china_guide',published:0,with_image:0,missing_image:0,weak_image:0,ai_generated:0,coverage_percent:100,missing_items:[]},image_metrics:{period_days:30,sources:[],failure_reasons:[]}, 17624 readiness:{state:'untested',ready:false,max_age_hours:720,job:null}, 17625 readiness_summary:{all_ready:false,ready_count:0,total:2,domains:{}}, 17626 automation:{policy:{hub_key:'china_guide',auto_enabled:false,interval_hours:24,max_results:3,daily_run_limit:1,monthly_run_limit:30,failure_pause_threshold:3,consecutive_failures:0,paused_reason:'',paused_at:null},usage:{scheduled_today:0,standard_month:0,active_jobs:0,completed_month:0,failed_month:0,canary_month:0,input_tokens_month:0,output_tokens_month:0,total_tokens_month:0},decision:{ok:false,code:'domain_auto_disabled'}
17626,due:true,next_due_at:null,options:{interval_hours:[6,12,24,48,72,168],daily_run_limit:[1,2,3,4,6,12],monthly_run_limit:[4,8,12,20,30,60,90,120,200],failure_pause_threshold:[1,2,3,5]}} 17627 }); 17628 const researchForm=reactive({query_text:'',category_id:''}); 17629 const aiInput=ref(''); 17630 const aiMode=ref('describe'); 17631 const aiOutput=ref(''); 17632 const searxngLoaded=ref(false),searxngEnabled=ref(false),searxngUrl=ref(''),searxngSource=ref(''),searxngActive=ref(false),searxngSaving=ref(false),searxngTesting=ref(false),searxngTest=ref(null); 17633 const amapSecret=ref(''),amapOtp=ref(''),amapStepUpReady=ref(false),amapSaving=ref(false); 17634 const searchKeyProvider=ref('serper'),searchKeySecret=ref(''),searchKeySaving=ref(false); 17635 const deepseekSecret=ref(''),deepseekSaving=ref(false),deepseekTesting=ref(false),deepseekTest=ref(null); 17636 let canaryPoll=null; 17637 let standardPoll=null; 17638 const currentHub=computed(()=>AI_RESEARCH_HUB_OPTIONS.find(x=>x.key===selectedHub.value)||AI_RESEARCH_HUB_OPTIONS[0]); 17639 const activeStandardJob=computed(()=>safeArray(research.jobs).find(j=>String(j.run_kind||'standard')!=='canary'&&['queued','processing'].includes(String(j.status||'')))||null); 17640 const latestStandardJob=computed(()=>activeStandardJob.value||safeArray(research.jobs).find(j=>String(j.run_kind||'standard')!=='canary')||null); 17641 const visibleSuggestions=computed(()=>{ 17642 let rows=targetJob?research.suggestions.filter(s=>String(s.job_id||'')===targetJob):research.suggestions; 17643 const f=decisionFilter.value; 17644 if(f==='new')rows=rows.filter(s=>['pending','in_review'].includes(String(s.status||''))&&String(s.suggestion_kind||'')==='new_item'&&dedupStatus(s)!=='conflict'); 17645 else if(f==='update')rows=rows.filter(s=>['pending','in_review'].includes(String(s.status||''))&&String(s.suggestion_kind||'')==='update_existing'&&dedupStatus(s)!=='conflict'&&String(s.image_status||'')!=='ready'); 17646 else if(f==='image')rows=rows.filter(s=>['pending','in_review'].includes(String(s.status||''))&&String(s.image_status||'')==='ready'&&dedupStatus(s)!=='conflict'); 17647 else if(f==='high_risk')rows=rows.filter(s=>['pending','in_review'].includes(String(s.status||''))&&String(s.risk_level||'')==='high'&&dedupStatus(s)!=='conflict'); 17648 else if(f==='excluded')rows=rows.filter(s=>['pending','in_review'].includes(String(s.status||''))&&dedupStatus(s)==='conflict'); 17649 return rows; 17650 }); 17651 const canOperate=computed(()=>{ 17652 const role=String(store.state.me&&store.state.me.admin&&store.state.me.admin.role||''); 17653 return ['it_admin','super_admin','system_admin'].includes(role); 17654 }); 17655 function serviceOptions(){return AI_RESEARCH_SERVICE_OPTIONS[selectedHub.value]||AI_RESEARCH_SERVICE_OPTIONS.china_guide;} 17656 function modelOptions(current){return Array.from(new Set([String(current||''),'gpt-5.6-luna'].filter(Boolean)));} 17657 function researchStatusLabel(v){return ({pending:'Ø¬Ø¯ÙØ¯',in_review:'ÙÙØ¯ اÙ٠راجعة',approved:'٠عت٠د ÙÙ ÙØ´Ùر',rejected:'٠رÙÙØ¶',archived:'٠ؤرشÙ',queued:'ÙÙ Ø§ÙØ·Ø§Ø¨Ùر',processing:'ÙØ¨ØØ« Ø§ÙØ¢Ù',completed:'Ù ÙØªÙ Ù',failed:'ÙØ´Ù',cancelled:'Ù ÙØºÙ'}[String(v||'')])||String(v||'-');} 17658 function researchRiskLabel(v){return ({low:'Ù ÙØ®Ùض',standard:'عادÙ',high:'عاÙ٠اÙ٠خاطر'}[String(v||'')])||String(v||'-');} 17659 function suggestionKindLabel(v){return String(v||'')==='update_existing'?'استÙÙ Ø§Ù Ø¹ÙØµØ± Ù ÙØ¬Ùد':'Ø¥Ø¶Ø§ÙØ© Ø¬Ø¯ÙØ¯Ø©';} 17660 function gapReasonLabel(v){return ({missing_category:'ÙØ¦Ø© ÙØ§Ø±ØºØ©',thin_category:'ØªØºØ·ÙØ© ضعÙÙØ©',missing_fields:'Ø¨ÙØ§Ùات ÙØ§Ùصة',stale_information:'٠عÙÙÙ Ø© ÙØ¯ÙÙ Ø©',official_source:'٠صدر Ø±Ø³Ù Ù Ø£ÙØ¶Ù',correction:'تصØÙØ Ù Ø¹ÙÙÙ Ø©'}[String(v||'')])||'ÙØ¬ÙØ© Ù ØØªÙÙ';} 17661 function growthPriorityLabel(v){return ({urgent:'Ø¹Ø§Ø¬ÙØ©',high:'عاÙÙØ©',medium:'Ù ØªÙØ³Ø·Ø©',normal:'Ø¹Ø§Ø¯ÙØ©'}[String(v||'')])||'Ø¹Ø§Ø¯ÙØ©';} 17662 function growthKindLabel(v){return ({search_demand_gap:'Ø·ÙØ¨ Ø¨ÙØ§ ÙØªØ§Ø¦Ø¬',low_engagement:'ÙØªØ§Ø¦Ø¬ ØªØØªØ§Ø¬ ØªØØ³ÙÙ',empty_category:'ÙØ¦Ø© Ø¨ÙØ§ Ù ØØªÙÙ',thin_category:'ØªØºØ·ÙØ© ضعÙÙØ©',local_coverage_gap:'ÙØ¬ÙØ© Ù ØÙÙØ©',incomplete_item:'Ø¹ÙØµØ± ÙØØªØ§Ø¬ استÙ٠اÙ'}[String(v||'')])||'ÙØ±ØµØ© Ù ØØªÙÙ';} 17663 function growthEvidenceText(x){const e=x&&x.evidence||{};if(x&&x.kind==='search_demand_gap')return `${e.zero_result_count||0} بدÙÙ ÙØªÙجة${e.search_count?' Ù Ù '+e.search_count+' Ø¨ØØ«':''}`;if(x&&x.kind==='low_engagement')return `${e.result_open_count||0} ÙØªØ Ù Ù ${e.search_count||0} Ø¨ØØ«`;if(x&&x.kind==='local_coverage_gap')return `${e.item_count||0} ÙØªÙجة ØØ§ÙÙØ©`;
17663if(x&&['empty_category','thin_category'].includes(String(x.kind||'')))return `${e.item_count||0} Ø¹ÙØµØ± ØØ§ÙÙØ§Ù`;if(x&&x.kind==='incomplete_item')return `${safeArray(e.missing_fields).length} ØÙÙ ÙØØªØ§Ø¬ استÙ٠اÙ`;return '';} 17664 function freshnessStateLabel(v){return ({overdue:'٠تأخر Ø¹Ù Ø§ÙØªØÙÙ',due_soon:'ÙÙØªØ±Ø¨ Ù ÙØ¹Ø¯ Ø§ÙØªØÙÙ',unverified:'بدÙ٠تØÙÙ Ù ÙØ«Ù',source_missing:'اÙ٠صدر ÙØØªØ§Ø¬ استÙ٠اÙ',stale:'ÙØ¯ÙÙ '}[String(v||'')])||'ÙØØªØ§Ø¬ ٠راجعة';} 17665 function freshnessEvidenceText(x){const e=x&&x.evidence||{};if(Number(e.overdue_days)>0)return `٠تأخر ${e.overdue_days} ÙÙ٠· ÙØ§Ùذة Ø§ÙØªØÙÙ ${e.interval_days||'-'} ÙÙÙ `;if(Number(e.days_until_due)>0)return `٠تبÙÙ ${e.days_until_due} ÙÙ٠· ÙØ§Ùذة Ø§ÙØªØÙÙ ${e.interval_days||'-'} ÙÙÙ `;if(e.age_days!==null&&e.age_days!==undefined)return `آخر تØÙÙ ÙØ¨Ù ${e.age_days} ÙÙ٠· ÙØ§Ùذة Ø§ÙØªØÙÙ ${e.interval_days||'-'} ÙÙÙ `;return `ÙØ§Ùذة Ø§ÙØªØÙÙ ${e.interval_days||'-'} ÙÙÙ `; } 17666 function missingFieldLabel(v){return ({title_en:'Ø§ÙØ¹ÙÙØ§Ù Ø§ÙØ¥ÙجÙÙØ²Ù',title_zh:'Ø§ÙØ¹ÙÙØ§Ù Ø§ÙØµÙÙÙ',summary_ar:'اÙÙ ÙØ®Øµ',description_ar:'اÙÙØµÙ',city:'اÙ٠دÙÙØ©',source_url:'اÙ٠صدر',image:'Ø§ÙØµÙرة'}[String(v||'')])||String(v||'');} 17667 function missingFieldsText(item){return safeArray(item&&item.missing_fields).map(missingFieldLabel).join('Ø ');} 17668 function readinessLabel(v){return ({untested:'ÙÙ ÙÙØ®ØªØ¨Ø±',running:'Ø§ÙØ§Ø®ØªØ¨Ø§Ø± ÙØ¹Ù Ù',ready:'Ø¬Ø§ÙØ²',failed:'ÙØ´Ù Ø§ÙØ§Ø®ØªØ¨Ø§Ø±',partial:'ÙØªÙجة ØºÙØ± Ù ÙØªÙ ÙØ©',stale:'Ø§ÙØªÙت ØµÙØ§ØÙØ© Ø§ÙØ§Ø®ØªØ¨Ø§Ø±',configuration_changed:'تغÙÙØ± إعداد Ø§ÙØ§ØªØµØ§Ù'}[String(v||'')])||'ØºÙØ± Ø¬Ø§ÙØ²';} 17669 function readinessHelp(item){const state=String(item&&item.state||'untested');return ({untested:'شغÙ٠اختبارا٠ØÙØ§Ù Ù Ø¶Ø¨ÙØ·Ø§Ù ÙÙØªØ£Ùد Ù Ù Ø§ÙØ§ØªØµØ§Ù ÙØ§ÙØ¨ØØ« ÙØÙØ¸ اÙ٠صدر.',running:'ÙØªÙ Ø§ÙØ¢Ù تÙÙÙØ° Ø·ÙØ¨ ØÙ ÙØ§ØØ¯. Ø§ÙØªØ¸Ø± ظÙÙØ± اÙÙØªÙجة.',ready:'ÙØ¬Ø Ø§ÙØ§ØªØµØ§Ù ÙØ§ÙØ¨ØØ« باÙÙ ØµØ¯Ø±Ø ÙØ§ÙÙØªÙجة بÙÙØª Ù ØØ¬Ùرة ÙÙ٠راجعة Ø§ÙØ¨Ø´Ø±ÙØ©.',failed:'ÙÙ ÙÙØªÙ Ù Ø§ÙØ§Ø®ØªØ¨Ø§Ø±. راجع سبب اÙÙØ´Ù ÙÙ Ø¨Ø·Ø§ÙØ© اÙÙ ÙÙ Ø© ث٠أعد اÙÙ ØØ§ÙÙØ©.',partial:'Ø§ÙØªÙ ٠اتصا٠اÙÙ Ø²ÙØ¯ ÙÙÙ ÙÙ ØªØµÙ ÙØªÙجة Ù ÙØ«ÙØ© ÙØ§Ù ÙØ©Ø راجع اÙÙ ÙÙ Ø© ÙØ£Ø¹Ø¯ Ø§ÙØ§Ø®ØªØ¨Ø§Ø±.',stale:'Ù Ø±Ù Ø£ÙØ«Ø± Ù Ù 30 ÙÙ٠ا٠عÙ٠آخر اختبار ÙØ§Ø¬ØØ أعد Ø§ÙØ§Ø®ØªØ¨Ø§Ø± ÙØ¨Ù Ø§ÙØªØ´ØºÙÙ Ø§ÙØªÙÙØ§Ø¦Ù.',configuration_changed:'تغÙÙØ± اÙÙ ÙØªØ§Ø أ٠اÙÙ ÙØ¯ÙÙ Ø£Ù Ø³ÙØ§Ø³Ø© اÙ٠صادر بعد آخر Ø§Ø®ØªØ¨Ø§Ø±Ø Ø´ØºÙÙ Ø§Ø®ØªØ¨Ø§Ø±Ø§Ù Ø¬Ø¯ÙØ¯Ø§Ù ÙÙØ°Ø§ اÙÙØ³Ù .'}[state])||'شغÙ٠اختبار Ø§ÙØ¬Ø§ÙØ²ÙØ© ÙØ¨Ù Ø§ÙØªØ´ØºÙÙ Ø§ÙØªÙÙØ§Ø¦Ù.';} 17670 function automationStatusLabel(v){return ({within_budget:'Ø¬Ø§ÙØ² ÙÙØªØ´ØºÙÙ',research_disabled:'Ù ØØ±Ù Ø§ÙØ¨ØØ« ٠تÙÙÙ',global_auto_disabled:'اÙÙ ÙØªØ§Ø Ø§ÙØ¹Ø§Ù ٠تÙÙÙ',api_not_configured:'API Key ØºÙØ± Ù ÙØ¬Ùد',canary_readiness_required:'اختبار Ø§ÙØ¬Ø§ÙØ²ÙØ© Ù Ø·ÙÙØ¨',domain_auto_disabled:'جدÙ٠اÙÙØ³Ù ٠تÙÙÙ',not_due:'Ø¨Ø§ÙØªØ¸Ø§Ø± اÙÙ ÙØ¹Ø¯',policy_paused:'٠تÙÙÙ ÙÙØ§Ø¦ÙاÙ',active_job:'Ù ÙÙ Ø© ØªØ¹Ù Ù Ø§ÙØ¢Ù',daily_limit:'Ø§ÙØªÙ Ù ØØ¯ اÙÙÙÙ ',monthly_limit:'Ø§ÙØªÙ ٠سÙÙ Ø§ÙØ´Ùر'}[String(v||'')])||'ØºÙØ± Ø¬Ø§ÙØ²';} 17671 function pauseReasonLabel(v){return ({configuration_billing:'Ø§ÙØ±ØµÙد Ø£Ù ØØ¯ Ø§ÙØ¥ÙÙØ§Ù',configuration_authentication:'Ù ÙØªØ§Ø API ٠رÙÙØ¶',configuration_authorization:'ØµÙØ§ØÙØ© اÙÙ Ø´Ø±ÙØ¹',configuration_model:'اÙÙ ÙØ¯ÙÙ ØºÙØ± ٠تاØ',configuration_request:'Ø·ÙØ¨ اÙÙ Ø²ÙØ¯ ٠رÙÙØ¶',consecutive_failures:'Ø¥Ø®ÙØ§Ùات ٠تتاÙÙØ©'}[String(v||'')])||String(v||'سبب تشغÙÙÙ');} 17672 function formatTokens(v){const n=Math.max(0,Number(v)||0);return n>=1000000?(Math.round(n/100000)/10)+'M':n>=1000?(Math.round(n/100)/10)+'K':String(n);}
17673 function formatDuration(v){const ms=Number(v||0);return ms>0?(Math.round(ms/100)/10).toLocaleString('en-US')+' Ø«':'-';} 17674 function providerResearchStats(job,key){const u=job&&job.usage_json&&typeof job.usage_json==='object'?job.usage_json:{};const p=u.providers&&typeof u.providers==='object'?u.providers:{};return p&&p[key]&&typeof p[key]==='object'?p[key]:{};} 17675 function providerStatusLabel(p){return ({completed:'â Ø´Ø§Ø±Ù',failed:'تعذر',assist:'٠ساعد',skipped:'ØºÙØ± ٠ستخد٠'}[String(p&&p.status||'')])||'â';} 17676 // Job history keeps everything, but routine outcomes (readiness tests, old image-research tasks, 17677 // completed runs that produced nothing) are folded away by default so attention items stand out. 17678 const showAllJobs=ref(false); 17679 function jobIsRoutine(job){ 17680 if(!job||String(job.status||'')!=='completed')return false; 17681 if(job.run_kind==='canary')return true; 17682 if(/^(item image suggestion|image coverage completion)/i.test(String(job.query_text||'').trim()))return true; 17683 const merge=job.usage_json&&job.usage_json.merge||{}; 17684 return Number(job.result_count||0)===0&&!Number(merge.rejected_sources||0); 17685 } 17686 const visibleJobs=computed(()=>{const all=safeArray(research.jobs);return showAllJobs.value?all:all.filter(job=>!jobIsRoutine(job)||String(job.id)===targetJob);}); 17687 const routineJobCount=computed(()=>safeArray(research.jobs).filter(jobIsRoutine).length); 17688 // Completed jobs may carry counters in error_text (e.g. rejected_sources:4); that is not a failure. 17689 function researchJobHasFailure(job){return !!(job&&job.error_text)&&String(job.status||'')!=='completed';} 17690 function researchNoticeText(job){ 17691 const text=String(job&&job.error_text||'');const parts=[]; 17692 for(const token of text.split(/[,;\s]+/).filter(Boolean)){ 17693 const m=token.match(/^([a-z_]+):(\d+)$/);if(!m){parts.push(token);continue;} 17694 const n=Number(m[2]); 17695 parts.push(({rejected_sources:`رÙÙØ¶ ${n} Ù ÙØªØ±Ø ÙØ£Ù ٠صدر٠خارج اÙÙØ·Ø§Ùات اÙÙ Ø³Ù ÙØØ© أ٠ض٠٠اÙÙ ØØ¸Ùرة Ø£Ù ÙÙ ÙÙØ±Ø¬Ø¹Ù Ø§ÙØ¨ØØ«`,rejected_city_scope:`رÙÙØ¶ ${n} Ù ÙØªØ±Ø خارج ÙØ·Ø§Ù اÙ٠دÙÙØ©`,rejected_xai_policy:`رÙÙØ¶ ${n} Ù ÙØªØ±Ø Ù Ù Grok ÙØ¹Ø¯Ù Ù Ø·Ø§Ø¨ÙØ© Ø³ÙØ§Ø³Ø© اÙ٠صادر`,rejected_non_halal_restaurants:`رÙÙØ¶ ${n} Ù Ø·Ø¹Ù Ø¨ÙØ§ دÙÙÙ ØÙØ§Ù ÙØ§Ø¶Ø`}[m[1]])||token); 17696 } 17697 return parts.join('Ø '); 17698 } 17699 function researchFailureLabel(job){const key=String(job&&job.failure_class||'unknown');return ({billing:'Ù Ø´ÙÙØ© Ø±ØµÙØ¯ Ø£Ù ØØ¯ Ø¥ÙÙØ§Ù',authentication:'Ù Ø´ÙÙØ© ÙÙ Ù ÙØªØ§Ø OpenAI',authorization:'ØµÙØ§ØÙØ© اÙÙ Ø´Ø±ÙØ¹ ØºÙØ± ÙØ§ÙÙØ©',rate_limit:'ضغط Ù Ø¤ÙØª عÙÙ Ø§ÙØ·Ùبات',model:'اÙÙ ÙØ¯ÙÙ ØºÙØ± Ù ØªØ§Ø ÙÙÙ Ø´Ø±ÙØ¹',request:'إعداد Ø·ÙØ¨ Ø§ÙØ¨ØØ« ٠رÙÙØ¶',timeout:'Ø§ÙØªÙت Ù ÙÙØ© Ø§ÙØ¨ØØ«',provider:'Ø¹Ø·Ù Ù Ø¤ÙØª ÙØ¯Ù اÙÙ Ø²ÙØ¯',validation:'اÙÙØªÙجة Ø¨ÙØ§ ٠صادر ØµØ§ÙØØ©',unknown:'ÙØ´Ù ØºÙØ± ٠صÙÙ'}[key])||'ÙØ´Ù ØºÙØ± ٠صÙÙ';} 17700 function researchFailureHelp(job){const key=String(job&&job.failure_class||'unknown');return ({billing:'ØªØ£ÙØ¯ Ø£Ù API Key اÙÙ ØÙÙØ¸ تابع ÙÙÙØ³ اÙÙ Ø´Ø±ÙØ¹ Ø§ÙØ°Ù Ø£Ø¶ÙØª ÙÙ Ø§ÙØ±ØµÙØ¯Ø Ø«Ù Ø±Ø§Ø¬Ø¹ Billing ÙLimits ÙØ°Ù٠اÙÙ Ø´Ø±ÙØ¹.',authentication:'Ø£ÙØ´Ø¦ Ù ÙØªØ§ØØ§Ù Ø¬Ø¯ÙØ¯Ø§Ù داخ٠اÙÙ Ø´Ø±ÙØ¹ Ø§ÙØµØÙØ Ø«Ù Ø§ØÙظ٠٠٠إعدادات AI.',authorization:'راجع ØµÙØ§ØÙات اÙÙ ÙØªØ§Ø ÙØ¥ØªØ§ØØ© Web Search ÙØ§ÙÙ ÙØ¯Ù٠داخ٠اÙÙ Ø´Ø±ÙØ¹.',rate_limit:'Ø§ÙØªØ¸Ø± ÙÙÙÙØ§Ù ث٠أعد اÙÙ ØØ§ÙÙØ©Ø ÙØ°Ø§ Ø§ÙØ®Ø·Ø£ ÙØ§Ø¨Ù ÙÙØ§Ø³ØªØ±Ø¯Ø§Ø¯.',model:'اختر Ù ÙØ¯ÙÙ Ø¨ØØ« Ù ØªØ§ØØ§Ù ÙÙÙ Ø´Ø±ÙØ¹ أ٠راجع ØµÙØ§ØÙØ© اÙÙØµÙÙ.',request:'راجع إعدادات اÙÙ ÙØ¯ÙÙ ÙWeb Search ÙØ¨Ù إعادة اÙÙ ØØ§ÙÙØ©.',timeout:'أعد اÙÙ ØØ§ÙÙØ©Ø ÙØ¥Ø°Ø§ ØªÙØ±Ø± Ø§ÙØ®Ø·Ø£ راجع Ù ÙÙØ© Ø§ÙØ¨ØØ« ÙØ§ØªØµØ§Ù Ø§ÙØ®Ø§Ø¯Ù .',provider:'أعد اÙÙ ØØ§ÙÙØ© ÙØ§ØÙØ§Ù ÙØ£Ù Ø§ÙØ®Ø·Ø£ Ù Ø¤ÙØª ÙØ¯Ù اÙÙ Ø²ÙØ¯.',validation:'Ø¬Ø±ÙØ¨ Ù ÙØ¶ÙØ¹Ø§Ù Ø£ÙØ¶Ø ÙØ¹Ø·Ù Ø§ÙØ£ÙÙÙÙØ© ÙÙ٠صادر Ø§ÙØ±Ø³Ù ÙØ©.',unknown:'Ø§ÙØªØ Ø§ÙØªÙاصÙÙ Ø§ÙØªÙÙÙØ© ÙØ£Ø±Ø³Ù ر٠ز Ø§ÙØ®Ø·Ø£ Ù٠عرÙÙ Ø§ÙØ·Ùب ÙÙ٠راجعة.'}[key])||'راجع Ø§ÙØªÙاصÙÙ Ø§ÙØªÙÙÙØ© ÙØ¨Ù إعادة اÙÙ ØØ§ÙÙØ©.';} 17701 function suggestionSnapshot(s){return JSON.stringify(reviewEditFields.map(key=>[key,String((s&&s[key])??'')]));} 17702 function suggestionDirty(s){return String(s&&s.status||'')==='pending'&&String(s&&s._baseline||'')!==suggestionSnapshot(s);} 17703 function hydrateSuggestion(row){const s={...row,_useImage:String(row&&row.image_status||'')==='ready'&&!!row.image_url,_reviewChecks:{source_verified:false,content_verified:false,image_verified:false,publish_confirmed:false}};s._baseline=suggestionSnapshot(s);return s;} 17704 function imageStatusLabel(v){return ({pending:'Ø¨Ø§ÙØªØ¸Ø§Ø± Ø¬ÙØ¨ Ø§ÙØµÙرة',fetching:'ÙØ¬Ø±Ù Ø¬ÙØ¨ Ø§ÙØµÙرة',ready:'Ø§ÙØµÙرة Ø¬Ø§ÙØ²Ø© ÙÙ٠راجعة',not_found:'ÙÙ ÙØ¹Ø«Ø± اÙ٠صدر عÙÙ ØµÙØ±Ø© Ù ÙØ§Ø³Ø¨Ø©',failed:'تعذر تجÙÙØ² Ø§ÙØµÙرة'}[String(v||'')])||'ÙØ§ ØªÙØ¬Ø¯ ØµÙØ±Ø© Ù ÙØªØ±ØØ©';} 17705 function dedupStatus(s){ 17706 if(suggestionDirty(s))return 'unchecked'; 17707 if(String(s&&s.dedup_current_status||'')==='conflict')return 'conflict';
17708 if(String(s&&s.dedup_status||'')==='clear'&&!s.dedup_stale)return 'clear'; 17709 return 'unchecked'; 17710 } 17711 function dedupStatusLabel(s){return ({clear:'ÙØ§ ÙÙØ¬Ø¯ ØªÙØ±Ø§Ø±',conflict:'تعارض / ØªÙØ±Ø§Ø±',unchecked:'ÙØØªØ§Ø¬ ÙØØµØ§Ù'}[dedupStatus(s)])||'ÙØØªØ§Ø¬ ÙØØµØ§Ù';} 17712 function dedupReasonLabel(v){return ({generation_clear:'ÙØØµ Ø§ÙØ¥Ùشاء سÙÙÙ ',target_update_clear:'استÙÙ Ø§Ù Ø§ÙØ¹Ùصر اÙÙ ØØ¯Ø¯ دÙÙ ÙØ³Ø®Ù',no_duplicate:'ÙØ§ ÙÙØ¬Ø¯ تطابÙ',same_target:'Ù ÙØªØ±Ø آخر ÙØ³ØªÙد٠ÙÙØ³ Ø§ÙØ¹Ùصر',target_missing:'Ø§ÙØ¹Ùصر اÙÙ Ø³ØªÙØ¯Ù ÙÙ ÙØ¹Ø¯ Ù ÙØ¬ÙداÙ',no_new_information:'ÙØ§ ØªÙØ¬Ø¯ ٠عÙÙÙ Ø© Ø¬Ø¯ÙØ¯Ø©',inventory_duplicate:'تطاب٠٠ع Ø¹ÙØµØ± Ù ÙØ´Ùر',review_queue_duplicate:'تطاب٠٠ع Ù ÙØªØ±Ø ÙØ´Ø·',exact_contact:'Ø¨ÙØ§Ùات Ø§ØªØµØ§Ù Ù ØªØ·Ø§Ø¨ÙØ©',exact_source:'اÙ٠صدر ÙÙØ³Ù',semantic_match:'تشاب٠ÙÙÙ Ù٠اÙÙ ØØªÙÙ'}[String(v||'')])||'ÙØªÙجة اÙÙØØµ Ø§ÙØ¢ÙÙ';} 17713 function dedupMatchText(s){ 17714 if(s&&s.dedup_current_match_item_id)return `Ø§ÙØ¹Ùصر #${s.dedup_current_match_item_id} â ${s.dedup_current_match_item_title||'Ù ØØªÙÙ Ù ÙØ´Ùر'}`; 17715 if(s&&s.dedup_current_match_suggestion_id)return `اÙÙ ÙØªØ±Ø #${s.dedup_current_match_suggestion_id} â ${s.dedup_current_match_suggestion_title||'Ù ÙØªØ±Ø ÙØ´Ø·'}`; 17716 return ''; 17717 } 17718 function approvalChecksReady(s){const c=s&&s._reviewChecks||{};return c.source_verified===true&&c.content_verified===true&&c.publish_confirmed===true&&(!s._useImage||c.image_verified===true);} 17719 function canSubmitSuggestion(s){return String(s&&s.status||'')==='pending'&&!suggestionDirty(s)&&dedupStatus(s)==='clear';} 17720 function canApproveSuggestion(s){return String(s&&s.status||'')==='in_review'&&!s.review_content_changed&&dedupStatus(s)==='clear'&&approvalChecksReady(s)&&!(s.risk_level==='high'&&!canOperate.value);} 17721 function suggestionOpen(s){return String(openSuggestionId.value)===String(s&&s.id||'');} 17722 function toggleSuggestion(s){const id=String(s&&s.id||'');openSuggestionId.value=String(openSuggestionId.value)===id?'':id;} 17723 function suggestionReadiness(s){return {source:!!String(s&&s.source_url||'').trim(),image:String(s&&s.image_status||'')==='ready',dedup:dedupStatus(s)==='clear'};} 17724 function nextVisibleSuggestionId(excludeId){const row=visibleSuggestions.value.find(x=>String(x.id)!==String(excludeId||''));return row?String(row.id):'';} 17725 function applyResearch(rr){ 17726 research.suggestions=safeArray(rr.suggestions).map(hydrateSuggestion); 17727 research.jobs=safeArray(rr.jobs); 17728 research.stats=rr.stats||{total:0,pending:0,in_review:0,approved:0,rejected:0,high_risk:0,new_items:0,updates:0,dedup_conflicts:0,images_ready:0}; 17729 research.inventory=rr.inventory||{hub_key:selectedHub.value,digest:'',item_count:0,category_count:0,gap_count:0,thin_count:0,incomplete_count:0,demand_bucket_count:0,demand_total:0,coverage:[],gaps:[],thin:[],incomplete:[],demand:[],quality:[]}; 17730 research.image_coverage=rr.image_coverage||{hub_key:selectedHub.value,published:0,with_image:0,missing_image:0,weak_image:0,ai_generated:0,coverage_percent:100,missing_items:[]}; 17731 research.image_metrics=rr.image_metrics||{period_days:30,sources:[],failure_reasons:[]}; 17732 research.growth=rr.growth||{model_version:1,hub_key:selectedHub.value,total:0,summary:{urgent:0,high:0,medium:0,normal:0,demand_total:0,search_driven:0,coverage_driven:0},recommended:null,opportunities:[]}; 17733 research.freshness=rr.freshness||{model_version:1,hub_key:selectedHub.value,total:0,summary:{urgent:0,high:0,medium:0,normal:0,overdue:0,due_soon:0,unverified:0,source_missing:0,current:0},recommended:null,opportunities:[]}; 17734 research.policy=rr.policy||{}; 17735 const settings=rr.settings||{}; 17736 for(const key of ['enabled','allow_translate','allow_describe','allow_tags','research_enabled','research_auto','research_live_access','secondary_research_enabled','image_assistant_enabled','image_search_enabled','image_generate_enabled'])settings[key]=settings[key]===true||String(settings[key])==='true'; 17737 research.settings=settings; 17738 if(!searxngLoaded.value)loadSearxngSettings(); 17739 research.provider_state=rr.provider_state||{latest_failure:null}; 17740 research.readiness=rr.readiness||{state:'untested',ready:false,max_age_hours:720,job:null}; 17741 research.readiness_summary=rr.readiness_summary||{all_ready:false,ready_count:0,total:2,domains:{}}; 17742 research.automation=rr.automation||research.automation; 17743 if(research.automation&&research.automation.policy)research.automation.policy.auto_enabled=research.automation.policy.auto_enabled===true||String(research.automation.policy.auto_enabled)==='true'; 17744 } 17745 async function load(){ 17746 store.state.busy=true; 17747 const results=await Promise.all([ 17748 api('/api/admin/ai-research?hub='+encodeURIComponent(selectedHub.value)+'&status='+encodeURIComponent(suggestionStatus.value)+(targetSuggestion?'&suggestion='+encodeURIComponent(target
17748Suggestion):'')), 17749 api('/api/china-guide/categories?hub='+encodeURIComponent(selectedHub.value)) 17750 ]); 17751 const rr=results[0],content=results[1]; 17752 if(rr.status===401){store.state.busy=false;router.replace('/admin/login');return;} 17753 applyResearch(rr); 17754 categories.value=safeArray(content.categories); 17755 if(openSuggestionId.value&&!visibleSuggestions.value.some(x=>String(x.id)===String(openSuggestionId.value)))openSuggestionId.value=''; 17756 if(!openSuggestionId.value&&targetSuggestion&&visibleSuggestions.value.some(x=>String(x.id)===String(targetSuggestion)))openSuggestionId.value=String(targetSuggestion); 17757 store.state.busy=false; 17758 await nextTick(); 17759 const target=targetSuggestion?document.querySelector('[data-task-id="ai-suggestion-'+targetSuggestion.replace(/[^0-9]/g,'')+'"]'):(workspace.value==='jobs'&&targetJob?document.querySelector('[data-task-id="ai-job-'+targetJob.replace(/[^0-9]/g,'')+'"]'):null); 17760 if(target)target.scrollIntoView({behavior:'smooth',block:'center'}); 17761 } 17762 async function refreshResearch(){ 17763 const rr=await api('/api/admin/ai-research?hub='+encodeURIComponent(selectedHub.value)+'&status='+encodeURIComponent(suggestionStatus.value)); 17764 if(rr.status===401){router.replace('/admin/login');return false;} 17765 if(rr.ok)applyResearch(rr); 17766 return !!rr.ok; 17767 } 17768 function stopCanaryPoll(){if(canaryPoll){clearTimeout(canaryPoll);canaryPoll=null;}} 17769 function pollCanary(hub,attempt=0){ 17770 stopCanaryPoll(); 17771 if(hub!==selectedHub.value||attempt>=45)return; 17772 canaryPoll=setTimeout(async()=>{ 17773 if(hub!==selectedHub.value)return; 17774 await refreshResearch(); 17775 if(String(research.readiness.state)==='running')pollCanary(hub,attempt+1); 17776 },2000); 17777 } 17778 function stopStandardPoll(){if(standardPoll){clearTimeout(standardPoll);standardPoll=null;}} 17779 function hasActiveStandardJob(){return safeArray(research.jobs).some(job=>String(job.run_kind||'standard')!=='canary'&&['queued','processing'].includes(String(job.status||'')));} 17780 function pollStandard(hub,attempt=0){ 17781 stopStandardPoll(); 17782 if(hub!==selectedHub.value||attempt>=60)return; 17783 standardPoll=setTimeout(async()=>{ 17784 if(hub!==selectedHub.value)return; 17785 await refreshResearch(); 17786 if(hasActiveStandardJob())pollStandard(hub,attempt+1); 17787 },2000); 17788 } 17789 function selectHub(key){ 17790 if(!AI_RESEARCH_HUB_OPTIONS.some(item=>item.key===key)||selectedHub.value===key)return; 17791 stopCanaryPoll(); 17792 stopStandardPoll(); 17793 selectedHub.value=key; 17794 researchForm.category_id=''; 17795 router.replace({path:technicalRoute.value?'/admin/ai-operations':'/admin/ai-research',query:{hub:key,workspace:workspace.value}}).catch(()=>{}); 17796 if(suggestionStatus.value!=='pending')suggestionStatus.value='pending';else load(); 17797 } 17798 17799 async function selectDecisionFilter(key){ 17800 if(!['all','new','update','image','high_risk','excluded'].includes(key))return; 17801 decisionFilter.value=key; 17802 if(key==='excluded')suggestionStatus.value='all'; 17803 else if(!['pending','in_review','all'].includes(suggestionStatus.value))suggestionStatus.value='all'; 17804 router.replace({path:technicalRoute.value?'/admin/ai-operations':'/admin/ai-research',query:{...route.query,hub:selectedHub.value,workspace:'review',decision:key,status:suggestionStatus.value}}).catch(()=>{}); 17805 await load(); 17806 } 17807 function decisionFilterLabel(){return ({all:'Ù٠٠ا ÙØØªØ§Ø¬ ÙØ±Ø§Ø±Ù',new:'Ø¥Ø¶Ø§ÙØ§Øª Ø¬Ø¯ÙØ¯Ø©',update:'استÙ٠ا٠٠عÙÙ٠ات',image:'٠راجعة Ø§ÙØµÙر',high_risk:'عاÙÙØ© اÙ٠خاطر',excluded:'٠ستبعد تÙÙØ§Ø¦ÙاÙ'}[decisionFilter.value])||'Ù٠٠ا ÙØØªØ§Ø¬ ÙØ±Ø§Ø±Ù';} 17808 function selectWorkspace(key){ 17809 if(!allowedWorkspaces.includes(key)||workspace.value===key)return; 17810 workspace.value=key; 17811 router.replace({path:technicalRoute.value?'/admin/ai-operations':'/admin/ai-research',query:{...route.query,hub:selectedHub.value,workspace:key}}).catch(()=>{}); 17812 } 17813 async function runFreshnessOpportunity(x){ 17814 if(!canOperate.value){store.state.msg='إعادة Ø§ÙØªØÙÙ Ø¨Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙØ§Ø¹Ù Ù ØªØ§ØØ© ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§ ÙÙØ·';return;} 17815 if(!x||!x.key)return; 17816 if(!confirm(`إعادة Ø§ÙØªØÙÙ Ù Ù: ${x.title||'اÙÙ ØØªÙÙ'}Ø Ø³ÙØ¨ÙÙ Ø£Ù ØªØØ¯ÙØ« ÙÙ ØµÙØ¯Ù٠اÙ٠راجعة ÙÙÙ ÙÙÙØ´Ø± تÙÙØ§Ø¦ÙاÙ.`))return; 17817 store.state.busy=true; 17818 const r=await api('/api/admin/ai-research/freshness/run',{method:'POST',body:JSON.stringify({hub_key:selectedHub.value,opportunity_key:x.key})}); 17819 store.state.busy=false;store.state.msg=r.message||r.error||''; 17820 if(r.ok){await load();pollStandard(selectedHub.value);} 17821 } 17822 async function runGrowthOpportunity(x){ 17823 if(!canOperate.value){store.state.msg='تشغÙÙ Ø¨ØØ« ÙØ±Øµ اÙÙ ØØªÙÙ Ù ØªØ§Ø ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§ ÙÙØ·';return;} 17824 if(!x||!x.key)return; 17825 if(!confirm(`تشغÙÙ Ø¨ØØ« AI ÙÙØ°Ù اÙÙØ±ØµØ©: ${x.title||'ÙØ±ØµØ© اÙÙ ØØªÙÙ'}Ø Ø§ÙÙØªØ§Ø¦Ø¬ ستبÙÙ ÙÙ ØµÙØ¯Ù٠اÙ٠راجعة ÙÙ٠تÙÙØ´Ø± تÙÙØ§Ø¦ÙاÙ.`))return; 17826 store.state.busy=true; 17827 const r=await api('/api/admin/ai-research/opportunities/run',{method:'POST',body:JSON.stringify({hub_key:selectedHub.value,opportunity_key:x.key})}); 17828 store.state.busy=false;store.state.msg=r.message||r.error||''; 17829 if(r.ok){await load();pollStandard(selectedHub.value);} 17830 } 17831 async function runResearch(){ 17832 if(!canOperate.value){store.state.msg='تشغÙÙ Ø§ÙØ¨ØØ« Ù ØªØ§Ø ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§ ÙÙØ·';return;} 17833 const hub=selectedHub.value; 17834 store.state.busy=true; 17835 const r=await api('/api/admin/ai-research/jobs',{method:'POST',body:JSON.stringify({hub_key:hub,category_id:researchForm.category_id||null,query_text:researchForm.query_text||''})}); 17836 store.state.busy=false;store.state.msg=r.message||r.error||''; 17837 if(r.ok){researchForm.query_text='';workspace.value='jobs';await refreshResearch();pollStandard(hub);} 17838 } 17839 async function processResearch(){ 17840 if(!canOperate.value){store.state.msg='تشغÙÙ Ø§ÙØ·Ø§Ø¨Ùر Ù ØªØ§Ø ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§ ÙÙØ·';return;} 17841 const hub=selectedHub.value; 17842 store.state.busy=true;const r=await api('/api/admin/ai-research/process',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||''; 17843 if(r.ok){await refreshResearch();pollStandard(hub);} 17844 } 17845 async function runCanary(){ 17846 if(!canOperate.value){store.state.msg='اختبار Ø§ÙØ¬Ø§ÙØ²ÙØ© Ù ØªØ§Ø ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§ ÙÙØ·';return;} 17847 if(!confirm('Ø³ÙØªÙ Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨ Ø¨ØØ« ØÙ ÙØ§ØØ¯ ٠دÙÙØ¹ ÙØ¥Ø±Ø¬Ø§Ø¹ Ù ÙØªØ±Ø ÙØ§ØØ¯ ÙÙØ· Ø¥ÙÙ ØµÙØ¯Ù٠اÙ٠راجعة. ÙÙ ØªØ±ÙØ¯ اÙ٠تابعةØ'))return; 17848 const hub=selectedHub.value; 17849 store.state.busy=true; 17850 const r=await api('/api/admin/ai-research/canary',{method:'POST',body:JSON.stringify({hub_key:hub})}); 17851 store.state.busy=false;store.state.msg=r.message||r.error||''; 17852 if(r.ok){workspace.value='jobs';await refreshResearch();pollCanary(hub);} 17853 } 17854 async function saveResearchSuggestion(s){ 17855 if(String(s&&s.status||'')!=='pending'){store.state.msg='Ø§ÙØªØ¹Ø¯ÙÙ Ù ØªØ§Ø Ù٠٠رØÙØ© اÙÙ Ø³ÙØ¯Ø© ÙÙØ·';return;} 17856 store.state.busy=true;const r=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(s.id)+'/update',{method:'POST',body:JSON.stringify(s)});store.state.busy=false;store.state.msg=r.message||r.error||''; 17857 if(r.ok)await load(); 17858 } 17859 async function checkResearchDuplicate(s){ 17860 if(suggestionDirty(s)){store.state.msg='اØÙظ تعدÙÙØ§Øª اÙÙ Ø³ÙØ¯Ø© Ø£ÙÙØ§Ù ØØªÙ ÙÙØØµ اÙÙØ¸Ø§Ù ÙÙØ³ اÙÙ ØØªÙÙ Ø§ÙØ¸Ø§Ùر أ٠ا٠Ù';return;} 17861 store.state.busy=true; 17862 const r=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(s.id)+'/dedup-check',{method:'POST'}); 17863 store.state.busy=false;store.state.msg=r.message||r.error||''; 17864 if(r.ok||r.report)await load(); 17865 } 17866 async function saveAndCheckSuggestion(s){ 17867 if(String(s&&s.status||'')!=='pending'){store.state.msg='اÙÙØØµ Ù ØªØ§Ø Ù٠٠رØÙØ© اÙÙ Ø³ÙØ¯Ø© ÙÙØ·';return;} 17868 store.state.busy=true; 17869 if(suggestionDirty(s)){ 17870 const saved=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(s.id)+'/update',{method:'POST',body:JSON.stringify(s)}); 17871 if(!saved.ok){store.state.busy=false;store.state.msg=saved.message||saved.error||'تعذر ØÙظ اÙÙ Ø³ÙØ¯Ø©';return;} 17872 } 17873 const checked=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(s.id)+'/dedup-check',{method:'POST'}); 17874 store.state.busy=false;store.state.msg=checked.message||checked.error||''; 17875 if(checked.ok||checked.report)await load(); 17876 } 17877 async function refreshResearchImage(s){ 17878 if(String(s&&s.status||'')!=='pending'){store.state.msg='إعادة Ø¬ÙØ¨ Ø§ÙØµÙرة Ù ØªØ§ØØ© ÙØ¨Ù إرسا٠اÙÙ ÙØªØ±Ø ÙÙ٠راجعة';return;} 17879 store.state.busy=true; 17880 const r=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(s.id)+'/image/refresh',{method:'POST'}); 17881 store.state.busy=false;store.state.msg=r.message||r.error||''; 17882 await load(); 17883 } 17884 async function reviewResearchSuggestion(s,action){ 17885 let note=s.admin_note||''; 17886 if(action==='reject'){note=prompt('سبب Ø±ÙØ¶ اÙÙ ÙØªØ±Ø:')||'';if(!note)return;} 17887 if(action==='return'){note=prompt('٠ا Ø§ÙØªØ¹Ø¯Ù٠اÙÙ Ø·ÙÙØ¨ ÙØ¨Ù إعادة اÙ٠راجعةØ')||'';if(!note)return;} 17888 if(action==='submit'){ 17889 if(suggestionDirty(s)){store.state.msg='ÙÙØ§Ù تعدÙÙØ§Øª ØºÙØ± Ù ØÙÙØ¸Ø©Ø اØÙظ اÙÙ Ø³ÙØ¯Ø© Ø£ÙÙØ§Ù';return;} 17890 if(dedupStatus(s)!=='clear'){store.state.msg='ÙÙÙØ° ÙØØµ Ø§ÙØªÙرار Ø£ÙÙØ§Ù ØØªÙ ØªØØµÙ عÙÙ Ø´ÙØ§Ø¯Ø© سÙÙÙ Ø©';return;} 17891 } 17892 if(action==='approve'){ 17893 if(!approvalChecksReady(s)){store.state.msg=s._useImage?'Ø£Ù٠٠تØÙ٠اÙ٠صدر ÙØ§ÙÙ ØØªÙÙ ÙØ§ÙØµÙØ±Ø© ÙØªØ£ÙÙØ¯ اÙÙØ´Ø±':'Ø£Ù٠٠تØÙ٠اÙ٠صدر ÙØ§ÙÙ ØØªÙÙ ÙØªØ£ÙÙØ¯ اÙÙØ´Ø±';return;} 17894 if(s.review_content_changed){store.state.msg='تغÙÙØ± اÙÙ ØØªÙ٠بعد Ø§ÙØ¥Ø±Ø³Ø§ÙØ Ø£Ø¹Ø¯Ù ÙÙÙ Ø³ÙØ¯Ø© Ø«Ù Ø±Ø§Ø¬Ø¹Ù Ù Ù Ø¬Ø¯ÙØ¯';return;} 17895 if(dedupStatus(s)!=='clear'){store.state.msg='Ø´ÙØ§Ø¯Ø© Ù ÙØ¹ Ø§ÙØªÙرار ØªØØªØ§Ø¬ ØªØØ¯ÙØ«Ø§Ù ÙØ¨Ù Ø§ÙØ§Ø¹ØªÙ اد';return;} 17896 const message=String(s.suggestion_kind||'')==='update_existing' 17897 ?`تأÙÙØ¯ ÙÙØ§Ø¦Ù: Ø³ÙØ¹Ùد اÙÙØ¸Ø§Ù ÙØØµ Ø§ÙØ¯ÙÙÙ ÙØ§ÙÙ ÙØªØ±ØØ§ØªØ Ø«Ù ÙØ³ØªÙ٠٠«${s.target_item_title||s.title_ar||'Ø§ÙØ¹Ùصر'}» داخ٠ÙÙØ³ اÙÙ Ø¹Ø§Ù ÙØ© دÙÙ Ø¨Ø·Ø§ÙØ© Ø¬Ø¯ÙØ¯Ø©. ٠تابعةØ` 17898 :'تأÙÙØ¯ ÙÙØ§Ø¦Ù: Ø³ÙØ¹Ùد اÙÙØ¸Ø§Ù ÙØØµ Ø§ÙØ¯ÙÙÙ ÙØ§ÙÙ ÙØªØ±ØØ§Øª داخ٠ÙÙØ³ اÙÙ Ø¹Ø§Ù ÙØ©Ø ÙÙÙ ÙÙØ´Ø± Ø¥ÙØ§ إذا بÙÙØª اÙÙØªÙجة ØºÙØ± Ù ÙØ±Ø±Ø©. ٠تابعةØ'; 17899 if(!confirm(message))return; 17900 } 17901 if(action==='archive'&&!confirm('Ø£Ø±Ø´ÙØ© ÙØ°Ø§ Ø§ÙØ³Ø¬Ù Ù Ù ØµÙØ¯Ù٠اÙ٠راجعةØ'))return; 17902 const checks=s._reviewChecks||{}; 17903 const submittedId=String(s.id);const nextId=action==='submit'?nextVisibleSuggestionId(submittedId):''; 17904 submittingSuggestionId.value=action==='submit'?submittedId:'';store.state.busy=true; 17905 const r=await api('/api/admin/ai-research/suggestions/'+encodeURIComponent(s.id)+'/review',{method:'POST',body:JSON.stringify({action,note, 17906 source_verified:checks.source_verified===true,content_verified:checks.content_verified===true,use_suggested_image:s._useImage===true, 17907 image_verified:checks.image_verified===true,publish_confirmed:checks.publish_confirmed===true})}); 17908 store.state.busy=false;submittingSuggestionId.value='';store.state.msg=r.message||r.error||''; 17909 if(r.ok){if(action==='submit')openSuggestionId.value=nextId;await load();} 17910 } 17911 async function retryResearchJob(job){if(!canOperate.value)return;const hub=selectedHub.value;store.state.busy=true;const r=await api('/api/admin/ai-research/jobs/'+encodeURIComponent(job.id)+'/retry',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){await refreshResearch();pollStandard(hub);}} 17912 async function cancelResearchJob(job){if(!canOperate.value||!confirm('Ø¥ÙØºØ§Ø¡ Ù ÙÙ Ø© Ø§ÙØ¨ØØ«Ø'))return;store.state.busy=true;const r=await api('/api/admin/ai-research/jobs/'+encodeURIComponent(job.id)+'/cancel',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)await load();} 17913 async function saveAutomation(resume=false){ 17914 if(!canOperate.value)return; 17915 const policy=research.automation&&research.automation.policy||{}; 17916 if(resume&&!confirm('Ø§Ø³ØªØ¦ÙØ§Ù ÙØ°Ø§ اÙÙØ·Ø§Ù Ø³ÙØµÙر عداد Ø§ÙØ¥Ø®ÙØ§ÙØ§Øª ÙÙØ¹Ùد تشغÙ٠جدÙÙÙ ØØ³Ø¨ Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª Ø§ÙØØ§ÙÙØ©. ٠تابعةØ'))return; 17917 if(!resume&&policy.auto_enabled&&!confirm(`ØªÙØ¹Ù٠جدÙÙ ${currentHub.value.short}: Ø³ÙØ´ØºÙÙ Ø¨ØØ«Ø§Ù ٠دÙÙØ¹Ø§Ù ØØ³Ø¨ اÙÙØ§ØµÙ ÙØ§ÙسÙ٠اÙÙ ØØ¯Ø¯ÙÙØ ÙÙ٠اÙÙØ´Ø± Ø³ÙØ¨ÙÙ ÙØ¯ÙÙØ§Ù. ٠تابعةØ`))return; 17918 store.state.busy=true; 17919 const r=await api('/api/admin/ai-research/domain-policy',{method:'POST',body:JSON.stringify({hub_key:selectedHub.value, 17920 auto_enabled:policy.auto_enabled===true,interval_hours:Number(policy.interval_hours),max_results:Number(policy.max_results), 17921 daily_run_limit:Number(policy.daily_run_limit),monthly_run_limit:Number(policy.monthly_run_limit), 17922 failure_pause_threshold:Number(policy.failure_pause_threshold),resume:resume===true})}); 17923 store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)await load(); 17924 } 17925 async function saveAi(){if(!canOperate.value)return;store.state.busy=true;const r=await api('/api/admin/china-guide/ai-settings',{method:'POST',body:JSON.stringify(research.settings||{})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ai){const settings=r.ai;for(const key of ['enabled','allow_translate','allow_describe','allow_tags','research_enabled','research_auto','research_live_access','secondary_research_enabled','image_assistant_enabled','image_search_enabled','image_generate_enabled'])settings[key]=settings[key]===true||String(settings[key])==='true';research.settings=settings;}if(r.readiness_summary)research.readiness_summary=r.readiness_summary;if(r.ok)await load();} 17926 async function requestAmapStepUp(){const r=await api('/api/admin/security/step-up/request',{method:'POST',body:'{}'});store.state.msg=r.message||r.error||'';} 17927 async function verifyAmapStepUp(){const code=String(amapOtp.value||'').trim();if(!/^\d{6}$/.test(code)){store.state.msg='أدخ٠ر٠ز OTP Ù Ù 6 Ø£Ø±ÙØ§Ù ';return;}const r=await api('/api/admin/security/step-up/verify',{method:'POST',body:JSON.stringify({code})});store.state.msg=r.message||r.error||'';amapStepUpReady.value=!!r.ok;if(r.ok)amapOtp.value='';} 17928 function applySearxngSettings(value){const v=value||{};searxngEnabled.value=v.enabled===true;searxngUrl.value=String(v.base_url||'');searxngSource.value=String(v.source||'');searxngActive.value=v.active===true;} 17929 async function loadSearxngSettings(){const r=await api('/api/admin/route-search/searxng');if(!r||!r.ok){searxngLoaded.value=false;return;}applySearxngSettings(r.settings);searxngLoaded.value=true;} 17930 async function saveSearxngSettings(){if(searxngSaving.value)return;searxngSaving.value=true;const r=await api('/api/admin/route-search/searxng',{method:'POST',body:JSON.stringify({enabled:searxngEnabled.value,base_url:searxngUrl.value.trim()})});searxngSaving.value=false;store.state.msg=(r&&r.message)||'تعذر
17930 ØÙظ إعدادات SearXNG';if(r&&r.ok)applySearxngSettings(r.settings);} 17931 async function testSearxngConnection(){if(searxngTesting.value)return;searxngTesting.value=true;searxngTest.value=null;const r=await api('/api/admin/route-search/searxng/test',{method:'POST',body:JSON.stringify({base_url:searxngUrl.value.trim()})});searxngTesting.value=false;if(!r||!r.ok){searxngTest.value={ok:false,message:(r&&r.message)||'تعذر تÙÙÙØ° Ø§ÙØ§Ø®ØªØ¨Ø§Ø±'};return;}searxngTest.value=r.test;} 17932 async function saveAmapSecret(){const secret=String(amapSecret.value||'').trim();if(!amapStepUpReady.value){store.state.msg='Ø£ÙØ¯ اÙÙÙÙØ© بر٠ز OTP Ø£ÙÙØ§Ù';return;}if(secret.length<8){store.state.msg='Ø£Ø¯Ø®Ù Ù ÙØªØ§Ø Amap Web Service Ø§ÙØµØÙØ';return;}amapSaving.value=true;const configured=!!research.settings.amap_api_key_configured;const path=configured?'/api/admin/security/secrets/'+encodeURIComponent('amap.api_key')+'/replace':'/api/admin/security/secrets';const body=configured?{secret}:{secret_key:'amap.api_key',secret};const r=await api(path,{method:'POST',body:JSON.stringify(body)});amapSaving.value=false;store.state.msg=r.ok?'ت٠ØÙظ Ù ÙØªØ§Ø Amap بأ٠اÙ':(r.message||r.code||r.error||'تعذر ØÙظ اÙÙ ÙØªØ§Ø');if(r.ok){amapSecret.value='';amapStepUpReady.value=false;await load();}} 17933 async function saveDeepseekSecret(){const secret=String(deepseekSecret.value||'').trim();if(!amapStepUpReady.value){store.state.msg='Ø£ÙØ¯ اÙÙÙÙØ© بر٠ز OTP Ø£ÙÙØ§Ù';return;}if(secret.length<20){store.state.msg='Ø£Ø¯Ø®Ù Ù ÙØªØ§Ø DeepSeek Ø§ÙØµØÙØ';return;}deepseekSaving.value=true;const configured=!!research.settings.deepseek_api_key_configured;const path=configured?'/api/admin/security/secrets/'+encodeURIComponent('deepseek.api_key')+'/replace':'/api/admin/security/secrets';const body=configured?{secret}:{secret_key:'deepseek.api_key',secret};const r=await api(path,{method:'POST',body:JSON.stringify(body)});deepseekSaving.value=false;store.state.msg=r.ok?'ت٠ØÙظ Ù ÙØªØ§Ø DeepSeek بأ٠اÙ':(r.message||r.code||r.error||'تعذر ØÙظ اÙÙ ÙØªØ§Ø');if(r.ok){deepseekSecret.value='';amapStepUpReady.value=false;await load();}} 17934 async function saveSearchKey(){const secret=String(searchKeySecret.value||'').trim();if(!amapStepUpReady.value){store.state.msg='Ø£ÙØ¯ اÙÙÙÙØ© بر٠ز OTP Ø£ÙÙØ§Ù';return;}if(secret.length<10){store.state.msg='Ø£Ø¯Ø®Ù Ù ÙØªØ§Ø ٠زÙÙØ¯ Ø§ÙØ¨ØØ«';return;}const name=searchKeyProvider.value+'.api_key';searchKeySaving.value=true;const configured=!!(research.settings.search_keys_configured&&research.settings.search_keys_configured[searchKeyProvider.value]);const path=configured?'/api/admin/security/secrets/'+encodeURIComponent(name)+'/replace':'/api/admin/security/secrets';const body=configured?{secret}:{secret_key:name,secret};const r=await api(path,{method:'POST',body:JSON.stringify(body)});searchKeySaving.value=false;store.state.msg=r.ok?'ت٠ØÙظ Ù ÙØªØ§Ø Ø§ÙØ¨ØØ« بأ٠اÙ':(r.message||r.code||r.error||'تعذر ØÙظ اÙÙ ÙØªØ§Ø');if(r.ok){searchKeySecret.value='';amapStepUpReady.value=false;await load();}} 17935 async function testDeepseek(){if(deepseekTesting.value)return;deepseekTesting.value=true;deepseekTest.value=null;const r=await api('/api/admin/ai-research/deepseek/test',{method:'POST',body:'{}',feedback:false});deepseekTesting.value=false;deepseekTest.value=r&&typeof r==='object'?r:{ok:false,message:'تعذر تÙÙÙØ° Ø§ÙØ§Ø®ØªØ¨Ø§Ø±'};} 17936 async function generateAi(){if(!aiInput.value){store.state.msg='Ø§ÙØªØ¨ ٠عÙÙ٠ات Ø£ÙÙØ§Ù';return;}store.state.busy=true;const r=await api('/api/admin/china-guide/ai-draft',{method:'POST',body:JSON.stringify({input:aiInput.value,mode:aiMode.value})});store.state.busy=false;store.state.msg=r.message||r.error||'';aiOutput.value=r.output||'';} 17937 async function runImageCompletion(){ 17938 if(!canOperate.value||store.state.busy)return; 17939 const missing=Number(research.image_coverage&&research.image_coverage.missing_image||0); 17940 if(!missing){store.state.msg='ÙØ§ ØªÙØ¬Ø¯ Ø¹ÙØ§ØµØ± Ù ÙØ´Ùرة بدÙÙ ØµÙØ± ÙÙ ÙØ°Ø§ اÙÙØ³Ù ';return;} 17941 const limit=Math.max(1,Math.min(20,Number(research.settings.image_batch_limit||5)||5)); 17942 if(!confirm(`Ø³ÙØ¬Ùز اÙÙØ¸Ø§Ù ØØªÙ ${limit} Ø¹ÙØ§ØµØ± بدÙÙ ØµÙØ± ÙÙ٠راجعة. ÙÙ ÙÙØ´Ø± Ø£Ù ØµÙØ±Ø© تÙÙØ§Ø¦ÙاÙ. ٠تابعةØ`))return; 17943 store.state.busy=true; 17944 const r=await api('/api/admin/ai-research/image-completion/run',{method:'POST',body:JSON.stringify({hub_key:selectedHub.value,limit})}); 17945 store.state.busy=false;store.state.msg=r.message||r.error||''; 17946 if(r.ok){workspace.value='review';suggestionStatus.value='pending';await load();} 17947 } 17948 onMounted(async()=>
17948{if(await store.requireAdmin(router)){await load();if(hasActiveStandardJob())pollStandard(selectedHub.value);}}); 17949 onUnmounted(()=>{stopCanaryPoll();stopStandardPoll();}); 17950 watch(suggestionStatus,load); 17951 watch(()=>route.path,()=>{const allowed=technicalRoute.value?['jobs','settings']:['review','freshness','growth','inventory'];if(!allowed.includes(workspace.value))workspace.value=technicalRoute.value?'jobs':'review';}); 17952 watch(()=>String((route.query||{}).workspace||''),(value)=>{const normalized=value==='suggestions'?'review':value;if(allowedWorkspaces.includes(normalized))workspace.value=normalized;}); 17953 return {searchKeyProvider,searchKeySecret,searchKeySaving,saveSearchKey,deepseekSecret,deepseekSaving,deepseekTesting,deepseekTest,saveDeepseekSecret,testDeepseek,showAllJobs,visibleJobs,routineJobCount,researchJobHasFailure,researchNoticeText,searxngLoaded,searxngEnabled,searxngUrl,searxngSource,searxngActive,searxngSaving,searxngTesting,searxngTest,saveSearxngSettings,testSearxngConnection,store,selectedHub,workspace,suggestionStatus,decisionFilter,targetSuggestion,targetJob,visibleSuggestions,openSuggestionId,submittingSuggestionId,categories,research,researchForm,aiInput,aiMode,aiOutput,amapSecret,amapOtp,amapStepUpReady,amapSaving,currentHub,activeStandardJob,latestStandardJob,canOperate,technicalRoute,pageTitle,selectHub,selectWorkspace,selectDecisionFilter,decisionFilterLabel,serviceOptions,modelOptions,researchStatusLabel,researchRiskLabel,suggestionKindLabel,gapReasonLabel,growthPriorityLabel,growthKindLabel,growthEvidenceText,freshnessStateLabel,freshnessEvidenceText,missingFieldLabel,missingFieldsText,imageStatusLabel,safeImageErrorText,readinessLabel,readinessHelp,automationStatusLabel,pauseReasonLabel,formatTokens,formatDuration,providerResearchStats,providerStatusLabel,researchFailureLabel,researchFailureHelp,suggestionDirty,dedupStatus,dedupStatusLabel,dedupReasonLabel,dedupMatchText,approvalChecksReady,canSubmitSuggestion,canApproveSuggestion,suggestionOpen,toggleSuggestion,suggestionReadiness,load,runFreshnessOpportunity,runGrowthOpportunity,runResearch,processResearch,runCanary,saveResearchSuggestion,checkResearchDuplicate,saveAndCheckSuggestion,refreshResearchImage,reviewResearchSuggestion,retryResearchJob,cancelResearchJob,saveAutomation,saveAi,requestAmapStepUp,verifyAmapStepUp,saveAmapSecret,generateAi,runImageCompletion,shortDate,AI_RESEARCH_HUB_OPTIONS}; 17954 }, 17955 render:(function(){ 17956const _Vue = Vue 17957const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 17958 17959const _hoisted_1 = { class: "card aiCenterHero aiContentOpsHero" } 17960const _hoisted_2 = { class: "vueBadge" } 17961const _hoisted_3 = ["onClick"] 17962const _hoisted_4 = { 17963 class: "card aiHubSelector", 17964 "aria-label": "Ø§Ø®ØªÙØ§Ø± ÙØ³Ù Ø§ÙØ¨ØØ«" 17965} 17966const _hoisted_5 = ["onClick"] 17967const _hoisted_6 = ["aria-label"] 17968const _hoisted_7 = ["onClick"] 17969const _hoisted_8 = { class: "aiCenterNavCopy" } 17970const _hoisted_9 = ["onClick"] 17971const _hoisted_10 = { class: "aiCenterNavCopy" } 17972const _hoisted_11 = ["onClick"] 17973const _hoisted_12 = { class: "aiCenterNavCopy" } 17974const _hoisted_13 = ["onClick"] 17975const _hoisted_14 = { class: "aiCenterNavCopy" } 17976const _hoisted_15 = ["onClick"] 17977const _hoisted_16 = ["onClick"] 17978const _hoisted_17 = { 17979 key: 0, 17980 class: "card aiGrowthPanel" 17981} 17982const _hoisted_18 = { class: "aiInventoryHead" } 17983const _hoisted_19 = { class: "statusPill" } 17984const _hoisted_20 = { class: "aiGrowthSummary" } 17985const _hoisted_21 = { 17986 key: 0, 17987 class: "aiGrowthList" 17988} 17989const _hoisted_22 = { class: "aiGrowthRank" } 17990const _hoisted_23 = { key: 0 } 17991const _hoisted_24 = { class: "aiGrowthBody" } 17992const _hoisted_25 = { class: "vueBadge" } 17993const _hoisted_26 = ["onClick"] 17994const _hoisted_27 = { 17995 key: 1, 17996 class: "hint" 17997} 17998const _hoisted_28 = { 17999 key: 1, 18000 class: "card aiGrowthPanel" 18001} 18002const _hoisted_29 = { class: "aiInventoryHead" } 18003const _hoisted_30 = { class: "statusPill" } 18004const _hoisted_31 = { class: "aiGrowthSummary" } 18005const _hoisted_32 = { 18006 key: 0, 18007 class: "aiGrowthList" 18008} 18009const _hoisted_33 = { class: "aiGrowthRank" } 18010const _hoisted_34 = { key: 0 } 18011const _hoisted_35 = { class: "aiGrowthBody" } 18012const _hoisted_36 = { class: "vueBadge" } 18013const _hoisted_37 = { key: 0 } 18014const _hoisted_38 = { class: "row" } 18015const _hoisted_39 = ["onClick"] 18016const _hoisted_40 = { 18017 key: 1, 18018 class: "hint" 18019} 18020const _hoisted_41 = { 18021 key: 2, 18022 class: "card aiInventoryPanel" 18023} 18024const _hoisted_42 = { class: "aiInventoryHead" } 18025const _hoisted_43 = { class: "aiInventoryMetrics" } 18026const _hoisted_44 = { class: "aiImageCoverageCard" } 18027const _hoisted_45 = { class: "hint" } 18028const _hoisted_46 = ["disabled", "onClick"] 18029const _hoisted_47 = { 18030 key: 0, 18031 class: "aiInventoryDetails" 18032} 18033const _hoisted_48 = { class: "aiIncompleteList" } 18034const _hoisted_49 = { 18035 key: 1, 18036 class: "hint" 18037} 18038const _hoisted_50 = { class: "aiInventoryDetails" } 18039const _hoisted_51 = { class: "aiCoverageGrid" } 18040const _hoisted_52 = { 18041 key: 0, 18042 class: "aiIncompleteList" 18043} 18044const _hoisted_53 = { 18045 key: 1, 18046 class: "aiIncompleteList" 18047} 18048const _hoisted_54 = { 18049 key: 2, 18050 class: "aiIncompleteList" 18051} 18052const _hoisted_55 = { 18053 key: 3, 18054 class: "aiDecisionWorkspace" 18055} 18056const _hoisted_56 = { class: "card aiDecisionNow" } 18057const _hoisted_57 = { class: "aiCenterMetrics aiContentOpsMetrics aiDecisionMetrics" } 18058const _hoisted_58 = ["onClick"] 18059const _hoisted_59 = ["onClick"] 18060const _hoisted_60 = ["onClick"] 18061const _hoisted_61 = ["onClick"] 18062const _hoisted_62 = { class: "card aiSystemHistory" } 18063const _hoisted_63 = ["onClick"] 18064const _hoisted_64 = { 18065 key: 4, 18066 class: "card errorCard aiProviderAlert", 18067 role: "alert" 18068} 18069const _hoisted_65 = { 18070 key: 5,
18071 class: "aiCenterPanel" 18072} 18073const _hoisted_66 = { class: "card aiSectionLead" } 18074const _hoisted_67 = { class: "vueBadge" } 18075const _hoisted_68 = { class: "hint" } 18076const _hoisted_69 = { class: "row" } 18077const _hoisted_70 = ["onClick"] 18078const _hoisted_71 = ["onClick"] 18079const _hoisted_72 = { 18080 key: 0, 18081 class: "card aiApprovalGuide aiApprovalGuideDisclosure" 18082} 18083const _hoisted_73 = { class: "segmented aiResearchFilters" } 18084const _hoisted_74 = ["onClick"] 18085const _hoisted_75 = ["onClick"] 18086const _hoisted_76 = ["onClick"] 18087const _hoisted_77 = ["onClick"] 18088const _hoisted_78 = ["onClick"] 18089const _hoisted_79 = { 18090 key: 1, 18091 class: "card aiQueuePurpose" 18092} 18093const _hoisted_80 = { 18094 key: 2, 18095 class: "card aiQueuePurpose" 18096} 18097const _hoisted_81 = { 18098 key: 3, 18099 class: "card aiQueuePurpose system" 18100} 18101const _hoisted_82 = { 18102 key: 4, 18103 class: "card emptyCard" 18104} 18105const _hoisted_83 = ["data-task-id"] 18106const _hoisted_84 = ["aria-expanded", "onClick"] 18107const _hoisted_85 = { class: "aiSuggestionNumber" } 18108const _hoisted_86 = { class: "aiQueueReadiness" } 18109const _hoisted_87 = { class: "aiSuggestionSummaryState" } 18110const _hoisted_88 = { class: "statusPill" } 18111const _hoisted_89 = { "aria-hidden": "true" } 18112const _hoisted_90 = { 18113 key: 0, 18114 class: "aiSuggestionBody" 18115} 18116const _hoisted_91 = { class: "aiSuggestionMeta" } 18117const _hoisted_92 = { class: "statusPill" } 18118const _hoisted_93 = { 18119 key: 0, 18120 class: "statusPill canaryPill" 18121} 18122const _hoisted_94 = { class: "statusPill" } 18123const _hoisted_95 = { 18124 key: 1, 18125 class: "statusPill dirtyPill" 18126} 18127const _hoisted_96 = { class: "formCard aiSuggestionEdit" } 18128const _hoisted_97 = { 18129 key: 0, 18130 class: "aiUpdateTarget" 18131} 18132const _hoisted_98 = { 18133 key: 1, 18134 class: "aiNewItemNotice" 18135} 18136const _hoisted_99 = { 18137 key: 2, 18138 class: "aiReviewLock" 18139} 18140const _hoisted_100 = { class: "formTwo" } 18141const _hoisted_101 = ["onUpdate:modelValue", "disabled"] 18142const _hoisted_102 = ["value"] 18143const _hoisted_103 = ["onUpdate:modelValue", "disabled"] 18144const _hoisted_104 = ["value"] 18145const _hoisted_105 = ["onUpdate:modelValue", "disabled"] 18146const _hoisted_106 = ["onUpdate:modelValue", "disabled"] 18147const _hoisted_107 = ["onUpdate:modelValue", "disabled"] 18148const _hoisted_108 = { class: "aiSourceReview" } 18149const _hoisted_109 = ["href"] 18150const _hoisted_110 = { 18151 key: 0, 18152 class: "aiSuggestionImagePreview" 18153} 18154const _hoisted_111 = ["src", "alt"] 18155const _hoisted_112 = { key: 0 } 18156const _hoisted_113 = { key: 1 } 18157const _hoisted_114 = { class: "aiSuggestionImageCopy" } 18158const _hoisted_115 = { "aria-hidden": "true" } 18159const _hoisted_116 = { key: 0 } 18160const _hoisted_117 = { key: 1 } 18161const _hoisted_118 = { key: 2 } 18162const _hoisted_119 = ["href"] 18163const _hoisted_120 = ["onClick"] 18164const _hoisted_121 = { 18165 key: 2, 18166 class: "checkLine" 18167} 18168const _hoisted_122 = ["onUpdate:modelValue"] 18169const _hoisted_123 = { 18170 key: 3, 18171 class: "aiImageReplaceNote" 18172} 18173const _hoisted_124 = { class: "aiEvidence" } 18174const _hoisted_125 = { class: "aiAdvancedReview" } 18175const _hoisted_126 = { class: "collapseBody" } 18176const _hoisted_127 = ["onUpdate:modelValue", "disabled"] 18177const _hoisted_128 = { class: "formTwo" } 18178const _hoisted_129 = ["onUpdate:modelValue", "disabled"] 18179const _hoisted_130 = ["onUpdate:modelValue", "disabled"] 18180const _hoisted_131 = ["onUpdate:modelValue", "disabled"] 18181const _hoisted_132 = { class: "aiDedupHead" } 18182const _hoisted_133 = { 18183 key: 0, 18184 class: "dangerText" 18185} 18186const _hoisted_134 = { key: 1 } 18187const _hoisted_135 = { class: "aiDedupCounts" } 18188const _hoisted_136 = ["onUpdate:modelValue", "disabled"] 18189const _hoisted_137 = { 18190 key: 4, 18191 class: "aiBoundaryNote" 18192} 18193const _hoisted_138 = { 18194 key: 5, 18195 class: "aiWorkflowError" 18196} 18197const _hoisted_139 = { 18198 key: 6, 18199 class: "aiDraftActions" 18200} 18201const _hoisted_140 = ["onClick"] 18202const _hoisted_141 = ["disabled", "onClick"] 18203const _hoisted_142 = ["onClick"] 18204const _hoisted_143 = { 18205 key: 7, 18206 class: "aiApprovalChecklist" 18207} 18208const _hoisted_144 = ["onUpdate:modelValue"] 18209const _hoisted_145 = ["onUpdate:modelValue"] 18210const _hoisted_146 = { key: 0 } 18211const _hoisted_147 = ["onUpdate:modelValue"] 18212const _hoisted_148 = ["onUpdate:modelValue"] 18213const _hoisted_149 = { class: "aiReviewActions" } 18214const _hoisted_150 = ["disabled", "onClick"] 18215const _hoisted_151 = ["onClick"] 18216const _hoisted_152 = ["onClick"] 18217const _hoisted_153 = { 18218 key: 8, 18219 class: "row" 18220} 18221const _hoisted_154 = ["href"] 18222const _hoisted_155 = ["onClick"] 18223const _hoisted_156 = { 18224 key: 6, 18225 class: "aiCenterPanel" 18226} 18227const _hoisted_157 = { class: "card aiSectionLead" } 18228const _hoisted_158 = { class: "vueBadge" } 18229const _hoisted_159 = ["onClick"] 18230const _hoisted_160 = { class: "aiRunOverviewHead" } 18231const _hoisted_161 = { class: "statusPill" } 18232const _hoisted_162 = { class: "aiRunOverviewMetrics" } 18233const _hoisted_163 = { 18234 key: 0, 18235 class: "aiJobFailure" 18236} 18237const _hoisted_164 = { class: "dangerText" } 18238const _hoisted_165 = { 18239 key: 1, 18240 class: "aiJobNotice" 18241} 18242const _hoisted_166 = { 18243 key: 2, 18244 class: "row" 18245} 18246const _hoisted_167 = { 18247 key: 4, 18248 class: "card formCard aiJobComposer aiFullSearchCard" 18249} 18250const _hoisted_168 = { class: "fieldLabel" } 18251const _hoisted_169 = ["onUpdate:modelValue"] 18252const _hoisted_170 = ["value"] 18253const _hoisted_171 = { class: "fieldLabel" } 18254const _hoisted_172 = ["onUpdate:modelValue"] 18255const _hoisted_173 = ["disabled", "onClick"] 18256const _hoisted_174 = { 18257 key: 5,
18258 class: "card aiBoundaryNote" 18259} 18260const _hoisted_175 = { class: "aiCanaryHead" } 18261const _hoisted_176 = { class: "statusPill" } 18262const _hoisted_177 = ["disabled", "onClick"] 18263const _hoisted_178 = { 18264 key: 0, 18265 class: "aiCanaryMetrics" 18266} 18267const _hoisted_179 = { 18268 key: 6, 18269 class: "card aiAdminDisclosure aiTechnicalTools" 18270} 18271const _hoisted_180 = { class: "aiDisclosureBody" } 18272const _hoisted_181 = ["onClick"] 18273const _hoisted_182 = ["open"] 18274const _hoisted_183 = { 18275 class: "aiJobFilter", 18276 role: "group", 18277 "aria-label": "تصÙÙØ© سج٠اÙÙ ÙØ§Ù " 18278} 18279const _hoisted_184 = ["onClick"] 18280const _hoisted_185 = ["onClick"] 18281const _hoisted_186 = { class: "aiJobTimeline aiDisclosureBody" } 18282const _hoisted_187 = ["data-task-id"] 18283const _hoisted_188 = { class: "memberCardTop" } 18284const _hoisted_189 = { class: "hint" } 18285const _hoisted_190 = { class: "aiJobCounts" } 18286const _hoisted_191 = { 18287 key: 0, 18288 class: "aiProviderBreakdown" 18289} 18290const _hoisted_192 = { 18291 key: 1, 18292 class: "aiJobFailure" 18293} 18294const _hoisted_193 = { class: "dangerText" } 18295const _hoisted_194 = { class: "dangerText" } 18296const _hoisted_195 = { 18297 key: 2, 18298 class: "aiJobNotice" 18299} 18300const _hoisted_196 = { 18301 key: 3, 18302 class: "row" 18303} 18304const _hoisted_197 = ["onClick"] 18305const _hoisted_198 = ["onClick"] 18306const _hoisted_199 = { 18307 key: 0, 18308 class: "hint" 18309} 18310const _hoisted_200 = { 18311 key: 7, 18312 class: "aiCenterPanel" 18313} 18314const _hoisted_201 = { class: "card aiSectionLead" } 18315const _hoisted_202 = { class: "statusPill" } 18316const _hoisted_203 = { class: "card aiConnectionSummary" } 18317const _hoisted_204 = { dir: "ltr" } 18318const _hoisted_205 = { class: "card aiReadinessSummary" } 18319const _hoisted_206 = { class: "aiReadinessDomains" } 18320const _hoisted_207 = { class: "aiAutomationHead" } 18321const _hoisted_208 = { class: "aiAutomationMetrics" } 18322const _hoisted_209 = { 18323 key: 0, 18324 class: "aiWorkflowError" 18325} 18326const _hoisted_210 = { 18327 key: 0, 18328 class: "card aiBoundaryNote" 18329} 18330const _hoisted_211 = { class: "card formCard aiSettingsForm" } 18331const _hoisted_212 = { class: "formTwo" } 18332const _hoisted_213 = ["onUpdate:modelValue"] 18333const _hoisted_214 = ["onUpdate:modelValue"] 18334const _hoisted_215 = ["value"] 18335const _hoisted_216 = ["onUpdate:modelValue"] 18336const _hoisted_217 = { class: "hint" } 18337const _hoisted_218 = { class: "formTwo" } 18338const _hoisted_219 = ["onUpdate:modelValue"] 18339const _hoisted_220 = ["onUpdate:modelValue"] 18340const _hoisted_221 = { class: "checkLine" } 18341const _hoisted_222 = ["onUpdate:modelValue"] 18342const _hoisted_223 = { class: "card formCard aiSettingsForm" } 18343const _hoisted_224 = { class: "aiAutomationHead" } 18344const _hoisted_225 = { class: "statusPill" } 18345const _hoisted_226 = { class: "checkLine" } 18346const _hoisted_227 = ["onUpdate:modelValue"] 18347const _hoisted_228 = { class: "formTwo" } 18348const _hoisted_229 = { class: "fieldLabel" } 18349const _hoisted_230 = ["onUpdate:modelValue"] 18350const _hoisted_231 = { class: "fieldLabel" } 18351const _hoisted_232 = ["onUpdate:modelValue"] 18352const _hoisted_233 = ["value"] 18353const _hoisted_234 = { class: "checkLine" } 18354const _hoisted_235 = ["onUpdate:modelValue"] 18355const _hoisted_236 = { class: "checkLine" } 18356const _hoisted_237 = ["onUpdate:modelValue"] 18357const _hoisted_238 = { class: "checkLine" } 18358const _hoisted_239 = ["onUpdate:modelValue"] 18359const _hoisted_240 = { class: "fieldLabel" } 18360const _hoisted_241 = ["onUpdate:modelValue"] 18361const _hoisted_242 = { class: "card formCard aiSettingsForm aiDeepseekCard" } 18362const _hoisted_243 = { class: "aiAutomationHead" } 18363const _hoisted_244 = { class: "statusPill" } 18364const _hoisted_245 = { class: "fieldLabel" } 18365const _hoisted_246 = ["onUpdate:modelValue"] 18366const _hoisted_247 = { class: "formTwo" } 18367const _hoisted_248 = ["onClick"] 18368const _hoisted_249 = { class: "fieldLabel" } 18369const _hoisted_250 = ["onUpdate:modelValue"] 18370const _hoisted_251 = { class: "row" } 18371const _hoisted_252 = ["onClick"] 18372const _hoisted_253 = ["disabled", "onClick"] 18373const _hoisted_254 = ["disabled", "onClick"] 18374const _hoisted_255 = { 18375 key: 0, 18376 class: "hint", 18377 role: "status" 18378} 18379const _hoisted_256 = { key: 0 } 18380const _hoisted_257 = { class: "formTwo" } 18381const _hoisted_258 = { class: "fieldLabel" } 18382const _hoisted_259 = ["onUpdate:modelValue"] 18383const _hoisted_260 = { value: "serper" } 18384const _hoisted_261 = { value: "brave" } 18385const _hoisted_262 = { value: "tavily" } 18386const _hoisted_263 = { value: "serpapi" } 18387const _hoisted_264 = { class: "fieldLabel" } 18388const _hoisted_265 = ["onUpdate:modelValue"] 18389const _hoisted_266 = { class: "formTwo" } 18390const _hoisted_267 = ["onClick"] 18391const _hoisted_268 = { class: "fieldLabel" } 18392const _hoisted_269 = ["onUpdate:modelValue"] 18393const _hoisted_270 = { class: "row" } 18394const _hoisted_271 = ["onClick"] 18395const _hoisted_272 = ["disabled", "onClick"] 18396const _hoisted_273 = { 18397 class: "hint", 18398 role: "status", 18399 "aria-live": "polite" 18400} 18401const _hoisted_274 = { class: "card formCard aiSettingsForm" } 18402const _hoisted_275 = { class: "aiAutomationHead" } 18403const _hoisted_276 = { class: "statusPill" } 18404const _hoisted_277 = { class: "fieldLabel" } 18405const _hoisted_278 = ["onUpdate:modelValue"] 18406const _hoisted_279 = { class: "formTwo" } 18407const _hoisted_280 = ["onClick"]
18408const _hoisted_281 = { class: "fieldLabel" } 18409const _hoisted_282 = ["onUpdate:modelValue"] 18410const _hoisted_283 = { class: "row" } 18411const _hoisted_284 = ["onClick"] 18412const _hoisted_285 = ["disabled", "onClick"] 18413const _hoisted_286 = { 18414 key: 1, 18415 class: "card formCard aiSettingsForm searxngSettingsCard" 18416} 18417const _hoisted_287 = { class: "aiAutomationHead" } 18418const _hoisted_288 = { class: "statusPill" } 18419const _hoisted_289 = { class: "fieldLabel" } 18420const _hoisted_290 = ["onUpdate:modelValue"] 18421const _hoisted_291 = { class: "checkLine" } 18422const _hoisted_292 = ["onUpdate:modelValue"] 18423const _hoisted_293 = { class: "row" } 18424const _hoisted_294 = ["disabled", "onClick"] 18425const _hoisted_295 = ["disabled", "onClick"] 18426const _hoisted_296 = { class: "card formCard aiSettingsForm" } 18427const _hoisted_297 = { class: "checkLine" } 18428const _hoisted_298 = ["onUpdate:modelValue"] 18429const _hoisted_299 = ["onUpdate:modelValue", "disabled"] 18430const _hoisted_300 = { 18431 key: 0, 18432 class: "hint" 18433} 18434const _hoisted_301 = { class: "checkLine" } 18435const _hoisted_302 = ["onUpdate:modelValue"] 18436const _hoisted_303 = { class: "formTwo" } 18437const _hoisted_304 = ["onUpdate:modelValue"] 18438const _hoisted_305 = ["value"] 18439const _hoisted_306 = ["onUpdate:modelValue"] 18440const _hoisted_307 = { class: "fieldLabel" } 18441const _hoisted_308 = ["onUpdate:modelValue"] 18442const _hoisted_309 = { 18443 key: 1, 18444 class: "aiDomainAlert", 18445 role: "alert" 18446} 18447const _hoisted_310 = { class: "fieldLabel" } 18448const _hoisted_311 = ["onUpdate:modelValue"] 18449const _hoisted_312 = ["onClick"] 18450const _hoisted_313 = { class: "card formCard aiSettingsForm aiDomainPolicyForm" } 18451const _hoisted_314 = { class: "aiAutomationHead" } 18452const _hoisted_315 = { class: "vueBadge" } 18453const _hoisted_316 = { class: "checkLine" } 18454const _hoisted_317 = ["onUpdate:modelValue", "disabled"] 18455const _hoisted_318 = { class: "formTwo" } 18456const _hoisted_319 = { class: "fieldLabel" } 18457const _hoisted_320 = ["onUpdate:modelValue"] 18458const _hoisted_321 = ["value"] 18459const _hoisted_322 = { class: "fieldLabel" } 18460const _hoisted_323 = ["onUpdate:modelValue"] 18461const _hoisted_324 = ["value"] 18462const _hoisted_325 = { class: "formTwo" } 18463const _hoisted_326 = { class: "fieldLabel" } 18464const _hoisted_327 = ["onUpdate:modelValue"] 18465const _hoisted_328 = ["value"] 18466const _hoisted_329 = { class: "fieldLabel" } 18467const _hoisted_330 = ["onUpdate:modelValue"] 18468const _hoisted_331 = ["value"] 18469const _hoisted_332 = { class: "fieldLabel" } 18470const _hoisted_333 = ["onUpdate:modelValue"] 18471const _hoisted_334 = ["value"] 18472const _hoisted_335 = { class: "row" } 18473const _hoisted_336 = ["onClick"] 18474const _hoisted_337 = ["onClick"] 18475const _hoisted_338 = { class: "card collapseSection aiDraftTool" } 18476const _hoisted_339 = { class: "collapseBody formCard" } 18477const _hoisted_340 = ["onUpdate:modelValue"] 18478const _hoisted_341 = ["onUpdate:modelValue"] 18479const _hoisted_342 = ["onClick"] 18480const _hoisted_343 = { 18481 key: 0, 18482 class: "auditPre" 18483} 18484 18485return function render(_ctx, _cache) { 18486 with (_ctx) { 18487 const { resolveComponent: _resolveComponent, createVNode: _createVNode, toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, normalizeClass: _normalizeClass, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, withCtx: _withCtx, createBlock: _createBlock, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, vModelCheckbox: _vModelCheckbox } = _Vue 18488 18489 const _component_AiAdminCenterNav = _resolveComponent("AiAdminCenterNav") 18490 const _component_router_link = _resolveComponent("router-link") 18491 const _component_AiQualityPanel = _resolveComponent("AiQualityPanel") 18492 const _component_AiKnowledgeGapsPanel = _resolveComponent("AiKnowledgeGapsPanel") 18493 const _component_ExhibitionDatesPanel = _resolveComponent("ExhibitionDatesPanel") 18494 const _component_AiResearchSettingsPanel = _resolveComponent("AiResearchSettingsPanel") 18495 const _component_AdminFrame = _resolveComponent("AdminFrame") 18496 18497 return (_openBlock(), _createBlock(_component_AdminFrame, { title: pageTitle }, { 18498 default: _withCtx(() => [ 18499 _createVNode(_component_AiAdminCenterNav), 18500 _createElementVNode("section", _hoisted_1, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_2, _toDisplayString(technicalRoute?(workspace==='settings'?'إعدادات Ù ØÙÙÙ Ø©':'تشغÙÙ Ø§ÙØ¨ØØ«'):'ÙØ±Ø§Ø± بشر٠Ù٠راجعة'), 1), _createElementVNode("h3", null, _toDisplayString(technicalRoute?(workspace==='settings'?'إعدادات AI':'تشغÙÙ Ø§ÙØ¨ØØ« Ø¨Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ'):'٠راجعة Ù ØØªÙÙ AI'), 1), _createElementVNode("p", null, _toDisplayString(technicalRoute?(workspace==='settings'?'إعدادات اÙÙ Ø²ÙØ¯ ÙØ§ÙØ¨ØØ« ÙØ§Ùأت٠تة. غÙÙØ±Ùا ÙÙØ· Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø© ÙØ¨Ø¹Ø¯ اختبار Ù Ø¶Ø¨ÙØ·.':'Ø£ÙØ´Ø¦ Ø¨ØØ«Ø§Ù ÙØ§Ù ÙØ§Ù أ٠اختبر Ø§ÙØ¬Ø§ÙØ²ÙØ©Ø ث٠تابع Ø§ÙØØ§ÙØ© ÙØ§ÙÙØªØ§Ø¦Ø¬ تÙÙØ§Ø¦Ùا٠دÙÙ ØªØØ¯ÙØ« Ø§ÙØµÙØØ©. Ø¨ØØ« اÙ٠طاع٠٠ÙÙÙØ¯ باÙÙ Ø·Ø§Ø¹Ù Ø§ÙØÙØ§Ù ÙÙØ·.'):'راجع اÙÙ ÙØªØ±ØØ§Øª ÙØ§Ù٠صادر ÙØ§ÙØªÙØ±Ø§Ø± ث٠اعت٠د Ø£Ù Ø§Ø±ÙØ¶. AI ÙÙØªØ±Ø ÙÙØ· ÙÙØ§ ÙÙØ´Ø± ٠باشرة.'), 1)]), _createElementVNode("button", { 18501 class: "smallbtn secondary", 18502 onClick: load 18503 }, "ØªØØ¯ÙØ«", 8, _hoisted_3)]), 18504 _createElementVNode("section", _hoisted_4, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(AI_RESEARCH_HUB_OPTIONS, (h) => { 18505 return (_openBlock(), _createElementBlock("button", { 18506 key: h.key, 18507 class: _normalizeClass({active:selectedHub===h.key}), 18508 onClick: $event => (selectHub(h.key)) 18509 }, [_createElementVNode("span", null, _toDisplayString(h.icon), 1), _createElementVNode("b", null, _toDisplayString(h.short), 1), _createElementVNode("small", null, _toDisplayString(selectedHub===h.key?'اÙÙØ³Ù Ø§ÙØØ§ÙÙ'
18509:'ÙØªØ اÙÙ Ø³Ø§ØØ©'), 1)], 10, _hoisted_5)) 18510 }), 128))]), 18511 _createElementVNode("nav", { 18512 class: "card aiCenterNav aiContentOpsNav", 18513 "aria-label": technicalRoute?'Ø£ÙØ³Ø§Ù تشغÙÙ AI':'Ø£ÙØ³Ø§Ù إدارة Ù ØØªÙÙ AI' 18514 }, [(!technicalRoute) 18515 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 18516 _createElementVNode("button", { 18517 class: _normalizeClass({active:workspace==='review'}), 18518 onClick: $event => (selectWorkspace('review')) 18519 }, [_cache[1] || (_cache[1] = _createElementVNode("span", { 18520 class: "aiCenterNavIcon", 18521 "aria-hidden": "true" 18522 }, "â ", -1)), _createElementVNode("span", _hoisted_8, [_cache[0] || (_cache[0] = _createElementVNode("b", null, "اÙ٠راجعة اÙÙÙÙ ÙØ©", -1)), _createElementVNode("small", null, _toDisplayString(research.stats.pending||0) + " Ø¬Ø¯ÙØ¯ · " + _toDisplayString(research.stats.in_review||0) + " ÙÙØ¯ اÙ٠راجعة", 1)])], 10, _hoisted_7), 18523 _createElementVNode("button", { 18524 class: _normalizeClass({active:workspace==='freshness'}), 18525 onClick: $event => (selectWorkspace('freshness')) 18526 }, [_cache[3] || (_cache[3] = _createElementVNode("span", { 18527 class: "aiCenterNavIcon", 18528 "aria-hidden": "true" 18529 }, "ð", -1)), _createElementVNode("span", _hoisted_10, [_cache[2] || (_cache[2] = _createElementVNode("b", null, "إعادة Ø§ÙØªØÙÙ", -1)), _createElementVNode("small", null, _toDisplayString(research.freshness.total||0) + " Ø¹ÙØµØ± ÙØØªØ§Ø¬ ٠راجعة", 1)])], 10, _hoisted_9), 18530 _createElementVNode("button", { 18531 class: _normalizeClass({active:workspace==='growth'}), 18532 onClick: $event => (selectWorkspace('growth')) 18533 }, [_cache[5] || (_cache[5] = _createElementVNode("span", { 18534 class: "aiCenterNavIcon", 18535 "aria-hidden": "true" 18536 }, "ð", -1)), _createElementVNode("span", _hoisted_12, [_cache[4] || (_cache[4] = _createElementVNode("b", null, "ÙØ±Øµ اÙÙ ØØªÙÙ", -1)), _createElementVNode("small", null, _toDisplayString(research.growth.total||0) + " ÙØ±ØµØ© Ù Ù Ø§ÙØ·Ùب ÙØ§ÙØªØºØ·ÙØ©", 1)])], 10, _hoisted_11), 18537 _createElementVNode("button", { 18538 class: _normalizeClass({active:workspace==='inventory'}), 18539 onClick: $event => (selectWorkspace('inventory')) 18540 }, [_cache[7] || (_cache[7] = _createElementVNode("span", { 18541 class: "aiCenterNavIcon", 18542 "aria-hidden": "true" 18543 }, "ðï¸", -1)), _createElementVNode("span", _hoisted_14, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "ØªØºØ·ÙØ© Ø§ÙØ¯ÙÙÙ", -1)), _createElementVNode("small", null, _toDisplayString(research.inventory.item_count||0) + " Ø¹ÙØµØ± · " + _toDisplayString(research.inventory.incomplete_count||0) + " ÙØ§Ùص", 1)])], 10, _hoisted_13) 18544 ], 64)) 18545 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createElementVNode("button", { 18546 class: _normalizeClass({active:workspace==='jobs'}), 18547 onClick: $event => (selectWorkspace('jobs')) 18548 }, _cache[8] || (_cache[8] = [_createElementVNode("span", { 18549 class: "aiCenterNavIcon", 18550 "aria-hidden": "true" 18551 }, "ð", -1), _createElementVNode("span", { class: "aiCenterNavCopy" }, [_createElementVNode("b", null, "Ù ÙØ§Ù Ø§ÙØ¨ØØ«"), _createElementVNode("small", null, "Ø¨ØØ« ÙØ§Ù ٠· اختبار Ø¬Ø§ÙØ²ÙØ©")], -1)]), 10, _hoisted_15), _createElementVNode("button", { 18552 class: _normalizeClass({active:workspace==='settings'}), 18553 onClick: $event => (selectWorkspace('settings')) 18554 }, _cache[9] || (_cache[9] = [_createElementVNode("span", { 18555 class: "aiCenterNavIcon", 18556 "aria-hidden": "true" 18557 }, "âï¸", -1), _createElementVNode("span", { class: "aiCenterNavCopy" }, [_createElementVNode("b", null, "Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª"), _createElementVNode("small", null, "اÙÙ Ø²ÙØ¯ ÙØ§ÙØ³ÙØ§Ø³Ø§Øª ÙØ§Ùأت٠تة")], -1)]), 10, _hoisted_16)], 64))], 8, _hoisted_6), 18558 (!technicalRoute&&workspace==='freshness') 18559 ? (_openBlock(), _createElementBlock("section", _hoisted_17, [_createElementVNode("div", _hoisted_18, [_cache[10] || (_cache[10] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ØØ¯Ø§Ø«Ø© اÙÙ ØØªÙÙ"), _createElementVNode("h3", null, "Ù ØØªÙÙ ÙØØªØ§Ø¬ إعادة تØÙÙ"), _createElementVNode("p", { class: "hint" }, "ÙØ±ØªØ¨ اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر ØØ³Ø¨ ØØ³Ø§Ø³ÙØ© اÙ٠عÙÙÙ Ø© ÙØ¹Ù ر آخر تØÙÙ. اÙ٠عÙÙ٠ات Ø§ÙØ·Ø¨ÙØ© ÙØ§Ù٠اÙÙØ© ÙØ§ÙØ¥ÙØ§Ù Ø© ÙØ§ÙØ¬Ù Ø§Ø±Ù ØªÙØ±Ø§Ø¬Ø¹ أسرع Ù Ù Ø§ÙØ£Ø³ÙØ§Ù ÙØ§ÙÙ Ø·Ø§Ø¹Ù ÙØ§ÙÙÙØ§Ø¯Ù.")], -1)), _createElementVNode("span", _hoisted_19, _toDisplayString(research.freshness.total||0) + " ÙÙ٠راجعة", 1)]), _createElementVNode("div", _hoisted_20, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.freshness.summary&&research.freshness.summary.overdue||0), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "٠تأخر ع٠اÙÙ ÙØ¹Ø¯", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.freshness.summary&&research.freshness.summary.unverified||0), 1), _cache[12] || (_cache[12] = _createElementVNode("small", null, "بدÙ٠تØÙÙ Ù ÙØ«Ù", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.freshness.summary&&research.freshness.summary.source_missing||0), 1), _cache[13] || (_cache[13] = _createElementVNode("small", null, "اÙ٠صدر ÙØØªØ§Ø¬ استÙ٠اÙ", -1))])]), ((research.freshness.opportunities||[]).length) 18560 ? (_openBlock(), _createElementBlock("div", _hoisted_21, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.freshness.opportunities.slice(0,6), (x, j) => { 18561 return (_openBlock(), _createElementBlock("article", { 18562 key: x.key, 18563 class: _normalizeClass(['aiGrowthOpportunity','priority-'+x.priority,{top:j===0}]) 18564 }, [_createElementVNode("div", _hoisted_22, [_createElementVNode("b", null, _toDisplayString(j+1), 1), (j===0) 18565 ? (_openBlock(), _createElementBlock("small", _hoisted_23, "Ø§ÙØ£ÙÙÙÙØ© Ø§ÙØ£ÙÙÙ")) 18566 : _createCommentVNode("", true)]), _createElementVNode("div", _hoisted_24, [ 18567 _createElementVNode("div", null, [_createElementVNode("span", _hoisted_25, _toDisplayString(freshnessStateLabel(x.freshness_state)), 1), _createElementVNode("em", null, _toDisplayString(growthPriorityLabel(x.priority)), 1)]), 18568 _createElementVNode("h4", null, _toDisplayString(x.title), 1), 18569 _createElementVNode("p", null, _toDisplayString(x.reason), 1), 18570 _createElementVNode("small", null, _toDisplayString(freshnessEvidenceText(x)), 1) 18571 ]), (canOperate&&x.action==='research') 18572 ? (_openBlock(), _createElementBlock("button", { 18573 key: 0, 18574 class: "smallbtn", 18575 onClick: $event => (runFreshnessOpportunity(x)) 18576 }, "إعادة تØÙ٠باÙÙAI", 8, _hoisted_26)) 18577 : _createCommentVNode("", true)], 2)) 18578 }), 128))])) 18579 : (_openBlock(), _createElementBlock("p", _hoisted_27, "ÙØ§ ÙÙØ¬Ø¯ Ù ØØªÙÙ Ù ÙØ´Ùر ÙØØªØ§Ø¬ إعادة تØÙÙ Ø¹Ø§Ø¬ÙØ© Ø§ÙØ¢Ù."))])) 18580 : _createCommentVNode("", true), 18581 (!technicalRoute&&workspace==='growth') 18582 ? (_openBlock(), _createElementBlock("section", _hoisted_28, [_createElementVNode("div", _hoisted_29, [_cache[14] || (_cache[14] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ø·ÙØ¨ اÙ٠ستخد٠Ù٠اÙÙ Ø¬Ù ÙØ¹"), _createElementVNode("h3", null, "ÙØ±Øµ اÙÙ ØØªÙÙ Ø§ÙØ¢Ù"), _createElementVNode("p", { class: "hint" }, "ÙØ±ØªØ¨ اÙÙØ¸Ø§Ù ٠ا ÙØØªØ§Ø¬Ù Ø§ÙØ²Ùار ÙØ¹ÙÙØ§Ù Ù Ù ÙØªØ§Ø¦Ø¬ Ø§ÙØ¨ØØ« ÙØ§ÙØªØºØ·ÙØ© Ø§ÙØØ§ÙÙØ©. ÙØ§ ÙØÙØ¸ عبارة Ø§ÙØ¨ØØ« Ø§ÙØ®Ø§Ù Ø£Ù ÙÙÙØ© اÙÙ Ø³ØªØ®Ø¯Ù Ø ÙAI ÙØ§ ÙÙØ´Ø± ٠باشرة.")], -1)), _createElementVNode("span", _hoisted_30, _toDisplayString(research.growth.total||0) + " ÙØ±ØµØ©", 1)]), _createElementVNode("div", _hoisted_31, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.growth.summary&&research.growth.summary.demand_total||0), 1), _cache[15] || (_cache[15] = _createElementVNode("small", null, "Ù ØØ§ÙÙØ§Øª Ø¨ÙØ§ ÙØªÙجة / 30 ÙÙÙ ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.growth.summary&&research.growth.summary.search_driven||0), 1), _cache[16] || (_cache[16] = _createElementVNode("small", null, "ÙØ±Øµ Ù Ù Ø§ÙØ·Ùب اÙÙØ¹ÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.growth.summary&&research.growth.summary.coverage_driven||0), 1), _cache[17] || (_cache[17] = _createElementVNode("small", null, "ÙØ±Øµ Ù Ù ÙÙØµ Ø§ÙØªØºØ·ÙØ©", -1))])]), ((research.growth.opportunities||[]).length) 18583 ? (_openBlock(), _createElementBlock("div", _hoisted_32, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.growth.opportunities.slice(0,6), (x, i) => { 18584 return (_openBlock(), _createElementBlock("article", { 18585 key: x.key, 18586 class: _normalizeClass(['aiGrowthOpportunity','priority-'+x.priority,{top:i===0}]) 18587 }, [_createElementVNode("div", _hoisted_33, [_createElementVNode("b", null, _toDisplayString(i+1), 1), (i===0) 18588 ? (_openBlock(), _createElementBlock("small", _hoisted_34, "Ø§ÙØ£ÙÙÙÙØ© Ø§ÙØ£ÙÙÙ")) 18589 : _createCommentVNode("", true)]), _createElementVNode("div", _hoisted_35, [ 18590 _createElementVNode("div", null, [_createElementVNode("span", _hoisted_36, _toDisplayString(growthKindLabel(x.kind)), 1), _createElementVNode("em", null, _toDisplayString(growthPriorityLabel(x.priority)), 1)]), 18591 _createElementVNode("h4", null, _toDisplayString(x.title), 1), 18592 _createElementVNode("p", null, _toDisplayString(x.reason), 1), 18593 (growthEvidenceText(x)) 18594 ? (_openBlock(), _createElementBlock("small", _hoisted_37, _toDisplayString(growthEvidenceText(x)), 1)) 18595 : _createCommentVNode("", true) 18596 ]), _createElementVNode("div", _hoisted_38, [(x.destination_path) 18597 ? (_openBlock(), _createBlock(_component_router_link, { 18598 key: 0, 18599 class: "smallbtn secondary", 18600 to: x.destination_path, 18601 target: "_blank" 18602 }, { 18603 default: _withCtx(() => _cache[18] || (_cache[18] = [_createTextVNode("ÙØªØ Ø§ÙØµÙØØ© اÙÙ Ø³ØªÙØ¯ÙØ©")])), 18604 _: 2, 18605 __: [18] 18606 }, 1032, ["to"])) 18607 : _createCommentVNode("", true), (canOperate&&x.action==='research') 18608 ? (_openBlock(), _createElementBlock("button", { 18609 key: 1, 18610 class: "smallbtn", 18611 onClick: $event => (runGrowthOpportunity(x)) 18612 }, "Ø¨ØØ« AI ÙÙØ°Ù اÙÙØ±ØµØ©", 8, _hoisted_39)) 18613 : _createCommentVNode("", true)])], 2)) 18614 }), 128))])) 18615 : (_openBlock(), _createElementBlock("p", _hoisted_40, "ÙØ§ ØªÙØ¬Ø¯ ÙØ¬ÙØ© Ø·ÙØ¨ Ø£Ù ØªØºØ·ÙØ© ÙØ§Ø¶ØØ© Ø§ÙØ¢Ù. Ø³ÙØ¸Ù Ø§ÙØ¨ØØ« Ø§ÙØªÙÙØ§Ø¦Ù Ù ØØ§Ùظا٠ÙÙÙ ÙÙØ´Ø¦ Ù ØØªÙÙ Ù٠جرد Ù ÙØ¡ Ø§ÙØµÙØØ©."))])) 18616 : _createCommentVNode("", true), 18617 (!technicalRoute&&workspace==='inventory') 18618 ? (_openBlock(), _createElementBlock("section", _hoisted_41, [ 18619 _createElementVNode("div", _hoisted_42, [_createElementVNode("div", null, [_cache[19] || (_cache[19] = _createElementVNode("span", { class: "vueBadge" }, "جرد اÙÙ ØØªÙÙ ÙØ¨Ù Ø§ÙØ¨ØØ«", -1)), _createElementVNode("h3", null, _toDisplayString(currentHub.icon) + " ØªØºØ·ÙØ© " + _toDisplayString(currentHub.short), 1), _cache[20] || (_cache[20] = _createElementVNode("p", { class: "hint" }, "اÙÙ ØØ±Ù ÙÙØ§Ø±Ù اÙÙ ÙØªØ±ØØ§Øª Ø¨ÙØ°Ø§ Ø§ÙØ¬Ø±Ø¯ اÙÙØ§Ù Ù ÙÙÙ ÙØ¹ ØªÙØ±Ø§Ø± اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر أ٠اÙÙ ÙØªØ±ØØ§Øª اÙÙØ´Ø·Ø©.", -1))]), _createElementVNode("span", { class: _normalizeClass(["statusPill", {canaryPill:Number(research.inventory.gap_count||0)===0}]) }, _toDisplayString(Number(research.inventory.gap_count||0)===0?'ÙØ§ ØªÙØ¬Ø¯ ÙØ¦Ø§Øª ÙØ§Ø±ØºØ©':research.inventory.gap_count+' ÙØ¬Ùات'), 3)]), 18620 _createElementVNode("div", _hoisted_43, [ 18621 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.inventory.item_count||0), 1), _cache[21] || (_cache[21] = _createElementVNode("small", null, "Ø¹ÙØ§ØµØ± Ù ÙØ±Ùءة", -1))]), 18622 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.inventory.category_count||0), 1), _cache[22] || (_cache[22] = _createElementVNode("small", null, "تصÙÙÙØ§Øª", -1))]), 18623 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.inventory.gap_count||0), 1), _cache[23] || (_cache[23] = _createElementVNode("small", null, "ÙØ¦Ø§Øª ÙØ§Ø±ØºØ©", -1))]), 18624 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.inventory.thin_count||0), 1), _cache[24] || (_cache[24] = _createElementVNode("small", null, "ØªØºØ·ÙØ© ضعÙÙØ©", -1))]), 18625 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.inventory.incomplete_count||0), 1), _cache[25] || (_cache[25] = _createElementVNode("small", null, "Ø¹ÙØ§ØµØ± ÙØ§Ùصة", -1))]) 18626 ]), 18627 _createElementVNode("section", _hoisted_44, [_createElementVNode("div", null, [_cache[26] || (_cache[26] = _createElementVNode("span", { class: "vueBadge" }, "ØªØºØ·ÙØ© Ø§ÙØµÙر", -1)), _createElementVNode("h4", null, _toDisplayString(research.image_coverage.coverage_percent||0) + "% ٠٠اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر ÙØ¯ÙÙ ØµÙØ±Ø©", 1), _createElementVNode("p", _hoisted_45, _toDisplayString(research.image_coverage.missing_image||0) + " بدÙÙ ØµÙØ±Ø© · " + _toDisplayString(research.image_coverage.weak_image||0) + " ØµÙØ±Ø© ضعÙÙØ© · " + _toDisplayString(research.image_coverage.ai_generated||0) + " ØµÙØ±Ø© Ù ÙÙØ¯Ø© Ù٠عÙÙÙ Ø©.", 1)]), canOperate 18628 ? (_openBlock(), _createElementBlock("button", { 18629 key: 0, 18630 class: "smallbtn", 18631 disabled: !research.settings.image_assistant_enabled||!research.settings.xai_api_key_configured||!research.image_coverage.missing_image, 18632 onClick: runImageCompletion 18633 }, "استÙÙ Ø§Ù Ø¯ÙØ¹Ø© ØµÙØ±", 8, _hoisted_46)) 18634 : _createCommentVNode("", true)]), 18635 ((research.image_metrics.sources||[]).length) 18636 ? (_openBlock(), _createElementBlock("details", _hoisted_47, [_cache[28] || (_cache[28] = _createElementVNode("summary", null, "ÙØ¬Ø§Ø Ø¬ÙØ¨ Ø§ÙØµÙر ØØ³Ø¨ اÙ٠صدر Ø®ÙØ§Ù 30 ÙÙ٠اÙ", -1)), _createElementVNode("div", _hoisted_48, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.image_metrics.sources, (m) => { 18637 return (_openBlock(), _createElementBlock("span", { key: 'image-source-'+m.source_domain }, [_createElementVNode("b", null, _toDisplayString(m.source_domain), 1), _createElementVNode("small", null, _toDisplayString(m.s
18637uccess_percent) + "% ÙØ¬Ø§Ø · " + _toDisplayString(m.ready) + " Ø¬Ø§ÙØ²Ø© · " + _toDisplayString(m.not_found) + " Ø¨ÙØ§ ØµÙØ±Ø© · " + _toDisplayString(m.failed) + " ÙØ´Ù", 1)])) 18638 }), 128)), _cache[27] || (_cache[27] = _createElementVNode("h4", null, "أسباب Ø§ÙØªØ¹Ø«Ø±", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.image_metrics.failure_reasons, (f) => { 18639 return (_openBlock(), _createElementBlock("span", { key: 'image-failure-'+f.code }, [_createElementVNode("b", null, _toDisplayString(safeImageErrorText('', 'failed', {failure_code:f.code})), 1), _createElementVNode("small", null, _toDisplayString(f.total) + " Ù ÙØªØ±Ø", 1)])) 18640 }), 128))])])) 18641 : _createCommentVNode("", true), 18642 (canOperate&&!research.settings.xai_api_key_configured) 18643 ? (_openBlock(), _createElementBlock("p", _hoisted_49, "أض٠XAI_API_KEY عÙÙ Ø§ÙØ®Ø§Ø¯Ù ÙØªÙعÙÙ Grok ÙÙØ¨ØØ« Ø¹Ù Ø§ÙØµÙر ÙØªÙÙÙØ¯ Ø§ÙØ±Ø³ÙÙ Ø§ÙØªÙØ¶ÙØÙØ© Ø¹ÙØ¯ Ø§ÙØ³Ù Ø§Ø Ø¨Ø°ÙÙ.")) 18644 : _createCommentVNode("", true), 18645 _createElementVNode("details", _hoisted_50, [ 18646 _cache[32] || (_cache[32] = _createElementVNode("summary", null, "عرض Ø®Ø±ÙØ·Ø© Ø§ÙØªØºØ·ÙØ© ÙØ§ÙØ¹ÙØ§ØµØ± اÙÙØ§Ùصة", -1)), 18647 _createElementVNode("div", _hoisted_51, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.inventory.coverage||[], (c) => { 18648 return (_openBlock(), _createElementBlock("span", { 18649 key: 'coverage-'+c.id, 18650 class: _normalizeClass({empty:Number(c.item_count||0)===0,thin:Number(c.item_count||0)===1}) 18651 }, [_createElementVNode("b", null, _toDisplayString(c.icon||'â¢') + " " + _toDisplayString(c.name_ar), 1), _createElementVNode("small", null, _toDisplayString(c.item_count||0) + " Ø¹ÙØµØ±", 1)], 2)) 18652 }), 128))]), 18653 ((research.inventory.incomplete||[]).length) 18654 ? (_openBlock(), _createElementBlock("div", _hoisted_52, [_cache[29] || (_cache[29] = _createElementVNode("h4", null, "Ø¹ÙØ§ØµØ± ÙÙ Ù٠استÙ٠اÙÙØ§", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.inventory.incomplete, (x) => { 18655 return (_openBlock(), _createElementBlock("span", { key: 'incomplete-'+x.id }, [_createElementVNode("b", null, "#" + _toDisplayString(x.id) + " " + _toDisplayString(x.title_ar), 1), _createElementVNode("small", null, _toDisplayString(missingFieldsText(x)), 1)])) 18656 }), 128))])) 18657 : _createCommentVNode("", true), 18658 ((research.inventory.demand||[]).length) 18659 ? (_openBlock(), _createElementBlock("div", _hoisted_53, [_cache[30] || (_cache[30] = _createElementVNode("h4", null, "ÙØ¬Ùات Ø·ÙØ¨ Ù Ù Ø§ÙØ¨ØØ« â Ø¨ÙØ§ÙØ§Øª ٠ج٠عة", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.inventory.demand, (x) => { 18660 return (_openBlock(), _createElementBlock("span", { key: 'demand-'+x.intent_key+'-'+x.city_key+'-'+x.service_type }, [_createElementVNode("b", null, _toDisplayString(x.intent_key) + " " + _toDisplayString($cityLabel(x.city_key)||''), 1), _createElementVNode("small", null, _toDisplayString(x.zero_result_count) + " Ù ØØ§ÙÙØ© بدÙÙ ÙØªÙجة · ÙØ§ ØªÙØ¬Ø¯ عبارة Ø¨ØØ« خا٠٠ØÙÙØ¸Ø©", 1)])) 18661 }), 128))])) 18662 : _createCommentVNode("", true), 18663 ((research.inventory.local_gaps||[]).length) 18664 ? (_openBlock(), _createElementBlock("div", _hoisted_54, [_cache[31] || (_cache[31] = _createElementVNode("h4", null, "ÙØ¬Ùات Ø§ÙØªØºØ·ÙØ© اÙÙ ØÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.inventory.local_gaps, (x) => { 18665 return (_openBlock(), _createElementBlock("span", { key: 'local-gap-'+x.area_key+'-'+x.intent_key }, [_createElementVNode("b", null, _toDisplayString(x.intent_label_ar) + " · " + _toDisplayString(x.area_label_ar), 1), _createElementVNode("small", null, _toDisplayString($cityLabel(x.city_key)) + " · " + _toDisplayString(x.item_count) + " ÙØªÙجة ØØ§ÙÙØ© · AI ÙØ¨ØØ« Ø¨Ø§ÙØ¹Ø±Ø¨Ù/Ø§ÙØ¥ÙجÙÙØ²Ù/Ø§ÙØµÙÙÙ", 1)])) 18666 }), 128))])) 18667 : _createCommentVNode("", true) 18668 ]) 18669 ])) 18670 : _createCommentVNode("", true), 18671 (!technicalRoute&&workspace==='review') 18672 ? (_openBlock(), _createElementBlock("section", _hoisted_55, [_createElementVNode("div", _hoisted_56, [_createElementVNode("div", null, [_cache[33] || (_cache[33] = _createElementVNode("span", { class: "vueBadge" }, "ÙØØªØ§Ø¬ ÙØ±Ø§Ø±Ù Ø§ÙØ¢Ù", -1)), _createElementVNode("h3", null, _toDisplayString(Number(research.stats.actionable||0)) + " Ù ÙÙ Ø© ÙØ§Ø¨ÙØ© ÙÙØªÙÙÙØ°", 1), _cache[34] || (_cache[34] = _createElementVNode("p", { class: "hint" }, "Ù٠رÙÙ Ø£Ø¯ÙØ§Ù ÙÙØªØ ÙÙØ³ Ø§ÙØ³Ø¬Ùات Ø§ÙØªÙ ÙÙÙÙØªÙ. ÙØ§ ØªÙØ¬Ø¯ عدادات Ù ÙØªØ©.", -1))])]), _createElementVNode("div", _hoisted_57, [ 18673 _createElementVNode("button", { 18674 type: "button", 18675 class: _normalizeClass(["aiDecisionMetric", {active:decisionFilter==='new'}]), 18676 onClick: $event => (selectDecisionFilter('new')) 18677 }, [ 18678 _cache[35] || (_cache[35] = _createElementVNode("span", { 18679 class: "metricMark", 18680 "aria-hidden": "true" 18681 }, null, -1)), 18682 _createElementVNode("b", null, _toDisplayString(research.stats.new_items||0), 1), 18683 _cache[36] || (_cache[36] = _createElementVNode("small", null, "Ø¥Ø¶Ø§ÙØ§Øª Ø¬Ø¯ÙØ¯Ø©", -1)), 18684 _cache[37] || (_cache[37] = _createElementVNode("em", null, "ÙØªØ اÙÙØ§Ø¦Ù Ø©", -1)) 18685 ], 10, _hoisted_58), 18686 _createElementVNode("button", { 18687 type: "button", 18688 class: _normalizeClass(["aiDecisionMetric", {active:decisionFilter==='update'}]), 18689 onClick: $event => (selectDecisionFilter('update')) 18690 }, [ 18691 _cache[38] || (_cache[38] = _createElementVNode("span", { 18692 class: "metricMark", 18693 "aria-hidden": "true" 18694 }, null, -1)), 18695 _createElementVNode("b", null, _toDisplayString(research.stats.updates||0), 1), 18696 _cache[39] || (_cache[39] = _createElementVNode("small", null, "استÙ٠ا٠٠عÙÙ٠ات", -1)), 18697 _cache[40] || (_cache[40] = _createElementVNode("em", null, "عرض Ø§ÙØÙÙ٠اÙÙ ÙØªØ±ØØ©", -1)) 18698 ], 10, _hoisted_59), 18699 _createElementVNode("button", { 18700 type: "button", 18701 class: _normalizeClass(["aiDecisionMetric", {active:decisionFilter==='image'}]), 18702 onClick: $event => (selectDecisionFilter('image')) 18703 }, [ 18704 _cache[41] || (_cache[41] = _createElementVNode("span", { 18705 class: "metricMark", 18706 "aria-hidden": "true" 18707 }, null, -1)), 18708 _createElementVNode("b", null, _toDisplayString(research.stats.images_ready||0), 1), 18709 _cache[42] || (_cache[42] = _createElementVNode("small", null, "ØµÙØ± Ø¬Ø§ÙØ²Ø©", -1)), 18710 _cache[43] || (_cache[43] = _createElementVNode("em", null, "٠راجعة Ø§ÙØµÙر", -1)) 18711 ], 10, _hoisted_60), 18712 _createElementVNode("button", { 18713 type: "button", 18714 class: _normalizeClass(["aiDecisionMetric", {active:decisionFilter==='high_risk',alert:Number(research.stats.high_risk||0)>0}]), 18715 onClick: $event => (selectDecisionFilter('high_risk')) 18716 }, [ 18717 _cache[44] || (_cache[44] = _createElementVNode("span", { 18718 class: "metricMark", 18719 "aria-hidden": "true" 18720 }, null, -1)), 18721 _createElementVNode("b", null, _toDisplayString(research.stats.high_risk||0), 1),
18722 _cache[45] || (_cache[45] = _createElementVNode("small", null, "عاÙÙØ© اÙ٠خاطر", -1)), 18723 _cache[46] || (_cache[46] = _createElementVNode("em", null, "ØªØØªØ§Ø¬ Ø§ÙØªØ¨Ø§ÙاÙ", -1)) 18724 ], 10, _hoisted_61) 18725 ]), _createElementVNode("div", _hoisted_62, [_cache[48] || (_cache[48] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "سج٠اÙÙØ¸Ø§Ù "), _createElementVNode("h4", null, "ÙØªØ§Ø¦Ø¬ ÙØ§ ØªØØªØ§Ø¬ إجراء٠ÙÙÙ ÙØ§Ù")], -1)), _createElementVNode("button", { 18726 type: "button", 18727 class: "smallbtn secondary", 18728 onClick: $event => (selectDecisionFilter('excluded')) 18729 }, "٠ستبعد تÙÙØ§Ø¦Ùا٠ÙÙ ÙØ±Ø±: " + _toDisplayString(research.stats.dedup_conflicts||0), 9, _hoisted_63), _createElementVNode("span", null, [_cache[47] || (_cache[47] = _createTextVNode("ØªÙ Ø§Ø¹ØªÙ Ø§Ø¯ÙØ§ Ø³Ø§Ø¨ÙØ§Ù: ")), _createElementVNode("b", null, _toDisplayString(research.stats.approved||0), 1)])])])) 18730 : _createCommentVNode("", true), 18731 (research.provider_state&&research.provider_state.latest_failure) 18732 ? (_openBlock(), _createElementBlock("section", _hoisted_64, [_createElementVNode("h4", null, _toDisplayString(researchFailureLabel(research.provider_state.latest_failure)), 1), _createElementVNode("p", null, _toDisplayString(researchFailureHelp(research.provider_state.latest_failure)), 1), _createElementVNode("small", null, "اÙÙ ÙÙ Ø© " + _toDisplayString(research.provider_state.latest_failure.job_id) + " · HTTP " + _toDisplayString(research.provider_state.latest_failure.http_status||'-') + " · Ø§ÙØ±Ù ز " + _toDisplayString(research.provider_state.latest_failure.error_code||'-') + " · ٠عرÙÙ Ø§ÙØ·Ùب " + _toDisplayString(research.provider_state.latest_failure.request_id||'-'), 1)])) 18733 : _createCommentVNode("", true), 18734 (workspace==='review') 18735 ? (_openBlock(), _createElementBlock("section", _hoisted_65, [ 18736 _createElementVNode("div", _hoisted_66, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_67, _toDisplayString(currentHub.icon) + " " + _toDisplayString(currentHub.label), 1), _createElementVNode("h3", null, _toDisplayString(decisionFilterLabel()), 1), _createElementVNode("small", _hoisted_68, "٠راجعة Ù ÙØªØ±ØØ§Øª AI · " + _toDisplayString(visibleSuggestions.length) + " سج٠· Ø§ÙØªØ Ø¹ÙØµØ±Ø§Ù ÙØ§ØØ¯Ø§ÙØ Ø±Ø§Ø¬Ø¹ اÙ٠صدر ÙØ§ÙØªÙØ±Ø§Ø±Ø ث٠اتخذ اÙÙØ±Ø§Ø± ÙØ§ÙتÙÙ ÙÙØªØ§ÙÙ.", 1)]), _createElementVNode("div", _hoisted_69, [(decisionFilter!=='all') 18737 ? (_openBlock(), _createElementBlock("button", { 18738 key: 0, 18739 class: "smallbtn secondary", 18740 onClick: $event => (selectDecisionFilter('all')) 18741 }, "Ù٠اÙÙ ÙØ§Ù ", 8, _hoisted_70)) 18742 : _createCommentVNode("", true), _createElementVNode("button", { 18743 class: "smallbtn secondary", 18744 onClick: $event => ($router.push(currentHub.adminPath)) 18745 }, "إدارة اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر", 8, _hoisted_71)])]), 18746 (decisionFilter==='all') 18747 ? (_openBlock(), _createElementBlock("details", _hoisted_72, _cache[49] || (_cache[49] = [_createElementVNode("summary", null, [_createElementVNode("b", null, "طرÙÙØ© Ø§ÙØ§Ø¹ØªÙ اد Ø§ÙØµØÙØØ©"), _createElementVNode("span", null, "عرض Ø§ÙØ®Ø·Ùات")], -1), _createElementVNode("div", { class: "aiApprovalGuideBody" }, [_createElementVNode("div", { class: "aiApprovalGuideHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "طرÙÙØ© Ø§ÙØ§Ø¹ØªÙ اد Ø§ÙØµØÙØØ©"), _createElementVNode("h3", null, "أربع ٠راØÙ ÙØ§Ø¶ØØ© Ù Ù Ø§ÙØ§ÙØªØ±Ø§Ø Ø¥Ù٠اÙÙØ´Ø±")]), _createElementVNode("span", { class: "statusPill canaryPill" }, "ÙØ´Ø± بشر٠ÙÙØ·")]), _createElementVNode("ol", { class: "aiApprovalSteps" }, [ 18748 _createElementVNode("li", null, [_createElementVNode("b", null, "Ø´Ø§ÙØ¯ Ø§ÙØ§ÙØªØ±Ø§Ø ÙØ§ÙØµÙØ±Ø©"), _createElementVNode("small", null, "Ø§ÙØªØ اÙ٠صدر ÙØ±Ø§Ø¬Ø¹ اÙ٠عÙÙÙ Ø© ÙØ§ÙØµÙØ±Ø© اÙÙ ÙØªØ±ØØ© Ø¨Ø¬Ø§ÙØ¨Ùا.")]), 18749 _createElementVNode("li", null, [_createElementVNode("b", null, "اØÙظ ÙØ§ÙØØµ Ø§ÙØªÙرار"), _createElementVNode("small", null, "زر ÙØ§ØØ¯ ÙØÙØ¸ أ٠تعدÙ٠ث٠ÙÙØ§Ø±Ù بÙ٠اÙÙ ØØªÙ٠اÙÙØ´Ø·.")]), 18750 _createElementVNode("li", null, [_createElementVNode("b", null, "أرس٠ÙÙ٠راجعة"), _createElementVNode("small", null, "ÙÙÙÙ٠اÙÙ ØØªÙÙ ÙØ§ÙØµÙØ±Ø© ÙØªÙØÙظ بص٠ة ٠ا ت٠ت ٠راجعتÙ.")]), 18751 _createElementVNode("li", null, [_createElementVNode("b", null, "اعت٠د ÙØ§Ùشر"), _createElementVNode("small", null, "تØÙ٠٠٠اÙ٠صدر ÙØ§ÙÙ ØØªÙÙ ÙØ§ÙØµÙØ±Ø©Ø ث٠ÙÙ
18751ÙØ° اÙÙØ¸Ø§Ù ÙØØµØ§Ù ÙÙØ§Ø¦Ùا٠ÙÙÙØ´Ø±.")]) 18752 ]), _createElementVNode("p", { class: "aiApprovalGuarantee" }, [_createElementVNode("b", null, "ض٠ا٠اÙÙ ÙØ¹:"), _createTextVNode(" Ø¥Ù Ø¸ÙØ± تطاب٠٠ع Ø¹ÙØµØ± Ù ÙØ´Ùر Ø£Ù Ù ÙØªØ±Ø ÙØ´Ø·Ø ÙØªÙÙÙ Ø§ÙØ§Ø¹ØªÙ اد ÙÙØ¹Ø±Ø¶ اÙÙØ¸Ø§Ù Ø§ÙØ³Ø¬Ù اÙ٠تعارض. استÙÙ Ø§Ù Ø¹ÙØµØ± Ù ÙØ¬Ùد ÙØØ¯ÙØ« ÙÙØ³ Ø§ÙØ¨Ø·Ø§ÙØ© ÙÙØ§ ÙÙØ´Ø¦ ÙØ³Ø®Ø© Ø¬Ø¯ÙØ¯Ø©.")])], -1)]))) 18753 : _createCommentVNode("", true), 18754 _createElementVNode("div", _hoisted_73, [ 18755 _createElementVNode("button", { 18756 class: _normalizeClass({active:suggestionStatus==='pending'}), 18757 onClick: $event => (suggestionStatus='pending') 18758 }, "Ø§ÙØ¬Ø¯Ùدة", 10, _hoisted_74), 18759 _createElementVNode("button", { 18760 class: _normalizeClass({active:suggestionStatus==='in_review'}), 18761 onClick: $event => (suggestionStatus='in_review') 18762 }, "اÙ٠راجعة", 10, _hoisted_75), 18763 _createElementVNode("button", { 18764 class: _normalizeClass({active:suggestionStatus==='approved'}), 18765 onClick: $event => (suggestionStatus='approved') 18766 }, "اÙ٠عت٠دة", 10, _hoisted_76), 18767 _createElementVNode("button", { 18768 class: _normalizeClass({active:suggestionStatus==='rejected'}), 18769 onClick: $event => (suggestionStatus='rejected') 18770 }, "اÙ٠رÙÙØ¶Ø©", 10, _hoisted_77), 18771 _createElementVNode("button", { 18772 class: _normalizeClass({active:suggestionStatus==='all'}), 18773 onClick: $event => (suggestionStatus='all') 18774 }, "اÙÙÙ", 10, _hoisted_78) 18775 ]), 18776 (decisionFilter==='image') 18777 ? (_openBlock(), _createElementBlock("div", _hoisted_79, _cache[50] || (_cache[50] = [_createElementVNode("b", null, "٠راجعة Ø§ÙØµÙر", -1), _createElementVNode("span", null, "اعرض Ø§ÙØµÙرة ÙØ§Ù٠صدر ث٠اعت٠د Ø§ÙØµÙرة ÙÙØ·Ø Ø£Ù Ø§Ø±ÙØ¶ÙØ§Ø Ø£Ù Ø§Ø·ÙØ¨ ØµÙØ±Ø© أخرÙ. اعت٠اد Ø§ÙØµÙرة ÙØ§ ÙØ¹Ùد ØªÙØ«Ù٠اÙÙØµ.", -1)]))) 18778 : (decisionFilter==='update') 18779 ? (_openBlock(), _createElementBlock("div", _hoisted_80, _cache[51] || (_cache[51] = [_createElementVNode("b", null, "استÙ٠ا٠٠عÙÙ٠ات", -1), _createElementVNode("span", null, "ÙØ°Ù اÙÙØ§Ø¦Ù Ø© ٠خصصة ÙÙØ¹Ùاصر اÙÙ ÙØ¬Ùدة. راجع ÙÙØ· اÙ٠عÙÙÙ Ø© Ø§ÙØ¬Ø¯Ùدة أ٠اÙÙØ§Ùصة ÙØ¨Ù استÙ٠ا٠ÙÙØ³ Ø§ÙØ¹Ùصر.", -1)]))) 18780 : (decisionFilter==='excluded') 18781 ? (_openBlock(), _createElementBlock("div", _hoisted_81, _cache[52] || (_cache[52] = [_createElementVNode("b", null, "٠ستبعد تÙÙØ§Ø¦ÙاÙ", -1), _createElementVNode("span", null, "ÙØ°Ù Ø§ÙØ³Ø¬Ùات تعرض ÙÙØªØ¯ÙÙÙ ÙÙØ· ÙØ£ÙÙØ§ ٠تعارضة Ø£Ù Ù ÙØ±Ø±Ø©. ÙØ§ ØªÙØ¹Ø§Ù Ù ÙÙ ÙØ§Ù اعت٠اد ÙÙÙ ÙØ©.", -1)]))) 18782 : _createCommentVNode("", true), 18783 (!visibleSuggestions.length&&!store.state.busy) 18784 ? (_openBlock(), _createElementBlock("div", _hoisted_82, "ÙØ§ ØªÙØ¬Ø¯ Ø³Ø¬ÙØ§Øª Ù٠«" + _toDisplayString(decisionFilterLabel()) + "» ØØ§ÙÙØ§Ù.", 1)) 18785 : _createCommentVNode("", true), 18786 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleSuggestions, (s) => { 18787 return (_openBlock(), _createElementBlock("article", { 18788 class: _normalizeClass(["aiSuggestionCard aiReviewCard aiSuggestionDisclosure", ['risk-'+s.risk_level,'dedup-'+dedupStatus(s),{'taskTarget':String(s.id)===targetSuggestion,'is-open':suggestionOpen(s)}]]), 18789 "data-task-id": 'ai-suggestion-'+s.id, 18790 key: 'air'+s.id 18791 }, [_createElementVNode("button", { 18792 type: "button", 18793 class: "aiSuggestionSummary", 18794 "aria-expanded": suggestionOpen(s)?'true':'false', 18795 onClick: $event => (toggleSuggestion(s)) 18796 }, [_createElementVNode("div", null, [ 18797 _createElementVNode("span", _hoisted_85, "#" + _toDisplayString(s.id), 1), 18798 _createElementVNode("b", null, _toDisplayString(s.title_ar||'Ù ÙØªØ±Ø Ø¨ÙØ§ عÙÙØ§Ù'), 1), 18799 _createElementVNode("small", null, _toDisplayString(s.category_name_ar||'ÙÙ ÙØØ¯Ø¯ Ø§ÙØªØµÙÙÙ') + " · " + _toDisplayString(suggestionKindLabel(s.suggestion_kind)), 1), 18800 _createElementVNode("span", _hoisted_86, [_createElementVNode("em", { class: _normalizeClass({ready:suggestionReadiness(s).source}) }, "٠صدر " + _toDisplayString(suggestionReadiness(s).source?'â':'â'), 3), _createElementVNode("em", { class: _normalizeClass({ready:suggestionReadiness(s).image}) }, "ØµÙØ±Ø© " + _toDisplayString(suggestionReadiness(s).image?'â':'â'), 3), _createElementVNode("em", { class: _normalizeClass({ready:suggestionReadiness(s).dedup}) }, "ØªÙØ±Ø§Ø± " + _toDisplayString(suggestionReadiness(s).dedup?'â':'!'), 3)]) 18801 ]), _createElementVNode("div", _hoisted_87, [_createElementVNode("span", _hoisted_88, _toDisplayString(researchStatusLabel(s.status)), 1), _createElementVNode("span", { class: _normalizeClass(["statusPill", {'canaryPill':dedupStatus(s)==='clear','danger':dedupStatus(s)==='conflict'}]) }, _toDisplayString(dedupStatusLabel(s)), 3), _createElementVNode("span", _hoisted_89, _toDisplayString(suggestionOpen(s)?'â':'â'), 1)])], 8, _hoisted_84), (suggestionOpen(s)) 18802 ? (_openBlock(), _createElementBlock("div", _hoisted_90, [_createElementVNode("div", _hoisted_91, [ 18803 _createElementVNode("span", { class: _normalizeClass(["statusPill", {updatePill:s.suggestion_kind==='update_existing',newPill:s.suggestion_kind!=='update_existing'}]) }, _toDisplayString(suggestionKindLabel(s.suggestion_kind)), 3), 18804 _createElementVNode("span", _hoisted_92, _toDisplayString(gapReasonLabel(s.gap_reason)), 1), 18805 (s.job_run_kind==='canary') 18806 ? (_openBlock(), _createElementBlock("span", _hoisted_93, "اختبار ØÙ")) 18807 : _createCommentVNode("", true), 18808 _createElementVNode("span", _hoisted_94, "Ø«ÙØ© " + _toDisplayString(s.confidence) + "%", 1), 18809 _createElementVNode("span", { class: _normalizeClass(["statusPill", {danger:s.risk_level==='high'}]) }, _toDisplayString(researchRiskLabel(s.risk_level)), 3), 18810 (suggestionDirty(s)) 18811 ? (_openBlock(), _createElementBlock("span", _hoisted_95, "تعدÙÙØ§Øª ØºÙØ± Ù ØÙÙØ¸Ø©")) 18812 : _createCommentVNode("", true) 18813 ]), _createElementVNode("div", _hoisted_96, [ 18814 (s.suggestion_kind==='update_existing') 18815 ? (_openBlock(), _createElementBlock("div", _hoisted_97, [_cache[54] || (_cache[54] = _createElementVNode("span", { 18816 class: "metricMark", 18817 "aria-hidden": "true" 18818 }, null, -1)), _createElementVNode("div", null, [_createElementVNode("b", null, "سÙÙØ³ØªÙÙ Ù Ø§ÙØ¹Ùصر اÙÙ ÙØ¬Ùد #" + _toDisplayString(s.target_item_id), 1), _createElementVNode("p", null, _toDisplayString(s.target_item_title||'Ø¹ÙØµØ± ÙØ§Ø¦Ù ÙÙ Ø§ÙØ¯ÙÙÙ'), 1), _cache[53] || (_cache[53] = _createElementVNode("small", null, "ÙÙ ÙÙØ´Ø¦ Ø§ÙØ§Ø¹ØªÙ اد Ø¨Ø·Ø§ÙØ© Ø¬Ø¯ÙØ¯Ø©Ø ستÙÙ ÙØ£ Ø§ÙØ¨ÙØ§ÙØ§Øª اÙÙØ§Ùصة Ø£Ù ÙÙØ
18818·Ø¨ÙÙ Ø§ÙØªØµØÙØ Ø§ÙÙ ÙØ«Ù عÙÙ ÙÙØ³ Ø§ÙØ¹Ùصر.", -1))])])) 18819 : (_openBlock(), _createElementBlock("div", _hoisted_98, _cache[55] || (_cache[55] = [_createElementVNode("span", { 18820 class: "metricMark", 18821 "aria-hidden": "true" 18822 }, null, -1), _createElementVNode("div", null, [_createElementVNode("b", null, "Ù Ø±Ø´Ø ÙØ¥Ø¶Ø§ÙØ© ٠عÙÙÙ Ø© Ø¬Ø¯ÙØ¯Ø©"), _createElementVNode("small", null, "ÙØ°Ù ÙÙØ³Øª Ø´ÙØ§Ø¯Ø© ÙÙØ§Ø¦ÙØ©. اÙÙØØµ Ø§ÙØ¢ÙÙ Ø§ÙØØ§ÙÙ ÙØ§ÙÙØØµ Ø¯Ø§Ø®Ù Ù Ø¹Ø§Ù ÙØ© Ø§ÙØ§Ø¹ØªÙ اد Ù٠ا اÙÙØ°Ø§Ù ÙÙ ÙØ¹Ø§Ù Ø¥ÙØ´Ø§Ø¡ ÙØ³Ø®Ø© Ù ÙØ±Ø±Ø©.")], -1)]))), 18823 (s.status==='in_review') 18824 ? (_openBlock(), _createElementBlock("div", _hoisted_99, _cache[56] || (_cache[56] = [_createElementVNode("span", null, "ð", -1), _createElementVNode("div", null, [_createElementVNode("b", null, "اÙÙ ØØªÙÙ Ù ÙÙÙÙ ÙÙ٠راجعة"), _createElementVNode("small", null, "إذا Ø§ØØªØ§Ø¬ تعدÙÙÙØ§ استخد٠«إرجاع ÙÙØªØµØÙØÂ». أ٠تغÙÙØ± ÙÙØºÙ بص٠ة اÙ٠راجعة ÙÙØ§ ÙÙ Ù٠اعت٠ادÙ.")], -1)]))) 18825 : _createCommentVNode("", true), 18826 _createElementVNode("div", _hoisted_100, [_withDirectives(_createElementVNode("select", { 18827 "onUpdate:modelValue": $event => ((s.category_id) = $event), 18828 disabled: s.status!=='pending' 18829 }, [_cache[57] || (_cache[57] = _createElementVNode("option", { value: "" }, "اختر Ø§ÙØªØµÙÙÙ ÙØ¨Ù Ø§ÙØ¥Ø±Ø³Ø§Ù", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(categories, (c) => { 18830 return (_openBlock(), _createElementBlock("option", { 18831 key: 'sc'+s.id+'-'+c.id, 18832 value: c.id 18833 }, _toDisplayString(c.icon) + " " + _toDisplayString(c.name_ar), 9, _hoisted_102)) 18834 }), 128))], 8, _hoisted_101), [[_vModelSelect, s.category_id]]), (selectedHub!=='china_guide') 18835 ? _withDirectives((_openBlock(), _createElementBlock("select", { 18836 key: 0, 18837 "onUpdate:modelValue": $event => ((s.service_type) = $event), 18838 disabled: s.status!=='pending' 18839 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(serviceOptions(), (o) => { 18840 return (_openBlock(), _createElementBlock("option", { 18841 key: o[0], 18842 value: o[0] 18843 }, _toDisplayString(o[1]), 9, _hoisted_104)) 18844 }), 128))], 8, _hoisted_103)), [[_vModelSelect, s.service_type]]) 18845 : _createCommentVNode("", true)]), 18846 (selectedHub==='trade_shipping') 18847 ? _withDirectives((_openBlock(), _createElementBlock("select", { 18848 key: 3, 18849 "onUpdate:modelValue": $event => ((s.direction) = $event), 18850 disabled: s.status!=='pending' 18851 }, _cache[58] || (_cache[58] = [_createElementVNode("option", { value: "general" }, "عا٠/ Ø§ÙØ§ØªØ¬Ø§ÙÙÙ", -1), _createElementVNode("option", { value: "china_to_arab" }, "Ù Ù Ø§ÙØµÙ٠إÙÙ Ø§ÙØ¯ÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ©", -1), _createElementVNode("option", { value: "arab_to_china" }, "Ù Ù Ø§ÙØ¯ÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ© Ø¥ÙÙ Ø§ÙØµÙÙ", -1)]), 8, _hoisted_105)), [[_vModelSelect, s.direction]]) 18852 : _createCommentVNode("", true), 18853 _withDirectives(_createElementVNode("input", { 18854 "onUpdate:modelValue": $event => ((s.title_ar) = $event), 18855 disabled: s.status!=='pending', 18856 placeholder: "Ø§ÙØ¹ÙÙØ§Ù Ø§ÙØ¹Ø±Ø¨Ù" 18857 }, null, 8, _hoisted_106), [[_vModelText, s.title_ar]]), 18858 _withDirectives(_createElementVNode("textarea", { 18859 "onUpdate:modelValue": $event => ((s.summary_ar) = $event), 18860 disabled: s.status!=='pending', 18861 placeholder: "اÙÙ ÙØ®Øµ Ø§ÙØ°Ù Ø³ÙØ¸Ùر ÙÙ٠ستخد٠" 18862 }, null, 8, _hoisted_107), [[_vModelText, s.summary_ar]]), 18863 _createElementVNode("div", _hoisted_108, [_createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(s.source_name||s.source_domain||'اÙ٠صدر'), 1), _createElementVNode("small", null, _toDisplayString(s.source_domain||'-'), 1)]), _createElementVNode("a", { 18864 class: "sourceLink", 18865 href: s.source_url, 18866 target: "_blank", 18867 rel: "noopener noreferrer" 18868 }, "ÙØªØ اÙ٠صدر Ù٠راجعتÙ", 8, _hoisted_109)]), 18869 _createElementVNode("section", { class: _normalizeClass(["aiSuggestionImageReview", 'state-'+(s.image_status||'pending')]) }, [(s.image_status==='ready'&&s.image_url) 18870 ? (_openBlock(), _createElementBlock("figure", _hoisted_110, [_createElementVNode("img", { 18871 src: s.image_thumb_url||s.image_url, 18872 alt: 'Ø§ÙØµÙرة اÙÙ ÙØªØ±ØØ© ÙÙ '+(s.title_ar||'Ø§ÙØ¹Ùصر'), 18873 loading: "lazy"
18874 }, null, 8, _hoisted_111), (s.image_meta&&s.image_meta.ai_generated) 18875 ? (_openBlock(), _createElementBlock("figcaption", _hoisted_112, "Ø±Ø³Ù ØªÙØ¶ÙØÙ Ù ÙÙØ¯ Ø¨Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·Ùاع٠â ÙÙØ³ ØµÙØ±Ø© ÙÙÙ ÙÙØ¹ â ÙØ§ ÙÙÙØ´Ø± ÙØ¨Ù Ù ÙØ§ÙÙØªÙ")) 18876 : (_openBlock(), _createElementBlock("figcaption", _hoisted_113, "ØµÙØ±Ø© Ù ÙØªØ±ØØ© â ÙØ§ تÙÙØ´Ø± ÙØ¨Ù Ù ÙØ§ÙÙØªÙ"))])) 18877 : _createCommentVNode("", true), _createElementVNode("div", _hoisted_114, [ 18878 _createElementVNode("div", null, [_createElementVNode("span", _hoisted_115, _toDisplayString(s.image_status==='ready'?'ð¼ï¸':s.image_status==='fetching'?'â³':'ð'), 1), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(imageStatusLabel(s.image_status)), 1), (s.image_attribution) 18879 ? (_openBlock(), _createElementBlock("small", _hoisted_116, _toDisplayString(s.image_attribution), 1)) 18880 : (s.image_error) 18881 ? (_openBlock(), _createElementBlock("small", _hoisted_117, _toDisplayString(safeImageErrorText(s.image_error,s.image_status,s.image_meta)), 1)) 18882 : (_openBlock(), _createElementBlock("small", _hoisted_118, "ÙØ¨ØØ« اÙÙØ¸Ø§Ù داخ٠٠صدر اÙÙ ÙØªØ±Ø ÙÙØ¶Ø¨Ø· Ø§ÙØµÙرة تÙÙØ§Ø¦ÙاÙ."))])]), 18883 (s.image_source_url) 18884 ? (_openBlock(), _createElementBlock("a", { 18885 key: 0, 18886 class: "sourceLink", 18887 href: s.image_source_url, 18888 target: "_blank", 18889 rel: "noopener noreferrer" 18890 }, "ÙØªØ Ø£ØµÙ Ø§ÙØµÙرة", 8, _hoisted_119)) 18891 : _createCommentVNode("", true), 18892 (s.status==='pending'&&['not_found','failed'].includes(s.image_status)) 18893 ? (_openBlock(), _createElementBlock("button", { 18894 key: 1, 18895 class: "smallbtn secondary", 18896 onClick: $event => (refreshResearchImage(s)) 18897 }, "إعادة Ø¬ÙØ¨ Ø§ÙØµÙرة ٠٠اÙ٠صدر", 8, _hoisted_120)) 18898 : _createCommentVNode("", true), 18899 (s.status==='in_review'&&s.image_status==='ready') 18900 ? (_openBlock(), _createElementBlock("label", _hoisted_121, [_withDirectives(_createElementVNode("input", { 18901 type: "checkbox", 18902 "onUpdate:modelValue": $event => ((s._useImage) = $event) 18903 }, null, 8, _hoisted_122), [[_vModelCheckbox, s._useImage]]), _cache[59] || (_cache[59] = _createTextVNode(" ÙØ´Ø± ÙØ°Ù Ø§ÙØµÙرة ٠ع Ø§ÙØ¹Ùصر بعد Ø§Ø¹ØªÙ Ø§Ø¯ÙØ§"))])) 18904 : _createCommentVNode("", true), 18905 (s.suggestion_kind==='update_existing'&&s.target_item_image_url&&s._useImage) 18906 ? (_openBlock(), _createElementBlock("small", _hoisted_123, "Ø³ÙØªÙ Ø§Ø³ØªØ¨Ø¯Ø§Ù ØµÙØ±Ø© Ø§ÙØ¹Ùصر Ø§ÙØØ§ÙÙØ© Ø¨Ø§ÙØµÙرة Ø§ÙØªÙ ØªØ¹ØªÙ Ø¯ÙØ§ ÙÙØ§.")) 18907 : _createCommentVNode("", true) 18908 ])], 2), 18909 _createElementVNode("p", _hoisted_124, [_cache[60] || (_cache[60] = _createElementVNode("b", null, "Ø®ÙØ§ØµØ© Ø§ÙØ¯ÙÙÙ:", -1)), _createTextVNode(" " + _toDisplayString(s.evidence_summary||'ÙÙ ÙØ¶Ù اÙÙ ØØ±Ù Ø®ÙØ§ØµØ©.'), 1)]), 18910 _createElementVNode("details", _hoisted_125, [_cache[62] || (_cache[62] = _createElementVNode("summary", null, "ØªÙØ§ØµÙÙ Ø§ÙØªØØ±Ùر ÙØ§Ù٠راجعة", -1)), _createElementVNode("div", _hoisted_126, [_withDirectives(_createElementVNode("textarea", { 18911 "onUpdate:modelValue": $event => ((s.description_ar) = $event), 18912 disabled: s.status!=='pending', 18913 placeholder: "اÙÙØµÙ اÙÙØ§Ù Ù" 18914 }, null, 8, _hoisted_127), [[_vModelText, s.description_ar]]), _createElementVNode("div", _hoisted_128, [_withDirectives(_createElementVNode("input", { 18915 "onUpdate:modelValue": $event => ((s.source_name) = $event), 18916 disabled: s.status!=='pending', 18917 placeholder: "اس٠اÙ٠صدر" 18918 }, null, 8, _hoisted_129), [[_vModelText, s.source_name]]), _withDirectives(_createElementVNode("input", { 18919 "onUpdate:modelValue": $event => ((s.source_url) = $event), 18920 disabled: s.status!=='pending', 18921 placeholder: "رابط اÙ٠صدر" 18922 }, null, 8, _hoisted_130), [[_vModelText, s.source_url]])]), _withDirectives(_createElementVNode("select", { 18923 "onUpdate:modelValue": $event => ((s.risk_level) = $event), 18924 disabled: s.status!=='pending' 18925 }, _cache[61] || (_cache[61] = [_createElementVNode("option", { value: "low" }, "٠خاطر Ù ÙØ®Ùضة", -1), _createElementVNode("option", { value: "standard" }, "٠خاطر Ø¹Ø§Ø¯ÙØ©", -1), _createElementVNode("option", { value: "high" }, "عاÙ٠اÙ٠خاطر", -1)]), 8, _hoisted_131), [[_vModelSelect, s.risk_level]])])]), 18926 _createElementVNode("section", { class: _normalizeClass(["aiDedupCertificate", 'state-'+dedupStatus(s)]) }, [ 18927 _createElementVNode("div", _hoisted_132, [_createElementVNode("span", null, _toDisplayString(dedupStatus(s)==='clear'?'ð¡ï¸':dedupStatus(s)==='conflict'?'â':'ð'), 1), _createElementVNode("div", null, [_createElementVNode("b", null, "Ø´ÙØ§Ø¯Ø© Ù ÙØ¹ Ø§ÙØªÙرار: " + _toDisplayString(dedupStatusLabel(s)), 1), _createElementVNode("small", null, _toDisplayString(suggestionDirty(s)?'اØÙظ Ø§ÙØªØ¹Ø¯ÙÙ ÙØ¨Ù اÙÙØØµ':dedupReasonLabel(s.dedup_current_reason||s.dedup_reason)), 1)])]), 18928 (dedupMatchText(s)) 18929 ? (_openBlock(), _createElementBlock("p", _hoisted_133, "Ø§ÙØªØ¹Ø§Ø±Ø¶ ٠ع: " + _toDisplayString(dedupMatchText(s)), 1)) 18930 : (s.dedup_stale) 18931 ? (_openBlock(), _createElementBlock("p", _hoisted_134, "تغÙÙØ± جرد Ø§ÙØ¯ÙÙ٠بعد آخر Ø´ÙØ§Ø¯Ø©Ø ÙÙÙØ° اÙÙØØµ ٠رة أخرÙ.")) 18932 : _createCommentVNode("", true), 18933 _createElementVNode("div", _hoisted_135, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(s.dedup_checked_item_count||research.inventory.item_count||0), 1), _cache[63] || (_cache[63] = _createElementVNode("small", null, "Ø¹ÙØµØ± ÙÙ Ø§ÙØ¯ÙÙÙ", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(s.dedup_checked_suggestion_count||0), 1), _cache[64] || (_cache[64] = _createElementVNode("small", null, "Ù ÙØªØ±Ø ÙØ´Ø·", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(s.dedup_checked_at?shortDate(s.dedup_checked_at):'-'), 1), _cache[65] || (_cache[65] = _createElementVNode("small", null, "آخر Ø´ÙØ§Ø¯Ø©", -1))])]), 18934 _cache[66] || (_cache[66] = _createElementVNode("small", { class: "aiFinalCheckNote" }, "ÙØ¹Ø§Ø¯ ÙÙØ³ اÙÙØØµ ÙÙ٠رة Ø§ÙØ£Ø®Ùرة Ø¯Ø§Ø®Ù Ù Ø¹Ø§Ù ÙØ© Ø§ÙØ§Ø¹ØªÙ اد ÙØ¨Ù Ø£Ù ÙØªØ§Ø¨Ø© Ø£Ù ÙØ´Ø±.", -1)) 18935 ], 2), 18936 _withDirectives(_createElementVNode("textarea", { 18937 "onUpdate:modelValue": $event => ((s.admin_note) = $event), 18938 disabled: s.status==='approved'||s.status==='rejected', 18939 placeholder: "Ù ÙØ§ØØ¸Ø© اÙ٠راجع" 18940 }, null, 8, _hoisted_136), [[_vModelText, s.admin_note]]),
18941 (s.risk_level==='high'&&!canOperate) 18942 ? (_openBlock(), _createElementBlock("p", _hoisted_137, _cache[67] || (_cache[67] = [_createElementVNode("b", null, "ÙØªØ·Ùب إدارة عÙÙØ§:", -1), _createTextVNode(" ÙØ°Ø§ اÙÙ ÙØªØ±Ø عاÙ٠اÙ٠خاطر ÙÙØ§ ÙÙ ÙÙ Ø§Ø¹ØªÙ Ø§Ø¯Ù Ù Ù ÙØ°Ø§ Ø§ÙØØ³Ø§Ø¨.")]))) 18943 : _createCommentVNode("", true), 18944 (s.review_content_changed) 18945 ? (_openBlock(), _createElementBlock("div", _hoisted_138, _cache[68] || (_cache[68] = [_createElementVNode("b", null, "تغÙÙØ± اÙÙ ØØªÙ٠بعد Ø§ÙØ¥Ø±Ø³Ø§Ù.", -1), _createElementVNode("small", null, "Ø§ÙØ§Ø¹ØªÙ اد Ù ÙÙÙÙ. أعد اÙÙ ÙØªØ±Ø ÙÙÙ Ø³ÙØ¯Ø© Ø«Ù ØµØØÙ ÙØ£Ø¹Ø¯ اÙÙØØµ ÙØ§ÙإرساÙ.", -1)]))) 18946 : _createCommentVNode("", true), 18947 (s.status==='pending') 18948 ? (_openBlock(), _createElementBlock("div", _hoisted_139, [_createElementVNode("button", { 18949 class: "smallbtn secondary", 18950 onClick: $event => (saveAndCheckSuggestion(s)) 18951 }, _toDisplayString(suggestionDirty(s)?'2. ØÙظ ÙÙØØµ Ø§ÙØªÙرار':dedupStatus(s)==='clear'?'2. إعادة ÙØØµ Ø§ÙØªÙرار':'2. ÙØØµ Ø§ÙØªÙرار'), 9, _hoisted_140), _createElementVNode("button", { 18952 class: "smallbtn", 18953 disabled: !canSubmitSuggestion(s)||submittingSuggestionId===String(s.id), 18954 onClick: $event => (reviewResearchSuggestion(s,'submit')) 18955 }, _toDisplayString(submittingSuggestionId===String(s.id)?'Ø¬Ø§Ø±Ù Ø§ÙØ¥Ø±Ø³Ø§Ù...':'إرسا٠ÙÙ٠راجعة'), 9, _hoisted_141), _createElementVNode("button", { 18956 class: "smallbtn danger", 18957 onClick: $event => (reviewResearchSuggestion(s,'reject')) 18958 }, "Ø±ÙØ¶ Ø§ÙØ§ÙتراØ", 8, _hoisted_142)])) 18959 : (s.status==='in_review') 18960 ? (_openBlock(), _createElementBlock("section", _hoisted_143, [ 18961 _cache[73] || (_cache[73] = _createElementVNode("h4", null, "تØÙ٠اÙ٠راجع ÙØ¨Ù Ø§ÙØ§Ø¹ØªÙ اد", -1)), 18962 _createElementVNode("label", null, [_withDirectives(_createElementVNode("input", { 18963 type: "checkbox", 18964 "onUpdate:modelValue": $event => ((s._reviewChecks.source_verified) = $event) 18965 }, null, 8, _hoisted_144), [[_vModelCheckbox, s._reviewChecks.source_verified]]), _cache[69] || (_cache[69] = _createTextVNode(" ÙØªØØª اÙ٠صدر ÙØªØ£Ùدت Ø£ÙÙ ÙØ«Ø¨Øª اÙ٠عÙÙÙ Ø© Ø§ÙØØ§ÙÙØ©."))]), 18966 _createElementVNode("label", null, [_withDirectives(_createElementVNode("input", { 18967 type: "checkbox", 18968 "onUpdate:modelValue": $event => ((s._reviewChecks.content_verified) = $event) 18969 }, null, 8, _hoisted_145), [[_vModelCheckbox, s._reviewChecks.content_verified]]), _cache[70] || (_cache[70] = _createTextVNode(" راجعت Ø§ÙØ¹ÙÙØ§Ù ÙØ§ÙÙ ÙØ®Øµ ÙØ§ÙتصÙÙÙØ ÙØªØ£Ùدت Ø£Ù Ø§ÙØ§Ø³ØªÙÙ Ø§Ù ÙØ¶ÙÙ Ø¨ÙØ§Ùات ÙØ¹ÙÙØ©."))]), 18970 (s._useImage) 18971 ? (_openBlock(), _createElementBlock("label", _hoisted_146, [_withDirectives(_createElementVNode("input", { 18972 type: "checkbox", 18973 "onUpdate:modelValue": $event => ((s._reviewChecks.image_verified) = $event) 18974 }, null, 8, _hoisted_147), [[_vModelCheckbox, s._reviewChecks.image_verified]]), _cache[71] || (_cache[71] = _createTextVNode(" ÙØªØØª Ø§ÙØµÙرة ÙØªØ£Ùدت Ø£ÙÙØ§ تخص Ø§ÙØ¹Ùصر ÙÙÙ ÙÙ ÙØ´Ø±Ùا ٠ع ØªÙØ«ÙÙ Ù ØµØ¯Ø±ÙØ§."))])) 18975 : _createCommentVNode("", true), 18976 _createElementVNode("label", null, [_withDirectives(_createElementVNode("input", { 18977 type: "checkbox", 18978 "onUpdate:modelValue": $event => ((s._reviewChecks.publish_confirmed) = $event) 18979 }, null, 8, _hoisted_148), [[_vModelCheckbox, s._reviewChecks.publish_confirmed]]), _cache[72] || (_cache[72] = _createTextVNode(" Ø£ÙÙÙ Ø£Ù Ø§ÙØ§Ø¹ØªÙ اد سÙÙØ´Ø± Ø§ÙØ¥Ø¶Ø§ÙØ© Ø£Ù ÙØØ¯ÙØ« Ø§ÙØ¹Ùصر اÙÙØ§Ø¦Ù بعد اÙÙØØµ اÙÙÙØ§Ø¦Ù."))]), 18980 _createElementVNode("div", _hoisted_149, [_createElementVNode("button", { 18981 class: "smallbtn", 18982 disabled: !canApproveSuggestion(s), 18983 onClick: $event => (reviewResearchSuggestion(s,'approve')) 18984 }, _toDisplayString(s.suggestion_kind==='update_existing'?'4. اعت٠اد استÙÙ Ø§Ù Ø§ÙØ¹Ùصر':'4. اعت٠اد ÙÙØ´Ø± Ø§ÙØ¥Ø¶Ø§ÙØ©'), 9, _hoisted_150), _createElementVNode("button", { 18985 class: "smallbtn secondary", 18986 onClick: $event => (reviewResearchSuggestion(s,'return')) 18987 }, "إرجاع ÙÙØªØµØÙØ", 8, _hoisted_151), _createElementVNode("button", { 18988 class: "smallbtn danger", 18989 onClick: $event => (reviewResearchSuggestion(s,'reject')) 18990 }, "Ø±ÙØ¶", 8, _hoisted_152)]) 18991 ])) 18992 : (s.status==='approved'||s.status==='rejected') 18993 ? (_openBlock(), _createElementBlock("div", _hoisted_153, [(s.approved_item_id) 18994 ? (_openBlock(), _createElementBlock("a", { 18995 key: 0, 18996 class: "smallbtn secondary", 18997 href: currentHub.publicPath, 18998 target: "_blank", 18999 rel: "noopener" 19000 }, "ÙØªØ اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر", 8, _hoisted_154)) 19001 : _createCommentVNode("", true), _createElementVNode("button", { 19002 class: "smallbtn danger", 19003 onClick: $event => (reviewResearchSuggestion(s,'archive')) 19004 }, "Ø£Ø±Ø´ÙØ© اÙÙ ÙØªØ±Ø", 8, _hoisted_155)])) 19005 : _createCommentVNode("", true) 19006 ])])) 19007 : _createCommentVNode("", true)], 10, _hoisted_83)) 19008 }), 128)) 19009 ])) 19010 : (workspace==='jobs') 19011 ? (_openBlock(), _createElementBlock("section", _hoisted_156, [ 19012 canOperate 19013 ? (_openBlock(), _createBlock(_component_AiQualityPanel, { 19014 key: 0, 19015 hub: selectedHub 19016 }, null, 8, ["hub"])) 19017 : _createCommentVNode("", true), 19018 canOperate 19019 ? (_openBlock(), _createBlock(_component_AiKnowledgeGapsPanel, { 19020 key: 1, 19021 hub: selectedHub 19022 }, null, 8, ["hub"])) 19023 : _createCommentVNode("", true), 19024 (canOperate&&selectedHub==='china_guide') 19025 ? (_openBlock(), _createBlock(_component_ExhibitionDatesPanel, { key: 2 })) 19026 : _createCommentVNode("", true), 19027 _createElementVNode("div", _hoisted_157, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_158, _toDisplayString(currentHub.icon) + " " + _toDisplayString(currentHub.label), 1), _cache[74] || (_cache[74] = _createElementVNode("h3", null, "تشغÙÙ Ø§ÙØ¨ØØ«", -1)), _cache[75] || (_cache[75] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØ¨ØØ« اÙÙØ§Ù Ù ÙØ¬Ù ع ٠صادر ÙÙØ¨ ÙÙÙØ§Ø±ÙÙØ§ Ø¨Ø§ÙØ¬Ø±Ø¯ Ø«Ù ÙØ±Ø³Ù اÙÙ ÙØªØ±ØØ§Øª ÙÙ٠راجعة Ø§ÙØ¨Ø´Ø±ÙØ©. اختبار Ø§ÙØ¬Ø§ÙØ²ÙØ© ÙØØµ Ù ØØ¯Ùد Ø¨ÙØªÙجة ÙØ§ØØ¯Ø©.", -1))]), _createElementVNode("button", { 19028 class: "smallbtn secondary", 19029 onClick: load 19030 }, "ØªØØ¯ÙØ« Ø§ÙØØ§ÙØ©", 8, _hoisted_159)]), 19031 latestStandardJob 19032 ? (_openBlock(), _createElementBlock("section", { 19033 key: 3, 19034 class: _normalizeClass(["card aiRunOverview", ['state-'+latestStandardJob.status,{active:!!activeStandardJob}]]) 19035 }, [ 19036 _createElementVNode("div", _hoisted_160, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_161, _toDisplayString(researchStatusLabel(latestStandardJob.status)), 1), _createElementVNode("h3", null, "Ù ÙÙ Ø© Ø§ÙØ¨ØØ« #" + _toDisplayString(latestStandardJob.id), 1), _createElementVNode("p", null, _toDisplayString(latestStandardJob.status==='processing'?'Ø§ÙØ¨ØØ« ÙØ¹Ù Ù Ø§ÙØ¢Ù ÙÙØªÙ ØªØØ¯ÙØ« Ø§ÙØ£Ø±Ùا٠تÙÙØ§Ø¦Ùا٠Ù٠ثاÙÙØªÙÙ.':latestStandardJob.status==='queued'?'اÙÙ ÙÙ Ø© ÙÙ Ø§ÙØ·Ø§Ø¨Ùر ÙØ³ØªØ¨Ø¯Ø£ تÙÙØ§Ø¦ÙاÙ.':'آخر Ù ÙÙ Ø© Ø¨ØØ« ÙØ§Ù ÙØ© ÙÙØ°Ø§ اÙÙØ³Ù .'), 1)]), _cache[76] || (_cache[76] = _
19036createElementVNode("span", { class: "vueBadge" }, "Standard · Ø¨ØØ« ÙØ§Ù Ù", -1))]), 19037 _createElementVNode("div", _hoisted_162, [ 19038 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(latestStandardJob.inventory_item_count||0), 1), _cache[77] || (_cache[77] = _createElementVNode("small", null, "ÙØ±Ø£ Ù Ù Ø§ÙØ¯ÙÙÙ", -1))]), 19039 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(latestStandardJob.source_count||0), 1), _cache[78] || (_cache[78] = _createElementVNode("small", null, "٠صادر ÙÙØ¨", -1))]), 19040 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(latestStandardJob.result_count||0), 1), _cache[79] || (_cache[79] = _createElementVNode("small", null, "Ù ÙØªØ±ØØ§Øª", -1))]), 19041 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(latestStandardJob.duplicate_count||0), 1), _cache[80] || (_cache[80] = _createElementVNode("small", null, "Ù ÙØ±Ø±", -1))]), 19042 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(formatDuration(latestStandardJob.duration_ms)), 1), _cache[81] || (_cache[81] = _createElementVNode("small", null, "اÙ٠دة", -1))]) 19043 ]), 19044 (researchJobHasFailure(latestStandardJob)) 19045 ? (_openBlock(), _createElementBlock("div", _hoisted_163, [_createElementVNode("b", _hoisted_164, _toDisplayString(researchFailureLabel(latestStandardJob)), 1), _createElementVNode("small", null, _toDisplayString(researchFailureHelp(latestStandardJob)), 1)])) 19046 : (latestStandardJob.error_text) 19047 ? (_openBlock(), _createElementBlock("div", _hoisted_165, [_cache[82] || (_cache[82] = _createElementVNode("b", null, "Ø§ÙØªÙ Ù Ø§ÙØ¨ØØ« ٠ع Ù ÙØ§ØØ¸Ø§Øª", -1)), _createElementVNode("small", null, _toDisplayString(researchNoticeText(latestStandardJob)), 1)])) 19048 : _createCommentVNode("", true), 19049 (latestStandardJob.status==='completed') 19050 ? (_openBlock(), _createElementBlock("div", _hoisted_166, [_createVNode(_component_router_link, { 19051 class: "smallbtn", 19052 to: {path:'/admin/ai-research',query:{hub:selectedHub,workspace:'review',status:'pending',job:latestStandardJob.id}} 19053 }, { 19054 default: _withCtx(() => _cache[83] || (_cache[83] = [_createTextVNode("ÙØªØ اÙÙØªØ§Ø¦Ø¬ ÙÙ٠راجعة")])), 19055 _: 1, 19056 __: [83] 19057 }, 8, ["to"])])) 19058 : _createCommentVNode("", true) 19059 ], 2)) 19060 : _createCommentVNode("", true), 19061 canOperate 19062 ? (_openBlock(), _createElementBlock("div", _hoisted_167, [ 19063 _cache[87] || (_cache[87] = _createElementVNode("div", { class: "aiRunCardHead" }, [_createElementVNode("span", { class: "vueBadge" }, "Ø¨ØØ« ÙØ§Ù ٠· Standard"), _createElementVNode("h3", null, "Ø¨ØØ« Ø¬Ø¯ÙØ¯ ÙØ³Ø¯ اÙÙØ¬Ùات"), _createElementVNode("p", { class: "hint" }, "Ø§ÙØ±Ø£ Ø§ÙØ¬Ø±Ø¯ Ø£ÙÙØ§ÙØ Ø«Ù Ø§Ø¨ØØ« Ù٠اÙÙÙØ¨ ع٠٠عÙÙ٠ات ØºÙØ± Ù ÙØ±Ø±Ø©. اتر٠اÙÙØ¯Ù Ø§ÙØªØØ±ÙØ±Ù ÙØ§Ø±ØºØ§Ù ÙÙØØ¯Ø¯ اÙÙ ØØ±Ù Ø§ÙØ£ÙÙÙÙØ§Øª ٠٠اÙÙØ¬Ùات ÙØ§ÙØªØºØ·ÙØ©.")], -1)), 19064 _createElementVNode("label", _hoisted_168, [_cache[85] || (_cache[85] = _createTextVNode("ÙØ·Ø§Ù Ø§ÙØ¨ØØ«")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((researchForm.category_id) = $event) }, [_cache[84] || (_cache[84] = _createElementVNode("option", { value: "" }, "Ù٠تصÙÙÙØ§Øª ÙØ°Ø§ اÙÙØ³Ù ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(categories, (c) => { 19065 return (_openBlock(), _createElementBlock("option", { 19066 key: 'aircat'+c.id, 19067 value: c.id 19068 }, _toDisplayString(c.icon) + " " + _toDisplayString(c.name_ar), 9, _hoisted_170)) 19069 }), 128))], 8, _hoisted_169), [[_vModelSelect, researchForm.category_id]])]), 19070 _createElementVNode("label", _hoisted_171, [_cache[86] || (_cache[86] = _createTextVNode("ÙØ¯Ù ØªØØ±ÙØ±Ù Ø§Ø®ØªÙØ§Ø±Ù")), _withDirectives(_createElementVNode("textarea", { 19071 "onUpdate:modelValue": $event => ((researchForm.query_text) = $event), 19072 placeholder: "Ø§Ø®ØªÙØ§Ø±Ù â ٠ثاÙ: ØªØØ³ÙÙ ØªØºØ·ÙØ© خد٠ات Ø§ÙØ³ÙÙ ÙÙ ÙÙØ§ÙغتشÙ" 19073 }, null, 8, _hoisted_172), [[_vModelText, researchForm.query_text]])]), 19074 _createElementVNode("button", { 19075 class: "btn aiPrimaryRunButton", 19076 disabled: !!activeStandardJob||store.state.busy, 19077 onClick: runResearch 19078 }, _toDisplayString(activeStandardJob?'Ø¨ØØ« ÙØ§Ù Ù ÙØ¹Ù Ù Ø§ÙØ¢Ù':'تشغÙÙ Ø¨ØØ« ÙØ§Ù Ù'), 9, _hoisted_173), 19079 _cache[88] || (_cache[88] = _createElementVNode("small", { class: "hint" }, "بعد Ø§ÙØªØ´ØºÙÙ ÙØ§ ØªØØªØ§Ø¬ ÙØªØØ¯ÙØ« Ø§ÙØµÙØØ©. Ø§ÙØØ§ÙØ© ÙØ§Ù٠صادر ÙØ§ÙÙ ÙØªØ±ØØ§Øª ØªØªØØ¯Ø« تÙÙØ§Ø¦ÙاÙ.", -1)) 19080 ])) 19081 : (_openBlock(), _createElementBlock("div", _hoisted_174, _cache[89] || (_cache[89] = [_createElementVNode("b", null, "عرض ÙÙØ·:", -1), _createTextVNode(" ÙÙ ÙÙ٠٠تابعة اÙÙ ÙØ§Ù Ù٠راجعة اÙÙ ÙØªØ±ØØ§Øª. تشغÙÙ Ø§ÙØ¨ØØ« Ù ØªØ§Ø ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§ ÙÙØ·.")]))), 19082 _createElementVNode("section", { class: _normalizeClass(["card aiCanaryCard", 'state-'+research.readiness.state]) }
19082, [_createElementVNode("div", _hoisted_175, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_176, _toDisplayString(readinessLabel(research.readiness.state)), 1), _cache[90] || (_cache[90] = _createElementVNode("h3", null, "اختبار Ø§ÙØ¬Ø§ÙØ²ÙØ© · Canary", -1)), _createElementVNode("p", null, _toDisplayString(readinessHelp(research.readiness)), 1)]), canOperate 19083 ? (_openBlock(), _createElementBlock("button", { 19084 key: 0, 19085 class: "btn secondary", 19086 disabled: research.readiness.state==='running'||store.state.busy, 19087 onClick: runCanary 19088 }, _toDisplayString(research.readiness.state==='running'?'Ø§ÙØ§Ø®ØªØ¨Ø§Ø± ÙØ¹Ù Ù Ø§ÙØ¢Ù':'تشغÙ٠اختبار Ù ØØ¯Ùد'), 9, _hoisted_177)) 19089 : _createCommentVNode("", true)]), (research.readiness.job) 19090 ? (_openBlock(), _createElementBlock("div", _hoisted_178, [ 19091 _createElementVNode("span", null, [_createElementVNode("b", null, "#" + _toDisplayString(research.readiness.job.id), 1), _cache[91] || (_cache[91] = _createElementVNode("small", null, "آخر اختبار", -1))]), 19092 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.readiness.job.source_count||0), 1), _cache[92] || (_cache[92] = _createElementVNode("small", null, "٠صادر", -1))]), 19093 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(Number(research.readiness.job.result_count||0)+Number(research.readiness.job.duplicate_count||0)), 1), _cache[93] || (_cache[93] = _createElementVNode("small", null, "ÙØªÙجة ØµØ§ÙØØ©", -1))]), 19094 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(formatDuration(research.readiness.job.duration_ms)), 1), _cache[94] || (_cache[94] = _createElementVNode("small", null, "٠دة Ø§ÙØªÙÙÙØ°", -1))]) 19095 ])) 19096 : _createCommentVNode("", true), _cache[95] || (_cache[95] = _createElementVNode("div", { class: "aiCanaryBoundary" }, [_createElementVNode("b", null, "اختبار ÙÙØ·:"), _createTextVNode(" Ø·ÙØ¨ ØÙ ÙØ§ØØ¯Ø ØØ¯ Ø£ÙØµÙ Ù ÙØªØ±Ø ÙØ§ØØ¯Ø ÙÙØ§ ÙØ´Ø± تÙÙØ§Ø¦Ù.")], -1))], 2), 19097 canOperate 19098 ? (_openBlock(), _createElementBlock("details", _hoisted_179, [_cache[97] || (_cache[97] = _createElementVNode("summary", null, [_createElementVNode("b", null, "Ø£Ø¯ÙØ§Øª تÙÙÙØ© Ù ØªÙØ¯Ù Ø©"), _createElementVNode("span", null, "ÙØ§ تستخد٠عادةÙ")], -1)), _createElementVNode("div", _hoisted_180, [_cache[96] || (_cache[96] = _createElementVNode("p", { class: "hint" }, "اÙÙ Ø¹Ø§ÙØ¬ ÙØ¨Ø¯Ø£ اÙÙ ÙØ§Ù تÙÙØ§Ø¦ÙاÙ. Ø§Ø³ØªØ®Ø¯Ù Ø§ÙØªØ´ØºÙ٠اÙÙØ¯ÙÙ ÙÙØ·Ø§Ø¨Ùر ÙÙØ· Ø£Ø«ÙØ§Ø¡ Ø§ÙØªØ´Ø®Ùص Ø§ÙØªÙÙÙ.", -1)), _createElementVNode("button", { 19099 class: "smallbtn secondary", 19100 onClick: processResearch 19101 }, "تشغÙÙ Ø§ÙØ·Ø§Ø¨Ùر ÙØ¯ÙÙØ§Ù", 8, _hoisted_181)])])) 19102 : _createCommentVNode("", true), 19103 _createElementVNode("details", { 19104 class: "card aiAdminDisclosure", 19105 open: !!targetJob 19106 }, [_createElementVNode("summary", null, [_cache[98] || (_cache[98] = _createElementVNode("b", null, "Ø³Ø¬Ù Ù ÙØ§Ù Ø§ÙØ¨ØØ«", -1)), _createElementVNode("span", null, [_createTextVNode(_toDisplayString(showAllJobs?research.jobs.length:visibleJobs.length) + " Ù ÙÙ Ø©", 1), (!showAllJobs&&routineJobCount) 19107 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(routineJobCount) + " Ø±ÙØªÙÙÙØ© Ù Ø®ÙÙØ©", 1)], 64)) 19108 : _createCommentVNode("", true)])]), _createElementVNode("div", _hoisted_183, [_createElementVNode("button", { 19109 type: "button", 19110 class: _normalizeClass({active:!showAllJobs}), 19111 onClick: $event => (showAllJobs=false) 19112 }, "اÙÙ ÙÙ Ø©", 10, _hoisted_184), _createElementVNode("button", { 19113 type: "button", 19114 class: _normalizeClass({active:showAllJobs}), 19115 onClick: $event => (showAllJobs=true) 19116 }, "ÙÙ Ø§ÙØ³Ø¬Ù (" + _toDisplayString(research.jobs.length) + ")", 11, _hoisted_185)]), _createElementVNode("div", _hoisted_186, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleJobs, (job) => { 19117 return (_openBlock(), _createElementBlock("article", { 19118 class: _normalizeClass(["card aiJobCard", {taskTarget:String(job.id)===targetJob}]), 19119 "data-task-id": 'ai-job-'+job.id, 19120 key: 'job'+job.id 19121 }, [ 19122 _createElementVNode("div", _hoisted_188, [_createElementVNode("div", null, [_createElementVNode("h3", null, _toDisplayString(job.query_text||'خطة سد اÙÙØ¬Ùات Ø§ÙØ§ÙØªØ±Ø§Ø¶ÙØ©'), 1), _createElementVNode("p", _hoisted_189, _toDisplayString(job.run_kind==='canary'?'اختبار Ø¬Ø§ÙØ²ÙØ© ØÙ':(job.trigger_type==='scheduled'?'Ø¨ØØ« تÙÙØ§Ø¦Ù':'Ø¨ØØ« ÙØ¯ÙÙ')) + " · " + _toDisplayString(shortDate(job.created_at)), 1)]), _createElementVNode("span", { class: _normalizeClass(["statusPill", {canaryPill:job.run_kind==='canary'}]) }, _toDisplayString(researchStatusLabel(job.status)), 3)]), 19123 _createElementVNode("div", _hoisted_190, [ 19124 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(job.inventory_item_count||0), 1), _cache[99] || (_cache[99] = _createElementVNode("small", null, "ÙØ±Ø£ Ù Ù Ø§ÙØ¯ÙÙÙ", -1))]), 19125 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(job.source_count||0), 1), _cache[100] || (_cache[100] = _createElementVNode("small", null, "٠صادر ÙÙØ¨", -1))]), 19126 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(job.result_count||0), 1), _cache[101] || (_cache[101] = _createElementVNode("small", null, "Ù ÙØªØ±ØØ§Øª", -1))]), 19127 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(job.duplicate_count||0), 1), _cache[102] || (_cache[102] = _createElementVNode("small", null, "Ù ÙØ±Ø±", -1))]), 19128 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(job.attempts||0), 1), _cache[103] || (_cache[103] = _createElementVNode("small", null, "Ù ØØ§ÙÙØ§Øª", -1))]), 19129 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(formatDuration(job.duration_ms)), 1), _cache[104] || (_cache[104] = _createElementVNode("small", null, "اÙ٠دة", -1))]) 19130 ]), 19131 (job.usage_json&&job.usage_json.providers) 19132 ? (_openBlock(), _createElementBlock("div", _hoisted_191, [_createElementVNode("span", null, [_createElementVNode("b", null, "OpenAI · " + _toDisplayString(providerStatusLabel(providerResearchStats(job,'openai'))), 1), _createElementVNode("small", null, _toDisplayString(providerResearchStats(job,'openai').source_count||0) + " ٠صدر · " + _toDisplayString(providerResearchStats(job,'openai').suggestion_count||0) + " Ù ÙØªØ±Ø · " + _toDisplayString(formatDuration(providerResearchStats(job,'openai').duration_ms)), 1)]), _createElementVNode("span", null, [_createElementVNode("b", null, "Grok / xAI · " + _toDisplayString(providerStatusLabel(providerResearchStats(job,'xai'))), 1), _createElementVNode("small", null, _toDisplayString(providerResearchStats(job,'xai').source_count||0) + " ٠صدر · " + _toDisplayString(providerResearchStats(job,'xai').suggestion_count||0) + " Ù ÙØªØ±Ø · " + _toDisplayString(formatDuration(providerResearchStats(job,'xai').duration_ms)), 1)])])) 19133 : _createCommentVNode("", true), 19134 (researchJobHasFailure(job)) 19135 ? (_openBlock(), _createElementBlock("div", _hoisted_192, [_createElementVNode("b", _hoisted_193, _toDisplayString(researchFailureLabel(job)), 1), _createElementVNode("small", null, _toDisplayString(researchFailureHelp(job)), 1), _createElementVNode("details", null, [_cache[105] || (_cache[105] = _createElementVNode("summary", null, "Ø§ÙØªÙاصÙÙ Ø§ÙØªÙÙÙØ©", -1)), _createElementVNode("small", _hoisted_194, _toDisplayString(job.error_text), 1)])])) 19136 : (job.error_text) 19137 ? (_openBlock(), _createElementBlock("div", _hoisted_195, [_cache[106] || (_cache[106] = _createElementVNode("b", null, "Ø§ÙØªÙ Ù Ø§ÙØ¨ØØ« ٠ع Ù ÙØ§ØØ¸Ø§Øª", -1)), _createElementVNode("small", null, _toDisplayString(researchNoticeText(job)), 1)])) 19138 : _createCommentVNode("", true), 19139 canOperate 19140 ? (_openBlock(), _createElementBlock("div", _hoisted_196, [(job.status==='failed'||job.status==='cancelled') 19141 ? (_openBlock(), _createElementBlock("button", { 19142 key: 0, 19143 class: "smallbtn", 19144 onClick: $event => (retryResearchJob(job)) 19145 }, _toDisplayString(job.retryable?'إعادة اÙÙ ØØ§ÙÙØ©':'إعادة اÙÙ ØØ§ÙÙØ© بعد Ù Ø¹Ø§ÙØ¬Ø© Ø§ÙØ³Ø¨Ø¨'), 9, _hoisted_197)) 19146 : _createCommentVNode("", true), (job.status==='queued') 19147 ? (_openBlock(), _createElementBlock("button", { 19148 key: 1, 19149 class: "smallbtn danger", 19150 onClick: $event => (cancelResearchJob(job)) 19151 }, "Ø¥ÙØºØ§Ø¡ اÙÙ ÙÙ Ø©", 8, _hoisted_198)) 19152 : _createCommentVNode("", true)])) 19153 : _createCommentVNode("", true) 19154 ], 10, _hoisted_187)) 19155 }), 128)), (!research.jobs.length&&!store.state.busy) 19156 ? (_openBlock(), _createElementBlock("p", _hoisted_199, "ÙÙ ØªÙØ´ØºÙÙ Ù ÙØ§Ù Ø¨ØØ« ÙÙØ°Ø§ اÙÙØ³Ù بعد.")) 19157 : _createCommentVNode("", true)])], 8, _hoisted_182) 19158 ])) 19159 : (_openBlock(), _createElementBlock("section", _hoisted_200, [ 19160 _createElementVNode("div", _hoisted_201, [_cache[107] || (_cache[107] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "إعداد Ù Ø±ÙØ²Ù ٠شترÙ"), _createElementVNode("h3", null, "Ø§ÙØ§ØªØµØ§Ù ÙØ³Ùاسة Ø§ÙØªØ´ØºÙÙ"), _createElementVNode("p", { class: "hint" }, "Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª تطب٠عÙ٠٠سار٠دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ ÙØ§Ùتجارة ÙØ§ÙØ´ØÙ ÙÙØ·. ÙØ§ تغÙÙØ±Ùا Ø¥ÙØ§ بعد اختبار Ù ÙÙ Ø© ÙØ§ØØ¯Ø© Ù Ø¶Ø¨ÙØ·Ø©.")], -1)), _createElementVNode("span", _hoisted_202, _toDisplayString(research.settings.api_key_configured?'اÙÙ ÙØªØ§Ø Ù ØÙÙØ¸':'اÙÙ ÙØªØ§Ø ØºÙØ± ٠ضاÙ'), 1)]), 19161 _createElementVNode("section", _hoisted_203, [ 19162 _createElementVNode("article", null, [_cache[108] || (_cache[108] = _createElementVNode("small", null, "اÙÙ Ø²ÙØ¯", -1)), _createElementVNode("b", null, _toDisplayString(research.settings.provider||'openai'), 1)]), 19163 _createElementVNode("article", null, [_cache[109] || (_cache[109] = _createElementVNode("small", null, "Ù ÙØ¯ÙÙ Ø§ÙØ¨ØØ«", -1)), _createElementVNode("b", _hoisted_204, _toDisplayString(research.settings.research_model||'-'), 1)]), 19164 _createElementVNode("article", null, [_cache[110] || (_cache[110] = _createElementVNode("small", null, "Ø§ÙØ¨ØØ«", -1)), _createElementVNode("b", null, _toDisplayString(research.settings.research_enabled?'Ù ÙØ¹ÙÙ':'٠تÙÙÙ'), 1)]), 19165 _createElementVNode("article", null, [_cache[111] || (_cache[111] = _createElementVNode("small", null, "Ø§ÙØªØ´ØºÙÙ Ø§ÙØªÙÙØ§Ø¦Ù", -1)), _createElementVNode("b", null, _toDisplayString(research.settings.research_auto?(research.readiness_summary.ready_count>0?'Ù ÙØ¹ÙÙ ÙÙÙØ·Ø§Ùات Ø§ÙØ¬Ø§Ùزة':'Ù ÙÙÙÙ ØØªÙ Ø§ÙØ§Ø®ØªØ¨Ø§Ø±'):'٠تÙÙÙ'), 1)]) 19166 ]),
19167 _createElementVNode("section", _hoisted_205, [_createElementVNode("div", null, [_createElementVNode("span", { class: _normalizeClass(["statusPill", {canaryPill:research.readiness_summary.ready_count>0}]) }, _toDisplayString(research.readiness_summary.ready_count||0) + " / " + _toDisplayString(research.readiness_summary.total||2), 3), _cache[112] || (_cache[112] = _createElementVNode("h3", null, "Ø¬Ø§ÙØ²ÙØ© ٠ستÙÙØ© ÙÙÙ ÙØ·Ø§Ù", -1)), _createElementVNode("p", null, _toDisplayString(research.readiness_summary.all_ready?'اÙÙØ³Ù ا٠اجتازا اختبارا٠ØÙØ§Ù ØØ¯ÙثاÙ.':'ÙÙ ÙØ³Ù ÙØ¹Ù Ù ØØ³Ø¨ Ø§Ø®ØªØ¨Ø§Ø±Ù ÙØ³ÙØ§Ø³ØªÙØ Ø¹Ø¯Ù Ø¬Ø§ÙØ²ÙØ© ÙØ³Ù ÙØ§ ÙÙÙ٠اÙÙØ³Ù Ø§ÙØ¢Ø®Ø±.'), 1)]), _createElementVNode("div", _hoisted_206, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(AI_RESEARCH_HUB_OPTIONS, (h) => { 19168 return (_openBlock(), _createElementBlock("span", { key: 'ready-'+h.key }, [_createElementVNode("b", null, _toDisplayString(h.icon) + " " + _toDisplayString(h.short), 1), _createElementVNode("small", null, _toDisplayString(readinessLabel((research.readiness_summary.domains[h.key]||{}).state)), 1)])) 19169 }), 128))])]), 19170 _createElementVNode("section", { class: _normalizeClass(["card aiAutomationDashboard", {paused:research.automation.policy.paused_reason}]) }, [ 19171 _createElementVNode("div", _hoisted_207, [_createElementVNode("div", null, [_cache[113] || (_cache[113] = _createElementVNode("span", { class: "vueBadge" }, "Ø³ÙØ§Ø³Ø© ٠ستÙÙØ© ÙÙØ°Ø§ اÙÙØ³Ù ", -1)), _createElementVNode("h3", null, _toDisplayString(currentHub.icon) + " جدÙÙ ÙØ§Ø³ØªÙÙØ§Ù " + _toDisplayString(currentHub.short), 1), _cache[114] || (_cache[114] = _createElementVNode("p", null, "اÙÙ ÙØªØ§Ø Ø§ÙØ¹Ø§Ù ÙØ´ØºÙ٠اÙÙØ¸Ø§Ù Ø Ø«Ù ÙØªØÙÙ ÙØ°Ø§ اÙÙØ±Øª ÙØØ¯Ù Ù٠تÙÙÙØª ÙØØ¯ÙØ¯ اÙÙØ³Ù Ø§ÙØØ§ÙÙ.", -1))]), _createElementVNode("span", { class: _normalizeClass(["statusPill", {canaryPill:research.automation.decision.ok,danger:research.automation.policy.paused_reason}]) }, _toDisplayString(automationStatusLabel(research.automation.decision.code)), 3)]), 19172 _createElementVNode("div", _hoisted_208, [ 19173 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.automation.usage.scheduled_today||0) + " / " + _toDisplayString(research.automation.policy.daily_run_limit||1), 1), _cache[115] || (_cache[115] = _createElementVNode("small", null, "تشغÙ٠تÙÙØ§Ø¦Ù اÙÙÙÙ ", -1))]), 19174 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.automation.usage.standard_month||0) + " / " + _toDisplayString(research.automation.policy.monthly_run_limit||30), 1), _cache[116] || (_cache[116] = _createElementVNode("small", null, "Ù ÙØ§Ù Ø§ÙØ´Ùر", -1))]), 19175 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(formatTokens(research.automation.usage.total_tokens_month)), 1), _cache[117] || (_cache[117] = _createElementVNode("small", null, "Tokens ÙØ°Ø§ Ø§ÙØ´Ùر", -1))]), 19176 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.automation.usage.failed_month||0), 1), _cache[118] || (_cache[118] = _createElementVNode("small", null, "Ø¥Ø®ÙØ§Ùات Ø§ÙØ´Ùر", -1))]), 19177 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.automation.policy.consecutive_failures||0), 1), _cache[119] || (_cache[119] = _createElementVNode("small", null, "Ø¥Ø®ÙØ§Ùات ٠تتاÙÙØ©", -1))]), 19178 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(research.automation.next_due_at?shortDate(research.automation.next_due_at):'-'), 1), _cache[120] || (_cache[120] = _createElementVNode("small", null, "اÙÙ ÙØ¹Ø¯ Ø§ÙØªØ§ÙÙ", -1))]) 19179 ]), 19180 (research.automation.policy.paused_reason) 19181 ? (_openBlock(), _createElementBlock("div", _hoisted_209, [_createElementVNode("b", null, "Ø£ÙÙ٠اÙÙØ¸Ø§Ù ÙØ°Ø§ اÙÙØ³Ù تÙÙØ§Ø¦ÙاÙ: " + _toDisplayString(pauseReasonLabel(research.automation.policy.paused_reason)), 1), _cache[121] || (_cache[121] = _createElementVNode("small", null, "Ø¹Ø§ÙØ¬ سبب اÙÙ Ø²ÙØ¯ Ø£ÙÙØ§ÙØ Ø«Ù Ø§Ø³ØªØ®Ø¯Ù Ø²Ø± Ø§ÙØ§Ø³ØªØ¦ÙاÙ. ÙØ§ ÙØ¹Ø§Ø¯ Ø§ÙØªØ´ØºÙ٠بص٠ت.", -1))])) 19182 : _createCommentVNode("", true), 19183 _cache[122] || (_cache[122] = _createElementVNode("small", { class: "hint" }, [_createElementVNode("b", null, "AI ÙØ§ ÙÙØ´Ø± ٠باشرة."), _createTextVNode(" تشغÙÙ Ø§ÙØ¨ØØ« تÙÙØ§Ø¦ÙØ§Ù ØØ³Ø¨ Ø§ÙØ¬Ø¯ÙÙ ÙØ¶ÙÙ Ù ÙØªØ±ØØ§Øª Ø¥ÙÙ ØµÙØ¯Ù٠اÙ٠راجعة ÙÙØ·. Ø§ÙØ§Ø³ØªÙÙØ§Ù اÙÙ Ø¹Ø±ÙØ¶ تشغÙÙ٠٠٠رد اÙÙ Ø²ÙØ¯Ø ÙÙÙØ³ ÙØ§ØªÙرة ٠اÙÙØ©Ø ÙØ³Ù٠عدد اÙÙ ÙØ§Ù ÙÙ Ø§ÙØØ§Ø¬Ø² Ø§ÙØµÙب ÙÙ ÙØ¹ Ø§ÙØµØ±Ù اÙÙ ÙØªÙØ.")], -1)) 19184 ], 2), 19185 (!canOperate) 19186 ? (_openBlock(), _createElementBlock("div", _hoisted_210, _cache[123] || (_cache[123] = [_createElementVNode("b", null, "عرض ÙÙØ·:", -1), _createTextVNode(" تعدÙÙ Ø§ÙØ§ØªØµØ§Ù ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª Ø§ÙØ¨ØØ« Ù ØªØ§Ø ÙÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¹ÙÙØ§. ÙÙ ÙÙÙ Ø§Ø³ØªØ®Ø¯Ø§Ù ØµÙØ¯Ù٠اÙÙ ÙØªØ±ØØ§Øª ÙÙ٠راجعة اÙÙÙÙ ÙØ©.")]))) 19187 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 19188 (workspace==='settings') 19189 ? (_openBlock(), _createBlock(_component_AiResearchSettingsPanel, { key: 0 })) 19190 : _createCommentVNode("", true), 19191 _createElementVNode("section", _hoisted_211, [ 19192 _cache[128] || (_cache[128] = _createElementVNode("h3", null, "اتصا٠OpenAI", -1)), 19193 _createElementVNode("div", _hoisted_212, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.settings.provider) = $event) }, _cache[124] || (_cache[124] = [_createElementVNode("option", { value: "openai" }, "OpenAI", -1)]), 8, _hoisted_213), [[_vModelSelect, research.settings.provider]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.settings.model) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(modelOptions(research.settings.model), (m) => { 19194 return (_openBlock(), _createElementBlock("option", { 19195 key: 'draft-'+m, 19196 value: m 19197 }, _toDisplayString(m), 9, _hoisted_215)) 19198 }), 128))], 8, _hoisted_214), [[_vModelSelect, research.settings.model]])]), 19199 _withDirectives(_createElementVNode("input", { 19200 "onUpdate:modelValue": $event => ((research.settings.apiKey) = $event), 19201 autocomplete: "off", 19202 placeholder: "OpenAI API Key â Ø§ØªØ±Ù اÙÙÙÙ Ø© اÙÙ ÙÙÙØ¹Ø© Ù٠ا ÙÙ ÙÙØ§ØØªÙاظ باÙÙ ÙØªØ§Ø" 19203 }, null, 8, _hoisted_216), [[_vModelText, research.settings.apiKey]]), 19204 _createElementVNode("small", _hoisted_217, "ØØ§ÙØ© اÙÙ ÙØªØ§Ø: " + _toDisplayString(research.settings.api_key_configured?'Ù ÙØ¬Ùد ÙÙ Ø®ÙÙ':'ØºÙØ± ٠ضاÙ'), 1), 19205 _createElementVNode("div", _hoisted_218, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.settings.default_language) = $event) }, _cache[125] || (_cache[125] = [_createElementVNode("option", { value: "ar" }, "Ø§ÙØ¹Ø±Ø¨ÙØ©", -1), _createElementVNode("option", { value: "en" }, "English", -1), _createElementVNode("option", { value: "zh" }, "䏿", -1)]), 8, _hoisted_219), [[_vModelSelect, research.settings.default_language]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.settings.tone) = $event) }, _cache[126] || (_cache[126] = [_createElementVNode("option", { value: "simple" }, "Ø¨Ø³ÙØ·Ø© ÙÙØ§Ø¶ØØ©", -1), _createElementVNode("option", { value: "professional" }, "Ù ÙÙÙØ©", -1), _createElementVNode("option", { value: "concise" }, "٠ختصرة", -1)]), 8, _hoisted_220), [[_vModelSelect, research.settings.tone]])]), 19206 _createElementVNode("label", _hoisted_221, [_withDirectives(_createElementVNode("input", { 19207 type: "checkbox", 19208 "onUpdate:modelValue": $event => ((research.settings.enabled) = $event) 19209 }, null, 8, _hoisted_222), [[_vModelCheckbox, research.settings.enabled]]), _cache[127] || (_cache[127] = _createTextVNode(" ØªÙØ¹ÙÙ Ù ÙÙÙØ¯ اÙÙ Ø³ÙØ¯Ø§Øª"))]) 19210 ]), 19211 _createElementVNode("section", _hoisted_223, [ 19212 _createElementVNode("div", _hoisted_224, [_cache[129] || (_cache[129] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ø¨Ø§ØØ« ٠شارÙ"), _createElementVNode("h3", null, "Grok / xAI")], -1)), _createElementVNode("span", _hoisted_225, _toDisplayString(research.settings.xai_api_key_configured?'٠تص٠باÙÙ ÙØªØ§Ø':'اÙÙ ÙØªØ§Ø ØºÙØ± Ù ÙØ¬Ùد'), 1)]), 19213 _cache[137] || (_cache[137] = _createElementVNode("p", { class: "hint" }, "ÙÙ Ø§ÙØ¨ØØ« اÙÙØ§Ù Ù ÙØ¯ÙÙÙÙ ÙÙ Ø§ÙØµÙÙ ÙØ¹Ù Ù OpenAI ÙGrok Ø¨Ø§ÙØªÙØ§Ø²ÙØ ث٠ت٠ر اÙ٠صادر ÙØ§ÙÙ ÙØªØ±ØØ§Øª عÙÙ Ø³ÙØ§Ø³Ø§Øª Ø§ÙØªØÙÙ ÙÙ ÙØ¹ Ø§ÙØªÙرار ÙØ§Ù٠راجعة Ø§ÙØ¨Ø´Ø±ÙØ©. اختبار Ø§ÙØ¬Ø§ÙØ²ÙØ© Canary ÙØ¨ÙÙ OpenAI ÙÙØ·Ø ÙØ§Ùتجارة ÙØ§ÙØ´ØÙ تبÙ٠عÙ٠اÙ٠ساعدة اÙÙØµÙرة ØØ§ÙÙØ§Ù. ÙØ´Ù Grok ÙØ§ ÙÙÙÙ OpenAI ÙØ§ÙØ¹ÙØ³ صØÙØ Ø¥Ø°Ø§ بÙÙØª ÙØªØ§Ø¦Ø¬ Ù ÙØ«ÙØ© ØµØ§ÙØØ©.", -1)), 19214 _createElementVNode("label", _hoisted_226, [_withDirectives(_createElementVNode("input", { 19215 type: "checkbox", 19216 "onUpdate:modelValue": $event => ((research.settings.secondary_research_enabled) = $event) 19217 }, null, 8, _hoisted_227), [[_vModelCheckbox, research.settings.secondary_research_enabled]]), _cache[130] || (_cache[130] = _createTextVNode(" ØªÙØ¹ÙÙ Grok ÙØ¨Ø§ØØ« Ù Ø´Ø§Ø±Ù ÙØ¯ÙÙÙÙ ÙÙ Ø§ÙØµÙÙ"))]), 19218 _createElementVNode("div", _hoisted_228, [_createElementVNode("label", _hoisted_229, [_cache[131] || (_cache[131] = _createTextVNode("Ù ÙØ¯ÙÙ Ø§ÙØ¨ØØ«")), _withDirectives(_createElementVNode("input", { 19219 "onUpdate:modelValue": $event => ((research.settings.secondary_model) = $event), 19220 dir: "ltr" 19221 }, null, 8, _hoisted_230), [[_vModelText, research.settings.secondary_model]])]), _createElementVNode("label", _hoisted_231, [_cache[132] || (_cache[132] = _createTextVNode("Ø£ÙØµÙ ØµÙØ± ÙÙ Ø§ÙØ¯Ùعة")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.settings.image_batch_limit) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(20, (n) => { 19222 return (_openBlock(), _createElementBlock("option", { 19223 key: 'image-batch-'+n, 19224 value: String(n) 19225 }, _toDisplayString(n), 9, _hoisted_233)) 19226 }), 128))], 8, _hoisted_232), [[_vModelSelect, research.settings.image_batch_limit]])])]), 19227 _createElementVNode("label", _hoisted_234, [_withDirectives(_createElementVNode("input", { 19228 type: "checkbox", 19229 "onUpdate:modelValue": $event => ((research.settings.image_assistant_enabled) = $event) 19230 }, null, 8, _hoisted_235), [[_vModelCheckbox, research.settings.image_assistant_enabled]]), _cache[133] || (_cache[133] = _createTextVNode(" ØªÙØ¹Ù٠٠ساعد استÙÙ Ø§Ù Ø§ÙØµÙر"))]), 19231 _createElementVNode("label", _hoisted_236, [_withDirectives(_createElementVNode("input", { 19232 type: "checkbox", 19233 "onUpdate:modelValue": $event => ((research.settings.image_search_enabled) = $event) 19234 }, null, 8, _hoisted_237), [[_vModelCheckbox, research.settings.image_search_enabled]]), _cache[134] || (_cache[134] = _createTextVNode(" Ø§ÙØ¨ØØ« Ø¹Ù ØµÙØ±Ø© ØÙÙÙÙØ© Ø£ÙÙØ§Ù"))]), 19235 _createElementVNode("label", _hoisted_238, [_withDirectives(_createElementVNode("input", { 19236 type: "checkbox", 19237 "onUpdate:modelValue": $event => ((research.settings.image_generate_enabled) = $event) 19238 }, null, 8, _hoisted_239), [[_vModelCheckbox, research.settings.image_generate_enabled]]), _cache[135] || (_cache[135] = _
19238createTextVNode(" Ø§ÙØ³Ù Ø§Ø Ø¨ØªÙÙÙØ¯ ØµÙØ±Ø© ØªÙØ¶ÙØÙØ© Ø¹ÙØ¯ Ø¹Ø¯Ù ÙØ¬Ùد ØµÙØ±Ø© Ù ÙØ§Ø³Ø¨Ø©"))]), 19239 _createElementVNode("label", _hoisted_240, [_cache[136] || (_cache[136] = _createTextVNode("Ù ÙØ¯ÙÙ Ø§ÙØµÙر")), _withDirectives(_createElementVNode("input", { 19240 "onUpdate:modelValue": $event => ((research.settings.image_model) = $event), 19241 dir: "ltr" 19242 }, null, 8, _hoisted_241), [[_vModelText, research.settings.image_model]])]), 19243 _cache[138] || (_cache[138] = _createElementVNode("small", { class: "hint" }, "تÙÙÙØ¯ Ø§ÙØµÙر Ù ØØ¸Ùر تÙÙØ§Ø¦Ùا٠ÙÙØ£Ù اÙÙ Ø§ÙØÙÙÙÙØ© ٠ث٠اÙÙ Ø·Ø§Ø¹Ù ÙØ§ÙÙÙØ§Ø¯Ù ÙØ§ÙØ£Ø³ÙØ§Ù ÙØ§Ù٠ستشÙÙØ§Øª ÙØ§ÙÙ Ø¹Ø§Ø±Ø¶Ø ÙÙØ°Ù Ø§ÙØ¹Ùاصر ÙØ¬Ø¨ Ø§ÙØ¹Ø«Ùر عÙÙ ØµÙØ±Ø© ÙØ¹ÙÙØ©.", -1)) 19244 ]), 19245 _createElementVNode("section", _hoisted_242, [ 19246 _createElementVNode("div", _hoisted_243, [_cache[139] || (_cache[139] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù ØØ±Ù Ø¨ØØ« Ù٠ساعد"), _createElementVNode("h3", null, "DeepSeek")], -1)), _createElementVNode("span", _hoisted_244, _toDisplayString(research.settings.deepseek_api_key_configured?'اÙÙ ÙØªØ§Ø Ù ØÙÙØ¸':'اÙÙ ÙØªØ§Ø ØºÙØ± Ù ÙØ¬Ùد'), 1)]), 19247 _cache[145] || (_cache[145] = _createElementVNode("p", { class: "hint" }, "ÙØ¹Ù Ù ÙÙ ØØ±Ù Ø¨ØØ« (ÙØ¬Ùب SMT اÙ٠صادر عبر SearXNG ÙÙÙØ±Ø¤Ùا DeepSeek ÙÙØ§ ÙØ³ØªØ´Ùد Ø¥ÙØ§ Ø¨ÙØ§) ÙÙÙØ§ØªØ¨ ÙØ¥Ø¬Ø§Ø¨Ø§Øª «اسأ٠SMT» Ù Ù Ø£Ø¯ÙØ© Ø§ÙØ¯ÙÙÙ ÙÙØ·. Ø§Ø®ØªÙØ§Ø± Ø§ÙØ£Ø³Ø§Ø³Ù/Ø§ÙØ§ØØªÙاط٠Ù٠زÙÙØ¯ «اسأ٠SMT» Ù Ù ÙÙØØ© إعدادات Ø§ÙØ¨ØØ« Ø£Ø¹ÙØ§Ù. ØªÙØ¨ÙÙ: ÙØµ Ø§ÙØ³Ø¤Ø§Ù ÙØ§ÙØ£Ø¯ÙØ© اÙÙ Ø±Ø³ÙØ© ØªØ°ÙØ¨ Ø¥ÙÙ Ø®ÙØ§Ø¯Ù DeepSeek.", -1)), 19248 _createElementVNode("label", _hoisted_245, [_cache[140] || (_cache[140] = _createTextVNode("DeepSeek API Key")), _withDirectives(_createElementVNode("input", { 19249 type: "password", 19250 "onUpdate:modelValue": $event => ((deepseekSecret) = $event), 19251 dir: "ltr", 19252 autocomplete: "new-password", 19253 spellcheck: "false", 19254 placeholder: "sk-â¦" 19255 }, null, 8, _hoisted_246), [[_vModelText, deepseekSecret]])]), 19256 _createElementVNode("div", _hoisted_247, [_createElementVNode("button", { 19257 class: "smallbtn secondary", 19258 onClick: requestAmapStepUp 19259 }, "إرسا٠ر٠ز تأÙÙØ¯ ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_248), _createElementVNode("label", _hoisted_249, [_cache[141] || (_cache[141] = _createTextVNode("ر٠ز OTP")), _withDirectives(_createElementVNode("input", { 19260 "onUpdate:modelValue": $event => ((amapOtp) = $event), 19261 inputmode: "numeric", 19262 maxlength: "6", 19263 autocomplete: "one-time-code", 19264 placeholder: "6 Ø£Ø±ÙØ§Ù " 19265 }, null, 8, _hoisted_250), [[_vModelText, amapOtp]])])]), 19266 _createElementVNode("div", _hoisted_251, [_createElementVNode("button", { 19267 class: "smallbtn secondary", 19268 onClick: verifyAmapStepUp 19269 }, "تأÙÙØ¯ اÙÙÙÙØ©", 8, _hoisted_252), _createElementVNode("button", { 19270 class: "btn", 19271 disabled: !amapStepUpReady||deepseekSaving, 19272 onClick: saveDeepseekSecret 19273 }, _toDisplayString(deepseekSaving?'Ø¬Ø§Ø±Ù Ø§ÙØÙØ¸â¦':(research.settings.deepseek_api_key_configured?'Ø§Ø³ØªØ¨Ø¯Ø§Ù Ù ÙØªØ§Ø DeepSeek':'ØÙظ Ù ÙØªØ§Ø DeepSeek')), 9, _hoisted_253), _createElementVNode("button", { 19274 class: "smallbtn secondary", 19275 disabled: deepseekTesting, 19276 onClick: testDeepseek 19277 }, "اختبار Ø§ÙØ§ØªØµØ§Ù", 8, _hoisted_254)]), 19278 deepseekTest 19279 ? (_openBlock(), _createElementBlock("p", _hoisted_255, [_createTextVNode(_toDisplayString(deepseekTest.message), 1), (deepseekTest.latency_ms) 19280 ? (_openBlock(), _createElementBlock("span", _hoisted_256, " · " + _toDisplayString(deepseekTest.latency_ms) + "ms", 1)) 19281 : _createCommentVNode("", true), _createTextVNode(" · Ø§ÙØ¨ØØ« (" + _toDisplayString(deepseekTest.search?deepseekTest.search.provider:'searxng') + "): " + _toDisplayString(deepseekTest.search?deepseekTest.search.message:(deepseekTest.searxng_ready?'Ø¬Ø§ÙØ²':'ØºÙØ± Ù ÙØ¹ÙÙ')), 1)])) 19282 : _createCommentVNode("", true), 19283 _cache[146] || (_cache[146] = _createElementVNode("h4", null, "٠زÙÙØ¯ Ø§ÙØ¨ØØ« (ÙÙ٠صادر)", -1)), 19284 _cache[147] || (_cache[147] = _createElementVNode("p", { class: "hint" }, "SearXNG ٠جاÙÙ ÙÙÙ Ù ØØ±Ùات٠تÙÙÙÙ Ù Ø¤ÙØªØ§Ù Ù Ù Ø®Ø§Ø¯Ù Ù Ø±Ø§ÙØ² Ø§ÙØ¨ÙØ§ÙØ§Øª. ÙØ¨ØØ« Ù ÙØ«ÙÙ Ø£Ø¯Ø®Ù Ù ÙØªØ§Ø ٠زÙÙØ¯ (Serper Ø£Ù SerpApi Ø£Ù Brave Ø£Ù Tavily) ث٠اختر٠٠٠«٠زÙÙØ¯ Ø§ÙØ¨ØØ« ÙÙ DeepSeek» ÙÙ Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§ØªØ ÙÙØ¨ÙÙ SearXNG Ø§ØØªÙØ§Ø·ÙØ§Ù.", -1)), 19285 _createElementVNode("div", _hoisted_257, [_createElementVNode("label", _hoisted_258, [_cache[142] || (_cache[142] = _createTextVNode("اÙ٠زÙÙØ¯")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((searchKeyProvider) = $event) }, [ 19286 _createElementVNode("option", _hoisted_260, "Serper (Google)" + _toDisplayString(research.settings.search_keys_configured&&research.settings.search_keys_configured.serper?' â':''), 1), 19287 _createElementVNode("option", _hoisted_261, "Brave Search" + _toDisplayString(research.settings.search_keys_configured&&research.settings.search_keys_configured.brave?' â':''), 1), 19288 _createElementVNode("option", _hoisted_262, "Tavily" + _toDisplayString(research.settings.search_keys_configured&&research.settings.search_keys_configured.tavily?' â':''), 1), 19289 _createElementVNode("option", _hoisted_263, "SerpApi" + _toDisplayString(research.settings.search_keys_configured&&research.settings.search_keys_configured.serpapi?' â':''), 1) 19290 ], 8, _hoisted_259), [[_vModelSelect, searchKeyProvider]])]), _createElementVNode("label", _hoisted_264, [_cache[143] || (_cache[143] = _createTextVNode("Ù ÙØªØ§Ø اÙ٠زÙÙØ¯")), _withDirectives(_createElementVNode("input", { 19291 type: "password", 19292 "onUpdate:modelValue": $event => ((searchKeySecret) = $event), 19293 dir: "ltr", 19294 autocomplete: "new-password", 19295 spellcheck: "false" 19296 }, null, 8, _hoisted_265), [[_vModelText, searchKeySecret]])])]), 19297 _cache[148] || (_cache[148] = _createElementVNode("ol", { class: "hint" }, [_createElementVNode("li", null, "Ø§ÙØµÙ اÙÙ ÙØªØ§Ø Ø£Ø¹ÙØ§Ù."), _createElementVNode("li", null, "اضغط «إرسا٠ر٠ز تأÙÙØ¯ ÙØ§ØªØ³Ø§Ø¨Â» Ø«Ù Ø§ÙØªØ¨ Ø§ÙØ±Ù ز ÙØ§Ø¶ØºØ· «تأÙÙØ¯ اÙÙÙÙØ©Â» (Ù Ø·ÙÙØ¨ ÙÙÙ ØÙظ)."), _createElementVNode("li", null, "اضغط «ØÙظ Ù ÙØªØ§Ø Ø§ÙØ¨ØØ«Â».")], -1)), 19298 _createElementVNode("div", _hoisted_266, [_createElementVNode("button", { 19299 class: "smallbtn secondary", 19300 onClick: requestAmapStepUp 19301 }, "إرسا٠ر٠ز تأÙÙØ¯ ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_267), _createElementVNode("label", _hoisted_268, [_cache[144] || (_cache[144] = _createTextVNode("ر٠ز OTP")), _withDirectives(_createElementVNode("input", { 19302 "onUpdate:modelValue": $event => ((amapOtp) = $event), 19303 inputmode: "numeric", 19304 maxlength: "6", 19305 autocomplete: "one-time-code", 19306 placeholder: "6 Ø£Ø±ÙØ§Ù " 19307 }, null, 8, _hoisted_269), [[_vModelText, amapOtp]])])]), 19308 _createElementVNode("div", _hoisted_270, [_createElementVNode("button", { 19309 class: "smallbtn secondary", 19310 onClick: verifyAmapStepUp 19311 }, "تأÙÙØ¯ اÙÙÙÙØ©", 8, _hoisted_271), _createElementVNode("button", { 19312 class: "btn", 19313 disabled: !amapStepUpReady||searchKeySaving, 19314 onClick: saveSearchKey 19315 }, _toDisplayString(searchKeySaving?'Ø¬Ø§Ø±Ù Ø§ÙØÙØ¸â¦':'ØÙظ Ù ÙØªØ§Ø Ø§ÙØ¨ØØ«'), 9, _hoisted_272)]), 19316 _createElementVNode("p", _hoisted_273, _toDisplayString(amapStepUpReady?'اÙÙÙÙØ© Ù Ø¤ÙØ¯Ø©: ÙÙ ÙÙÙ Ø§ÙØÙØ¸ Ø§ÙØ¢Ù.':'Ø§ÙØÙØ¸ ٠عطÙÙ ØØªÙ ØªØ¤ÙØ¯ اÙÙÙÙØ© بر٠ز OTP.') + " " + _toDisplayString(store.state.msg), 1), 19317 _cache[149] || (_cache[149] = _createElementVNode("small", { class: "hint" }, "اÙÙ ÙØªØ§Ø ÙÙØÙØ¸ Ù Ø´ÙØ±Ø§Ù ÙÙØ§ ÙØ¸Ùر ٠رة أخرÙ.", -1)) 19318 ]), 19319 _createElementVNode("section", _hoisted_274, [ 19320 _createElementVNode("div", _hoisted_275, [_cache[150] || (_cache[150] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "خرائط Ø§ÙØµÙÙ"), _createElementVNode("h3", null, "Amap / é«å¾·å°å¾")], -1)), _createElementVNode("span", _hoisted_276, _toDisplayString(research.settings.amap_api_key_configured?'اÙÙ ÙØªØ§Ø Ù ØÙÙØ¸':'ÙÙØ±Ø¨Ø· ÙØ§ØÙاÙ'), 1)]), 19321 _cache[153] || (_cache[153] = _createElementVNode("p", { class: "hint" }, "ÙÙØ³ØªØ®Ø¯Ù ÙÙØ· Ø¹ÙØ¯Ù ا ÙØ§ ÙØ¬Ø¯ «اسأ٠SMT» اÙÙ ÙØ§Ù داخ٠دÙÙ٠اÙÙ ÙØµØ©. اÙÙØªÙجة ØªØ¸ÙØ± Ø¨ÙØ³Ù «٠عÙÙÙ Ø© Ù Ù Ø®Ø±ÙØ·Ø© Amap» ÙØªØ¯Ø®Ù تÙÙØ§Ø¦ÙØ§Ù ØµÙØ¯ÙÙ Ø§ÙØªØ±Ø§ØØ§Øª Ø§ÙØ¥Ø¯Ø§Ø±Ø© دÙÙ ÙØ´Ø± تÙÙØ§Ø¦Ù.", -1)), 19322 _createElementVNode("label", _hoisted_277, [_cache[151] || (_cache[151] = _createTextVNode("Amap Web Service API Key")), _withDirectives(_createElementVNode("input", { 19323 type: "password", 19324 "onUpdate:modelValue": $event => ((amapSecret) = $event), 19325 dir: "ltr", 19326 autocomplete: "new-password", 19327 spellcheck: "false", 19328 placeholder: "أدخ٠اÙÙ ÙØªØ§Ø Ø¹ÙØ¯ تÙÙØ±Ù" 19329 }, null, 8, _hoisted_278), [[_vModelText, amapSecret]])]), 19330 _createElementVNode("div", _hoisted_279, [_createElementVNode("button", { 19331 class: "smallbtn secondary", 19332 onClick: requestAmapStepUp 19333 }, "إرسا٠ر٠ز تأÙÙØ¯ ÙØ§ØªØ³Ø§Ø¨", 8, _hoisted_280), _createElementVNode("label", _hoisted_28
193331, [_cache[152] || (_cache[152] = _createTextVNode("ر٠ز OTP")), _withDirectives(_createElementVNode("input", { 19334 "onUpdate:modelValue": $event => ((amapOtp) = $event), 19335 inputmode: "numeric", 19336 maxlength: "6", 19337 autocomplete: "one-time-code", 19338 placeholder: "6 Ø£Ø±ÙØ§Ù " 19339 }, null, 8, _hoisted_282), [[_vModelText, amapOtp]])])]), 19340 _createElementVNode("div", _hoisted_283, [_createElementVNode("button", { 19341 class: "smallbtn secondary", 19342 onClick: verifyAmapStepUp 19343 }, "تأÙÙØ¯ اÙÙÙÙØ©", 8, _hoisted_284), _createElementVNode("button", { 19344 class: "btn", 19345 disabled: !amapStepUpReady||amapSaving, 19346 onClick: saveAmapSecret 19347 }, _toDisplayString(amapSaving?'Ø¬Ø§Ø±Ù Ø§ÙØÙØ¸â¦':(research.settings.amap_api_key_configured?'Ø§Ø³ØªØ¨Ø¯Ø§Ù Ù ÙØªØ§Ø Amap':'ØÙظ Ù ÙØªØ§Ø Amap')), 9, _hoisted_285)]), 19348 _cache[154] || (_cache[154] = _createElementVNode("small", { class: "hint" }, "اÙÙ ÙØªØ§Ø ÙÙØÙØ¸ Ù Ø´ÙØ±Ø§Ù ÙÙØ§ ÙØ¸Ùر ٠رة أخرÙ. ÙÙ Ù٠ترÙÙ Ø§ÙØ¢Ù ÙØ±Ø¨Ø·Ù ÙØ§ØÙا٠٠٠ÙÙØ³ اÙÙ ÙØ§Ù.", -1)) 19349 ]), 19350 searxngLoaded 19351 ? (_openBlock(), _createElementBlock("section", _hoisted_286, [ 19352 _createElementVNode("div", _hoisted_287, [_cache[155] || (_cache[155] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ø§ØØ³Ø¨ طرÙÙÙ"), _createElementVNode("h3", null, "SearXNG")], -1)), _createElementVNode("span", _hoisted_288, _toDisplayString(searxngActive?'Ù ÙØ¹ÙÙ':(searxngSource==='env'?'Ù Ù Ù ØªØºÙØ± Ø§ÙØ¨Ùئة':'ØºÙØ± Ù ÙØ¹ÙÙ')), 1)]), 19353 _cache[159] || (_cache[159] = _createElementVNode("p", { class: "hint" }, "Ø§Ø®ØªÙØ§Ø±Ù. ÙÙØ³ØªØ®Ø¯Ù ÙÙØ· ÙØ§Ø³ØªØ®Ø±Ø§Ø¬ اس٠صÙÙÙ ÙØ¹ÙÙØ§Ù Ù Ù Ø£ÙØ¶Ù ÙØªÙجة Ø¨ØØ« Ø¹ÙØ¯Ù ا ÙÙØªØ¨ Ø§ÙØ¹Ø¶Ù اس٠اÙÙ ÙØ§Ù Ø¨Ø§ÙØ¹Ø±Ø¨ÙØ©. ÙØ§ ÙÙØ³ØªØ®Ø¯Ù ÙÙØ¥ØØ¯Ø§Ø«Ùات Ø£Ù ØØ³Ø§Ø¨ اÙÙ Ø³Ø§Ø±Ø ÙØºÙØ§Ø¨Ù ÙØ§ ÙÙÙÙ Amap.", -1)), 19354 _createElementVNode("label", _hoisted_289, [_cache[156] || (_cache[156] = _createTextVNode("عÙÙØ§Ù SearXNG")), _withDirectives(_createElementVNode("input", { 19355 "onUpdate:modelValue": $event => ((searxngUrl) = $event), 19356 type: "url", 19357 dir: "ltr", 19358 maxlength: "300", 19359 spellcheck: "false", 19360 autocomplete: "off", 19361 placeholder: "http://127.0.0.1:8888/" 19362 }, null, 8, _hoisted_290), [[_vModelText, searxngUrl]])]), 19363 _createElementVNode("label", _hoisted_291, [_withDirectives(_createElementVNode("input", { 19364 type: "checkbox", 19365 "onUpdate:modelValue": $event => ((searxngEnabled) = $event) 19366 }, null, 8, _hoisted_292), [[_vModelCheckbox, searxngEnabled]]), _cache[157] || (_cache[157] = _createTextVNode(" ØªÙØ¹ÙÙ SearXNG ÙÙ Â«Ø§ØØ³Ø¨ طرÙÙÙ»"))]), 19367 _createElementVNode("div", _hoisted_293, [_createElementVNode("button", { 19368 class: "smallbtn secondary", 19369 disabled: searxngTesting, 19370 onClick: testSearxngConnection 19371 }, _toDisplayString(searxngTesting?'Ø¬Ø§Ø±Ù Ø§ÙØ§Ø®ØªØ¨Ø§Ø±â¦':'اختبار Ø§ÙØ§ØªØµØ§Ù'), 9, _hoisted_294), _createElementVNode("button", { 19372 class: "btn", 19373 disabled: searxngSaving, 19374 onClick: saveSearxngSettings 19375 }, _toDisplayString(searxngSaving?'Ø¬Ø§Ø±Ù Ø§ÙØÙØ¸â¦':'ØÙظ إعدادات SearXNG'), 9, _hoisted_295)]), 19376 searxngTest 19377 ? (_openBlock(), _createElementBlock("p", { 19378 key: 0, 19379 class: _normalizeClass(['hint',searxngTest.ok?'searxngTestOk':'searxngTestFail']), 19380 role: "status" 19381 }, [_createTextVNode(_toDisplayString(searxngTest.message), 1), (searxngTest.elapsed_ms!=null) 19382 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" (" + _toDisplayString(searxngTest.elapsed_ms) + " ms", 1), (searxngTest.results!=null) 19383 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(searxngTest.results) + " ÙØªÙجة", 1)], 64)) 19384 : _createCommentVNode("", true), _cache[158] || (_cache[158] = _createTextVNode(")"))], 64)) 19385 : _createCommentVNode("", true)], 2)) 19386 : _createCommentVNode("", true), 19387 _cache[160] || (_cache[160] = _createElementVNode("small", { class: "hint" }, "ÙØ¬Ø¨ ØªÙØ¹ÙÙ ØµÙØºØ© json ÙÙ SearXNG (search.formats). Ù ÙÙØ© ÙÙ Ø·ÙØ¨ 5 Ø«ÙØ§ÙÙ.", -1)) 19388 ])) 19389 : _createCommentVNode("", true), 19390 _createElementVNode("section", _hoisted_296, [ 19391 _cache[167] || (_cache[167] = _createElementVNode("h3", null, "اÙÙ ÙØªØ§Ø Ø§ÙØ¹Ø§Ù ÙÙ ØØ±Ù Ø§ÙØ¨ØØ«", -1)), 19392 _createElementVNode("label", _hoisted_297, [_withDirectives(_createElementVNode("input", { 19393 type: "checkbox", 19394 "onUpdate:modelValue": $event => ((research.settings.research_enabled) = $event) 19395 }, null, 8, _hoisted_298), [[_vModelCheckbox, research.settings.research_enabled]]), _cache[161] || (_cache[161] = _createTextVNode(" ØªÙØ¹ÙÙ Ù ØØ±Ù Ø§ÙØ¨ØØ«"))]), 19396 _createElementVNode("label", { class: _normalizeClass(["checkLine", {disabledLine:research.readiness_summary.ready_count<1&&!research.settings.research_auto}]) }, [_withDirectives(_createElementVNode("input", { 19397 type: "checkbox", 19398 "onUpdate:modelValue": $event => ((research.settings.research_auto) = $event), 19399 disabled: research.readiness_summary.ready_count<1&&!research.settings.research_auto 19400 }, null, 8, _hoisted_299), [[_vModelCheckbox, research.settings.research_auto]]), _cache[162] || (_cache[162] = _createTextVNode(" Ø§ÙØ³Ù Ø§Ø ÙÙØªØ´ØºÙÙ Ø§ÙØªÙÙØ§Ø¦Ù ÙÙÙØ·Ø§Ùات اÙÙ ÙØ¹ÙØ©"))], 2), 19401 (research.readiness_summary.ready_count<1) 19402 ? (_openBlock(), _createElementBlock("small", _hoisted_300, "اÙÙ ÙØªØ§Ø Ø§ÙØ¹Ø§Ù Ù ÙÙÙÙ ØØªÙ ÙÙØ¬Ø اختبار ØÙ ØØ¯ÙØ« ÙÙ ÙØ·Ø§Ù ÙØ§ØØ¯ عÙÙ Ø§ÙØ£ÙÙ. بعد ذÙÙ ÙØ¹Ù Ù ÙÙ ÙØ·Ø§Ù ÙÙÙ Ø¬Ø§ÙØ²ÙØªÙ ÙØ³Ùاست٠ÙÙØ·.")) 19403 : _createCommentVNode("", true), 19404 _createElementVNode("label", _hoisted_301, [_withDirectives(_createElementVNode("input", { 19405 type: "checkbox", 19406 "onUpdate:modelValue": $event => ((research.settings.research_live_access) = $event) 19407 }, null, 8, _hoisted_302), [[_vModelCheckbox, research.settings.research_live_access]]), _cache[163] || (_cache[163] = _createTextVNode(" Ø§Ø³ØªØ®Ø¯Ø§Ù ÙØªØ§Ø¦Ø¬ ÙÙØ¨ ØÙØ©"))]), 19408 _createElementVNode("div", _hoisted_303, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.settings.research_model) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(modelOptions(research.settings.research_model), (m) => { 19409 return (_openBlock(), _createElementBlock("option", { 19410 key: 'research-'+m, 19411 value: m 19412 }, _toDisplayString(m), 9, _hoisted_305)) 19413 }), 128))], 8, _hoisted_304), [[_vModelSelect, research.settings.research_model]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.settings.research_reasoning) = $event) }, _cache[164] || (_cache[164] = [_createElementVNode("option", { value: "low" }, "Reasoning Ù ÙØ®Ùض", -1), _createElementVNode("option", { value: "medium" }, "Reasoning Ù ØªÙØ³Ø·", -1), _createElementVNode("option", { value: "high" }, "Reasoning Ù Ø±ØªÙØ¹", -1)]), 8, _hoisted_306), [[_vModelSelect, research.settings.research_reasoning]])]), 19414 _createElementVNode("label", _hoisted_307, [_
19414cache[165] || (_cache[165] = _createTextVNode("اÙÙØ·Ø§Ùات اÙÙ Ø³Ù ÙØØ© â Ø§ØªØ±ÙÙØ§ ÙØ§Ø±ØºØ© عادةÙ")), _withDirectives(_createElementVNode("textarea", { 19415 "onUpdate:modelValue": $event => ((research.settings.research_allowed_domains) = $event), 19416 placeholder: "ÙØ§Ø±Øº = Ù٠اÙ٠صادر ٠ا عدا اÙÙ ØØ¸Ùرة" 19417 }, null, 8, _hoisted_308), [[_vModelText, research.settings.research_allowed_domains]])]), 19418 _cache[168] || (_cache[168] = _createElementVNode("p", { class: "hint aiDomainWarning" }, [_createTextVNode("ØªÙØ¨ÙÙ: Ø£Ù ÙØ·Ø§Ù ÙÙÙØªØ¨ ÙÙØ§ "), _createElementVNode("b", null, "ÙÙØµØ± Ø§ÙØ¨ØØ« عÙÙÙ ÙØØ¯Ù"), _createTextVNode(" ÙÙØ±Ùض Ø£Ù Ù ÙØªØ±Ø ٠٠٠صدر آخر. ÙØ¥Ø¶Ø§ÙØ© ٠صدر Ù ÙØ«ÙÙ ÙØ§ ØªÙØªØ¨Ù ÙÙØ§Ø اترÙÙ ÙØ§Ø±ØºØ§Ù ÙØ¶Ø¹ ØºÙØ± اÙÙ Ø±ØºÙØ¨ ÙÙÙ Ù٠«اÙÙ ØØ¸Ùرة».")], -1)), 19419 (String(research.settings.research_allowed_domains||'').trim()) 19420 ? (_openBlock(), _createElementBlock("p", _hoisted_309, "Ø§ÙØ¨ØØ« Ø§ÙØ¢Ù Ù ÙØµÙر عÙÙ: " + _toDisplayString(research.settings.research_allowed_domains) + " â ٠عظ٠اÙÙ ÙØªØ±ØØ§Øª Ø³ØªÙØ±Ùض.", 1)) 19421 : _createCommentVNode("", true), 19422 _createElementVNode("label", _hoisted_310, [_cache[166] || (_cache[166] = _createTextVNode("اÙÙØ·Ø§Ùات اÙÙ ØØ¸ÙØ±Ø©Ø Ù ÙØµÙÙØ© بÙÙØ§ØµÙ")), _withDirectives(_createElementVNode("textarea", { 19423 "onUpdate:modelValue": $event => ((research.settings.research_blocked_domains) = $event), 19424 placeholder: "reddit.com, quora.com" 19425 }, null, 8, _hoisted_311), [[_vModelText, research.settings.research_blocked_domains]])]), 19426 _createElementVNode("button", { 19427 class: "btn", 19428 onClick: saveAi 19429 }, "ØÙظ Ø§ÙØ§ØªØµØ§Ù ÙØ§ÙÙ ÙØªØ§Ø Ø§ÙØ¹Ø§Ù ", 8, _hoisted_312) 19430 ]), 19431 _createElementVNode("section", _hoisted_313, [ 19432 _createElementVNode("div", _hoisted_314, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_315, _toDisplayString(currentHub.icon) + " إعداد خاص باÙÙØ³Ù ", 1), _createElementVNode("h3", null, "جدÙÙ ÙØØ¯ÙØ¯ " + _toDisplayString(currentHub.short), 1)]), _cache[169] || (_cache[169] = _createElementVNode("span", { class: "statusPill" }, "ÙØ§ ÙØ´Ø± تÙÙØ§Ø¦Ù", -1))]), 19433 _createElementVNode("label", _hoisted_316, [_withDirectives(_createElementVNode("input", { 19434 type: "checkbox", 19435 "onUpdate:modelValue": $event => ((research.automation.policy.auto_enabled) = $event), 19436 disabled: !!research.automation.policy.paused_reason 19437 }, null, 8, _hoisted_317), [[_vModelCheckbox, research.automation.policy.auto_enabled]]), _cache[170] || (_cache[170] = _createTextVNode(" تشغÙÙ ÙØ°Ø§ اÙÙØ³Ù تÙÙØ§Ø¦ÙاÙ"))]), 19438 _createElementVNode("div", _hoisted_318, [_createElementVNode("label", _hoisted_319, [_cache[171] || (_cache[171] = _createTextVNode("اÙÙØ§ØµÙ Ø§ÙØ²Ù ÙÙ")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.automation.policy.interval_hours) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.automation.options.interval_hours, (n) => { 19439 return (_openBlock(), _createElementBlock("option", { 19440 key: 'interval-'+n, 19441 value: n 19442 }, _toDisplayString(n===168?'ÙÙ Ø£Ø³Ø¨ÙØ¹':n===72?'ÙÙ 3 Ø£ÙØ§Ù ':'ÙÙ '+n+' ساعة'), 9, _hoisted_321)) 19443 }), 128))], 8, _hoisted_320), [[ 19444 _vModelSelect, 19445 research.automation.policy.interval_hours, 19446 void 0, 19447 { number: true } 19448 ]])]), _createElementVNode("label", _hoisted_322, [_cache[172] || (_cache[172] = _createTextVNode("Ø£ÙØµÙ Ù ÙØªØ±ØØ§Øª ÙÙÙ ÙÙ Ø©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.automation.policy.max_results) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(12, (n) => { 19449 return (_openBlock(), _createElementBlock("option", { 19450 key: 'domain-max-'+n, 19451 value: n 19452 }, _toDisplayString(n), 9, _hoisted_324)) 19453 }), 128))], 8, _hoisted_323), [[ 19454 _vModelSelect, 19455 research.automation.policy.max_results, 19456 void 0, 19457 { number: true } 19458 ]])])]), 19459 _createElementVNode("div", _hoisted_325, [_createElementVNode("label", _hoisted_326, [_cache[173] || (_cache[173] = _createTextVNode("ØØ¯ Ø§ÙØªØ´ØºÙÙ Ø§ÙØªÙÙØ§Ø¦Ù ÙÙÙ ÙØ§Ù")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.automation.policy.daily_run_limit) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.automation.options.daily_run_limit, (n) => { 19460 return (_openBlock(), _createElementBlock("option", { 19461 key: 'daily-'+n, 19462 value: n 19463 }, _toDisplayString(n), 9, _hoisted_328)) 19464 }), 128))], 8, _hoisted_327), [[ 19465 _vModelSelect, 19466 research.automation.policy.daily_run_limit, 19467 void 0, 19468 { number: true } 19469 ]])]), _createElementVNode("label", _hoisted_329, [_cache[174] || (_cache[174] = _createTextVNode("سÙÙ ÙÙ Ù ÙØ§Ù Ø§ÙØ´Ùر")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.automation.policy.monthly_run_limit) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.automation.options.monthly_run_limit, (n) => { 19470 return (_openBlock(), _createElementBlock("option", { 19471 key: 'monthly-'+n, 19472 value: n 19473 }, _toDisplayString(n) + " Ù ÙÙ Ø©", 9, _hoisted_331)) 19474 }), 128))], 8, _hoisted_330), [[ 19475 _vModelSelect, 19476 research.automation.policy.monthly_run_limit, 19477 void 0, 19478 { number: true } 19479 ]])])]), 19480 _createElementVNode("label", _hoisted_332, [_cache[175] || (_cache[175] = _createTextVNode("Ø§ÙØ¥ÙÙØ§Ù بعد Ø¥Ø®ÙØ§Ùات ٠تتاÙÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((research.automation.policy.failure_pause_threshold) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(research.automation.options.failure_pause_threshold, (n) => { 19481 return (_openBlock(), _createElementBlock("option", { 19482 key: 'failure-'+n, 19483 value: n 19484 }, _toDisplayString(n) + " Ø¥Ø®ÙØ§Ù", 9, _hoisted_334)) 19485 }), 128))], 8, _hoisted_333), [[ 19486 _vModelSelect, 19487 research.automation.policy.failure_pause_threshold, 19488 void 0, 19489 { number: true } 19490 ]])]), 19491 _cache[176] || (_cache[176] = _createElementVNode("div", { class: "aiBoundaryNote" }, [_createElementVNode("b", null, "Flow Ø§ÙØªØ´ØºÙÙ:"), _createTextVNode(" Ø¬Ø§ÙØ²ÙØ© ØÙØ© â Ù ÙØªØ§Ø Ø¹Ø§Ù â Ø¬Ø¯Ù٠اÙÙØ³Ù â ØØ¯ÙØ¯ ÙÙÙ ÙØ© ÙØ´ÙØ±ÙØ© â Ø¥ÙÙØ§Ù ÙÙØ§Ø¦Ù Ø¹ÙØ¯ اÙÙØ´Ù. Ø¬Ù ÙØ¹ اÙÙØªØ§Ø¦Ø¬ تبÙÙ ÙÙ ØµÙØ¯Ù٠اÙ٠راجعة.")], -1)), 19492 _createElementVNode("div", _hoisted_335, [_createElementVNode("button", { 19493 class: "btn", 19494 onClick: $event => (saveAutomation(false)) 19495 }, "ØÙظ Ø³ÙØ§Ø³Ø© اÙÙØ³Ù ", 8, _hoisted_336), (research.automation.policy.paused_reason) 19496 ? (_openBlock(), _createElementBlock("button", { 19497 key: 0, 19498 class: "btn secondary", 19499 onClick: $event => (saveAutomation(true)) 19500 }, "Ø§Ø³ØªØ¦ÙØ§Ù اÙÙØ·Ø§Ù بعد اÙÙ Ø¹Ø§ÙØ¬Ø©", 8, _hoisted_337)) 19501 : _createCommentVNode("", true)]) 19502 ]), 19503 _createElementVNode("details", _hoisted_338, [_cache[179] || (_cache[179] = _createElementVNode("summary", null, [_createElementVNode("b", null, "أداة ØµÙØ§ØºØ© Ù Ø³ÙØ¯Ø© ÙØ¯ÙÙØ©"), _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø±ÙØ©")], -1)), _createElementVNode("div", _hoisted_339, [ 19504 _cache[178] || (_cache[178] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ù Ø§ÙØ£Ø¯Ø§Ø© ÙÙØµÙاغة ÙÙØ· ÙÙØ§ ØªÙØ´Ø± Ù ØØªÙÙ.", -1)), 19505 _withDirectives(_createElementVNode("textarea", { 19506 "onUpdate:modelValue": $event => ((aiInput) = $event), 19507 placeholder: "Ø§ÙØªØ¨ ٠عÙÙ٠ات خا٠ÙÙØÙÙÙÙØ§ AI Ø¥ÙÙ Ù Ø³ÙØ¯Ø©" 19508 }, null, 8, _hoisted_340), [[_vModelText, aiInput]]), 19509 _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((aiMode) = $event) }, _cache[177] || (_cache[177] = [ 19510 _createElementVNode("option", { value: "describe" }, "ØµÙØ§ØºØ© ÙØµÙ", -1), 19511 _createElementVNode("option", { value: "translate" }, "ترج٠ة", -1), 19512 _createElementVNode("option", { value: "summary" }, "ØªÙØ®Ùص", -1), 19513 _createElementVNode("option", { value: "tags" }, "ÙÙ٠ات Ø¨ØØ«", -1) 19514 ]), 8, _hoisted_341), [[_vModelSelect, aiMode]]), 19515 _createElementVNode("button", { 19516 class: "btn secondary", 19517 onClick: generateAi 19518 }, "تÙÙÙØ¯ Ù Ø³ÙØ¯Ø©", 8, _hoisted_342), 19519 aiOutput 19520 ? (_openBlock(), _createElementBlock("pre", _hoisted_343, _toDisplayString(aiOutput), 1)) 19521 : _createCommentVNode("", true) 19522 ])]) 19523 ], 64)) 19524 ])) 19525 ]), 19526 _: 1 19527 }, 8, ["title"])) 19528 } 19529} 19530})() 19531 }; 19532 19533 const AdminChinaGuidePage={ 19534 components:{AdminFrame}, 19535 setup(){ 19536 const store=useGzcStore();const router=useRouter();const route=useRoute(); 19537 function adminHub(){const p=String(route.path||'');if(p.indexOf('/admin/trade-shipping')===0)return 'trade_shipping';if(p.indexOf('/admin/sudan-digital')===0)return 'sudan_digital';return 'china_guide';} 19538 function adminBase(){return adminHub()==='trade_shipping'?'/api/admin/trade-shipping':(adminHub()==='sudan_digital'?'/api/admin/sudan-digital':'/api/admin/china-guide');} 19539 const verificationDueOnly=computed(()=>String((route.query||{}).verification||'')==='due'); 19540 function adminApiPath(){return adminBase()+(verificationDueOnly.value?'?verification=due':'');} 19541 async function clearVerificationFilter(){const query={...(route.query||{})};delete query.verification;await router.replace({path:route.path,query}).catch(()=>{});await load();} 19542 function publicPath(){return adminHub()==='trade_shipping'?'/trade-shipping':(adminHub()==='sudan_digital'?'/sudan-digital':'/china-guide');} 19543 function adminTitle(){return adminHub()==='trade_shipping'?'إدارة Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ':(adminHub()==='sudan_digital'?'إدارة Ø¨ÙØ§Ø¨Ø© Ø§ÙØ³ÙØ¯Ø§Ù Ø§ÙØ±ÙÙ ÙØ©':'إدارة دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ');} 19544 function adminDesc(){return adminHub()==='trade_shipping'?'Ù ØØªÙ٠اÙ٠صادر ÙØ§ÙØ¬Ù Ø§Ø±Ù ÙØ§ÙØ´ØÙ بÙÙ Ø§ÙØ³ÙØ¯Ø§Ù ÙØ§ÙصÙÙ.':(adminHub()==='sudan_digital'?'Ø§ÙØªØ·Ø¨ÙÙØ§Øª ÙØ§ÙÙ ÙØµØ§Øª Ø§ÙØ³ÙداÙÙØ© اÙÙ ÙØ«ÙØ©.':'خد٠ات Ø§ÙØÙØ§Ø© Ø¯Ø§Ø®Ù Ø§ÙØµÙÙ: Ø£Ø³ÙØ§ÙØ Ù Ø·Ø§Ø¹Ù Ø ØµØØ©Ø سÙÙ ÙÙ ÙØ§ØµÙات.');} 19545 function sectionIcon(){return adminHub()==='trade_shipping'?'ð¢':(adminHub()==='sudan_digital'?'ð¸ð©':'
19545ð§');} 19546 function aiResearchPath(){return '/admin/ai-research?workspace=review&hub='+encodeURIComponent(adminHub());} 19547 const requestedWorkspace=String((route.query||{}).workspace||'items'); 19548 const workspace=ref(['items','categories','feedback'].includes(requestedWorkspace)?requestedWorkspace:'items'); 19549 const data=reactive({categories:[],items:[],suggestions:[],reports:[],stats:{total:0,published:0,verified:0,missing_image:0,missing_source:0,image_coverage_percent:100},demand:[],search_quality:{model_version:1,search_count:0,zero_result_count:0,nonzero_result_count:0,image_result_search_count:0,verified_result_search_count:0,result_open_count:0,search_success_rate:0,image_result_rate:0,result_open_rate:0,top_opened:[]},operations:{model_version:1,total:0,by_kind:{content_gap:0,source_gap:0,image_gap:0},priorities:[]},governance:null}); 19550 const queryText=ref(''),categoryFilter=ref('all'),serviceFilter=ref('all'),statusFilter=ref('all'),visibleLimit=ref(24),feedbackLimit=ref(20); 19551 const editorOpen=ref(false),removeImageOnSave=ref(false),reviewOpen=reactive({}),focusedTask=ref(''); 19552 const catForm=reactive({name_ar:'',name_en:'',name_zh:'',slug:'',icon:'ð§',sort_order:100,hub_key:adminHub()}); 19553 const emptyItem=()=>({id:'',category_id:'',hub_key:adminHub(),direction:'general',service_type:'general',company_sector_key:null,verification_status:'pending',source_name:'',source_url:'',trust_tier:'community_listed',trust_note:'',exhibition_start_date:'',exhibition_end_date:'',exhibition_sector:'',registration_url:'',title_ar:'',title_en:'',title_zh:'',summary_ar:'',description_ar:'',city:'Guangzhou',district:'',address_ar:'',address_zh:'',phone:'',wechat_id:'',whatsapp:'',map_url:'',image_url:'',image_thumb_url:'',tags:'',visibility:'public',status:'draft',is_recommended:false,governance_status:'draft',governance_note:''}); 19554 const itemForm=reactive(emptyItem()); 19555 // Registry-driven option lists for the editor (company sectors, trade services). 19556 const registrySectors=ref([]);const registryTradeServices=ref([]); 19557 async function loadRegistryOptions(){ 19558 if(adminHub()==='china_guide'){const r=await api('/api/admin/taxonomy/sectors',{feedback:false});if(r&&r.ok)registrySectors.value=safeArray(r.sectors).filter(x=>x.active);} 19559 if(adminHub()==='trade_shipping'){const r=await api('/api/china-guide/trade-meta',{feedback:false});if(r&&r.ok)registryTradeServices.value=safeArray(r.services);} 19560 } 19561 const itemImageFile=ref(null),itemImageLabel=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©'),itemImagePreview=ref(''),itemImagePreviewFailed=ref(false),itemImageInputKey=ref(0),adminBrokenImages=reactive({}); 19562 const itemImageSuggestion=ref(null),itemImageSuggestBusy=ref(false); 19563 let imageSuggestionPollTimer=null; 19564 function stopImageSuggestionPoll(){if(imageSuggestionPollTimer){clearInterval(imageSuggestionPollTimer);imageSuggestionPollTimer=null;}} 19565 async function pollImageSuggestion(){ 19566 const id=itemForm.id,sid=itemImageSuggestion.value&&itemImageSuggestion.value.id; 19567 if(!id||!sid||!editorOpen.value){stopImageSuggestionPoll();return;} 19568 const r=await api(adminBase()+'/items/'+encodeURIComponent(id)+'/image/suggestions/'+encodeURIComponent(sid),{feedback:false}); 19569 if(!r.ok||!r.suggestion||String(itemForm.id)!==String(id))return; 19570 itemImageSuggestion.value=r.suggestion; 19571 if(['not_found','failed'].includes(r.suggestion.image_status)||r.suggestion.image_status==='ready'&&r.suggestion.dedup_status!=='unchecked')stopImageSuggestionPoll(); 19572 } 19573 function startImageSuggestionPoll(){ 19574 stopImageSuggestionPoll(); 19575 if(!itemImageSuggestion.value||!['pending','fetching','ready'].includes(itemImageSuggestion.value.image_status))return; 19576 if(itemImageSuggestion.value.image_status==='ready'&&itemImageSuggestion.value.dedup_status!=='unchecked')return; 19577 imageSuggestionPollTimer=setInterval(()=>pollImageSuggestion().catch(()=>{}),4000); 19578 pollImageSuggestion().catch(()=>{}); 19579 } 19580 async function loadEditorImageSuggestion(id){ 19581 const r=await api(adminBase()+'/items/'+encodeURIComponent(id)+'/image/suggest',{feedback:false}); 19582 if(r.ok&&r.suggestion&&String(itemForm.id)===String(id)){itemImageSuggestion.value=r.suggestion;startImageSuggestionPoll();} 19583 } 19584 const itemImageDisplay=computed(()=>((!itemImagePreviewFailed.value&&itemImagePreview.value)||(!removeImageOnSave.value&&(itemForm.image_thumb_url||itemForm.image_url))||'')); 19585 const serviceOptions=computed(()=>Array.from(new Set(data.items.map(x=>String(x.service_type||'general')))).sort()); 19586 function adminCategoryIs(key){ 19587 const c=data.categories.find( 19588 x=>String(x.id)===String(itemForm.category_id) 19589 )||{}; 19590 19591 if(String(c.category_key||'')===String(key)){ 19592 return true; 19593 } 19594 19595 return String(key)==='exhibitions' 19596 && String(c.slug||'')==='china-exhibitions-conferences'; 19597 } 19598 const filteredItems=computed(()=>{ 19599 const text=String(queryText.value||'').trim().toLocaleLowerCase(); 19600 return data.items.filter(x=>{ 19601 if(categoryFilter.value!=='all'&&String(x.category_id||'')!==String(categoryFilter.value))return false;
19602 if(adminHub()!=='china_guide'&&serviceFilter.value!=='all'&&String(x.service_type||'')!==serviceFilter.value)return false; 19603 if(statusFilter.value!=='all'&&String(x.status||'draft')!==statusFilter.value)return false; 19604 if(!text)return true; 19605 return [x.title_ar,x.title_en,x.title_zh,x.summary_ar,x.city,x.district,x.tags,x.source_name].some(v=>String(v||'').toLocaleLowerCase().includes(text)); 19606 }); 19607 }); 19608 const visibleItems=computed(()=>filteredItems.value.slice(0,visibleLimit.value)); 19609 const itemStats=computed(()=>({total:data.items.length,published:data.items.filter(x=>x.status==='published').length,draft:data.items.filter(x=>x.status!=='published').length,images:data.items.filter(x=>x.image_url).length})); 19610 const pendingFeedback=computed(()=>data.suggestions.filter(x=>x.status==='pending').length+data.reports.filter(x=>x.status==='open').length); 19611 function prioritized(rows,target){const list=safeArray(rows);const hit=list.find(x=>String(x.id)===String(target||''));return (hit?[hit,...list.filter(x=>x!==hit)]:list).slice(0,feedbackLimit.value);} 19612 const visibleSuggestions=computed(()=>prioritized(data.suggestions,(route.query||{}).suggestion)); 19613 const visibleReports=computed(()=>prioritized(data.reports,(route.query||{}).report)); 19614 function itemStatusLabel(v){return ({draft:'Ù Ø³ÙØ¯Ø©',published:'Ù ÙØ´Ùر',archived:'٠ؤرشÙ'}[String(v||'')])||String(v||'-');} 19615 function verificationLabel(v){return ({verified:'Ù ÙØ«Ù',pending:'ÙÙØ¯ Ø§ÙØªØÙÙ',review:'ÙØØªØ§Ø¬ ٠راجعة',archived:'٠ؤرشÙ'}[String(v||'')])||String(v||'-');} 19616 function serviceLabel(v){return ({general:'عا٠',health:'ØµØØ©',transport:'Ù ÙØ§ØµÙات',housing:'سÙÙ',finance:'٠اÙÙ',markets:'Ø£Ø³ÙØ§Ù',exhibitions:'٠عارض Ù٠ؤت٠رات',restaurants:'٠طاع٠',hotels:'ÙÙØ§Ø¯Ù ÙØ¥Ùا٠ة',education:'تعÙÙÙ ',services:'خد٠ات',emergency:'Ø·ÙØ§Ø±Ø¦',tips:'ÙØµØ§Ø¦Ø',apps:'تطبÙÙØ§Øª',official_links:'Ø±ÙØ§Ø¨Ø· Ø±Ø³Ù ÙØ©',documents:'Ù Ø³ØªÙØ¯Ø§Øª',customs:'ج٠ارÙ',shipping:'Ø´ØÙ',clearance:'تخÙÙØµ',ports:'Ù ÙØ§Ùئ',export:'ØªØµØ¯ÙØ±',import:'Ø§Ø³ØªÙØ±Ø§Ø¯',warnings:'ØªØØ°Ùرات',government:'ØÙÙÙ Ù',investment:'استث٠ار',legal:'ÙØ§ÙÙÙÙ',diaspora:'٠غتربÙÙ'}[String(v||'')])||String(v||'-');} 19617 function demandLabel(x){const intent=({markets:'Ø£Ø³ÙØ§Ù',exhibitions:'٠عارض Ù٠ؤت٠رات',restaurants:'٠طاع٠',hotels:'ÙÙØ§Ø¯Ù',hospitals:'٠ستشÙÙØ§Øª',transport:'Ù ÙØ§ØµÙات',banking:'بÙÙÙ ÙØ¯Ùع',residence:'Ø¥ÙØ§Ù Ø© ÙØªØ£Ø´Ùرات',services:'خد٠ات ÙØªØ±Ø¬Ù Ø©',shipping:'Ø´ØÙ',education:'تعÙÙÙ ',government:'خد٠ات ØÙÙÙ ÙØ©',emergency:'Ø·ÙØ§Ø±Ø¦',clearance:'تخÙÙØµ',customs:'ج٠ارÙ',documents:'Ù Ø³ØªÙØ¯Ø§Øª Ø§ÙØ´ØÙ',ports:'Ù ÙØ§Ùئ',export:'ØªØµØ¯ÙØ±',import:'Ø§Ø³ØªÙØ±Ø§Ø¯',warnings:'ØªÙØ¨ÙÙØ§Øª',unclassified:'Ø·ÙØ¨ ٠صÙÙ Ø¨Ø§ÙØ®Ø¯Ù Ø©'}[String(x&&x.intent_key||'')])||String(x&&x.intent_key||'Ø·ÙØ¨');return [intent,x&&x.city_key,adminHub()==='china_guide'?'':serviceLabel(x&&x.service_type)].filter(v=>v&&v!=='-').join(' · ');} 19618 function priorityKindLabel(v){return ({content_gap:'Ù ØØªÙÙ Ù Ø·ÙÙØ¨',source_gap:'٠صدر ÙØ§Ùص',image_gap:'ØµÙØ±Ø© ÙØ§Ùصة'}[String(v||'')])||'ØªØØ³ÙÙ';} 19619 function priorityLevelLabel(v){return ({urgent:'عاجÙ',high:'Ù Ø±ØªÙØ¹',medium:'Ù ØªÙØ³Ø·',normal:'عادÙ'}[String(v||'')])||'عادÙ';} 19620 function priorityMeta(x){return [x&&x.city_key,adminHub()==='china_guide'?'':serviceLabel(x&&x.service_type),x&&x.kind==='content_gap'&&x&&x.intent_key&&x.intent_key!=='unclassified'?x.intent_key:''].filter(v=>v&&v!=='-').join(' · ');} 19621 function openGuidePriority(x){if(!x)return;if(x.action==='edit_item'&&x.item_id){const item=data.items.find(v=>String(v.id)===String(x.item_id));if(item){openEditor(item);return;}}if(x.action==='research_content')router.push(aiResearchPath());} 19622 function clearItemImageSelection(){if(String(itemImagePreview.value||'').startsWith('blob:'))URL.revokeObjectURL(itemImagePreview.value);itemImageFile.value=null;itemImagePreview.value='';itemImagePreviewFailed.value=false;itemImageLabel.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';itemImageInputKey.value++;} 19623 function resetItem(){stopImageSuggestionPoll();clearItemImageSelection();itemImageSuggestion.value=null;itemImageSuggestBusy.value=false;removeImageOnSave.value=false;Object.assign(itemForm,emptyItem());} 19624 function setWorkspace(key){if(!['items','categories','feedback'].includes(key))return;workspace.value=key;editorOpen.value=false;resetItem();router.replace({path:route.path,query:{workspace:key}}).catch(()=>{});} 19625 function openEditor(x=null,updateRoute=true){resetItem();if(x){Object.keys(itemForm).forEach(k=>{if(Object.prototype.hasOwnProperty.call(x,k))itemForm[k]=x[k]});itemForm.category_id=x.category_id||'';itemForm.is_recommended=!!x.is_recommended;}workspace.value='items';editorOpen.value=true;if(x&&x.id&&adminHub()!=='sudan_digital')loadEditorImageSuggestion(x.id).catch(()=>{});if(updateRoute)router.replace({path:route.path,query:{workspace:'items',...(x&&x.id?{item:x.id}:{})}}).catch(()=>{});} 19626 async function closeEditor(){editorOpen.value=false;resetItem();await router.replace({path:route.path,query:{workspace:'items'}}).catch(()=>{});} 19627 function toggleReview(kind,x){reviewOpen[kind+'-'+x.id]=!reviewOpen[kind+'-'+x.id];} 19628 async function syncRouteTarget(){ 19629 const qy=route.query||{},targetItem=String(qy.item||''),targetReport=String(qy.report||''),targetSuggestion=String(qy.suggestion||''); 19630 if(targetItem){workspace.value='items';const row=data.items.find(x=>String(x.id)===targetItem);if(row&&!editorOpen.value)openEditor(row,false);focusedTask.value='item-'+targetItem;} 19631 else if(targetReport||targetSuggestion){workspace.value='feedback';
19631const kind=targetReport?'report':'suggestion',id=targetReport||targetSuggestion;reviewOpen[kind+'-'+id]=true;focusedTask.value=kind+'-'+id;await nextTick();const el=document.querySelector('[data-task-id="'+kind+'-'+id.replace(/[^0-9]/g,'')+'"]');if(el)el.scrollIntoView({behavior:'smooth',block:'center'});} 19632 } 19633 async function load(){store.state.busy=true;const r=await api(adminApiPath());if(r.status===401){store.state.busy=false;router.replace('/admin/login');return;}data.categories=safeArray(r.categories);data.items=safeArray(r.items);data.suggestions=safeArray(r.suggestions);data.reports=safeArray(r.reports);data.stats=r.stats||data.stats;data.demand=safeArray(r.demand);data.search_quality=r.search_quality||data.search_quality;data.search_quality.top_opened=safeArray(data.search_quality.top_opened);data.operations=r.operations||data.operations;data.operations.priorities=safeArray(data.operations.priorities);data.governance=r.governance||null;store.state.busy=false;await syncRouteTarget();} 19634 async function saveCategory(){if(!catForm.name_ar){store.state.msg='Ø§ÙØªØ¨ اس٠اÙÙØ³Ù ';return;}store.state.busy=true;catForm.hub_key=adminHub();const r=await api(adminBase()+'/categories',{method:'POST',body:JSON.stringify(catForm)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){Object.assign(catForm,{name_ar:'',name_en:'',name_zh:'',slug:'',icon:sectionIcon(),sort_order:100,hub_key:adminHub()});await load();}} 19635 function onItemImage(e){const f=(e.target.files&&e.target.files[0])||null;if(!f){clearItemImageSelection();return;}if(f.size>20*1024*1024){clearItemImageSelection();store.state.msg='ØØ¬Ù Ø§ÙØµÙرة Ø£ÙØ¨Ø± Ù Ù 20MB. اختر ØµÙØ±Ø© أصغر';return;}clearItemImageSelection();removeImageOnSave.value=false;itemImageFile.value=f;itemImageLabel.value=f.name;itemImagePreview.value=URL.createObjectURL(f);} 19636 function markItemImagePreviewBroken(){if(itemImagePreview.value&&!itemImagePreviewFailed.value){itemImagePreviewFailed.value=true;return;}itemForm.image_thumb_url='';itemForm.image_url='';} 19637 function adminItemImage(x){return [x&&x.image_thumb_url,x&&x.image_url].find(url=>url&&!adminBrokenImages[String(url)])||'';} 19638 function markAdminImageBroken(x){const url=adminItemImage(x);if(url)adminBrokenImages[String(url)]=true;} 19639 function stageImageRemoval(){if(!itemForm.id||!itemForm.image_url)return;removeImageOnSave.value=!removeImageOnSave.value;if(removeImageOnSave.value)clearItemImageSelection();} 19640 async function uploadItemImage(itemId){const fd=new FormData();fd.append('file',itemImageFile.value);return uploadApi(adminBase()+'/items/'+encodeURIComponent(itemId)+'/image',{method:'POST',body:fd,headers:{Accept:'application/json'},uploadLabel:'Ø±ÙØ¹ ØµÙØ±Ø© اÙÙ ØØªÙÙ'});} 19641 async function suggestItemImage(){ 19642 if(!itemForm.id){store.state.msg='اØÙظ Ø§ÙØ¹Ùصر Ø£ÙÙØ§Ù Ø«Ù Ø§Ø·ÙØ¨ Ø§Ø³ØªØ¬ÙØ§Ø¨ Ø§ÙØµÙرة';return;} 19643 if(adminHub()==='sudan_digital'){store.state.msg='٠ساعد Ø§ÙØµÙر ØºÙØ± Ù ÙØ¹ÙÙ ÙØ¨Ùابة Ø§ÙØ³ÙØ¯Ø§Ù ØØ§ÙÙØ§Ù';return;} 19644 if(!String(itemForm.source_url||'').match(/^https?:\/\//i)){store.state.msg='أض٠رابط ٠صدر ØµØ§ÙØ ÙØ§ØÙظ Ø§ÙØ¹Ùصر Ø£ÙÙØ§Ù';return;} 19645 const saved=data.items.find(x=>String(x.id)===String(itemForm.id)); 19646 if(saved&&String(saved.source_url||'')!==String(itemForm.source_url||'')){store.state.msg='اØÙظ رابط اÙ٠صدر Ø§ÙØ¬Ø¯Ùد Ø£ÙÙØ§Ù ث٠أعد Ø§Ø³ØªØ¬ÙØ§Ø¨ Ø§ÙØµÙرة';return;} 19647 itemImageSuggestBusy.value=true;store.state.msg='ÙØ¬Ø±Ù Ø§ÙØ¨ØØ« Ø¹Ù ØµÙØ±Ø© ٠رتبطة باÙ٠صدر...'; 19648 const r=await api(adminBase()+'/items/'+encodeURIComponent(itemForm.id)+'/image/suggest',{method:'POST'}); 19649 itemImageSuggestBusy.value=false;store.state.msg=r.message||r.error||''; 19650 if(r.suggestion){itemImageSuggestion.value=r.suggestion;startImageSuggestionPoll();} 19651 } 19652 function suggestedItemImage(){const s=itemImageSuggestion.value||{};return s.image_thumb_url||s.image_url||'';} 19653 function openSuggestedItemImageSource(){const s=itemImageSuggestion.value||{};const url=s.image_source_url||s.source_url||'';if(url)window.open(url,'_blank','noopener,noreferrer');} 19654 function suggestedItemImageSourceLabel(){const s=itemImageSuggestion.value||{},m=s.image_meta||{};if(m.ai_search)return 'Grok Image Search';if(m.ai_generated)return 'ØµÙØ±Ø© Ù ÙÙØ¯Ø© Ø¨Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ';if(s.image_source_url)return 'ØµÙØ±Ø© ٠٠اÙ٠صدر';return '٠صدر Ø§ÙØµÙرة';} 19655 async function approveSuggestedItemImage(){const s=itemImageSuggestion.value||{};if(!s.id||!itemForm.id)return;itemImageSuggestBusy.value=true;store.state.msg='جار٠اعت٠اد Ø§ÙØµÙرة ÙÙØ·...';const r=await api(adminBase()+'/items/'+encodeURIComponent(itemForm.id)+'/image/suggestions/'+encodeURIComponent(s.id)+'/approve',{method:'POST'});itemImageSuggestBusy.value=false;store.state.msg=r.message||r.error||'';if(r.ok){itemImageSuggestion.value=null;if(r.item){itemForm.image_url=r.item.image_url||'';itemForm.image_thumb_url=r.item.image_thumb_url||'';}await load();const row=data.items.find(x=>String(x.id)===String(itemForm.id));if(row)openEditor(row,false);}} 19656 async function rejectSuggestedItemImage(){const s=itemImageSuggestion.value||{};if(!s.id||!itemForm.id)return;itemImageSuggestBusy.value=true;const r=await api(adminBase()+'/items/'+encodeURIComponent(itemForm.id)+'/image/suggestions/'+encodeURIComponent(s.id)+'/reject',{method:'POST'});itemImageSuggestBusy.value=false;store.state.msg=r.message||r.error||'';if(r.ok)itemImageSuggestion.value=null;} 19657 async function retrySuggestedItemImage(){const s=itemImageSuggestion.value||{};if(s.id&&s.image_status==='ready')await rejectSuggestedItemImage();if(!itemImageSuggestion.value||['not_found','failed'].includes(s.image_status))await suggestItemImage();} 19658 async function saveItem(){ 19659 if(!String(itemForm.title_ar||'').trim()){store.state.msg='Ø§ÙØªØ¨ عÙÙØ§Ù Ø§ÙØ¹Ùصر';return;} 19660 store.state.busy=true;itemForm.hub_key=adminHub();const hadImage=!!itemForm.image_url,selectedFile=itemImageFile.value;const url=itemForm.id?adminBase()+'/items/'+encodeURIComponent(itemForm.id):adminBase()+'/items';const r=await api(url,{method:'POST',body:JSON.stringify(itemForm)}); 19661 if(!r.ok){store.state.busy=false;store.state.msg=r.message||r.error||'تعذر ØÙظ Ø§ÙØ¹Ùصر';return;} 19662 const itemId=(r.item&&r.item.id)||itemForm.id;let mediaResult={ok:true}; 19663 if(selectedFile)mediaResult=await uploadItemImage(itemId);else if(removeImageOnSave.value&&hadImage)mediaResult=await api(adminBase()+'/items/'+encodeURIComponent(itemId)+'/image/remove',{method:'POST'}); 19664 if(!mediaResult.ok){itemForm.id=itemId;store.state.busy=false;store.state.msg='ØÙÙØ¸Øª Ø§ÙØ¨ÙØ§ÙØ§ØªØ ÙÙ٠تعذر Ø¥ÙÙ Ø§Ù Ù Ø¹Ø§ÙØ¬Ø© Ø§ÙØµÙرة: '+(mediaResult.message||mediaResult.error||'خطأ ØºÙØ± ٠عرÙÙ');return;} 19665 store.state.busy=false;store.state.msg=selectedFile?'ت٠ØÙظ ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ§ÙØµÙØ±Ø© ÙØ¶Ø¨Ø·Ùا تÙÙØ§Ø¦ÙاÙ':(removeImageOnSave.value?'ت٠ØÙظ Ø§ÙØ¹Ùصر ÙØ¥Ø²Ø§ÙØ© Ø§ÙØµÙرة':'ت٠ØÙظ Ø§ÙØ¹Ùصر');await closeEditor();await load(); 19666 } 19667 async function archiveItem(){if(!itemForm.id||!confirm('Ø£Ø±Ø´ÙØ© ÙØ°Ø§ Ø§ÙØ¹Ùصر ÙØ¥Ø²Ø§Ùت٠٠٠اÙÙÙØ§Ø¦Ù اÙÙØ´Ø·Ø©Ø'))return;store.state.busy=true;const r=await api(adminBase()+'/items/'+encodeURIComponent(itemForm.id)+'/archive',{method:'POST'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){await closeEditor();await load();}} 19668 async function governance(action){if(!itemForm.id)return;let note='';if(['reject','approve','reverify'].includes(action))note=prompt(action==='reject'?'سبب Ø§ÙØ¥Ø±Ø¬Ø§Ø¹ ÙÙÙ Ø³ÙØ¯Ø©:':'Ù ÙØ§ØØ¸Ø© Ø§ÙØÙÙÙ Ø© (Ø§Ø®ØªÙØ§Ø±Ù):')||'';if(action==='reject'&&!note)return;store.state.busy=true;const r=await api('/api/admin/sudan-digital/items/'+encodeURIComponent(itemForm.id)+'/governance',{method:'POST',body:JSON.stringify({action,note})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok&&r.item)Object.assign(itemForm,r.item);if(r.ok)await load();} 19669 async function reviewReward(kind,x,action){let note='';if(action==='reject'){note=prompt('سبب Ø§ÙØ±Ùض:')||'';if(!note)return;}store.state.busy=true;const endpoint=kind==='suggestion'?'/api/admin/china-guide/suggestions/':'/api/admin/china-guide/reports/';const r=await api(endpoint+encodeURIComponent(x.id)+'/review',{method:'POST',body:JSON.stringify({action,note})});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok)await load();} 19670 onMounted(async()=>
19670{if(await store.requireAdmin(router)){await load();loadRegistryOptions();}}); 19671 onUnmounted(()=>{stopImageSuggestionPoll();clearItemImageSelection();}); 19672 watch(()=>route.fullPath,async()=>{if(data.items.length)await syncRouteTarget();}); 19673 return {registrySectors,registryTradeServices,store,data,workspace,queryText,categoryFilter,serviceFilter,statusFilter,visibleLimit,feedbackLimit,editorOpen,removeImageOnSave,reviewOpen,focusedTask,catForm,itemForm,itemImageFile,itemImageLabel,itemImagePreview,itemImagePreviewFailed,itemImageInputKey,itemImageDisplay,itemImageSuggestion,itemImageSuggestBusy,verificationDueOnly,safeImageErrorText,serviceOptions,adminCategoryIs,filteredItems,visibleItems,itemStats,pendingFeedback,visibleSuggestions,visibleReports,load,clearVerificationFilter,resetItem,setWorkspace,openEditor,closeEditor,toggleReview,saveCategory,saveItem,onItemImage,markItemImagePreviewBroken,adminItemImage,markAdminImageBroken,clearItemImageSelection,stageImageRemoval,suggestItemImage,suggestedItemImage,openSuggestedItemImageSource,suggestedItemImageSourceLabel,approveSuggestedItemImage,rejectSuggestedItemImage,retrySuggestedItemImage,archiveItem,governance,reviewReward,adminHub,adminTitle,adminDesc,publicPath,sectionIcon,aiResearchPath,itemStatusLabel,verificationLabel,serviceLabel,demandLabel,priorityKindLabel,priorityLevelLabel,priorityMeta,openGuidePriority,shortDate}; 19674 }, 19675 render:(function(){ 19676const _Vue = Vue 19677const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 19678 19679const _hoisted_1 = { class: "card adminContentHero" } 19680const _hoisted_2 = { class: "adminHeroActions" } 19681const _hoisted_3 = ["onClick"] 19682const _hoisted_4 = ["onClick"] 19683const _hoisted_5 = { 19684 class: "card adminWorkspaceTabs", 19685 "aria-label": "Ø£ÙØ³Ø§Ù إدارة اÙÙ ØØªÙÙ" 19686} 19687const _hoisted_6 = ["onClick"] 19688const _hoisted_7 = ["onClick"] 19689const _hoisted_8 = ["onClick"] 19690const _hoisted_9 = { 19691 key: 0, 19692 class: "card adminQueuePurpose" 19693} 19694const _hoisted_10 = ["onClick"] 19695const _hoisted_11 = { class: "adminContentMetrics" } 19696const _hoisted_12 = { 19697 key: 0, 19698 class: "card guideOperationsPanel" 19699} 19700const _hoisted_13 = { class: "adminSectionLead" } 19701const _hoisted_14 = { class: "statusPill" } 19702const _hoisted_15 = { 19703 key: 0, 19704 class: "guidePriorityList" 19705} 19706const _hoisted_16 = { class: "guidePriorityRank" } 19707const _hoisted_17 = { key: 0 } 19708const _hoisted_18 = ["onClick"] 19709const _hoisted_19 = { 19710 key: 1, 19711 class: "hint" 19712} 19713const _hoisted_20 = { 19714 key: 1, 19715 class: "card guideEnrichmentPanel" 19716} 19717const _hoisted_21 = { class: "adminSectionLead" } 19718const _hoisted_22 = ["onClick"] 19719const _hoisted_23 = { class: "guideEnrichmentStats" } 19720const _hoisted_24 = { 19721 key: 0, 19722 class: "guideDemandList" 19723} 19724const _hoisted_25 = { 19725 key: 1, 19726 class: "hint" 19727} 19728const _hoisted_26 = { 19729 key: 2, 19730 class: "card guideQualityPanel" 19731} 19732const _hoisted_27 = { class: "adminSectionLead" } 19733const _hoisted_28 = { class: "statusPill" } 19734const _hoisted_29 = { class: "guideQualityStats" } 19735const _hoisted_30 = { 19736 key: 0, 19737 class: "guideTopOpened" 19738} 19739const _hoisted_31 = { 19740 key: 1, 19741 class: "hint" 19742} 19743const _hoisted_32 = { 19744 key: 3, 19745 class: "card compactGovernanceSummary" 19746} 19747const _hoisted_33 = { class: "card adminContentToolbar" } 19748const _hoisted_34 = { class: "adminSearchField" } 19749const _hoisted_35 = ["onUpdate:modelValue", "onInput"] 19750const _hoisted_36 = ["onUpdate:modelValue", "onChange"] 19751const _hoisted_37 = ["value"] 19752const _hoisted_38 = ["onUpdate:modelValue", "onChange"] 19753const _hoisted_39 = ["value"] 19754const _hoisted_40 = ["onUpdate:modelValue", "onChange"] 19755const _hoisted_41 = ["onClick"] 19756const _hoisted_42 = { 19757 key: 4, 19758 class: "card emptyCard" 19759} 19760const _hoisted_43 = { class: "adminCompactList" } 19761const _hoisted_44 = ["onClick"] 19762const _hoisted_45 = { class: "adminCompactThumb" } 19763const _hoisted_46 = ["src", "alt", "onError"] 19764const _hoisted_47 = { key: 1 } 19765const _hoisted_48 = { class: "adminCompactCopy" } 19766const _hoisted_49 = { class: "adminCompactTitle" } 19767const _hoisted_50 = { key: 0 } 19768const _hoisted_51 = { class: "adminCompactState" } 19769const _hoisted_52 = ["onClick"] 19770const _hoisted_53 = ["onClick"] 19771const _hoisted_54 = { 19772 key: 2, 19773 class: "adminCategoryWorkspace" 19774} 19775const _hoisted_55 = { 19776 key: 0, 19777 class: "card formCard adminCategoryComposer" 19778} 19779const _hoisted_56 = { class: "formTwo" } 19780const _hoisted_57 = ["onUpdate:modelValue"] 19781const _hoisted_58 = ["onUpdate:modelValue"] 19782const _hoisted_59 = { class: "formTwo" } 19783const _hoisted_60 = ["onUpdate:modelValue"] 19784const _hoisted_61 = ["onUpdate:modelValue"] 19785const _hoisted_62 = { class: "formTwo" } 19786const _hoisted_63 = ["onUpdate:modelValue"] 19787const _hoisted_64 = ["onUpdate:modelValue"] 19788const _hoisted_65 = ["onClick"] 19789const _hoisted_66 = { class: "card adminCategoryList" } 19790const _hoisted_67 = { 19791 key: 3, 19792 class: "adminFeedbackWorkspace" 19793} 19794const _hoisted_68 = { class: "card adminSectionLead" } 19795const _hoisted_69 = { class: "statusPill" } 19796const _hoisted_70 = { 19797 key: 0, 19798 class: "compactReviewGroup" 19799} 19800const _hoisted_71 = ["data-task-id"] 19801const _hoisted_72 = ["onClick"] 19802const _hoisted_73 = { 19803 key: 0, 19804 class: "compactReviewBody" 19805} 19806const _hoisted_74 = { class: "notifyMeta" } 19807const _hoisted_75 = { dir: "ltr" } 19808const _hoisted_76 = { 19809 key: 0, 19810 class: "row" 19811} 19812const _hoisted_77 = ["onClick"] 19813const _hoisted_78 = ["onClick"] 19814const _hoisted_79 = { 19815 key: 1, 19816 class: "compactReviewGroup" 19817} 19818const _hoisted_80 = ["data-task-id"] 19819const _hoisted_81 = ["onClick"] 19820const _hoisted_82 = { 19821 key: 0, 19822 class: "compactReviewBody" 19823} 19824const _hoisted_83 = { class: "notifyMeta" } 19825const _hoisted_84 = { dir: "ltr" } 19826const _hoisted_85 = { 19827 key: 0, 19828 class: "row" 19829} 19830const _hoisted_86 = ["onClick"] 19831const _hoisted_87 = ["onClick"] 19832const _hoisted_88 = { 19833 key: 2, 19834 class: "card emptyCard" 19835} 19836const _hoisted_89 = ["onClick"] 19837const _hoisted_90 = ["onClick"] 19838const _hoisted_91 = { 19839 class: "adminEditorShell", 19840 role: "dialog", 19841 "aria-modal": "true", 19842 "aria-label": "Ù ØØ±Ø± Ø§ÙØ¹Ùصر" 19843} 19844const _hoisted_92 = { class: "adminEditorHeader" } 19845const _hoisted_93 = { class: "vueBadge" } 19846const _hoisted_94 = ["onClick"] 19847const _hoisted_95 = { 19848 type: "submit", 19849 form: "guide-item-editor", 19850 class: "btn" 19851} 19852const _hoisted_96 = ["onSubmit"] 19853const _hoisted_97 = { class: "adminFormSection" } 19854const _hoisted_98 = { class: "editorMediaAndNames" } 19855const _hoisted_99 = { class: "editorMediaField" } 19856const _hoisted_100 = { class: "guideImageAdminPreview" } 19857const _hoisted_101 = ["src", "alt", "onError"]
19858const _hoisted_102 = { key: 1 } 19859const _hoisted_103 = { key: 2 } 19860const _hoisted_104 = { class: "filePicker guideImagePicker" } 19861const _hoisted_105 = ["onChange"] 19862const _hoisted_106 = { class: "row" } 19863const _hoisted_107 = ["onClick"] 19864const _hoisted_108 = ["onClick"] 19865const _hoisted_109 = { 19866 key: 0, 19867 class: "guideImageAssistBox" 19868} 19869const _hoisted_110 = ["disabled", "onClick"] 19870const _hoisted_111 = { 19871 key: 0, 19872 class: "guideImageSuggestionPreview" 19873} 19874const _hoisted_112 = ["src", "alt"] 19875const _hoisted_113 = { key: 1 } 19876const _hoisted_114 = { key: 0 } 19877const _hoisted_115 = { key: 1 } 19878const _hoisted_116 = { key: 2 } 19879const _hoisted_117 = { 19880 key: 3, 19881 class: "row" 19882} 19883const _hoisted_118 = ["onClick"] 19884const _hoisted_119 = ["disabled", "onClick"] 19885const _hoisted_120 = ["disabled", "onClick"] 19886const _hoisted_121 = ["disabled", "onClick"] 19887const _hoisted_122 = { 19888 key: 4, 19889 class: "row" 19890} 19891const _hoisted_123 = ["disabled", "onClick"] 19892const _hoisted_124 = ["disabled", "onClick"] 19893const _hoisted_125 = { class: "editorNameFields" } 19894const _hoisted_126 = { class: "fieldLabel" } 19895const _hoisted_127 = ["onUpdate:modelValue"] 19896const _hoisted_128 = { class: "fieldLabel" } 19897const _hoisted_129 = ["onUpdate:modelValue"] 19898const _hoisted_130 = { class: "fieldLabel" } 19899const _hoisted_131 = ["onUpdate:modelValue"] 19900const _hoisted_132 = { class: "fieldLabel" } 19901const _hoisted_133 = ["onUpdate:modelValue"] 19902const _hoisted_134 = { class: "fieldLabel" } 19903const _hoisted_135 = ["onUpdate:modelValue"] 19904const _hoisted_136 = { class: "adminFormSection" } 19905const _hoisted_137 = { class: "formTwo" } 19906const _hoisted_138 = { class: "fieldLabel" } 19907const _hoisted_139 = ["onUpdate:modelValue"] 19908const _hoisted_140 = ["value"] 19909const _hoisted_141 = { class: "fieldLabel" } 19910const _hoisted_142 = ["onUpdate:modelValue"] 19911const _hoisted_143 = { 19912 key: 0, 19913 class: "formTwo" 19914} 19915const _hoisted_144 = { class: "fieldLabel" } 19916const _hoisted_145 = ["onUpdate:modelValue"] 19917const _hoisted_146 = ["value"] 19918const _hoisted_147 = ["value"] 19919const _hoisted_148 = { 19920 key: 1, 19921 class: "formTwo" 19922} 19923const _hoisted_149 = { class: "fieldLabel" } 19924const _hoisted_150 = ["onUpdate:modelValue"] 19925const _hoisted_151 = { class: "fieldLabel" } 19926const _hoisted_152 = ["onUpdate:modelValue"] 19927const _hoisted_153 = ["value"] 19928const _hoisted_154 = { 19929 key: 2, 19930 class: "formTwo" 19931} 19932const _hoisted_155 = { class: "fieldLabel" } 19933const _hoisted_156 = ["onUpdate:modelValue"] 19934const _hoisted_157 = { class: "fieldLabel" } 19935const _hoisted_158 = ["onUpdate:modelValue"] 19936const _hoisted_159 = { 19937 key: 3, 19938 class: "formTwo" 19939} 19940const _hoisted_160 = { class: "fieldLabel" } 19941const _hoisted_161 = ["onUpdate:modelValue"] 19942const _hoisted_162 = { class: "fieldLabel" } 19943const _hoisted_163 = ["onUpdate:modelValue"] 19944const _hoisted_164 = { class: "formTwo" } 19945const _hoisted_165 = { class: "fieldLabel" } 19946const _hoisted_166 = ["onUpdate:modelValue"] 19947const _hoisted_167 = { class: "fieldLabel" } 19948const _hoisted_168 = ["onUpdate:modelValue"] 19949const _hoisted_169 = { 19950 key: 0, 19951 class: "adminExhibitionFields" 19952} 19953const _hoisted_170 = { class: "formTwo" } 19954const _hoisted_171 = { class: "fieldLabel" } 19955const _hoisted_172 = ["onUpdate:modelValue"] 19956const _hoisted_173 = { class: "fieldLabel" } 19957const _hoisted_174 = ["onUpdate:modelValue"] 19958const _hoisted_175 = { class: "formTwo" } 19959const _hoisted_176 = { class: "fieldLabel" } 19960const _hoisted_177 = ["onUpdate:modelValue"] 19961const _hoisted_178 = { class: "fieldLabel" } 19962const _hoisted_179 = ["onUpdate:modelValue"] 19963const _hoisted_180 = { class: "fieldLabel" } 19964const _hoisted_181 = ["onUpdate:modelValue"] 19965const _hoisted_182 = { class: "adminFormSection" } 19966const _hoisted_183 = { class: "adminFormSectionHead" } 19967const _hoisted_184 = { class: "formTwo" } 19968const _hoisted_185 = { class: "fieldLabel" } 19969const _hoisted_186 = ["onUpdate:modelValue", "onChange"] 19970const _hoisted_187 = ["value"] 19971const _hoisted_188 = { class: "fieldLabel" } 19972const _hoisted_189 = ["onUpdate:modelValue"] 19973const _hoisted_190 = ["value"] 19974const _hoisted_191 = { class: "fieldLabel" } 19975const _hoisted_192 = ["onUpdate:modelValue"] 19976const _hoisted_193 = { class: "fieldLabel" } 19977const _hoisted_194 = ["onUpdate:modelValue"] 19978const _hoisted_195 = { class: "formTwo" } 19979const _hoisted_196 = { class: "fieldLabel" } 19980const _hoisted_197 = ["onUpdate:modelValue"] 19981const _hoisted_198 = { class: "fieldLabel" } 19982const _hoisted_199 = ["onUpdate:modelValue"] 19983const _hoisted_200 = { class: "formTwo" } 19984const _hoisted_201 = { class: "fieldLabel" } 19985const _hoisted_202 = ["onUpdate:modelValue"] 19986const _hoisted_203 = { class: "fieldLabel" } 19987const _hoisted_204 = ["onUpdate:modelValue"] 19988const _hoisted_205 = { 19989 key: 1, 19990 class: "fieldLabel" 19991} 19992const _hoisted_206 = ["onUpdate:modelValue"] 19993const _hoisted_207 = { class: "formTwo" } 19994const _hoisted_208 = { class: "fieldLabel" } 19995const _hoisted_209 = ["onUpdate:modelValue"] 19996const _hoisted_210 = ["value"] 19997const _hoisted_211 = { class: "fieldLabel" } 19998const _hoisted_212 = ["onUpdate:modelValue"] 19999const _hoisted_213 = ["value"] 20000const _hoisted_214 = { class: "checkLine" } 20001const _hoisted_215 = ["onUpdate:modelValue"] 20002const _hoisted_216 = { 20003 key: 0, 20004 class: "adminFormSection governanceEditorSection" 20005} 20006const _hoisted_217 = { class: "adminFormSectionHead" } 20007const _hoisted_218 = { class: "row" } 20008const _hoisted_219 = ["onClick"] 20009const _hoisted_220 = ["onClick"] 20010const _hoisted_221 = ["onClick"] 20011const _hoisted_222 = ["onClick"] 20012const _hoisted_223 = ["onClick"] 20013const _hoisted_224 = ["onClick"] 20014const _hoisted_225 = { class: "adminEditorFooter" } 20015const _hoisted_226 = { 20016 key: 0, 20017 class: "editorDangerMenu" 20018} 20019const _hoisted_227 = ["onClick"] 20020const _hoisted_228 = ["onClick"] 20021const _hoisted_229 = { 20022 type: "submit", 20023 class: "btn" 20024} 20025 20026return function render(_ctx, _cache) { 20027 with (_ctx) {
20028 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, vModelText: _vModelText, withDirectives: _withDirectives, vModelSelect: _vModelSelect, vModelCheckbox: _vModelCheckbox, withModifiers: _withModifiers, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 20029 20030 const _component_AdminFrame = _resolveComponent("AdminFrame") 20031 20032 return (_openBlock(), _createBlock(_component_AdminFrame, { title: adminTitle() }, { 20033 default: _withCtx(() => [ 20034 _createElementVNode("section", _hoisted_1, [_createElementVNode("div", null, [_cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "Ù Ø³Ø§ØØ© إدارة اÙÙ ØØªÙÙ", -1)), _createElementVNode("h3", null, [_createElementVNode("span", null, _toDisplayString(sectionIcon()), 1), _createTextVNode(" " + _toDisplayString(adminTitle()), 1)]), _createElementVNode("p", null, _toDisplayString(adminDesc()), 1)]), _createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 20035 class: "smallbtn secondary", 20036 onClick: $event => ($router.push(publicPath())) 20037 }, "٠عاÙÙØ© Ø§ÙØµÙØØ©", 8, _hoisted_3), (adminHub()!=='sudan_digital') 20038 ? (_openBlock(), _createElementBlock("button", { 20039 key: 0, 20040 class: "smallbtn", 20041 onClick: $event => ($router.push(aiResearchPath())) 20042 }, "إدارة Ù ØØªÙÙ AI", 8, _hoisted_4)) 20043 : _createCommentVNode("", true)])]), 20044 _createElementVNode("nav", _hoisted_5, [_createElementVNode("button", { 20045 class: _normalizeClass({active:workspace==='items'}), 20046 onClick: $event => (setWorkspace('items')) 20047 }, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "â¦", -1)), _cache[2] || (_cache[2] = _createElementVNode("b", null, "Ø§ÙØ¹Ùاصر", -1)), _createElementVNode("small", null, _toDisplayString(data.items.length), 1)], 10, _hoisted_6), _createElementVNode("button", { 20048 class: _normalizeClass({active:workspace==='categories'}), 20049 onClick: $event => (setWorkspace('categories')) 20050 }, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "â", -1)), _cache[4] || (_cache[4] = _createElementVNode("b", null, "Ø§ÙØ£Ùسا٠", -1)), _createElementVNode("small", null, _toDisplayString(data.categories.length), 1)], 10, _hoisted_7), _createElementVNode("button", { 20051 class: _normalizeClass({active:workspace==='feedback'}), 20052 onClick: $event => (setWorkspace('feedback')) 20053 }, [_cache[5] || (_cache[5] = _createElementVNode("span", null, "â", -1)), _cache[6] || (_cache[6] = _createElementVNode("b", null, "اÙÙ ÙØ§ØØ¸Ø§Øª", -1)), _createElementVNode("small", null, _toDisplayString(pendingFeedback), 1)], 10, _hoisted_8)]), 20054 (verificationDueOnly&&workspace==='items') 20055 ? (_openBlock(), _createElementBlock("section", _hoisted_9, [_cache[7] || (_cache[7] = _createElementVNode("div", null, [_createElementVNode("b", null, "ÙÙØªØ±: Ø§ÙØªÙØ«Ù٠اÙ٠ستØÙ"), _createElementVNode("span", null, "ÙØ°Ù اÙÙØ§Ø¦Ù Ø© تعرض ÙÙØ· Ø§ÙØ¹Ùاصر اÙÙ ÙØ´Ùرة Ø§ÙØªÙ ØªØ¬Ø§ÙØ²Øª Ù ÙØ¹Ø¯ إعادة Ø§ÙØªØÙÙ.")], -1)), _createElementVNode("button", { 20056 class: "smallbtn secondary", 20057 onClick: clearVerificationFilter 20058 }, "عرض ÙÙ Ø§ÙØ¹Ùاصر", 8, _hoisted_10)])) 20059 : _createCommentVNode("", true), 20060 (workspace==='items') 20061 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 20062 _createElementVNode("section", _hoisted_11, [ 20063 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(itemStats.total), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "ÙÙ Ø§ÙØ¹Ùاصر", -1))]), 20064 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(itemStats.published), 1
20064), _cache[9] || (_cache[9] = _createElementVNode("small", null, "Ù ÙØ´Ùر", -1))]), 20065 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.stats.image_coverage_percent) + "%", 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "ØªØºØ·ÙØ© Ø§ÙØµÙر", -1))]), 20066 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.stats.missing_image||0), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "Ù ÙØ´Ùر Ø¨ÙØ§ ØµÙØ±Ø©", -1))]) 20067 ]), 20068 (adminHub()!=='sudan_digital') 20069 ? (_openBlock(), _createElementBlock("section", _hoisted_12, [_createElementVNode("div", _hoisted_13, [_cache[12] || (_cache[12] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ابدأ Ù Ù ÙÙØ§"), _createElementVNode("h3", null, "Ø£ÙÙÙÙØ§Øª Ø§ÙØªØØ³ÙÙ Ø§ÙØ¢Ù"), _createElementVNode("p", null, "٠رتبة Ù Ù Ø§ÙØ®Ø§Ø¯Ù ØØ³Ø¨ Ø§ÙØ·Ùب اÙÙØ¹ÙÙØ ÙÙØµ اÙÙ ØµØ¯Ø±Ø ÙÙØµ Ø§ÙØµÙرة ÙØ§Ø³ØªØ®Ø¯Ø§Ù ÙØªØ§Ø¦Ø¬ Ø§ÙØ¨ØØ«. ÙØ§ ÙÙØ´Ø¦ Ù ÙØ§Ù Ù ÙØ±Ø±Ø© ÙÙØ§ ÙØ®Ø²Ù ÙÙ٠ات Ø§ÙØ¨ØØ« Ø§ÙØ®Ø§Ù .")], -1)), _createElementVNode("span", _hoisted_14, _toDisplayString(data.operations.total||0) + " Ø£ÙÙÙÙØ©", 1)]), ((data.operations.priorities||[]).length) 20070 ? (_openBlock(), _createElementBlock("div", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.operations.priorities.slice(0,6), (x, i) => { 20071 return (_openBlock(), _createElementBlock("article", { 20072 key: 'priority-'+x.kind+'-'+(x.item_id||i), 20073 class: _normalizeClass(['guidePriorityItem','priority-'+x.priority]) 20074 }, [_createElementVNode("span", _hoisted_16, _toDisplayString(i+1), 1), _createElementVNode("div", null, [_createElementVNode("p", null, [_createElementVNode("b", null, _toDisplayString(x.kind==='content_gap'?demandLabel(x):x.title), 1), _createElementVNode("em", null, _toDisplayString(priorityKindLabel(x.kind)) + " · " + _toDisplayString(priorityLevelLabel(x.priority)), 1)]), _createElementVNode("small", null, _toDisplayString(x.reason), 1), (priorityMeta(x)) 20075 ? (_openBlock(), _createElementBlock("i", _hoisted_17, _toDisplayString(priorityMeta(x)), 1)) 20076 : _createCommentVNode("", true)]), _createElementVNode("button", { 20077 class: "smallbtn", 20078 onClick: $event => (openGuidePriority(x)) 20079 }, _toDisplayString(x.action==='edit_item'?'ÙØªØ Ø§ÙØ¹Ùصر':'ÙØªØ Ø§ÙØ¨ØØ« ÙØ§ÙØªØØ³ÙÙ'), 9, _hoisted_18)], 2)) 20080 }), 128))])) 20081 : (_openBlock(), _createElementBlock("p", _hoisted_19, "ÙØ§ ØªÙØ¬Ø¯ Ø£ÙÙÙÙØ§Øª تشغÙÙÙØ© Ø¸Ø§ÙØ±Ø© Ø§ÙØ¢Ù. ÙØ°Ø§ Ø£ÙØ¶Ù Ù Ù Ù ÙØ¡ Ø§ÙØ´Ø§Ø´Ø© Ø¨Ø£Ø±ÙØ§Ù ÙØ§ ØªØØªØ§Ø¬ إجراء."))])) 20082 : _createCommentVNode("", true), 20083 (adminHub()!=='sudan_digital') 20084 ? (_openBlock(), _createElementBlock("section", _hoisted_20, [_createElementVNode("div", _hoisted_21, [_cache[13] || (_cache[13] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ØªØØ³ÙÙ Ø§ÙØ¯ÙÙÙ"), _createElementVNode("h3", null, "ÙØ¬Ùات اÙÙ ØØªÙÙ ÙØ§ÙØµÙØ±"), _createElementVNode("p", null, "Ø§ÙØ¨ÙØ§ÙØ§Øª ٠ج٠عة ØØ³Ø¨ ÙÙØ¹ Ø§ÙØ·Ùب ÙØ§Ù٠دÙÙØ© ÙÙØ·Ø ÙØ§ ÙØÙØ¸ عبارة Ø¨ØØ« اÙ٠ستخد٠أ٠ÙÙÙØªÙ.")], -1)), _createElementVNode("button", { 20085 class: "smallbtn", 20086 onClick: $event => ($router.push(aiResearchPath())) 20087 }, "ÙØªØ Ù ÙØªØ±ØØ§Øª AI", 8, _hoisted_22)]), _createElementVNode("div", _hoisted_23, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.stats.missing_image||0), 1), _cache[14] || (_cache[14] = _createElementVNode("small", null, "Ø¹ÙØµØ± Ù ÙØ´Ùر ÙØØªØ§Ø¬ ØµÙØ±Ø©", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.stats.missing_source||0), 1), _cache[15] || (_cache[15] = _createElementVNode("small", null, "Ø¹ÙØµØ± ÙØØªØ§Ø¬ ٠صدر", -1))]), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.demand.length), 1), _cache[16] || (_cache[16] = _createElementVNode("small", null, "ÙØ¬Ùات Ø·ÙØ¨ ٠صÙÙØ©", -1))])]), (data.demand.length) 20088 ? (_openBlock(), _createElementBlock("div", _hoisted_24, [_cache[17] || (_cache[17] = _createElementVNode("h4", null, "Ø£ÙØ«Ø± ٠ا ÙÙ ÙØ¬Ø¯ ÙØªÙجة â Ø¢Ø®Ø± 30 ÙÙ٠اÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.demand, (x) => { 20089 return (_openBlock(), _createElementBlock("span", { key: x.intent_key+'-'+x.city_key+'-'+x.service_type }, [_createElementVNode("b", null, _toDisplayString(demandLabel(x)), 1), _createElementVNode("small", null, _toDisplayString(x.zero_result_count) + " Ù ØØ§ÙÙØ© بدÙÙ ÙØªÙجة", 1)])) 20090 }), 128))])) 20091 : (_openBlock(), _createElementBlock("p", _hoisted_25, "ÙØ§ ØªÙØ¬Ø¯ ÙØ¬Ùات Ø¨ØØ« ٠صÙÙØ© ØØ§ÙÙØ§Ù."))])) 20092 : _createCommentVNode("", true), 20093 (adminHub()!=='sudan_digital') 20094 ? (_openBlock(), _createElementBlock("section", _hoisted_26, [_createElementVNode("div", _hoisted_27, [_cache[18] || (_cache[18] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ø¬ÙØ¯Ø© Ø§ÙØ¨ØØ«"), _createElementVNode("h3", null, "ÙÙ ÙØ¬Ø¯ اÙ٠ستخد٠٠ا ÙØ±ÙدØ"), _createElementVNode("p", null, "٠ؤشرات ٠ج٠عة ÙØ¢Ø®Ø± 30 ÙÙÙ Ø§ÙØ ÙØ§ ÙÙ٠ات Ø¨ØØ« خا٠ÙÙØ§ ÙÙÙØ© ٠ستخد٠.")
20094], -1)), _createElementVNode("span", _hoisted_28, _toDisplayString(data.search_quality.search_count||0) + " Ø¨ØØ«", 1)]), _createElementVNode("div", _hoisted_29, [ 20095 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.search_quality.search_success_rate||0) + "%", 1), _cache[19] || (_cache[19] = _createElementVNode("small", null, "Ø¨ØØ« ÙØ¬Ø¯ ÙØªÙجة", -1))]), 20096 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.search_quality.result_open_rate||0) + "%", 1), _cache[20] || (_cache[20] = _createElementVNode("small", null, "ÙØªØ ÙØªÙجة Ù Ù Ø§ÙØ¨ØØ«", -1))]), 20097 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.search_quality.image_result_rate||0) + "%", 1), _cache[21] || (_cache[21] = _createElementVNode("small", null, "Ø¨ØØ« Ø¸ÙØ± Ù Ø¹Ù ØµÙØ±Ø©", -1))]), 20098 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.search_quality.zero_result_count||0), 1), _cache[22] || (_cache[22] = _createElementVNode("small", null, "Ø¨ØØ« بدÙÙ ÙØªÙجة", -1))]) 20099 ]), ((data.search_quality.top_opened||[]).length) 20100 ? (_openBlock(), _createElementBlock("div", _hoisted_30, [_cache[23] || (_cache[23] = _createElementVNode("h4", null, "Ø£ÙØ«Ø± اÙÙØªØ§Ø¦Ø¬ ÙØªØØ§Ù Ù Ù Ø§ÙØ¨ØØ«", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.search_quality.top_opened, (x) => { 20101 return (_openBlock(), _createElementBlock("span", { key: 'opened-'+x.id }, [_createElementVNode("b", null, _toDisplayString(x.title_ar||x.title_en), 1), _createElementVNode("small", null, [_createTextVNode(_toDisplayString(x.search_open_count) + " ÙØªØ · " + _toDisplayString(adminHub()==='china_guide'?(x.category_name_ar||'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ'):serviceLabel(x.service_type)), 1), (x.city) 20102 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString($cityLabel(x.city)), 1)], 64)) 20103 : _createCommentVNode("", true)])])) 20104 }), 128))])) 20105 : (_openBlock(), _createElementBlock("p", _hoisted_31, "ÙØ§ ØªÙØ¬Ø¯ Ø¨ÙØ§Ùات ÙØªØ ÙØªØ§Ø¦Ø¬ ÙØ§ÙÙØ© بعد."))])) 20106 : _createCommentVNode("", true), 20107 (adminHub()==='sudan_digital'&&data.governance) 20108 ? (_openBlock(), _createElementBlock("section", _hoisted_32, [_createElementVNode("b", null, _toDisplayString(data.governance.policy), 1), _createElementVNode("span", null, _toDisplayString(data.governance.in_review) + " ٠راجعة · " + _toDisplayString(data.governance.approved) + " ٠عت٠د · " + _toDisplayString(data.governance.verification_due) + " تØÙ٠٠ستØÙ", 1)])) 20109 : _createCommentVNode("", true), 20110 _createElementVNode("section", _hoisted_33, [ 20111 _createElementVNode("div", _hoisted_34, [_cache[24] || (_cache[24] = _createElementVNode("span", null, "â", -1)), _withDirectives(_createElementVNode("input", { 20112 "onUpdate:modelValue": $event => ((queryText) = $event), 20113 onInput: $event => (visibleLimit=24), 20114 placeholder: "Ø§Ø¨ØØ« Ø¨Ø§ÙØ§Ø³Ù أ٠اÙ٠دÙÙØ© أ٠اÙ٠صدر..." 20115 }, null, 40, _hoisted_35), [[_vModelText, queryText]])]), 20116 _withDirectives(_createElementVNode("select", { 20117 "onUpdate:modelValue": $event => ((categoryFilter) = $event), 20118 onChange: $event => (visibleLimit=24) 20119 }, [_cache[25] || (_cache[25] = _createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØ£Ùسا٠", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.categories, (c) => { 20120 return (_openBlock(), _createElementBlock("option", { 20121 key: 'filter-cat-'+c.id, 20122 value: String(c.id) 20123 }, _toDisplayString(c.icon) + " " + _toDisplayString(c.name_ar), 9, _hoisted_37)) 20124 }), 128))], 40, _hoisted_36), [[_vModelSelect, categoryFilter]]), 20125 (adminHub()!=='china_guide') 20126 ? _withDirectives((_openBlock(), _createElementBlock("select", { 20127 key: 0, 20128 "onUpdate:modelValue": $event => ((serviceFilter) = $event), 20129 onChange: $event => (visibleLimit=24) 20130 }, [_cache[26] || (_cache[26] = _createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØ£ÙÙØ§Ø¹", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(serviceOptions, (s) => { 20131 return (_openBlock(), _createElementBlock("option", { 20132 key: 'filter-service-'+s, 20133 value: s 20134 }, _toDisplayString(serviceLabel(s)), 9, _hoisted_39)) 20135 }), 128))], 40, _hoisted_38)), [[_vModelSelect, serviceFilter]]) 20136 : _createCommentVNode("", true), 20137 _withDirectives(_createElementVNode("select", { 20138 "onUpdate:modelValue": $event => ((statusFilter) = $event), 20139 onChange: $event => (visibleLimit=24) 20140 }, _cache[27] || (_cache[27] = [_createElementVNode("option", { value: "all" }, "ÙÙ Ø§ÙØØ§ÙØ§Øª", -1), _createElementVNode("option", { value: "published" }, "Ù ÙØ´Ùر", -1), _createElementVNode("option", { value: "draft" }, "Ù Ø³ÙØ¯Ø©", -1)]), 40, _hoisted_40), [[_vModelSelect, statusFilter]]), 20141 _createElementVNode("button", { 20142 class: "btn adminAddItem", 20143 onClick: $event => (openEditor()) 20144 }, "+ Ø¹ÙØµØ± Ø¬Ø¯ÙØ¯", 8, _hoisted_41) 20145 ]), 20146 (!visibleItems.length&&!store.state.busy) 20147 ? (_openBlock(), _createElementBlock("section", _hoisted_42, "ÙØ§ ØªÙØ¬Ø¯ Ø¹ÙØ§ØµØ± Ù Ø·Ø§Ø¨ÙØ© ÙÙØ¨ØØ«.")) 20148 : _createCommentVNode("", true), 20149 _createElementVNode("section", _hoisted_43, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleItems, (x) => { 20150 return (_openBlock(), _createElementBlock("article", { 20151 key: x.id, 20152 class: _normalizeClass(["card adminCompactItem", {taskTarget:focusedTask==='item-'+String(x.id)}]) 20153 }, [_createElementVNode("button", { 20154 class: "adminCompactItemMain", 20155 onClick: $event => (openEditor(x)) 20156 }, [_createElementVNode("span", _hoisted_45, [(adminItemImage(x)) 20157 ? (_openBlock(), _createElementBlock("img", { 20158 key: 0, 20159 src: adminItemImage(x), 20160 loading: "lazy", 20161 alt: 'ØµÙØ±Ø© '+x.title_ar, 20162 onError: $event => (markAdminImageBroken(x)) 20163 }, null, 40, _hoisted_46)) 20164 : (_openBlock(), _createElementBlock("i", _hoisted_47, _toDisplayString(x.category_icon||sectionIcon()), 1))]), _createElementVNode("span", _hoisted_48, [_createElementVNode("span", _hoisted_49, [_createElementVNode("b", null, _toDisplayString(x.title_ar), 1), (x.is_recommended) 20165 ? (_openBlock(), _createElementBlock("em", _hoisted_50, "Ù ÙØµÙ بÙ")) 20166 : _createCommentVNode("", true)]), _createElementVNode("small", null, [_createTextVNode(_toDisplayString(x.category_name_ar||'بدÙÙ ÙØ³Ù '), 1), (adminHub()==='china_guide') 20167 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString($cityLabel(x.city)||'-'), 1)], 64)) 20168 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createTextVNode(" · " + _toDisplayString(serviceLabel(x.service_type)), 1
20168)], 64))]), _createElementVNode("p", null, _toDisplayString(x.summary_ar||'ÙØ§ ÙÙØ¬Ø¯ ÙØµÙ ٠ختصر.'), 1)]), _createElementVNode("span", _hoisted_51, [_createElementVNode("i", { class: _normalizeClass({published:x.status==='published'}) }, _toDisplayString(itemStatusLabel(x.status)), 3), _createElementVNode("small", null, _toDisplayString(verificationLabel(x.verification_status)), 1)])], 8, _hoisted_44), _createElementVNode("button", { 20169 class: "smallbtn secondary adminCompactEdit", 20170 onClick: $event => (openEditor(x)) 20171 }, "تعدÙÙ", 8, _hoisted_52)], 2)) 20172 }), 128))]), 20173 (visibleItems.length<filteredItems.length) 20174 ? (_openBlock(), _createElementBlock("button", { 20175 key: 5, 20176 class: "btn secondary loadMore", 20177 onClick: $event => (visibleLimit+=24) 20178 }, "عرض اÙÙ Ø²ÙØ¯ (" + _toDisplayString(filteredItems.length-visibleItems.length) + ")", 9, _hoisted_53)) 20179 : _createCommentVNode("", true) 20180 ], 64)) 20181 : (workspace==='categories') 20182 ? (_openBlock(), _createElementBlock("section", _hoisted_54, [(adminHub()!=='china_guide') 20183 ? (_openBlock(), _createElementBlock("section", _hoisted_55, [ 20184 _cache[28] || (_cache[28] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ØªÙØ¸Ù٠اÙÙ ØØªÙÙ"), _createElementVNode("h3", null, "Ø¥Ø¶Ø§ÙØ© ÙØ³Ù "), _createElementVNode("p", { class: "hint" }, "اÙÙØ³Ù ÙÙØ¸Ù Ø§ÙØ¹Ùاصر ÙØ§ÙØ¨ØØ«Ø تعدÙÙ Ø§ÙØ¹Ùصر ÙÙØ³Ù ÙØªÙ Ù Ù Ù ØØ±Ø± Ø§ÙØ¹Ùاصر.")], -1)), 20185 _createElementVNode("div", _hoisted_56, [_withDirectives(_createElementVNode("input", { 20186 "onUpdate:modelValue": $event => ((catForm.name_ar) = $event), 20187 placeholder: "اس٠اÙÙØ³Ù " 20188 }, null, 8, _hoisted_57), [[_vModelText, catForm.name_ar]]), _withDirectives(_createElementVNode("input", { 20189 "onUpdate:modelValue": $event => ((catForm.icon) = $event), 20190 placeholder: "Ø§ÙØ£ÙÙÙÙØ©" 20191 }, null, 8, _hoisted_58), [[_vModelText, catForm.icon]])]), 20192 _createElementVNode("div", _hoisted_59, [_withDirectives(_createElementVNode("input", { 20193 "onUpdate:modelValue": $event => ((catForm.slug) = $event), 20194 placeholder: "slug" 20195 }, null, 8, _hoisted_60), [[_vModelText, catForm.slug]]), _withDirectives(_createElementVNode("input", { 20196 type: "number", 20197 "onUpdate:modelValue": $event => ((catForm.sort_order) = $event), 20198 placeholder: "Ø§ÙØªØ±ØªÙب" 20199 }, null, 8, _hoisted_61), [[_vModelText, catForm.sort_order]])]), 20200 _createElementVNode("div", _hoisted_62, [_withDirectives(_createElementVNode("input", { 20201 "onUpdate:modelValue": $event => ((catForm.name_en) = $event), 20202 placeholder: "English" 20203 }, null, 8, _hoisted_63), [[_vModelText, catForm.name_en]]), _withDirectives(_createElementVNode("input", { 20204 "onUpdate:modelValue": $event => ((catForm.name_zh) = $event), 20205 placeholder: "䏿" 20206 }, null, 8, _hoisted_64), [[_vModelText, catForm.name_zh]])]), 20207 _createElementVNode("button", { 20208 class: "btn", 20209 onClick: saveCategory 20210 }, "ØÙظ اÙÙØ³Ù ", 8, _hoisted_65) 20211 ])) 20212 : _createCommentVNode("", true), _createElementVNode("section", _hoisted_66, [_cache[29] || (_cache[29] = _createElementVNode("h3", null, "Ø§ÙØ£ÙØ³Ø§Ù Ø§ÙØØ§ÙÙØ©", -1)), _createElementVNode("div", null, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.categories, (c) => { 20213 return (_openBlock(), _createElementBlock("span", { key: c.id }, [_createElementVNode("i", null, _toDisplayString(c.icon), 1), _createElementVNode("b", null, _toDisplayString(c.name_ar), 1), _createElementVNode("small", null, _toDisplayString(c.slug) + " · ØªØ±ØªÙØ¨ " + _toDisplayString(c.sort_order), 1)])) 20214 }), 128))])])])) 20215 : (_openBlock(), _createElementBlock("section", _hoisted_67, [ 20216 _createElementVNode("div", _hoisted_68, [_cache[30] || (_cache[30] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Ù ÙØ§Ù ØªØØªØ§Ø¬ ÙØ±Ø§Ø±Ø§Ù"), _createElementVNode("h3", null, "Ø§ÙØ§ÙØªØ±Ø§ØØ§Øª ÙØ¨Ùاغات Ø§ÙØªØµØÙØ"), _createElementVNode("p", null, "Ø§ÙØªØ Ø§ÙØ³Ø¬Ù اÙÙ Ø·ÙÙØ¨ ÙÙØ·. بعد اÙÙØ¨ÙÙ Ø£Ù Ø§ÙØ±Ùض ØªÙØÙ Ø§ÙÙ ÙÙ Ø© ÙÙØ®ØªÙÙ Ø¥Ø´Ø¹Ø§Ø±ÙØ§ تÙÙØ§Ø¦ÙاÙ.")], -1)), _createElementVNode("span", _hoisted_69, _toDisplayString(pendingFeedback) + " Ù ÙØªÙØØ©", 1)]), 20217 (adminHub()==='china_guide'&&visibleSuggestions.length) 20218 ? (_openBlock(), _createElementBlock("section", _hoisted_70, [_cache[31] || (_cache[31] = _createElementVNode("h3", null, "Ø§ÙØªØ±Ø§ØØ§Øª Ø§ÙØ£Ø¹Ø¶Ø§Ø¡", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleSuggestions, (s) => { 20219 return (_openBlock(), _createElementBlock("article", { 20220 key: 's'+s.id, 20221 class: _normalizeClass(["card compactReviewItem", {taskTarget:focusedTask==='suggestion-'+String(s.id),open:reviewOpen['suggestion-'+s.id]}]), 20222 "data-task-id": 'suggestion-'+s.id 20223 }, [_createElementVNode("button", { 20224 class: "compactReviewHead", 20225 onClick: $event => (toggleReview('suggestion',s)) 20226 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(s.title), 1), _createElementVNode("small", null, _toDisplayString(s.category||'بدÙ٠تصÙÙÙ') + " · " + _toDisplayString(shortDate(s.created_at)), 1)]), _createElementVNode("i", null, _toDisplayString(s.status), 1), _createElementVNode("em", null, _toDisplayString(reviewOpen['suggestion-'+s.id]?'â':'+'), 1)], 8, _hoisted_72), (reviewOpen['suggestion-'+s.id]) 20227 ? (_openBlock(), _createElementBlock("div", _hoisted_73, [_createElementVNode("p", null, _toDisplayString(s.details), 1), _createElementVNode("div", _hoisted_74, [_createElementVNode("span", null, _toDisplayString(s.member_name||'عضÙ'), 1), _createElementVNode("span", _hoisted_75, _toDisplayString(s.member_phone||'-'), 1)]), (s.status==='pending') 20228 ? (_openBlock(), _createElementBlock("div", _hoisted_76, [_createElementVNode("button", { 20229 class: "smallbtn", 20230 onClick: $event => (reviewReward('suggestion',s,'accept')) 20231 }, "ÙØ¨ÙÙ +5", 8, _hoisted_77), _createElementVNode("button", { 20232 class: "smallbtn danger", 20233 onClick: $event => (reviewReward('suggestion',s,'reject')) 20234 }, "Ø±ÙØ¶", 8, _hoisted_78)])) 20235 : _createCommentVNode("", true)])) 20236 : _createCommentVNode("", true)], 10, _hoisted_71)) 20237 }), 128))])) 20238 : _createCommentVNode("", true), 20239 (visibleReports.length) 20240 ? (_openBlock(), _createElementBlock("section", _hoisted_79, [_cache[32] || (_cache[32] = _createElementVNode("h3", null, "Ø¨ÙØ§ØºØ§Øª Ø§ÙØªØµØÙØ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(visibleReports, (r) => { 20241 return (_openBlock(), _createElementBlock("article", { 20242 key: 'r'+r.id, 20243 class: _normalizeClass(["card compactReviewItem", {taskTarget:focusedTask==='report-'+String(r.id),open:reviewOpen['report-'+r.id]}]), 20244 "data-task-id": 'report-'+r.id 20245 }, [_createElementVNode("button", { 20246 class: "compactReviewHead", 20247 onClick: $event => (toggleReview('report',r)) 20248 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(r.item_title||'Ø¹ÙØµØ±'), 1), _createElementVNode("small", null, _toDisplayString(r.member_name||'زائر') + " · " + _toDisplayString(shortDate(r.created_at)), 1)]), _createElementVNode("i", null, _toDisplayString(r.status), 1), _createElementVNode("em", null, _toDisplayString(reviewOpen['report-'+r.id]?'â':'+'), 1)], 8, _hoisted_81), (reviewOpen['report-'+r.id]) 20249 ? (_openBlock(), _createElementBlock("div", _hoisted_82, [_createElementVNode("p", null, _toDisplayString(r.message), 1), _createElementVNode("div", _hoisted_83, [_createElementVNode("span", null, _toDisplayString(r.member_name||'زائر'), 1), _createElementVNode("span", _hoisted_84, _toDisplayString(r.member_phone||'-'), 1)]), (r.status==='open') 20250 ? (_openBlock(), _createElementBlock("div", _hoisted_85, [_createElementVNode("button", { 20251 class: "smallbtn", 20252 onClick: $event => (reviewReward('report',r,'accept')) 20253 }, "ÙØ¨ÙÙ +2", 8, _hoisted_86), _createElementVNode("button", { 20254 class: "smallbtn danger", 20255 onClick: $event => (reviewReward('report',r,'reject')) 20256 }, "Ø±ÙØ¶", 8, _hoisted_87)])) 20257 : _createCommentVNode("", true)])) 20258 : _createCommentVNode("", true)], 10, _hoisted_80)) 20259 }), 128))])) 20260 : _createCommentVNode("", true), 20261 (!visibleSuggestions.length&&!visibleReports.length) 20262 ? (_openBlock(), _createElementBlock("p", _hoisted_88, "ÙØ§ ØªÙØ¬Ø¯ Ø§ÙØªØ±Ø§ØØ§Øª Ø£Ù Ø¨ÙØ§ØºØ§Øª ØØ§ÙÙØ§Ù.")) 20263 : _createCommentVNode("", true), 20264 (feedbackLimit<Math.max(data.suggestions.length,data.reports.length)) 20265 ? (_openBlock(), _createElementBlock("button", { 20266 key: 3, 20267 class: "btn secondary loadMore", 20268 onClick: $event => (feedbackLimit+=20) 20269 }, "عرض اÙÙ Ø²ÙØ¯", 8, _hoisted_89)) 20270 : _createCommentVNode("", true) 20271 ])), 20272 editorOpen 20273 ? (_openBlock(), _createElementBlock("div", { 20274 key: 4, 20275 class: "adminEditorBackdrop", 20276 onClick: _withModifiers(closeEditor, ["self"]) 20277 }, [_createElementVNode("section", _hoisted_91, [_createElementVNode("header", _hoisted_92, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_93, _toDisplayString(itemForm.id?'تعدÙÙ Ø§ÙØ¹Ùصر #'+itemForm.id:'Ø¹ÙØµØ± Ø¬Ø¯ÙØ¯'), 1), _createElementVNode("h3", null, _toDisplayString(itemForm.title_ar||'Ø¥Ø¶Ø§ÙØ© اÙÙ ØØªÙÙ ÙØ§ÙØµÙØ±Ø©'), 1), _cache[33] || (_cache[33] = _createElementVNode("p", null, "ÙÙ Ø¨ÙØ§Ùات Ø§ÙØ¹Ùصر ÙØµÙØ±ØªÙ ØªÙØÙØ¸ Ù Ù ÙØ°Ø§ اÙÙ ØØ±Ø±.", -1))]), _createElementVNode("div", null, [_createElementVNode("button", { 20278 type: "button", 20279 class: "smallbtn secondary", 20280 onClick: closeEditor 20281 }, "Ø¥ØºÙØ§Ù", 8, _hoisted_94), _createElementVNode("button", _hoisted_95, _toDisplayString(itemForm.id?'ØÙظ ÙÙ Ø§ÙØªØ¹Ø¯ÙÙØ§Øª':'ØÙظ Ø§ÙØ¹Ùصر'), 1)])]), _createElementVNode("form", { 20282 id: "guide-item-editor", 20283 class: "adminEditorBody", 20284 onSubmit: _withModifiers(saveItem, ["prevent"]) 20285 }, [ 20286 _createElementVNode("section", _hoisted_97, [ 20287 _cache[41] || (_cache[41] = _createElementVNode("div", { class: "adminFormSectionHead" }, [_createElementVNode("span", null, "1"), _createElementVNode("div", null, [_createElementVNode("h4", null, "اÙÙ ØØªÙÙ ÙØ§ÙØµÙØ±Ø©"), _createElementVNode("p", null, "Ø§ÙØµÙرة جزء Ù Ù Ø§ÙØ¹Ùصر ÙÙÙØ³Øª ع٠ÙÙØ© Ù ÙÙØµÙØ©.")])], -1)), 20288 _createElementVNode("div", _hoisted_98, [_createElementVNode("div", _hoisted_99, [ 20289 _createElementVNode("div", _hoisted_100, [itemImageDisplay 20290 ? (_openBlock(), _createElementBlock("img", { 20291 key: 0, 20292 src: itemImageDisplay, 20293 alt: '٠عاÙÙØ© '+(itemForm.title_ar||'Ø§ÙØ¹Ùصر'), 20294 onError: markItemImagePreviewBroken 20295 }, null, 40, _hoisted_101)) 20296 : (_openBlock(), _createElementBlock("span", _hoisted_102, _toDisplayString(sectionIcon()), 1)), removeImageOnSave 20297 ? (_openBlock(), _createElementBlock("i", _hoisted_103, "Ø³ØªÙØ²Ø§Ù Ø¹ÙØ¯ Ø§ÙØÙØ¸")) 20298 : _createCommentVNode("", true)]), 20299 _createElementVNode("label", _hoisted_104, [(_openBlock(), _createElementBlock("input", { 20300 key: itemImageInputKey, 20301 type: "file", 20302 accept: "image/jpeg,image/png,image/webp,image/heic,image/heif,image/avif,image/gif,image/tiff,.jpe,.jfif,.heic,.heif,.avif,.tif,.tiff", 20303 onChange: onItemImage 20304 }, null, 40, _hoisted_105)), _createElementVNode("span", null, _toDisplayString(itemForm.image_url?'تغÙÙØ± Ø§ÙØµÙرة':'Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©'), 1), _createElementVNode("em", null, _toDisplayString(itemImageLabel), 1)]), 20305 _createElementVNode("div", _hoisted_106, [itemImageFile 20306 ? (_openBlock(), _createElementBlock("button", { 20307 key: 0, 20308 type: "button", 20309 class: "smallbtn secondary", 20310 onClick: clearItemImageSelection 20311 }, "Ø¥ÙØºØ§Ø¡ اÙ٠ختارة", 8, _hoisted_107)) 20312 : _createCommentVNode("", true), (itemForm.id&&itemForm.image_url) 20313 ? (_openBlock(), _createElementBlock("button", { 20314 key: 1, 20315 type: "button", 20316 class: _normalizeClass(["smallbtn", {danger:!removeImageOnSave}]), 20317 onClick: stageImageRemoval 20318 }, _toDisplayString(removeImageOnSave?'Ø§ÙØªØ±Ø§Ø¬Ø¹ Ø¹Ù Ø§ÙØ¥Ø²Ø§ÙØ©':'Ø¥Ø²Ø§ÙØ© Ø¹ÙØ¯ Ø§ÙØÙØ¸'), 11, _hoisted_108)) 20319 : _createCommentVNode("", true)]), 20320 _cache[35] || (_cache[35] = _createElementVNode("small", null, "ØªÙØµØØ Ø§ÙØ§Ø³ØªØ¯Ø§Ø±Ø© ÙØªÙØÙÙ٠إÙÙ WebP تÙÙØ§Ø¦ÙØ§Ù â ØØªÙ 20MB.", -1)), 20321 (itemForm.id&&adminHub()!=='sudan_digital') 20322 ? (_openBlock(), _createElementBlock("div", _hoisted_109, [_cache[34] || (_cache[34] = _createElementVNode("div", null, [_createElementVNode("b", null, "٠ساعد Ø§ÙØµÙرة"), _createElementVNode("small", null, "ÙØ¨ØØ« Ø£ÙÙØ§Ù Ù٠٠صدر Ø§ÙØ¹Ùصر Ø«Ù ÙØ³ØªØ®Ø¯Ù Grok Image Search Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©. ÙØ§ ÙØºÙÙØ± Ø§ÙØµÙرة اÙÙ ÙØ´Ùرة تÙÙØ§Ø¦ÙاÙ.")], -1)), _createElementVNode("button", { 20323 type: "button", 20324 class: "smallbtn secondary", 20325 disabled: itemImageSuggestBusy, 20326 onClick: suggestItemImage 20327 }, _toDisplayString(itemImageSuggestBusy?'Ø¬Ø§Ø±Ù Ø§ÙØ§Ø³ØªØ¬Ùاب...':'Ø§Ø³ØªØ¬ÙØ§Ø¨ ØµÙØ±Ø©'), 9, _hoisted_110), itemImageSuggestion 20328 ? (_openBlock(), _createElementBlock("div", _hoisted_111, [(suggestedItemImage()) 20329 ? (_openBlock(), _createElementBlock("img", { 20330 key: 0, 20331 src: suggestedItemImage(), 20332 alt: 'ØµÙØ±Ø© Ù ÙØªØ±ØØ© ÙÙ '+(itemForm.title_ar||'Ø§ÙØ¹Ùصر') 20333 }, null, 8, _hoisted_112)) 20334
20334 : (_openBlock(), _createElementBlock("span", _hoisted_113, _toDisplayString(sectionIcon()), 1)), _createElementVNode("div", null, [ 20335 _createElementVNode("b", null, _toDisplayString(itemImageSuggestion.image_status==='ready'?'ØµÙØ±Ø© Ù ÙØªØ±ØØ© Ø¬Ø§ÙØ²Ø© ÙÙ٠راجعة':['pending','fetching'].includes(itemImageSuggestion.image_status)?'Ø¬Ø§Ø±Ù Ø§ÙØ¨ØØ« Ø¹Ù ØµÙØ±Ø©':'ÙÙ ØªØ¬ÙØ² ØµÙØ±Ø© Ù ÙØ§Ø³Ø¨Ø©'), 1), 20336 (itemImageSuggestion.image_status==='ready') 20337 ? (_openBlock(), _createElementBlock("small", _hoisted_114, "Ù ØÙÙØ¸Ø© ÙÙ Ø§ÙØØ¬Ø± Ø§ÙØ¢Ù Ù. Ø§Ø¹ØªÙ Ø§Ø¯ÙØ§ ÙØºÙÙØ± Ø§ÙØµÙرة ÙÙØ· ÙÙØ§ ÙØ¹Ùد ØªÙØ«ÙÙ Ø¨ÙØ§Ùات Ø§ÙØ¹Ùصر.")) 20338 : (_openBlock(), _createElementBlock("small", _hoisted_115, _toDisplayString(itemImageSuggestion.image_error?safeImageErrorText(itemImageSuggestion.image_error,itemImageSuggestion.image_status,itemImageSuggestion.image_meta):'ÙØ¬Ø±Ù ÙØØµ اÙ٠صدر ÙØ§ÙØ¨ØØ« Ø¹Ù Ø§ÙØµÙر.'), 1)), 20339 (itemImageSuggestion.image_status==='ready') 20340 ? (_openBlock(), _createElementBlock("small", _hoisted_116, _toDisplayString(suggestedItemImageSourceLabel()), 1)) 20341 : _createCommentVNode("", true), 20342 (itemImageSuggestion.image_status==='ready') 20343 ? (_openBlock(), _createElementBlock("div", _hoisted_117, [ 20344 _createElementVNode("button", { 20345 type: "button", 20346 class: "smallbtn secondary", 20347 onClick: openSuggestedItemImageSource 20348 }, "ÙØªØ اÙ٠صدر", 8, _hoisted_118), 20349 _createElementVNode("button", { 20350 type: "button", 20351 class: "smallbtn", 20352 disabled: itemImageSuggestBusy||itemImageSuggestion.dedup_status!=='clear', 20353 onClick: approveSuggestedItemImage 20354 }, "اعت٠اد Ø§ÙØµÙرة", 8, _hoisted_119), 20355 _createElementVNode("button", { 20356 type: "button", 20357 class: "smallbtn secondary", 20358 disabled: itemImageSuggestBusy, 20359 onClick: retrySuggestedItemImage 20360 }, "ØµÙØ±Ø© أخرÙ", 8, _hoisted_120), 20361 _createElementVNode("button", { 20362 type: "button", 20363 class: "smallbtn danger", 20364 disabled: itemImageSuggestBusy, 20365 onClick: rejectSuggestedItemImage 20366 }, "Ø±ÙØ¶", 8, _hoisted_121) 20367 ])) 20368 : _createCommentVNode("", true), 20369 (['not_found','failed'].includes(itemImageSuggestion.image_status)) 20370 ? (_openBlock(), _createElementBlock("div", _hoisted_122, [_createElementVNode("button", { 20371 type: "button", 20372 class: "smallbtn secondary", 20373 disabled: itemImageSuggestBusy, 20374 onClick: retrySuggestedItemImage 20375 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_123), _createElementVNode("button", { 20376 type: "button", 20377 class: "smallbtn", 20378 disabled: itemImageSuggestBusy, 20379 onClick: rejectSuggestedItemImage 20380 }, "Ø¥ØºÙØ§Ù اÙÙ ØØ§ÙÙØ©", 8, _hoisted_124)])) 20381 : _createCommentVNode("", true) 20382 ])])) 20383 : _createCommentVNode("", true)])) 20384 : _createCommentVNode("", true) 20385 ]), _createElementVNode("div", _hoisted_125, [_createElementVNode("label", _hoisted_126, [_cache[36] || (_cache[36] = _createTextVNode("Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù")), _withDirectives(_createElementVNode("input", { 20386 "onUpdate:modelValue": $event => ((itemForm.title_ar) = $event), 20387 required: "", 20388 placeholder: "٠ثاÙ: سÙ٠باÙ٠ا ÙÙÙ ÙØ§Ø¨Ø³" 20389 }, null, 8, _hoisted_127), [[_vModelText, itemForm.title_ar]])]), _createElementVNode("label", _hoisted_128, [_cache[37] || (_cache[37] = _createTextVNode("English title")), _withDirectives(_createElementVNode("input", { 20390 "onUpdate:modelValue": $event => ((itemForm.title_en) = $event), 20391 placeholder: "English title" 20392 }, null, 8, _hoisted_129), [[_vModelText, itemForm.title_en]])]), _createElementVNode("label", _hoisted_130, [_
20392cache[38] || (_cache[38] = _createTextVNode("䏿æ é¢")), _withDirectives(_createElementVNode("input", { 20393 "onUpdate:modelValue": $event => ((itemForm.title_zh) = $event), 20394 placeholder: "䏿æ é¢" 20395 }, null, 8, _hoisted_131), [[_vModelText, itemForm.title_zh]])])])]), 20396 _createElementVNode("label", _hoisted_132, [_cache[39] || (_cache[39] = _createTextVNode("اÙÙØµÙ اÙ٠ختصر")), _withDirectives(_createElementVNode("input", { 20397 "onUpdate:modelValue": $event => ((itemForm.summary_ar) = $event), 20398 placeholder: "سطر ÙØ§Ø¶Ø ÙØ¸Ùر ÙÙ Ø§ÙØ¨Ø·Ø§ÙØ©" 20399 }, null, 8, _hoisted_133), [[_vModelText, itemForm.summary_ar]])]), 20400 _createElementVNode("label", _hoisted_134, [_cache[40] || (_cache[40] = _createTextVNode("Ø§ÙØªÙاصÙÙ")), _withDirectives(_createElementVNode("textarea", { 20401 "onUpdate:modelValue": $event => ((itemForm.description_ar) = $event), 20402 placeholder: "٠عÙÙ٠ات ع٠ÙÙØ© Ù٠ختصرة ÙÙ٠ستخد٠" 20403 }, null, 8, _hoisted_135), [[_vModelText, itemForm.description_ar]])]) 20404 ]), 20405 _createElementVNode("section", _hoisted_136, [ 20406 _cache[73] || (_cache[73] = _createElementVNode("div", { class: "adminFormSectionHead" }, [_createElementVNode("span", null, "2"), _createElementVNode("div", null, [_createElementVNode("h4", null, "Ø§ÙØªØµÙÙÙ ÙØ§Ù٠صدر"), _createElementVNode("p", null, "ØØ¯Ø¯ Ù ÙØ§Ù ظÙÙØ± اÙ٠عÙÙÙ Ø© Ù٠رجع Ø§ÙØªØÙÙ.")])], -1)), 20407 _createElementVNode("div", _hoisted_137, [_createElementVNode("label", _hoisted_138, [_cache[43] || (_cache[43] = _createTextVNode("اÙÙØ³Ù ")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.category_id) = $event) }, [_cache[42] || (_cache[42] = _createElementVNode("option", { value: "" }, "بدÙÙ ÙØ³Ù ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.categories, (c) => { 20408 return (_openBlock(), _createElementBlock("option", { 20409 key: c.id, 20410 value: c.id 20411 }, _toDisplayString(c.icon) + " " + _toDisplayString(c.name_ar), 9, _hoisted_140)) 20412 }), 128))], 8, _hoisted_139), [[_vModelSelect, itemForm.category_id]])]), _createElementVNode("label", _hoisted_141, [_cache[45] || (_cache[45] = _createTextVNode("ØØ§ÙØ© Ø§ÙØªÙØ«ÙÙ")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.verification_status) = $event) }, _cache[44] || (_cache[44] = [ 20413 _createElementVNode("option", { value: "verified" }, "Ù ÙØ«Ù", -1), 20414 _createElementVNode("option", { value: "pending" }, "ÙÙØ¯ Ø§ÙØªØÙÙ", -1), 20415 _createElementVNode("option", { value: "review" }, "ÙØØªØ§Ø¬ ٠راجعة", -1), 20416 _createElementVNode("option", { value: "archived" }, "٠ؤرشÙ", -1) 20417 ]), 8, _hoisted_142), [[_vModelSelect, itemForm.verification_status]])])]), 20418 (adminHub()==='china_guide' && registrySectors.length) 20419 ? (_openBlock(), _createElementBlock("div", _hoisted_143, [_createElementVNode("label", _hoisted_144, [_cache[46] || (_cache[46] = _createTextVNode("ÙØ·Ø§Ø¹ Ø§ÙØ´Ø±ÙØ© (ÙÙØ´Ø±Ùات ÙØ§Ùخد٠ات Ø§ÙØªØ¬Ø§Ø±ÙØ©)")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.company_sector_key) = $event) }, [_createElementVNode("option", { value: null }, "بدÙÙ ÙØ·Ø§Ø¹", 8, _hoisted_146), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(registrySectors, (sec) => { 20420 return (_openBlock(), _createElementBlock("option", { 20421 key: sec.sector_key, 20422 value: sec.sector_key 20423 }, _toDisplayString(sec.name_ar), 9, _hoisted_147)) 20424 }
20424), 128))], 8, _hoisted_145), [[_vModelSelect, itemForm.company_sector_key]])])])) 20425 : _createCommentVNode("", true), 20426 (adminHub()==='trade_shipping') 20427 ? (_openBlock(), _createElementBlock("div", _hoisted_148, [_createElementVNode("label", _hoisted_149, [_cache[48] || (_cache[48] = _createTextVNode("Ø§ÙØ§ØªØ¬Ø§Ù")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.direction) = $event) }, _cache[47] || (_cache[47] = [_createElementVNode("option", { value: "general" }, "عا٠/ Ø§ÙØ§ØªØ¬Ø§ÙÙÙ", -1), _createElementVNode("option", { value: "china_to_arab" }, "Ù Ù Ø§ÙØµÙ٠إÙÙ Ø§ÙØ¯ÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ©", -1), _createElementVNode("option", { value: "arab_to_china" }, "Ù Ù Ø§ÙØ¯ÙÙ Ø§ÙØ¹Ø±Ø¨ÙØ© Ø¥ÙÙ Ø§ÙØµÙÙ", -1)]), 8, _hoisted_150), [[_vModelSelect, itemForm.direction]])]), _createElementVNode("label", _hoisted_151, [_cache[59] || (_cache[59] = _createTextVNode("اÙÙÙØ¹")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.service_type) = $event) }, [(registryTradeServices.length) 20428 ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(registryTradeServices, (svc) => { 20429 return (_openBlock(), _createElementBlock("option", { 20430 key: svc.service_type, 20431 value: svc.service_type 20432 }, _toDisplayString(svc.name_ar||svc.name_en), 9, _hoisted_153)) 20433 }), 128)) 20434 : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 20435 _cache[49] || (_cache[49] = _createElementVNode("option", { value: "general" }, "عا٠", -1)), 20436 _cache[50] || (_cache[50] = _createElementVNode("option", { value: "documents" }, "Ù Ø³ØªÙØ¯Ø§Øª", -1)), 20437 _cache[51] || (_cache[51] = _createElementVNode("option", { value: "customs" }, "ج٠ارÙ", -1)), 20438 _cache[52] || (_cache[52] = _createElementVNode("option", { value: "shipping" }, "Ø´ØÙ", -1)), 20439 _cache[53] || (_cache[53] = _createElementVNode("option", { value: "clearance" }, "تخÙÙØµ", -1)), 20440 _cache[54] || (_cache[54] = _createElementVNode("option", { value: "ports" }, "Ù ÙØ§Ùئ", -1)), 20441 _cache[55] || (_cache[55] = _createElementVNode("option", { value: "export" }, "ØªØµØ¯ÙØ±", -1)), 20442 _cache[56] || (_cache[56] = _createElementVNode("option", { value: "import" }, "Ø§Ø³ØªÙØ±Ø§Ø¯", -1)), 20443 _cache[57] || (_cache[57] = _createElementVNode("option", { value: "warnings" }, "ØªØØ°Ùرات", -1)), 20444 _cache[58] || (_cache[58] = _createElementVNode("option", { value: "official_links" }, "Ø±ÙØ§Ø¨Ø· Ø±Ø³Ù ÙØ©", -1)) 20445 ], 64))], 8, _hoisted_152), [[_vModelSelect, itemForm.service_type]])])])) 20446 : (adminHub()==='sudan_digital') 20447 ? (_openBlock(), _createElementBlock("div", _hoisted_154, [_createElementVNode("label", _hoisted_155, [_cache[61] || (_cache[61] = _createTextVNode("اÙÙÙØ¹")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.service_type) = $event) }, _cache[60] || (_cache[60] = [ 20448 _createElementVNode("option", { value: "apps" }, "تطبÙÙØ§Øª", -1), 20449 _createElementVNode("option", { value: "government" }, "Ù ÙØµØ§Øª ØÙÙÙ ÙØ©", -1), 20450 _createElementVNode("option", { value: "finance" }, "خد٠ات ٠اÙÙØ©", -1), 20451 _createElementVNode("option", { value: "official_links" }, "Ø±ÙØ§Ø¨Ø· Ø±Ø³Ù ÙØ©", -1), 20452 _createElementVNode("option", { value: "health" }, "ØµØØ©", -1), 20453 _createElementVNode("option", { value: "education" }, "تعÙÙÙ ", -1), 20454 _createElementVNode("option", { value: "customs" }, "Ø¬Ù Ø§Ø±Ù ÙØ¶Ø±Ø§Ø¦Ø¨", -1), 20455 _createElementVNode("option", { value: "investment" }, "استث٠ار ÙØ´Ø±Ùات", -1), 20456 _createElementVNode("option", { value: "transport" }, "Ù ÙØ§Ùئ ÙØ·ÙراÙ", -1), 20457 _createElementVNode("option", { value: "legal" }, "ÙÙØ§ÙÙÙ ÙØªÙبÙÙØ§Øª", -1), 20458 _createElementVNode("option", { value: "diaspora" }, "خد٠ات اÙ٠غتربÙÙ", -1) 20459 ]), 8, _hoisted_156), [[_vModelSelect, itemForm.service_type]]
20459)]), _createElementVNode("label", _hoisted_157, [_cache[62] || (_cache[62] = _createTextVNode("Ø§ÙØ¬ÙØ© اÙ٠اÙÙØ©")), _withDirectives(_createElementVNode("input", { 20460 "onUpdate:modelValue": $event => ((itemForm.source_name) = $event), 20461 placeholder: "اÙÙØ²Ø§Ø±Ø© / Ø§ÙØ¨ÙÙ / اÙ٠ؤسسة" 20462 }, null, 8, _hoisted_158), [[_vModelText, itemForm.source_name]])])])) 20463 : (_openBlock(), _createElementBlock("div", _hoisted_159, [_createElementVNode("label", _hoisted_160, [_cache[63] || (_cache[63] = _createTextVNode("اس٠اÙ٠صدر")), _withDirectives(_createElementVNode("input", { 20464 "onUpdate:modelValue": $event => ((itemForm.source_name) = $event), 20465 placeholder: "Ø§ÙØ¬ÙØ© أ٠اÙÙ ÙÙØ¹" 20466 }, null, 8, _hoisted_161), [[_vModelText, itemForm.source_name]])])])), 20467 _createElementVNode("label", _hoisted_162, [_cache[64] || (_cache[64] = _createTextVNode("رابط اÙ٠صدر")), _withDirectives(_createElementVNode("input", { 20468 "onUpdate:modelValue": $event => ((itemForm.source_url) = $event), 20469 placeholder: "https://..." 20470 }, null, 8, _hoisted_163), [[_vModelText, itemForm.source_url]])]), 20471 (adminHub()==='china_guide') 20472 ? (_openBlock(), _createElementBlock(_Fragment, { key: 4 }, [_createElementVNode("div", _hoisted_164, [_createElementVNode("label", _hoisted_165, [_cache[66] || (_cache[66] = _createTextVNode("درجة Ø§ÙØ«ÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.trust_tier) = $event) }, _cache[65] || (_cache[65] = [_createElementVNode("option", { value: "community_listed" }, "Community Listed", -1), _createElementVNode("option", { value: "smt_verified" }, "SMT Verified", -1), _createElementVNode("option", { value: "official" }, "Official â ٠صدر Ø±Ø³Ù Ù Ù ÙØ«Ù", -1)]), 8, _hoisted_166), [[_vModelSelect, itemForm.trust_tier]])]), _createElementVNode("label", _hoisted_167, [_cache[67] || (_cache[67] = _createTextVNode("Ù ÙØ§ØØ¸Ø© Ø§ÙØ«ÙØ©")), _withDirectives(_createElementVNode("input", { 20473 "onUpdate:modelValue": $event => ((itemForm.trust_note) = $event), 20474 placeholder: "سبب Ø§ÙØªÙØ«ÙÙ Ø£Ù Ù ÙØ§ØØ¸Ø© اÙ٠راجعة" 20475 }, null, 8, _hoisted_168), [[_vModelText, itemForm.trust_note]])])]), (adminCategoryIs('exhibitions')) 20476 ? (_openBlock(), _createElementBlock("div", _hoisted_169, [_createElementVNode("div", _hoisted_170, [_createElementVNode("label", _hoisted_171, [_cache[68] || (_cache[68] = _createTextVNode("Ø¨Ø¯Ø§ÙØ© اÙ٠عرض")), _withDirectives(_createElementVNode("input", { 20477 type: "date", 20478 "onUpdate:modelValue": $event => ((itemForm.exhibition_start_date) = $event) 20479 }, null, 8, _hoisted_172), [[_vModelText, itemForm.exhibition_start_date]])]), _createElementVNode("label", _hoisted_173, [_cache[69] || (_cache[69] = _createTextVNode("ÙÙØ§ÙØ© اÙ٠عرض")), _withDirectives(_createElementVNode("input", { 20480 type: "date", 20481 "onUpdate:modelValue": $event => ((itemForm.exhibition_end_date) = $event) 20482 }, null, 8, _hoisted_174), [[_vModelText, itemForm.exhibition_end_date]])])]), _createElementVNode("div", _hoisted_175, [_createElementVNode("label", _hoisted_176, [_cache[70] || (_cache[70] = _createTextVNode("اÙÙØ·Ø§Ø¹")), _withDirectives(_createElementVNode("input", { 20483 "onUpdate:modelValue": $event => ((itemForm.exhibition_sector) = $event), 20484 placeholder: "Ù Ø¹Ø¯Ø§ØªØ Ø·Ø§ÙØ©Ø Ø£Ø²ÙØ§Ø¡..." 20485 }, null, 8, _hoisted_177), [[_vModelText, itemForm.exhibition_sector]])]), _createElementVNode("label", _hoisted_178, [_cache[71] || (_cache[71] = _createTextVNode("رابط Ø§ÙØªØ³Ø¬ÙÙ Ø§ÙØ±Ø³Ù Ù")), _withDirectives(_createElementVNode("input", { 20486 class: "ltr", 20487 "onUpdate:modelValue": $event => ((itemForm.registration_url) = $event), 20488 placeholder: "https://..." 20489 }, null, 8, _hoisted_179), [[_vModelText, itemForm.registration_url]])])])])) 20490 : _createCommentVNode("", true)], 64)) 20491 : _createCommentVNode("", true), 20492 _createElementVNode("label", _hoisted_180, [_cache[72] || (_cache[72] = _createTextVNode("ÙÙ٠ات Ø§ÙØ¨ØØ«")), _withDirectives(_createElementVNode("input", { 20493 "onUpdate:modelValue": $event => ((itemForm.tags) = $event), 20494 placeholder: "ÙÙ٠ات Ù ÙØµÙÙØ© بÙÙØ§ØµÙ" 20495 }, null, 8, _hoisted_181), [[_vModelText, itemForm.tags]])]) 20496 ]), 20497 _createElementVNode("section", _hoisted_182, [ 20498 _createElementVNode("div", _hoisted_183, [_cache[75] || (_cache[75] = _createElementVNode("span", null, "3", -1)), _createElementVNode("div", null, [_createElementVNode("h4", null, _toDisplayString(adminHub()==='china_guide'?'اÙÙ ÙÙØ¹ ÙØ§ÙØªÙØ§ØµÙ':'Ø§ÙØ±Ùابط ÙØ§ÙÙØ´Ø±'), 1), _cache[74] || (_cache[74] = _createElementVNode("p", null, "أدخ٠ÙÙØ· Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØªÙ ÙØØªØ§Ø¬ÙØ§ اÙÙ Ø³ØªØ®Ø¯Ù ÙØ¹ÙاÙ.", -1))])]), 20499 (adminHub()==='china_guide') 20500 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ 20501 _createElementVNode("div", _hoisted_184, [_createElementVNode("label", _hoisted_185, [_cache[76] || (_cache[76] = _
20501createTextVNode("اÙ٠دÙÙØ©")), _withDirectives(_createElementVNode("select", { 20502 "onUpdate:modelValue": $event => ((itemForm.city) = $event), 20503 onChange: $event => (itemForm.district='') 20504 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($cityList(itemForm.city), (c) => { 20505 return (_openBlock(), _createElementBlock("option", { 20506 key: c.value, 20507 value: c.value 20508 }, _toDisplayString(c.label), 9, _hoisted_187)) 20509 }), 128))], 40, _hoisted_186), [[_vModelSelect, itemForm.city]])]), _createElementVNode("label", _hoisted_188, [_cache[78] || (_cache[78] = _createTextVNode("اÙÙ ÙØ·ÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.district) = $event) }, [_cache[77] || (_cache[77] = _createElementVNode("option", { value: "" }, "اختر اÙÙ ÙØ·ÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($districtList(itemForm.city,itemForm.district), (d) => { 20510 return (_openBlock(), _createElementBlock("option", { 20511 key: d.value, 20512 value: d.value 20513 }, _toDisplayString(d.label), 9, _hoisted_190)) 20514 }), 128))], 8, _hoisted_189), [[_vModelSelect, itemForm.district]])])]), 20515 _createElementVNode("label", _hoisted_191, [_cache[79] || (_cache[79] = _createTextVNode("Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØµÙÙÙ")), _withDirectives(_createElementVNode("input", { 20516 "onUpdate:modelValue": $event => ((itemForm.address_zh) = $event), 20517 placeholder: "䏿å°å" 20518 }, null, 8, _hoisted_192), [[_vModelText, itemForm.address_zh]])]), 20519 _createElementVNode("label", _hoisted_193, [_cache[80] || (_cache[80] = _createTextVNode("Ø§ÙØ¹ÙÙØ§Ù Ø¨Ø§ÙØ¹Ø±Ø¨Ù")), _withDirectives(_createElementVNode("input", { 20520 "onUpdate:modelValue": $event => ((itemForm.address_ar) = $event), 20521 placeholder: "ÙØµÙ Ø§ÙØ¹ÙÙØ§Ù" 20522 }, null, 8, _hoisted_194), [[_vModelText, itemForm.address_ar]])]), 20523 _createElementVNode("div", _hoisted_195, [_createElementVNode("label", _hoisted_196, [_cache[81] || (_cache[81] = _createTextVNode("اÙÙØ§ØªÙ")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((itemForm.phone) = $event) }, null, 8, _hoisted_197), [[_vModelText, itemForm.phone]])]), _createElementVNode("label", _hoisted_198, [_cache[82] || (_cache[82] = _createTextVNode("WeChat ID")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((itemForm.wechat_id) = $event) }, null, 8, _hoisted_199), [[_vModelText, itemForm.wechat_id]])])]), 20524 _createElementVNode("div", _hoisted_200, [_createElementVNode("label", _hoisted_201, [_cache[83] || (_cache[83] = _createTextVNode("WhatsApp")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((itemForm.whatsapp) = $event) }, null, 8, _hoisted_202), [[_vModelText, itemForm.whatsapp]])]), _createElementVNode("label", _hoisted_203, [_cache[84] || (_cache[84] = _createTextVNode("رابط Ø§ÙØ®Ø±Ùطة")), _withDirectives(_createElementVNode("input", { 20525 "onUpdate:modelValue": $event => ((itemForm.map_url) = $event), 20526 placeholder: "https://..." 20527 }, null, 8, _hoisted_204), [[_vModelText, itemForm.map_url]])])]) 20528 ], 64)) 20529 : (_openBlock(), _createElementBlock("label", _hoisted_205, [_cache[85] || (_cache[85] = _createTextVNode("Ø§ÙØ±Ø§Ø¨Ø· Ø§ÙØªØ´ØºÙÙÙ / اÙÙ ÙÙØ¹")), _withDirectives(_createElementVNode("input", { 20530 "onUpdate:modelValue": $event => ((itemForm.map_url) = $event), 20531 placeholder: "https://..." 20532 }, null, 8, _hoisted_206), [[_vModelText, itemForm.map_url]])])), 20533 _createElementVNode("div", _hoisted_207, [_createElementVNode("label", _hoisted_208, [_cache[86] || (_cache[86] = _createTextVNode("Ø§ÙØ¸ÙÙØ±")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.visibility) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('guide_visibility',itemForm.visibility), (o) => { 20534 return (_openBlock(), _createElementBlock("option", { 20535 key: o.value, 20536 value: o.value 20537 }, _toDisplayString(o.label), 9, _hoisted_210)) 20538 }), 128))], 8, _hoisted_209), [[_vModelSelect, itemForm.visibility]])]), _createElementVNode("label", _hoisted_211, [_cache[87] || (_cache[87] = _createTextVNode("ØØ§ÙØ© اÙÙØ´Ø±")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((itemForm.status) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($optionList('guide_status',itemForm.status), (o) => { 20539 return (_openBlock(), _createElementBlock("option", { 20540 key: o.value, 20541 value: o.value 20542 }, _toDisplayString(o.label), 9, _hoisted_213)) 20543 }), 128))], 8, _hoisted_212), [[_vModelSelect, itemForm.status]])])]), 20544 _createElementVNode("label", _hoisted_214, [_withDirectives(_createElementVNode("input", { 20545 type: "checkbox", 20546 "onUpdate:modelValue": $event => ((itemForm.is_recommended) = $event) 20547 }, null, 8, _hoisted_215), [[_vModelCheckbox, itemForm.is_recommended]]), _cache[88] || (_cache[88] = _createTextVNode(" Ù ÙØµÙ Ø¨Ù Ù Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø©"))]) 20548 ]), 20549 (adminHub()==='sudan_digital'&&itemForm.id) 20550 ? (_openBlock(), _createElementBlock("section", _hoisted_216, [_createElementVNode("div", _hoisted_217, [_cache[90] || (_cache[90] = _createElementVNode("span", null, "4", -1)), _createElementVNode("div", null, [_cache[89] || (_cache[89] = _createElementVNode("h4", null, "٠سار اÙ٠راجعة ÙØ§ÙÙØ´Ø±", -1)), _createElementVNode("p", null, "Ø§ÙØØ§ÙØ© Ø§ÙØØ§ÙÙØ©: " + _toDisplayString(itemForm.governance_status||'draft'), 1)])]), _createElementVNode("div", _hoisted_218, [ 20551 (!itemForm.governance_status||itemForm.governance_status==='draft') 20552 ? (_openBlock(), _createElementBlock("button", { 20553 key: 0, 20554 type: "button", 20555 class: "smallbtn", 20556 onClick: $event => (governance('submit')) 20557 }, "إرسا٠ÙÙ٠راجعة", 8, _hoisted_219)) 20558 : _createCommentVNode("", true), 20559 (itemForm.governance_status==='in_review') 20560 ? (_openBlock(), _createElementBlock("button", { 20561 key: 1, 20562 type: "button", 20563 class: "smallbtn", 20564 onClick: $event => (governance('approve')) 20565 }, "اعت٠اد", 8, _hoisted_220)) 20566 : _createCommentVNode("", true), 20567 (itemForm.governance_status==='in_review') 20568 ? (_openBlock(), _createElementBlock("button", { 20569 key: 2, 20570 type: "button", 20571 class: "smallbtn danger", 20572 onClick: $event => (governance('reject')) 20573 }, "إرجاع", 8, _hoisted_221)) 20574 : _createCommentVNode("", true), 20575 (itemForm.governance_status==='approved') 20576 ? (_openBlock(), _createElementBlock("button", { 20577 key: 3, 20578 type: "button", 20579 class: "smallbtn", 20580 onClick: $event => (governance('publish')) 20581 }, "ÙØ´Ø±", 8, _hoisted_222)) 20582 : _createCommentVNode("", true), 20583 (itemForm.governance_status==='published') 20584 ? (_openBlock(), _createElementBlock("button", { 20585 key: 4, 20586 type: "button", 20587 class: "smallbtn secondary", 20588 onClick: $event => (governance('unpublish')) 20589 }, "Ø¥ÙÙØ§Ù اÙÙØ´Ø±", 8, _hoisted_223)) 20590 : _createCommentVNode("", true), 20591 (itemForm.governance_status==='published') 20592 ? (_openBlock(), _createElementBlock("button", { 20593 key: 5,
20594 type: "button", 20595 class: "smallbtn secondary", 20596 onClick: $event => (governance('reverify')) 20597 }, "ØªØ¬Ø¯ÙØ¯ Ø§ÙØªØÙÙ", 8, _hoisted_224)) 20598 : _createCommentVNode("", true) 20599 ])])) 20600 : _createCommentVNode("", true), 20601 _createElementVNode("footer", _hoisted_225, [(itemForm.id) 20602 ? (_openBlock(), _createElementBlock("details", _hoisted_226, [_cache[91] || (_cache[91] = _createElementVNode("summary", null, "إجراءات أخرÙ", -1)), _createElementVNode("button", { 20603 type: "button", 20604 class: "smallbtn danger", 20605 onClick: archiveItem 20606 }, "Ø£Ø±Ø´ÙØ© Ø§ÙØ¹Ùصر", 8, _hoisted_227)])) 20607 : _createCommentVNode("", true), _createElementVNode("div", null, [_createElementVNode("button", { 20608 type: "button", 20609 class: "btn secondary", 20610 onClick: closeEditor 20611 }, "Ø¥ÙØºØ§Ø¡", 8, _hoisted_228), _createElementVNode("button", _hoisted_229, _toDisplayString(itemForm.id?'ØÙظ ÙÙ Ø§ÙØªØ¹Ø¯ÙÙØ§Øª':'ØÙظ Ø§ÙØ¹Ùصر'), 1)])]) 20612 ], 40, _hoisted_96)])], 8, _hoisted_90)) 20613 : _createCommentVNode("", true) 20614 ]), 20615 _: 1 20616 }, 8, ["title"])) 20617 } 20618} 20619})() 20620 }; 20621 20622 const OfficialPublishAnnouncementPage={ 20623 components:{OfficialFrame}, 20624 setup(){const store=useGzcStore();const router=useRouter();const f=reactive({title:'',body:'',duration_days:14,action_url:''});const files=ref([]);const fileLabel=computed(()=>files.value.length?Array.from(files.value).map(x=>x.name).join('Ø '):'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ÙØ³Ø§Ø¦Ø·');function onFiles(e){files.value=Array.from((e.target&&e.target.files)||[]).slice(0,6);}onMounted(()=>store.requireOfficial(router));async function submit(){const fd=new FormData();fd.append('title',f.title);fd.append('body',f.body);fd.append('action_url',f.action_url);fd.append('duration_days',String(f.duration_days||14));Array.from(files.value||[]).forEach(file=>fd.append('media',file));store.state.busy=true;store.state.msg='Ø¬Ø§Ø±Ù ÙØ´Ø± Ø§ÙØªØ¹Ù ÙÙ Ø§ÙØ±Ø³Ù Ù...';const r=await uploadApi('/api/official/announcements',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ ÙØ³Ø§Ø¦Ø· Ø§ÙØªØ¹Ù ÙÙ '});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.ok){f.title='';f.body='';f.action_url='';files.value=[];router.push('/official/announcements');}}return{store,f,files,fileLabel,onFiles,submit};}, 20625 render:(function(){ 20626const _Vue = Vue 20627const { createElementVNode: _createElementVNode } = _Vue 20628 20629const _hoisted_1 = { class: "card formCard" } 20630const _hoisted_2 = ["onUpdate:modelValue"] 20631const _hoisted_3 = ["onUpdate:modelValue"] 20632const _hoisted_4 = ["onUpdate:modelValue"] 20633const _hoisted_5 = ["onUpdate:modelValue"] 20634const _hoisted_6 = { class: "filePicker officialFilePicker" } 20635const _hoisted_7 = ["onChange"] 20636const _hoisted_8 = ["onClick"] 20637 20638return function render(_ctx, _cache) { 20639 with (_ctx) { 20640 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 20641 20642 const _component_OfficialFrame = _resolveComponent("OfficialFrame") 20643 20644 return (_openBlock(), _createBlock(_component_OfficialFrame, { title: "ÙØ´Ø± تع٠Ù٠رس٠Ù" }, { 20645 default: _withCtx(() => [_createElementVNode("div", _hoisted_1, [ 20646 _cache[1] || (_cache[1] = _createElementVNode("h3", null, "تع٠Ù٠رس٠٠٠ع ÙØ³Ø§Ø¦Ø·", -1)), 20647 _cache[2] || (_cache[2] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØªØ¹Ù ÙÙ Ø³ÙØ¸Ùر تÙÙØ§Ø¦Ùا٠ÙÙ Ø®Ø§ÙØ© Ø§ÙØØ³Ø§Ø¨: تع٠Ù٠ات Ø§ÙØ³Ùارة أ٠تع٠Ù٠ات اÙÙÙØµÙÙØ©. اÙÙ Ø³Ù ÙØ: ØµÙØ±Ø PDFØ ÙÙÙØ¯ÙÙ ÙØµÙر.", -1)), 20648 _withDirectives(_createElementVNode("input", { 20649 "onUpdate:modelValue": $event => ((f.title) = $event), 20650 placeholder: "عÙÙØ§Ù Ø§ÙØªØ¹Ù ÙÙ " 20651 }, null, 8, _hoisted_2), [[_vModelText, f.title]]), 20652 _withDirectives(_createElementVNode("textarea", { 20653 "onUpdate:modelValue": $event => ((f.body) = $event), 20654 placeholder: "ÙØµ Ø§ÙØªØ¹Ù ÙÙ " 20655 }, null, 8, _hoisted_3), [[_vModelText, f.body]]), 20656 _withDirectives(_createElementVNode("input", { 20657 "onUpdate:modelValue": $event => ((f.action_url) = $event), 20658 placeholder: "رابط Ø§Ø®ØªÙØ§Ø±Ù" 20659 }, null, 8, _hoisted_4), [[_vModelText, f.action_url]]), 20660 _withDirectives(_createElementVNode("input", { 20661 type: "number", 20662 min: "1", 20663 max: "365", 20664 "onUpdate:modelValue": $event => ((f.duration_days) = $event), 20665 placeholder: "٠دة Ø§ÙØ¸ÙÙØ± Ø¨Ø§ÙØ£Ùا٠" 20666 }, null, 8, _hoisted_5), [[_vModelText, f.duration_days]]), 20667 _createElementVNode("label", _hoisted_6, [_createElementVNode("input", { 20668 type: "file", 20669 multiple: "", 20670 accept: "image/jpeg,image/png,image/webp,application/pdf,video/mp4,video/webm,video/quicktime", 20671 onChange: onFiles 20672 }, null, 40, _hoisted_7), _cache[0] || (_cache[0] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± اÙÙØ³Ø§Ø¦Ø·", -1)), _createElementVNode("em", null, _toDisplayString(fileLabel), 1)]), 20673 _createElementVNode("button", { 20674 class: "btn loadMore", 20675 onClick: submit 20676 }, "ÙØ´Ø± Ø§ÙØ¥Ø¹ÙاÙ", 8, _hoisted_8) 20677 ])]), 20678 _: 1 20679 })) 20680 } 20681} 20682})() 20683 }; 20684 20685 20686 const AdminBrandAssetsPage={ 20687 components:{AdminFrame,IdentityAdminNav}, 20688 setup(){ 20689 const store=useGzcStore(); const router=useRouter();
20690 const kinds=ref([]); const limits=ref({}); const sel=ref(''); 20691 const file=ref(null); const fileName=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©'); 20692 const previewUrl=ref(''); const previewOutput=ref(''); const busy=ref(''); 20693 const opts=reactive({fit:'',background:'',zoom:1,offsetX:0,offsetY:0,trim:false,quality:''}); 20694 const selected=computed(()=>kinds.value.find(k=>k.kind===sel.value)||null); 20695 const maxMb=computed(()=>Math.round((Number(limits.value.max_bytes)||0)/1048576)); 20696 const allowed=computed(()=>safeArray(limits.value.allowed).join(' · ')||'jpg · png · webp'); 20697 const minSide=computed(()=>Number(limits.value.min_side)||64); 20698 function clearPreview(){if(previewUrl.value){try{URL.revokeObjectURL(previewUrl.value);}catch(e){}}previewUrl.value='';previewOutput.value='';} 20699 function resetOpts(){opts.fit='';opts.background='';opts.zoom=1;opts.offsetX=0;opts.offsetY=0;opts.trim=false;opts.quality='';} 20700 function clearFile(){file.value=null;fileName.value='ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';clearPreview();} 20701 async function load(){ 20702 if(!await store.requireAdmin(router))return; 20703 store.state.busy=true; 20704 const r=await api('/api/admin/brand-assets'); 20705 store.state.busy=false; 20706 if(r&&r.ok){ 20707 kinds.value=safeArray(r.kinds); limits.value=r.limits||{}; 20708 if(!sel.value&&kinds.value.length)sel.value=kinds.value[0].kind; 20709 } else store.state.msg=(r&&(r.message||r.error))||'تعذر تØÙ ÙÙ ÙØªØ§ÙÙØ¬ أصÙ٠اÙÙÙÙØ©'; 20710 } 20711 function pick(k){if(sel.value===k)return;sel.value=k;clearFile();resetOpts();} 20712 function onFile(e){const f=e.target.files&&e.target.files[0]?e.target.files[0]:null;file.value=f;fileName.value=f?f.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©';clearPreview();} 20713 // Ø§ÙØ®Ùارات ØªÙØ¶Ø§Ù ÙØ¨Ù اÙÙ ÙÙ: Ø§ÙØ®Ø§Ø¯Ù ÙÙØ±Ø£ Ø§ÙØÙÙ٠اÙÙØµÙØ© اÙ٠راÙÙØ© ÙÙÙ ÙÙØ Ù٠ا Ø¨Ø¹Ø¯Ù ÙØ¯ ÙØ§ ÙØµÙÙ 20714 function formPayload(outputName){ 20715 const fd=new FormData(); 20716 if(opts.fit)fd.append('fit',opts.fit); 20717 if(String(opts.background||'').trim())fd.append('background',String(opts.background).trim()); 20718 if(Number(opts.zoom)!==1)fd.append('zoom',String(opts.zoom)); 20719 if(Number(opts.offsetX))fd.append('offsetX',String(opts.offsetX)); 20720 if(Number(opts.offsetY))fd.append('offsetY',String(opts.offsetY)); 20721 if(opts.trim)fd.append('trim','true'); 20722 if(String(opts.quality||'').trim())fd.append('quality',String(opts.quality).trim()); 20723 if(outputName)fd.append('output',outputName); 20724 fd.append('file',file.value); 20725 return fd; 20726 } 20727 // اÙ٠عاÙÙØ© ØªØ¹ÙØ¯ ØµÙØ±Ø© Ø«ÙØ§Ø¦ÙØ© ÙØ§ JSONØ ÙÙØ§ ت٠ر٠عبر api() Ø§ÙØ°Ù ÙÙÙ٠اÙÙØµ دائ٠ا٠20728 async function doPreview(outputName){ 20729 if(!file.value){store.state.msg='اختر ØµÙØ±Ø© Ø£ÙÙØ§Ù';return;} 20730 busy.value='preview'; 20731 try{ 20732 const res=await fetch('/api/admin/brand-assets/'+encodeURIComponent(sel.value)+'/preview', 20733 {method:'POST',credentials:'include',cache:'no-store',headers:{'Accept':'image/*,application/json'},body:formPayload(outputName)}); 20734 if(!res.ok){ 20735 let m='ØªØ¹Ø°ÙØ±Øª اÙ٠عاÙÙØ©'; 20736 try{const j=await res.json();m=(j&&j.message)||m;}catch(e){} 20737 store.state.msg=m; return; 20738 } 20739 const b=await res.blob(); clearPreview(); 20740 previewUrl.value=URL.createObjectURL(b); previewOutput.value=outputName||''; 20741 store.state.msg='٠عاÙÙØ© Ø¨ÙØ§ ØÙظ â Ø§Ø¶ØºØ· «اعت٠اد ÙØ±Ùع» ÙÙØÙØ¸'; 20742 }catch(e){store.state.msg='ÙØ´Ù Ø§ÙØ§ØªØµØ§Ù Ø¨Ø§ÙØ³ÙØ±ÙØ±';} 20743 finally{busy.value='';} 20744 } 20745 async function save(){ 20746 if(!file.value){store.state.msg='اختر ØµÙØ±Ø© Ø£ÙÙØ§Ù';return;} 20747 busy.value='save'; 20748 const r=await runBusyAction(store,'brand-assets.upload',()=>uploadApi( 20749 '/api/admin/brand-assets/'+encodeURIComponent(sel.value), 20750 {method:'POST',body:formPayload(''),headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ أص٠اÙÙÙÙØ©'})); 20751 busy.value=''; 20752 store.state.msg=(r&&(r.message||r.error))||''; 20753 if(r&&r.ok){clearFile();await load();} 20754 } 20755 async function doReset(){ 20756 if(!sel.value)return; 20757 busy.value='reset'; 20758 const r=await api('/api/admin/brand-assets/'+encodeURIComponent(sel.value)+'/reset',{method:'POST'}); 20759 busy.value=''; 20760 store.state.msg=(r&&(r.message||r.error))||''; 20761 if(r&&r.ok){clearFile();await load();} 20762 } 20763 onMounted(load); 20764 return {store,kinds,limits,sel,selected,file,fileName,opts,previewUrl,previewOutput,busy, 20765 maxMb,allowed,minSide,pick,onFile,doPreview,save,doReset,load}; 20766 }, 20767 render:(function(){ 20768const _Vue = Vue
20769const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 20770 20771const _hoisted_1 = { class: "card noticeCard compactNotice identityBoundaryNote" } 20772const _hoisted_2 = ["onClick"] 20773const _hoisted_3 = { class: "card formCard" } 20774const _hoisted_4 = { class: "row" } 20775const _hoisted_5 = ["onClick"] 20776const _hoisted_6 = { 20777 key: 0, 20778 class: "hint" 20779} 20780const _hoisted_7 = { class: "card formCard" } 20781const _hoisted_8 = { class: "dailyList" } 20782const _hoisted_9 = ["disabled", "onClick"] 20783const _hoisted_10 = { class: "card formCard" } 20784const _hoisted_11 = { class: "filePicker wide" } 20785const _hoisted_12 = ["onChange"] 20786const _hoisted_13 = { class: "formTwo" } 20787const _hoisted_14 = { class: "fieldLabel" } 20788const _hoisted_15 = ["onUpdate:modelValue"] 20789const _hoisted_16 = { class: "fieldLabel" } 20790const _hoisted_17 = ["onUpdate:modelValue"] 20791const _hoisted_18 = { class: "fieldLabel" } 20792const _hoisted_19 = ["onUpdate:modelValue"] 20793const _hoisted_20 = { class: "fieldLabel" } 20794const _hoisted_21 = ["onUpdate:modelValue"] 20795const _hoisted_22 = { class: "fieldLabel" } 20796const _hoisted_23 = ["onUpdate:modelValue"] 20797const _hoisted_24 = { class: "fieldLabel" } 20798const _hoisted_25 = ["onUpdate:modelValue"] 20799const _hoisted_26 = { class: "fieldLabel" } 20800const _hoisted_27 = ["onUpdate:modelValue"] 20801const _hoisted_28 = { class: "row" } 20802const _hoisted_29 = ["disabled", "onClick"] 20803const _hoisted_30 = ["disabled", "onClick"] 20804const _hoisted_31 = ["disabled", "onClick"] 20805const _hoisted_32 = { 20806 key: 0, 20807 class: "heroAdminPreview" 20808} 20809const _hoisted_33 = ["src"] 20810const _hoisted_34 = { class: "hint" } 20811 20812return function render(_ctx, _cache) { 20813 with (_ctx) { 20814 const { resolveComponent: _resolveComponent, createVNode: _createVNode, createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, vModelCheckbox: _vModelCheckbox, withCtx: _withCtx, createBlock: _createBlock } = _Vue 20815 20816 const _component_IdentityAdminNav = _resolveComponent("IdentityAdminNav") 20817 const _component_AdminFrame = _resolveComponent("AdminFrame") 20818 20819 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "أصÙ٠اÙÙÙÙØ© Ø§ÙØ¨ØµØ±ÙØ©" }, { 20820 default: _withCtx(() => [ 20821 _createVNode(_component_IdentityAdminNav), 20822 _createElementVNode("section", _hoisted_1, [ 20823 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "vueBadge" }, "اÙÙÙÙØ© Ø§ÙØ¨ØµØ±ÙØ©", -1)), 20824 _cache[1] || (_cache[1] = _createElementVNode("h3", null, "Ø§ÙØ´Ø¹Ø§Ø± ÙØ§ÙØµÙØ± Ø§ÙØ±Ø³Ù ÙØ© ÙÙÙ ÙØµØ©", -1)), 20825 _cache[2] || (_cache[2] = _createElementVNode("p", null, "ÙØ°Ù Ø§ÙØ£ØµÙ٠تخص SMT China ÙØªÙستخد٠Ù٠اÙÙÙÙØ© Ø§ÙØ¹Ø§Ù Ø©. ØµÙØ± ٠جت٠عات ÙÙØ§ÙØºØªØ´Ù ÙØ¥ÙÙÙ ØªÙØ¯Ø§Ø± Ù Ù ØµÙØØ© «اÙ٠جت٠عات» ÙÙØ§ ØªÙØ±Ùع ÙÙØ§.", -1)), 20826 _createElementVNode("button", { 20827 class: "smallbtn", 20828 onClick: load 20829 }, "ØªØØ¯ÙØ«", 8, _hoisted_2) 20830 ]), 20831 _createElementVNode("section", _hoisted_3, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, "ÙÙØ¹ Ø§ÙØ£ØµÙ", -1)), _createElementVNode("div", _hoisted_4, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(kinds, (k) => { 20832 return (_openBlock(), _createElementBlock("button", { 20833 key: k.kind, 20834 class: _normalizeClass(["btn secondary", {active:sel===k.kind}]), 20835 onClick: $event => (pick(k.kind)) 20836 }, _toDisplayString(k.label_ar), 11, _hoisted_5)) 20837 }), 128))]), (!kinds.length) 20838 ? (_openBlock(), _createElementBlock("p", _hoisted_6, "ÙØ§ ÙÙØ¬Ø¯ ÙØªØ§ÙÙØ¬ â Ø§Ø¶ØºØ· ØªØØ¯ÙØ«.")) 20839 : _createCommentVNode("", true)]), 20840 selected 20841 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("section", _hoisted_7, [_createElementVNode("h3", null, "اÙ٠خرجات اÙ٠شتÙÙØ© â " + _toDisplayString(selected.label_ar), 1), _createElementVNode("div", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(selected.outputs, (o) => { 20842 return (_openBlock(), _createElementBlock("div", { key: o.name }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(o.name), 1), _createElementVNode("small", null, [
20843 _createTextVNode(_toDisplayString(o.width), 1), 20844 (o.height) 20845 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode("Ã" + _toDisplayString(o.height), 1)], 64)) 20846 : _createCommentVNode("", true), 20847 _createTextVNode(" · " + _toDisplayString(o.format), 1), 20848 (o.budget_kb) 20849 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createTextVNode(" · ØØ¯ " + _toDisplayString(o.budget_kb) + "KB", 1)], 64)) 20850 : _createCommentVNode("", true), 20851 _createTextVNode(" · " + _toDisplayString(o.is_default?'Ø§ÙØ£ØµÙ اÙÙ ÙØ´ØÙÙ':'٠رÙÙØ¹ Ù Ù Ø§ÙØ¥Ø¯Ø§Ø±Ø©'), 1) 20852 ])]), _createElementVNode("button", { 20853 class: "smallbtn secondary", 20854 disabled: !file||busy==='preview', 20855 onClick: $event => (doPreview(o.name)) 20856 }, "٠عاÙÙØ©", 8, _hoisted_9)])) 20857 }), 128))])]), _createElementVNode("section", _hoisted_10, [ 20858 _cache[13] || (_cache[13] = _createElementVNode("h3", null, "Ø±ÙØ¹ ØµÙØ±Ø© Ø¬Ø¯ÙØ¯Ø©", -1)), 20859 _createElementVNode("label", _hoisted_11, [_createElementVNode("input", { 20860 type: "file", 20861 accept: "image/jpeg,image/png,image/webp", 20862 onChange: onFile 20863 }, null, 40, _hoisted_12), _cache[4] || (_cache[4] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± ØµÙØ±Ø©", -1)), _createElementVNode("em", null, _toDisplayString(fileName), 1)]), 20864 _createElementVNode("div", _hoisted_13, [ 20865 _createElementVNode("label", _hoisted_14, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "Ø§ÙØ§ØØªÙاء", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((opts.fit) = $event) }, _cache[5] || (_cache[5] = [ 20866 _createElementVNode("option", { value: "" }, "Ø§ÙØªØ±Ø§Ø¶Ù Ù٠٠خرج", -1), 20867 _createElementVNode("option", { value: "contain" }, "Ø§ØØªÙاء ÙØ§Ù Ù", -1), 20868 _createElementVNode("option", { value: "cover" }, "ØªØºØ·ÙØ© Ø¨Ø§ÙØ§Ùتطاع", -1), 20869 _createElementVNode("option", { value: "inside" }, "Ø¨Ø§ÙØ¹Ø±Ø¶ ÙÙØ·", -1) 20870 ]), 8, _hoisted_15), [[_vModelSelect, opts.fit]])]), 20871 _createElementVNode("label", _hoisted_16, [_cache[7] || (_cache[7] = _createElementVNode("span", null, "Ø§ÙØ®ÙÙÙØ©", -1)), _withDirectives(_createElementVNode("input", { 20872 "onUpdate:modelValue": $event => ((opts.background) = $event), 20873 placeholder: "#ffffff Ø£Ù transparent" 20874 }, null, 8, _hoisted_17), [[_vModelText, opts.background]])]), 20875 _createElementVNode("label", _hoisted_18, [_cache[8] || (_cache[8] = _createElementVNode("span", null, "Ø§ÙØªÙØ¨ÙØ± · 0.5 Ø¥ÙÙ 2", -1)), _withDirectives(_createElementVNode("input", { 20876 type: "number", 20877 step: "0.05", 20878 min: "0.5", 20879 max: "2", 20880 "onUpdate:modelValue": $event => ((opts.zoom) = $event) 20881 }, null, 8, _hoisted_19), [[_vModelText, opts.zoom]])]), 20882 _createElementVNode("label", _hoisted_20, [_cache[9] || (_cache[9] = _createElementVNode("span", null, "Ø§ÙØ¬Ùدة · 40 Ø¥ÙÙ 100", -1)), _withDirectives(_createElementVNode("input", { 20883 type: "number", 20884 step: "1", 20885 min: "40", 20886 max: "100", 20887 "onUpdate:modelValue": $event => ((opts.quality) = $event), 20888 placeholder: "Ø§ÙØªØ±Ø§Ø¶Ù اÙ٠خرج" 20889 }, null, 8, _hoisted_21), [[_vModelText, opts.quality]])]), 20890 _createElementVNode("label", _hoisted_22, [_cache[10] || (_cache[10] = _createElementVNode("span", null, "Ø¥Ø²Ø§ØØ© Ø£ÙÙÙØ© · â-100 Ø¥ÙÙ 100", -1)), _withDirectives(_createElementVNode("input", { 20891 type: "number", 20892 step: "5", 20893 min: "-100", 20894 max: "100", 20895 "onUpdate:modelValue": $event => ((opts.offsetX) = $event) 20896 }, null, 8, _hoisted_23), [[_vModelText, opts.offsetX]])]), 20897 _createElementVNode("label", _hoisted_24, [_cache[11] || (_cache[11] = _createElementVNode("span", null, "Ø¥Ø²Ø§ØØ© Ø±Ø£Ø³ÙØ© · â-100 Ø¥ÙÙ 100", -1)), _withDirectives(_createElementVNode("input", { 20898 type: "number", 20899 step: "5", 20900 min: "-100", 20901 max: "100", 20902 "onUpdate:modelValue": $event => ((opts.offsetY) = $event) 20903 }, null, 8, _hoisted_25), [[_vModelText, opts.offsetY]])]) 20904 ]), 20905 _createElementVNode("label", _hoisted_26, [_cache[12] || (_cache[12] = _createElementVNode("span", null, "ÙØµÙ Ø§ÙØÙØ§Ù اÙÙ ÙØÙØ¯Ø©", -1)), _withDirectives(_createElementVNode("input", { 20906 type: "checkbox", 20907 "onUpdate:modelValue": $event => ((opts.trim) = $event) 20908 }, null, 8, _hoisted_27), [[_vModelCheckbox, opts.trim]])]), 20909 _createElementVNode("div", _hoisted_28, [_createElementVNode("button", { 20910 class: "btn secondary", 20911 disabled: !file||busy==='preview', 20912 onClick: $event => (doPreview('')) 20913 }, _toDisplayString(busy==='preview'?'جار٠اÙ٠عاÙÙØ©...'
20913:'٠عاÙÙØ© Ø¨ÙØ§ ØÙظ'), 9, _hoisted_29), _createElementVNode("button", { 20914 class: "btn", 20915 disabled: !file||busy==='save', 20916 onClick: save 20917 }, _toDisplayString(busy==='save'?'Ø¬Ø§Ø±Ù Ø§ÙØ±Ùع...':'اعت٠اد ÙØ±Ùع'), 9, _hoisted_30), _createElementVNode("button", { 20918 class: "btn danger", 20919 disabled: busy==='reset', 20920 onClick: doReset 20921 }, "Ø§ÙØ¹Ùدة Ø¥ÙÙ Ø§ÙØ£ØµÙ اÙÙ ÙØ´ØÙÙ", 8, _hoisted_31)]), 20922 _cache[14] || (_cache[14] = _createElementVNode("p", { class: "hint" }, "اÙ٠عاÙÙØ© ÙØ§ تØÙظ Ø´ÙØ¦Ø§Ù. Â«Ø§ÙØ¹Ùدة Ø¥ÙÙ Ø§ÙØ£ØµÙ» ØªØØ°Ù Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯ ÙÙØ¹Ùد Ø§ÙØ£ØµÙ اÙÙ Ø´ØÙ٠٠ع Ø§ÙØ¥ØµØ¯Ø§Ø±.", -1)), 20923 previewUrl 20924 ? (_openBlock(), _createElementBlock("div", _hoisted_32, [_createElementVNode("img", { 20925 src: previewUrl, 20926 alt: "٠عاÙÙØ© Ø§ÙØ£ØµÙ" 20927 }, null, 8, _hoisted_33), _createElementVNode("p", _hoisted_34, "٠عاÙÙØ© " + _toDisplayString(previewOutput||selected.outputs[0].name) + " â ÙÙ ØªÙØÙØ¸.", 1)])) 20928 : _createCommentVNode("", true) 20929 ])], 64)) 20930 : _createCommentVNode("", true) 20931 ]), 20932 _: 1 20933 })) 20934 } 20935} 20936})() 20937 }; 20938 20939 const AdminPlatformBrandingPage={ 20940 components:{AdminFrame,IdentityAdminNav}, 20941 setup(){ 20942 const store=useGzcStore(); const router=useRouter();
20943 const form=reactive({titleLine1:'',titleLine2:'',subtitle:'',badge:'',appName:'',appShortName:''}); 20944 const iconFile=ref(null), iconLabel=ref('ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± شعار'); 20945 async function load(){if(await store.requireAdmin(router)){const r=await store.loadPlatformBranding(router);Object.assign(form,(r&&r.branding)||{});}} 20946 function onIcon(e){const f=e.target.files&&e.target.files[0];iconFile.value=f||null;iconLabel.value=f?f.name:'ÙÙ ÙØªÙ Ø§Ø®ØªÙØ§Ø± شعار';} 20947 async function save(){store.state.busy=true;const r=await api('/api/admin/platform-branding',{method:'POST',body:JSON.stringify(form)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.branding)Object.assign(form,r.branding);} 20948 async function uploadIcon(){if(!iconFile.value){store.state.msg='اختر ØµÙØ±Ø© Ø§ÙØ´Ø¹Ø§Ø± Ø£ÙÙØ§Ù';return;}const fd=new FormData();fd.append('file',iconFile.value);store.state.busy=true;const r=await uploadApi('/api/admin/platform-branding/icon',{method:'POST',body:fd,headers:{'Accept':'application/json'},uploadLabel:'Ø±ÙØ¹ Ø£ÙÙÙÙØ© Ø§ÙØªØ·Ø¨ÙÙ'});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r.branding)Object.assign(form,r.branding);} 20949 onMounted(load); 20950 return{store,form,iconLabel,onIcon,save,uploadIcon}; 20951 }, 20952 render:(function(){ 20953const _Vue = Vue 20954const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 20955 20956const _hoisted_1 = { class: "card formCard" } 20957const _hoisted_2 = ["onUpdate:modelValue"] 20958const _hoisted_3 = ["onUpdate:modelValue"] 20959const _hoisted_4 = ["onUpdate:modelValue"] 20960const _hoisted_5 = ["onUpdate:modelValue"] 20961const _hoisted_6 = { class: "formTwo" } 20962const _hoisted_7 = ["onUpdate:modelValue"] 20963const _hoisted_8 = ["onUpdate:modelValue"] 20964const _hoisted_9 = ["onClick"] 20965const _hoisted_10 = { class: "card formCard" } 20966const _hoisted_11 = { class: "filePicker" } 20967const _hoisted_12 = ["onChange"] 20968const _hoisted_13 = ["onClick"] 20969const _hoisted_14 = { 20970 key: 0, 20971 class: "heroAdminPreview" 20972} 20973const _hoisted_15 = ["src"] 20974 20975return function render(_ctx, _cache) { 20976 with (_ctx) { 20977 const { resolveComponent: _resolveComponent, createVNode: _createVNode, createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, withCtx: _withCtx, createBlock: _createBlock } = _Vue 20978 20979 const _component_IdentityAdminNav = _resolveComponent("IdentityAdminNav") 20980 const _component_AdminFrame = _resolveComponent("AdminFrame") 20981 20982 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ÙÙÙØ© اÙÙ ÙØµØ© ÙØ§ÙتطبÙÙ" }, { 20983 default: _withCtx(() => [ 20984 _createVNode(_component_IdentityAdminNav), 20985 _cache[4] || (_cache[4] = _createElementVNode("section", { class: "card noticeCard compactNotice identityBoundaryNote" }, [_createElementVNode("span", { class: "vueBadge" }, "ÙÙÙØ© عا٠ة"), _createElementVNode("h3", null, "Ø§ÙØ±Ø¦ÙØ³ÙØ© ÙØ§Ø³Ù Ø§ÙØªØ·Ø¨ÙÙ ÙPWA"), _createElementVNode("p", null, "ÙØ°Ù Ø§ÙØµÙØØ© تتØÙÙ ÙÙ ÙÙÙØ© SMT Ø§ÙØ¹Ø§Ù Ø© ÙÙØµ اÙÙÙØ¯Ø± ÙØ£ÙÙÙÙØ© Ø§ÙØªØ·Ø¨ÙÙ. Ù ØØªÙÙ ØµÙØØ© «ع٠اÙÙ ÙØµØ©Â» ٠ستÙÙØ ÙØ¨ÙØ§ÙØ§Øª اÙ٠جت٠عات اÙÙ ØÙÙØ© ٠ستÙÙØ©.")], -1)), 20986 _createElementVNode("section", _hoisted_1, [ 20987 _cache[0] || (_cache[0] = _createElementVNode("h3", null, "ÙØµ اÙÙÙØ¯Ø± ÙÙ Ø§ÙØ±Ø¦ÙØ³ÙØ©", -1)), 20988 _withDirectives(_createElementVNode("input", { 20989 "onUpdate:modelValue": $event => ((form.titleLine1) = $event), 20990 placeholder: "Ø§ÙØ³Ø·Ø± Ø§ÙØ£ÙÙ: SMT" 20991 }, null, 8, _hoisted_2), [[_vModelText, form.titleLine1]]), 20992 _withDirectives(_createElementVNode("input", { 20993 "onUpdate:modelValue": $event => ((form.titleLine2) = $event), 20994 placeholder: "Ø§ÙØ³Ø·Ø± Ø§ÙØ«Ø§ÙÙ: ÙÙ Ø§ÙØµÙÙ" 20995 }, null, 8, _hoisted_3), [[_vModelText, form.titleLine2]]), 20996 _withDirectives(_createElementVNode("textarea", { 20997 "onUpdate:modelValue": $event => ((form.subtitle) = $event), 20998 placeholder: "اÙÙØµÙ اÙ٠ختصر" 20999 }, null, 8, _hoisted_4), [[_vModelText, form.subtitle]]), 21000 _withDirectives(_createElementVNode("input", { 21001 "onUpdate:modelValue": $event => ((form.badge) = $event), 21002 placeholder: "Ø§ÙØ´Ø§Ø±Ø©: SMT China" 21003 }, null, 8, _hoisted_5), [[_vModelText, form.badge]]), 21004 _createElementVNode("div", _hoisted_6, [_withDirectives(_createElementVNode("input", { 21005 "onUpdate:modelValue": $event => ((form.appName) = $event), 21006 placeholder: "Ø§Ø³Ù Ø§ÙØªØ·Ø¨ÙÙ" 21007 }, null, 8, _hoisted_7), [[_vModelText, form.appName]]), _withDirectives(_createElementVNode("input", { 21008 "onUpdate:modelValue": $event => ((form.appShortName) = $event), 21009 placeholder: "Ø§ÙØ§Ø³Ù اÙ٠ختصر" 21010 }, null, 8, _hoisted_8), [[_vModelText, form.appShortName]])]), 21011 _createElementVNode("button", { 21012 class: "btn", 21013 onClick: save 21014 }, "ØÙظ اÙÙØµÙص", 8, _hoisted_9) 21015 ]), 21016 _createElementVNode("section", _hoisted_10, [ 21017 _cache[2] || (_cache[2] = _createElementVNode("h3", null, "Ø£ÙÙÙÙØ© تطبÙ٠اÙÙØ§ØªÙ", -1)), 21018 _cache[3] || (_cache[3] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ù Ø£ÙÙÙÙØ© PWA/اÙÙØ§ØªÙ ÙÙÙØ³Øª ØµÙØ±Ø© ØµÙØØ© «ع٠اÙÙ ÙØµØ©Â» Ø£Ù ØµÙØ±Ø© ٠جت٠ع Ù ØÙÙ. Ø§Ø±ÙØ¹ Ø´Ø¹Ø§Ø±Ø§Ù Ù Ø±Ø¨Ø¹Ø§Ù ÙØ§Ø¶ØØ§Ù. عÙÙ iPhone ÙØ¯ ØªØØªØ§Ø¬ ØØ°Ù Ø§ÙØªØ·Ø¨ÙÙ Ù Ù Ø§ÙØ´Ø§Ø´Ø© ÙØ¥Ø¶Ø§Ùت٠٠رة Ø£Ø®Ø±Ù ØØªÙ ØªØªØºÙØ± Ø§ÙØ£ÙÙÙÙØ©.", -1)), 21019 _createElementVNode("label", _hoisted_11, [_createElementVNode("input", { 21020 type: "file", 21021 accept: "image/jpeg,image/png,image/webp", 21022 onChange: onIcon 21023 }, null, 40, _hoisted_12), _cache[1] || (_cache[1] = _createElementVNode("span", null, "Ø§Ø®ØªÙØ§Ø± شعار Ø§ÙØªØ·Ø¨ÙÙ", -1)), _createElementVNode("em", null, _toDisplayString(iconLabel), 1)]), 21024 _createElementVNode("button", { 21025 class: "btn secondary", 21026 onClick: uploadIcon 21027 }, "Ø±ÙØ¹ Ø§ÙØ£ÙÙÙÙØ©", 8, _hoisted_13), 21028 (form.appIconUrl) 21029 ? (_openBlock(), _createElementBlock("div", _hoisted_14, [_createElementVNode("img", { 21030 src: form.appIconUrl, 21031 loading: "lazy", 21032 alt: "Ø£ÙÙÙÙØ© Ø§ÙØªØ·Ø¨ÙÙ" 21033 }, null, 8, _hoisted_15)])) 21034 : _createCommentVNode("", true) 21035 ]) 21036 ]), 21037 _: 1, 21038 __: [4] 21039 })) 21040 } 21041} 21042})() 21043 }; 21044 21045 const PrivacyPage={ 21046 components:{PublicFrame}, 21047 render:(function(){ 21048const _Vue = Vue
21049const { createElementVNode: _createElementVNode } = _Vue 21050 21051const _hoisted_1 = { class: "card legalSection" } 21052const _hoisted_2 = ["onClick"] 21053 21054return function render(_ctx, _cache) { 21055 with (_ctx) { 21056 const { createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 21057 21058 const _component_PublicFrame = _resolveComponent("PublicFrame") 21059 21060 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø³ÙØ§Ø³Ø© Ø§ÙØ®ØµÙØµÙØ©" }, { 21061 default: _withCtx(() => [ 21062 _cache[2] || (_cache[2] = _createElementVNode("section", { class: "card legalHero" }, [_createElementVNode("span", { class: "vueBadge" }, "آخر ØªØØ¯ÙØ«: 28 أغسطس 2026"), _createElementVNode("h2", null, "Ø³ÙØ§Ø³Ø© Ø§ÙØ®ØµÙØµÙØ©"), _createElementVNode("p", null, "ØªÙØ´ØºÙÙ SMT Advanced Business Ù ÙØµØ© SMT China ÙØ®Ø¯Ù Ø© Ø§ÙØ¹Ø¶ÙÙØ© ÙØ§Ù٠عÙÙ٠ات ÙØ§ÙØ·ÙØ¨Ø§Øª ÙØ§ÙØªÙØ§ØµÙ Ø§ÙØªØ´ØºÙÙÙ Ø¯Ø§Ø®Ù Ø§ÙØµÙÙ.")], -1)), 21063 _cache[3] || (_cache[3] = _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØªÙ ÙØ¹Ø§ÙØ¬ÙØ§"), _createElementVNode("ul", null, [ 21064 _createElementVNode("li", null, "رÙÙ ÙØ§ØªØ³Ø§Ø¨ ÙØ±Ù ز Ø§ÙØªØÙÙ ÙØ§ÙØ¬ÙØ³Ø© Ø§ÙØ¢Ù ÙØ©."), 21065 _createElementVNode("li", null, "Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶ÙÙØ© Ø§ÙØªÙ ØªÙØ¯Ù ÙØ§Ø Ù Ø«Ù Ø§ÙØ§Ø³Ù ÙØ§Ù٠دÙÙØ© ÙØ§ÙÙ ÙÙØ© ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØ£Ø³Ø±Ø© ÙØ§ÙØµÙØ±Ø© Ø§ÙØ§Ø®ØªÙØ§Ø±ÙØ©."), 21066 _createElementVNode("li", null, "Ø·ÙØ¨Ø§Øª اÙ٠ساعدة ÙØ§ÙØ·ÙØ§Ø±Ø¦ ÙØ§ÙØªÙØ±Ùد ÙØ§Ù٠رÙÙØ§Øª اÙ٠رتبطة Ø¨ÙØ§."), 21067 _createElementVNode("li", null, "Ø¨ÙØ§Ùات تشغÙÙÙØ© Ù ØØ¯Ùدة ٠ث٠ÙÙØª Ø§ÙØ·Ùب ÙØ³Ø¬Ù Ø§ÙØ¥Ø¬Ø±Ø§Ø¡Ø§Øª ÙØÙ Ø§ÙØ© Ø§ÙØØ³Ø§Ø¨ Ù٠راجعة Ø§ÙØ¹Ù Ù."), 21068 _createElementVNode("li", null, "ÙØªØØ³ÙÙ Ø§ÙØ¯ÙÙÙØ ÙØ³Ø¬Ù Ø¥ØØµØ§Ø¡Ø§Øª ٠ج٠عة ÙÙØ¦Ø§Øª Ø§ÙØ¨ØØ« Ø§ÙØªÙ Ù٠تجد ÙØªØ§Ø¦Ø¬Ø Ù Ø«Ù Ø§ÙØªØµÙÙÙ ÙØ§Ù٠دÙÙØ©. ÙØ§ ÙØÙØ¸ عبارة Ø§ÙØ¨ØØ« Ø§ÙØ®Ø§Ù Ø£Ù ÙÙÙØ© Ø§ÙØ¹Ø¶Ù Ø£Ù Ø§ÙØ¬Ùسة أ٠عÙÙØ§Ù IP Ø¶Ù Ù ÙØ°Ù Ø§ÙØ¥ØØµØ§Ø¡Ø§Øª."), 21069 _createElementVNode("li", null, "اÙÙ ÙÙØ¹ ÙÙØ· Ø¹ÙØ¯Ù ا تضغط زر Ø§ÙØ³Ù Ø§Ø ÙÙ ØµÙØØ© Ø§ÙØ·ÙØ§Ø±Ø¦Ø ÙØ§ ØªØ·ÙØ¨Ù اÙÙ ÙØµØ© تÙÙØ§Ø¦ÙاÙ.") 21070 ])], -1)), 21071 _cache[4] || (_cache[4] = _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ù٠اذا ÙØ³ØªØ®Ø¯Ù Ø§ÙØ¨ÙØ§ÙØ§Øª"), _createElementVNode("p", null, "ÙÙØªØÙ٠٠٠اÙÙÙÙØ©Ø إدارة Ø§ÙØ¹Ø¶ÙÙØ©Ø ØªÙØ¯ÙÙ Ø§ÙØ®Ø¯Ù Ø§ØªØ Ø¥Ø±Ø³Ø§Ù Ø¥Ø´Ø¹Ø§Ø±Ø§Øª ÙØ§ØªØ³Ø§Ø¨ اÙÙ Ø·ÙÙØ¨Ø©Ø ٠تابعة Ø§ÙØØ§ÙØ§ØªØ Ù ÙØ¹ إساءة Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù Ø ÙØªØØ³ÙÙ Ù ÙØ«ÙÙÙØ© اÙÙ ÙØµØ©.")], -1)), 21072 _cache[5] || (_cache[5] = _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ù Ù ÙÙ ÙÙÙ Ø§ÙØ§Ø·Ùاع"), _createElementVNode("p", null, "ÙØ§ تÙÙØ´Ø± Ø¨ÙØ§Ùات Ø§ÙØ¹Ø¶ÙÙØ© Ø£Ù Ø§ÙØ·Ùبات ÙÙØ¹Ø§Ù Ø©. ÙÙØªØµØ± Ø§ÙØ§Ø·Ùاع عÙÙ Ø§ÙØ¥Ø¯Ø§Ø±ÙÙÙ Ø£Ù Ø§ÙØØ³Ø§Ø¨Ø§Øª Ø§ÙØ±Ø³Ù ÙØ© اÙÙ Ø®ÙÙØ© Ø¨ØØ³Ø¨ Ø§ÙØ¯Ùر ÙÙØ·Ø§Ù اÙÙ Ø¬ØªÙ Ø¹Ø ÙØ¹ÙÙ Ù Ø²ÙØ¯ ÙØ§ØªØ³Ø§Ø¨ باÙÙØ¯Ø± اÙÙØ§Ø²Ù ÙØ¥Ø±Ø³Ø§Ù Ø§ÙØ±Ø³Ø§ÙØ©. اÙ٠رÙÙØ§Øª Ø§ÙØ®Ø§ØµØ© ÙØ§ ØªØ¸ÙØ± ÙÙ ØµÙØØ§Øª Ø§ÙØ²Ùار.")], -1)), 21073 _cache[6] || (_cache[6] = _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ø§ÙØÙØ¸ ÙØ§ÙØÙÙÙ"), _createElementVNode("p", null, "ØªÙØÙØ¸ Ø§ÙØ¨ÙØ§ÙØ§Øª Ø¨ÙØ¯Ø± Ø§ÙØØ§Ø¬Ø© ÙÙØªØ´ØºÙÙ ÙØ§Ù٠راجعة ÙØ§ÙØ§ÙØªØ²Ø§Ù ات اÙÙØ¸Ø§Ù ÙØ©Ø Ø«Ù ØªÙØ¤Ø±Ø´Ù Ø£Ù ØªÙØØ°Ù ÙÙÙ Ø³ÙØ§Ø³Ø© Ø§ÙØ¥Ø¯Ø§Ø±Ø©. ÙÙ ÙÙÙ Ø·ÙØ¨ تصØÙØ Ø¨ÙØ§ÙØ§ØªÙ Ù Ù ØØ³Ø§Ø¨Ù Ø£Ù Ø¥Ø±Ø³Ø§Ù Ø·ÙØ¨ عبر ØµÙØØ© Ø§ÙØªÙاصÙ. ÙØ¯ ÙÙØ²Ù Ø§ÙØ§ØØªÙاظ بسج٠٠ختصر ÙØÙ Ø§ÙØ© اÙÙØ¸Ø§Ù ÙØ¥Ø«Ø¨Ø§Øª Ø§ÙØ¥Ø¬Ø±Ø§Ø¡Ø§Øª.")], -1)), 21074 _createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("h3", null, "Ø§ÙØªØØ¯Ùثات", -1)), _cache[1] || (_cache[1] = _createElementVNode("p", null, "ÙØ¯ ØªØªØºÙØ± ÙØ°Ù Ø§ÙØ³Ùاسة Ø¹ÙØ¯ Ø¥Ø¶Ø§ÙØ© خد٠ة Ø¬Ø¯ÙØ¯Ø©. Ø³ÙØ¸Ùر ØªØ§Ø±ÙØ® آخر ØªØØ¯ÙØ« Ù٠أعÙÙ Ø§ÙØµÙØØ©Ø ÙØªÙعرض Ø§ÙØªØºÙÙØ±Ø§Øª اÙÙ ÙÙ Ø© داخ٠اÙÙ ÙØµØ© Ø¹ÙØ¯ Ø§ÙØØ§Ø¬Ø©.", -1)), _createElementVNode("button", { 21075 class: "btn secondary", 21076 onClick: $event => ($router.push('/contact')) 21077 }, "Ø§ÙØªÙØ§ØµÙ Ø¨Ø®ØµÙØµ Ø§ÙØ®ØµÙØµÙØ©", 8, _hoisted_2)]) 21078 ]), 21079 _: 1, 21080 __: [2,3,4,5,6] 21081 })) 21082 } 21083} 21084})() 21085 }; 21086 21087 const TermsPage={ 21088 components:{PublicFrame}, 21089 render:(function(){ 21090const _Vue = Vue
21091 21092return function render(_ctx, _cache) { 21093 with (_ctx) { 21094 const { createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 21095 21096 const _component_PublicFrame = _resolveComponent("PublicFrame") 21097 21098 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø´Ø±ÙØ· Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù " }, { 21099 default: _withCtx(() => _cache[0] || (_cache[0] = [ 21100 _createElementVNode("section", { class: "card legalHero" }, [_createElementVNode("span", { class: "vueBadge" }, "آخر ØªØØ¯ÙØ«: 16 أغسطس 2026"), _createElementVNode("h2", null, "Ø´Ø±ÙØ· استخدا٠اÙÙ ÙØµØ©"), _createElementVNode("p", null, "باستخدا٠اÙÙ ÙØµØ© ØªÙØ§Ù٠عÙÙ ØªÙØ¯ÙÙ Ø¨ÙØ§Ùات صØÙØØ©Ø ØÙ Ø§ÙØ© ر٠ز Ø§ÙØ¯Ø®ÙÙØ ÙØ§Ø³ØªØ®Ø¯Ø§Ù Ø§ÙØ®Ø¯Ù ات Ø¨ØµÙØ±Ø© ÙØ¸Ø§Ù ÙØ© ÙÙ ØØªØ±Ù Ø©.")], -1), 21101 _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ø§ÙØØ³Ø§Ø¨ ÙØ§ÙعضÙÙØ©"), _createElementVNode("ul", null, [_createElementVNode("li", null, "Ø§ÙØØ³Ø§Ø¨ شخص٠ÙÙØ±ØªØ¨Ø· برÙÙ ÙØ§ØªØ³Ø§Ø¨ ØªÙ Ø§ÙØªØÙÙ Ù ÙÙ."), _createElementVNode("li", null, "ÙØ§ تشار٠ر٠ز Ø§ÙØªØÙ٠أ٠تستخد٠رÙ٠شخص آخر."), _createElementVNode("li", null, "ÙØ¬Ùز ÙÙØ¥Ø¯Ø§Ø±Ø© ٠راجعة Ø§ÙØ·Ùب أ٠تعÙÙÙÙ Ø¹ÙØ¯ ÙØ¬Ùد Ø¨ÙØ§Ùات ØºÙØ± صØÙØØ© أ٠إساءة استخدا٠.")])], -1), 21102 _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "اÙÙ ØØªÙÙ ÙØ§Ù٠صادر"), _createElementVNode("p", null, "تسع٠اÙÙ ÙØµØ© ÙØ¹Ø±Ø¶ ٠عÙÙ٠ات Ù ÙØ«ÙØ© ÙÙ Ø±Ø§Ø¬Ø¹Ø©Ø ÙÙÙ Ø§ÙØ£Ùظ٠ة ÙØ§ÙÙ ÙØ§Ø¹Ùد ÙØ§ÙرسÙÙ ÙØ§ÙØ±ÙØ§Ø¨Ø· ÙØ¯ ØªØªØºÙØ±. راجع اÙ٠صدر Ø§ÙØ±Ø³Ù Ù ÙØ¨Ù اتخاذ ÙØ±Ø§Ø± ٠اÙÙ Ø£Ù ÙØ§ÙÙÙ٠أ٠صØÙ أ٠٠تعÙÙ Ø¨Ø§ÙØ³Ùر. ")], -1), 21103 _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ø§ÙØ·Ùارئ ÙØ§Ùخد٠ات اÙÙ ÙÙÙØ©"), _createElementVNode("p", null, "اÙÙ ÙØµØ© ÙÙØ³Øª بدÙÙØ§Ù ÙÙØ´Ø±Ø·Ø© Ø£Ù Ø§ÙØ¥Ø³Ø¹Ø§Ù Ø£Ù Ø§ÙØ¥Ø·ÙØ§Ø¡Ø ÙÙÙØ³Øª Ø¬ÙØ© ØÙÙÙ ÙØ© Ø£Ù Ù ÙØªØ¨ Ù ØØ§Ù اة Ø£Ù Ù ÙØ´Ø£Ø© Ø·Ø¨ÙØ©. ÙÙ Ø§ÙØµÙ٠استخد٠110 ÙÙØ´Ø±Ø·Ø©Ø 119 ÙÙØ¥Ø·ÙØ§Ø¡Ø 120 ÙÙØ¥Ø³Ø¹Ø§ÙØ Ù122 ÙØÙØ§Ø¯Ø« اÙÙ Ø±ÙØ±.")], -1), 21104 _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ø§ÙØ·Ùبات ÙØ§Ù٠رÙÙØ§Øª"), _createElementVNode("p", null, "Ø£ÙØª ٠سؤÙÙ Ø¹Ù ØµØØ© اÙÙ ÙÙØ§Øª ÙØ§Ù٠عÙÙ٠ات Ø§ÙØªÙ ØªØ±ÙØ¹Ùا ÙØ¹Ù Ø§Ù ØªÙØ§Ù ØÙ Ù Ø´Ø§Ø±ÙØªÙا. ÙØ§ ØªØ±ÙØ¹ ÙÙ٠ات Ù Ø±ÙØ± Ø£Ù Ø¨ÙØ§Ùات Ø¨Ø·Ø§ÙØ§Øª Ø£Ù Ù ÙÙØ§Øª ØºÙØ± ÙØ§Ø²Ù Ø© ÙÙØ®Ø¯Ù Ø©.")], -1), 21105 _createElementVNode("section", { class: "card legalSection" }, [_createElementVNode("h3", null, "Ø§ÙØªØ´ØºÙÙ ÙØ§ÙتعدÙÙ"), _createElementVNode("p", null, "ØªØ¯ÙØ± SMT Advanced Business اÙÙ ÙØµØ© ÙÙØ¯ ØªØØ¯ÙØ« Ø§ÙØ®Ø¯Ù ات أ٠تÙÙ٠جزءا٠٠ÙÙØ§ ÙÙØµÙØ§ÙØ© Ø£Ù Ø§ÙØÙ Ø§ÙØ©. Ø³ÙØØ§ÙÙ Ø¥Ø¸ÙØ§Ø± Ø§ÙØªØºÙÙØ±Ø§Øª اÙÙ ÙÙ Ø© Ø¨ÙØ¶ÙØ ÙÙ٠ستخد٠.")], -1) 21106 ])), 21107 _: 1, 21108 __: [0] 21109 })) 21110 } 21111} 21112})() 21113 }; 21114 21115 const ContactPage={ 21116 components:{PublicFrame}, 21117 setup(){const store=useGzcStore();const router=useRouter();onMounted(()=>store.loadMe());const member=computed(()=>store.state.me&&store.state.me.authenticated&&store.state.me.member);function openFeedback(){if(member.value)router.push('/feedback');else router.push({path:'/login',query:{next:'/feedback'}});}return{member,openFeedback};}, 21118 render:(function(){ 21119const _Vue = Vue 21120const { createElementVNode: _createElementVNode } = _Vue 21121 21122const _hoisted_1 = { class: "contactGrid" } 21123const _hoisted_2 = { class: "card" } 21124const _hoisted_3 = ["onClick"] 21125const _hoisted_4 = { class: "card" } 21126const _hoisted_5 = ["onClick"] 21127const _hoisted_6 = { class: "card" } 21128const _hoisted_7 = ["onClick"] 21129 21130return function render(_ctx, _cache) { 21131 with (_ctx) {
21132 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, openBlock: _openBlock, createBlock: _createBlock } = _Vue 21133 21134 const _component_PublicFrame = _resolveComponent("PublicFrame") 21135 21136 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø§ÙØªÙاصÙ" }, { 21137 default: _withCtx(() => [_cache[9] || (_cache[9] = _createElementVNode("section", { class: "card legalHero" }, [_createElementVNode("span", { class: "vueBadge" }, "SMT Advanced Business"), _createElementVNode("h2", null, "ØªÙØ§ØµÙ ٠ع إدارة اÙÙ ÙØµØ©"), _createElementVNode("p", null, "اختر اÙÙÙØ§Ø© اÙÙ ÙØ§Ø³Ø¨Ø© ØØªÙ ÙØµÙ Ø·ÙØ¨Ù Ø¥Ù٠اÙÙØ³Ù اÙÙ Ø®Ù٠بدÙÙ ÙØ´Ø± Ø¨ÙØ§Ùات٠ÙÙØ¹Ø§Ù Ø©.")], -1)), _createElementVNode("section", _hoisted_1, [_createElementVNode("article", _hoisted_2, [ 21138 _cache[0] || (_cache[0] = _createElementVNode("span", null, "ð¬", -1)), 21139 _cache[1] || (_cache[1] = _createElementVNode("h3", null, "Ù ÙØ§ØØ¸Ø© Ø£Ù Ø§ÙØªØ±Ø§Ø", -1)), 21140 _cache[2] || (_cache[2] = _createElementVNode("p", null, "ÙÙØ£ÙÙØ§Ø±Ø تصØÙØ Ø§Ù٠عÙÙÙ Ø§ØªØ Ø£Ù Ø§ÙÙ Ø´ÙÙØ§Øª Ø§ÙØªÙÙÙØ©.", -1)), 21141 _createElementVNode("button", { 21142 class: "btn secondary", 21143 onClick: openFeedback 21144 }, _toDisplayString(member?'ÙØªØ ÙÙ ÙØ°Ø¬ اÙÙ ÙØ§ØØ¸Ø§Øª':'Ø§ÙØ¯Ø®ÙÙ Ø«Ù Ø¥Ø±Ø³Ø§Ù Ù ÙØ§ØØ¸Ø©'), 9, _hoisted_3) 21145 ]), _createElementVNode("article", _hoisted_4, [ 21146 _cache[3] || (_cache[3] = _createElementVNode("span", null, "ð¤", -1)), 21147 _cache[4] || (_cache[4] = _createElementVNode("h3", null, "Ø·ÙØ¨ ٠ساعدة", -1)), 21148 _cache[5] || (_cache[5] = _createElementVNode("p", null, "ÙÙØªØ±Ø¬Ù Ø©Ø Ø§ÙØ³ÙÙØ اÙÙØ«Ø§Ø¦ÙØ Ø§ÙØ¯Ø±Ø§Ø³Ø© أ٠٠تابعة ØØ§ÙØ© Ø´Ø®ØµÙØ©.", -1)), 21149 _createElementVNode("button", { 21150 class: "btn secondary", 21151 onClick: $event => ($router.push('/help')) 21152 }, "ÙØªØ Ø·ÙØ¨ ٠ساعدة", 8, _hoisted_5) 21153 ]), _createElementVNode("article", _hoisted_6, [ 21154 _cache[6] || (_cache[6] = _createElementVNode("span", null, "ð", -1)), 21155 _cache[7] || (_cache[7] = _createElementVNode("h3", null, "ØØ§ÙØ© Ø¹Ø§Ø¬ÙØ©", -1)), 21156 _cache[8] || (_cache[8] = _createElementVNode("p", null, "اتص٠أÙÙØ§Ù Ø¨Ø§ÙØ·Ùارئ Ø§ÙØ±Ø³Ù ÙØ© Ø«Ù Ø§Ø³ØªØ®Ø¯Ù Ø¨ÙØ§Øº اÙÙ ÙØµØ© ÙÙ٠تابعة.", -1)), 21157 _createElementVNode("button", { 21158 class: "btn danger", 21159 onClick: $event => ($router.push('/emergency')) 21160 }, "ÙØªØ ØµÙØØ© Ø§ÙØ·Ùارئ", 8, _hoisted_7) 21161 ])]), _cache[10] || (_cache[10] = _createElementVNode("section", { class: "card legalSection" }, [ 21162 _createElementVNode("h3", null, "عÙÙØ§Ù اÙÙ ÙØµØ©"), 21163 _createElementVNode("p", null, [_createElementVNode("b", null, "Ø§ÙØ¹ÙÙØ§Ù Ø§ÙØ±Ø³Ù Ù")]), 21164 _createElementVNode("p", { class: "ltr" }, [_createElementVNode("a", { 21165 href: "https://smt.smtd.ai", 21166 target: "_blank", 21167 rel: "noopener noreferrer" 21168 }, "https://smt.smtd.ai")]), 21169 _createElementVNode("p", { class: "hint" }, "Ø§Ø³ØªØ®Ø¯Ù ÙØ°Ø§ Ø§ÙØ¹ÙÙØ§Ù ÙÙÙØµÙ٠إÙ٠اÙÙ ÙØµØ©.") 21170 ], -1))]), 21171 _: 1, 21172 __: [9,10] 21173 })) 21174 } 21175} 21176})() 21177 }; 21178 21179 const CitiesPage={components:{PublicFrame},setup(){ 21180 const hubs=ref([]);const summary=ref(null);const loading=ref(true);const router=useRouter(); 21181 onMounted(async()=>{const r=await api('/api/city-hubs');hubs.value=safeArray(r&&r.hubs);summary.value=(r&&r.coverage_summary)||null;loading.value=false;}); 21182 // v3.8.55 â a city with no published content is labelled honestly instead of being shown as a 21183 // full destination. Hiding it would understate the platform; faking depth would be worse. 21184 const ready=computed(()=>hubs.value.filter(x=>String(x.coverage_state||'')!=='empty')); 21185 const building=computed(()=>hubs.value.filter(x=>String(x.coverage_state||'')==='empty')); 21186 return{hubs,summary,loading,ready,building,router};}, 21187 render:(function(){ 21188const _Vue = Vue
21189const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 21190 21191const _hoisted_1 = { class: "dailyHero card" } 21192const _hoisted_2 = { 21193 key: 0, 21194 class: "hint" 21195} 21196const _hoisted_3 = { 21197 key: 0, 21198 class: "card loadingState", 21199 role: "status" 21200} 21201const _hoisted_4 = { 21202 key: 1, 21203 class: "dailyGrid" 21204} 21205const _hoisted_5 = ["onClick"] 21206const _hoisted_6 = { 21207 key: 0, 21208 class: "hint" 21209} 21210const _hoisted_7 = { 21211 key: 2, 21212 class: "card" 21213} 21214const _hoisted_8 = { class: "localCommunityGrid" } 21215const _hoisted_9 = ["onClick"] 21216const _hoisted_10 = { class: "memberCardTop" } 21217const _hoisted_11 = { class: "hint" } 21218 21219return function render(_ctx, _cache) { 21220 with (_ctx) { 21221 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 21222 21223 const _component_PublicFrame = _resolveComponent("PublicFrame") 21224 21225 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ù Ø¯Ù Ø§ÙØµÙÙ" }, { 21226 default: _withCtx(() => [ 21227 _createElementVNode("section", _hoisted_1, [ 21228 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "adminEyebrow" }, "City Hubs", -1)), 21229 _cache[1] || (_cache[1] = _createElementVNode("h2", null, "اختر ٠دÙÙØªÙ", -1)), 21230 _cache[2] || (_cache[2] = _createElementVNode("p", null, "٠عÙÙ٠ات ÙØ®Ø¯Ù ات Ù٠عارض ٠رتبة ØØ³Ø¨ اÙ٠دÙÙØ©.", -1)), 21231 summary 21232 ? (_openBlock(), _createElementBlock("small", _hoisted_2, _toDisplayString(summary.covered + summary.starter) + " ٠دÙÙØ© ÙÙÙØ§ Ù ØØªÙÙ Ù ÙØ´Ùر ٠٠أص٠" + _toDisplayString(summary.total_cities) + ".", 1)) 21233 : _createCommentVNode("", true) 21234 ]), 21235 loading 21236 ? (_openBlock(), _createElementBlock("div", _hoisted_3, _cache[3] || (_cache[3] = [_createElementVNode("span", { 21237 class: "loadingSpinner", 21238 "aria-hidden": "true" 21239 }, null, -1), _createElementVNode("h3", null, "جار٠تØÙ Ù٠اÙ٠دÙ...", -1)]))) 21240 : _createCommentVNode("", true), 21241 (ready.length) 21242 ? (_openBlock(), _createElementBlock("section", _hoisted_4, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(ready, (x) => { 21243 return (_openBlock(), _createElementBlock("button", { 21244 class: "card dailyTile", 21245 key: x.city_key, 21246 onClick: $event => (router.push('/city/'+x.city_key)) 21247 }, [ 21248 _cache[4] || (_cache[4] = _createElementVNode("span", { class: "dailyIcon" }, "ðï¸", -1)), 21249 _createElementVNode("b", null, _toDisplayString($cityLabel(x)), 1), 21250 _createElementVNode("small", null, _toDisplayString(x.province_ar||x.province_en), 1), 21251 _createElementVNode("p", null, _toDisplayString(x.summary_ar), 1), 21252 (x.item_count) 21253 ? (_openBlock(), _createElementBlock("small", _hoisted_6, _toDisplayString(x.item_count) + " Ø¹ÙØµØ±Ø§Ù Ù ÙØ´ÙراÙ", 1)) 21254 : _createCommentVNode("", true), 21255 _cache[5] || (_cache[5] = _createElementVNode("em", null, "ÙØªØ Ù Ø±ÙØ² اÙ٠دÙÙØ© â", -1)) 21256 ], 8, _hoisted_5)) 21257 }), 128))])) 21258 : _createCommentVNode("", true), 21259 (!loading && building.length) 21260 ? (_openBlock(), _createElementBlock("section", _hoisted_7, [_cache[6] || (_cache[6] = _createElementVNode("h3", null, "٠د٠ÙÙØ¯ Ø§ÙØªØºØ·ÙØ©", -1)), _cache[7] || (_cache[7] = _createElementVNode("p", { class: "hint" }, "ÙØ°Ù اÙÙ Ø¯Ù Ù Ø¶Ø§ÙØ© ÙÙØ¬Ø±Ù Ø¨ÙØ§Ø¡ Ù ØØªÙØ§ÙØ§ اÙÙ ÙØ«Ù. Ø§ÙØªØÙا ÙØªØ±Ù ٠ا ÙÙ Ù ØªØ§Ø Ø§ÙØ¢Ù.", -1)), _createElementVNode("div", _hoisted_8, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(building, (x) => { 21261 return (_openBlock(), _createElementBlock("button", { 21262 class: "localCommunityPublicCard clickable", 21263 key: x.city_key, 21264 onClick: $event => (router.push('/city/'+x.city_key)) 21265 }, [_createElementVNode("span", _hoisted_10, [_createElementVNode("h4", null, _toDisplayString($cityLabel(x)), 1)]), _createElementVNode("span", _hoisted_11, _toDisplayString(x.province_ar||x.province_en), 1)], 8, _hoisted_9)) 21266 }), 128))])])) 21267 : _createCommentVNode("", true) 21268 ]), 21269 _: 1 21270 })) 21271 } 21272} 21273})()}; 21274 21275 const CityHubPage={components:{PublicFrame},setup(){const route=useRoute(),router=useRouter(),data=ref(null),loading=ref(true);async function load(){loading.value=true;const r=await api('/api/city-hubs/'+encodeURIComponent(route.params.city));data.value=r&&r.ok?r:null;loading.value=false;}function cityHeroStyle(h){return h&&h.hero_image_url?{backgroundImage:'linear-gradient(rgba(62,26,13,.34),rgba(124,27,16,.78)),url(\"'+h.hero_image_url+'\")'}:{}}onMounted(load);watch(()=>route.params.city,load);return{data,loading,router,cityHeroStyle};},render:(function(){ 21276const _Vue = Vue
21277const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 21278 21279const _hoisted_1 = { 21280 key: 0, 21281 class: "card loadingState" 21282} 21283const _hoisted_2 = { class: "adminEyebrow" } 21284const _hoisted_3 = { class: "dailyQuickRow" } 21285const _hoisted_4 = ["onClick"] 21286const _hoisted_5 = ["onClick"] 21287const _hoisted_6 = ["onClick"] 21288const _hoisted_7 = ["onClick"] 21289const _hoisted_8 = { class: "card" } 21290const _hoisted_9 = { class: "dailyList" } 21291const _hoisted_10 = ["onClick"] 21292const _hoisted_11 = { 21293 key: 0, 21294 class: "hint" 21295} 21296const _hoisted_12 = { 21297 key: 0, 21298 class: "infoBox cityCoverageNote" 21299} 21300const _hoisted_13 = { class: "hint" } 21301const _hoisted_14 = { 21302 key: 0, 21303 class: "card" 21304} 21305const _hoisted_15 = { class: "dailyList" } 21306const _hoisted_16 = ["onClick"] 21307 21308return function render(_ctx, _cache) { 21309 with (_ctx) { 21310 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, normalizeStyle: _normalizeStyle, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 21311 21312 const _component_PublicFrame = _resolveComponent("PublicFrame") 21313 21314 return (_openBlock(), _createBlock(_component_PublicFrame, { title: data&&data.hub?$cityLabel(data.hub):'Ù Ø±ÙØ² اÙ٠دÙÙØ©' }, { 21315 default: _withCtx(() => [loading 21316 ? (_openBlock(), _createElementBlock("section", _hoisted_1, "جار٠تØÙ Ù٠اÙ٠دÙÙØ©...")) 21317 : data 21318 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 21319 _createElementVNode("section", { 21320 class: "card dailyHero cityHubHero", 21321 style: _normalizeStyle(cityHeroStyle(data.hub)) 21322 }, [_createElementVNode("span", _hoisted_2, "SMT China · " + _toDisplayString(data.hub.province_ar), 1), _createElementVNode("h2", null, _toDisplayString($cityLabel(data.hub)), 1), _createElementVNode("p", null, _toDisplayString(data.hub.summary_ar), 1)], 4), 21323 _createElementVNode("section", _hoisted_3, [ 21324 _createElementVNode("button", { onClick: $event => (router.push('/new-to-china')) }, "ð§ Ø£Ùا Ø¬Ø¯ÙØ¯ ÙÙØ§", 8, _hoisted_4), 21325 _createElementVNode("button", { onClick: $event => (router.push('/services?city='+encodeURIComponent(data.hub.name_en))) }, "â Ø®Ø¯Ù ات Ù ÙØ«ÙÙØ©", 8, _hoisted_5), 21326 _createElementVNode("button", { onClick: $event => (router.push('/exhibitions?city='+encodeURIComponent(data.hub.name_en))) }, "ðï¸ Ø§Ù٠عارض", 8, _hoisted_6), 21327 _createElementVNode("button", { onClick: $event => (router.push('/toolkit')) }, "ð§° Ø£Ø¯ÙØ§Øª Ø§ÙØÙØ§Ø©", 8, _hoisted_7) 21328 ]), 21329 _createElementVNode("section", _hoisted_8, [_cache[2] || (_cache[2] = _createElementVNode("h3", null, "Ø£Ù٠اÙ٠عÙÙ٠ات ÙØ§Ùخد٠ات", -1)), _createElementVNode("div", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.guide, (x) => { 21330 return (_openBlock(), _createElementBlock("button", { 21331 key: x.id, 21332 onClick: $event => (router.push('/china-guide/'+x.id)) 21333 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.title_ar), 1), _createElementVNode("small", null, _toDisplayString(x.category_name_ar||'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ') + " · " + _toDisplayString(x.trust_tier==='official'?'رس٠Ù':(x.trust_tier==='smt_verified'?'Ù ÙØ«Ù Ù Ù SMT':'٠درج')), 1)]), _cache[0] || (_cache[0] = _createElementVNode("em", null, "â", -1))], 8, _hoisted_10)) 21334 }), 128)), (!data.guide.length) 21335 ? (_openBlock(), _createElementBlock("p", _hoisted_11, "ÙØ§ ØªÙØ¬Ø¯ ٠عÙÙ٠ات Ù ÙØ´Ùرة ÙÙØ°Ù اÙ٠دÙÙØ© بعد.")) 21336 : _createCommentVNode("", true)]), (data.coverage && data.coverage.missing_intents.length) 21337 ? (_openBlock(), _createElementBlock("div", _hoisted_12, [_cache[1] || (_cache[1] = _createElementVNode("b", null, "ÙÙØ¯ Ø§ÙØªØºØ·ÙØ©", -1)), _createElementVNode("p", _hoisted_13, "ت٠ت ØªØºØ·ÙØ© " + _toDisplayString(data.coverage.essential_covered) + " Ù Ù " + _toDisplayString(data.coverage.essential_total) + " Ù Ù Ø§ÙØ£ÙØ³Ø§Ù Ø§ÙØ£Ø³Ø§Ø³ÙØ© ÙÙØ°Ù اÙ٠دÙÙØ©. Ø§ÙØ£ÙØ³Ø§Ù Ø§ÙØªÙ ÙØ¬Ø±Ù Ø§ÙØ¹Ù ٠عÙÙÙØ§: " + _toDisplayString(data.coverage.intents.filter(i=>i.state==='empty').map(i=>i.label_ar).join('Ø ')) + ".", 1)])) 21338 : _createCommentVNode("", true)]), 21339 (data.exhibitions.length) 21340 ? (_openBlock(), _createElementBlock("section", _hoisted_14, [_cache[4] || (_cache[4] = _createElementVNode("h3", null, "٠عارض Ù
21340اد٠ة", -1)), _createElementVNode("div", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.exhibitions, (x) => { 21341 return (_openBlock(), _createElementBlock("button", { 21342 key: x.id, 21343 onClick: $event => (router.push('/china-guide/'+x.id)) 21344 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.title_ar), 1), _createElementVNode("small", null, _toDisplayString(x.exhibition_start_date||'Ø§ÙØªØ§Ø±ÙØ® ÙØØªØ§Ø¬ ٠راجعة'), 1)]), _cache[3] || (_cache[3] = _createElementVNode("em", null, "â", -1))], 8, _hoisted_16)) 21345 }), 128))])])) 21346 : _createCommentVNode("", true) 21347 ], 64)) 21348 : _createCommentVNode("", true)]), 21349 _: 1 21350 }, 8, ["title"])) 21351 } 21352} 21353})()}; 21354 21355 const NewToChinaPage={components:{PublicFrame},setup(){const store=useGzcStore(),router=useRouter(),type=ref('resident'),data=ref({steps:[],completed:0,total:0});const types=[['visitor','زائر'],['student','Ø·Ø§ÙØ¨'],['trader','تاجر'],['resident','Ù ÙÙÙ '],['exhibition','ÙØ§Ø¯Ù Ù٠عرض'],['business','Ø²ÙØ§Ø±Ø© ع٠Ù']];async function load(){if(!await store.requireMember(router,'/new-to-china'))return;const r=await api('/api/new-to-china?type='+encodeURIComponent(type.value));if(r&&r.ok)data.value=r;}async function toggle(x){const r=await api('/api/new-to-china/progress',{method:'POST',body:JSON.stringify({journey_type:type.value,step_key:x.key,completed:!x.completed})});store.state.msg=r.message||r.error||'';if(r.ok)load();}onMounted(load);watch(type,load);return{store,router,type,types,data,toggle};},render:(function(){ 21356const _Vue = Vue 21357const { createElementVNode: _createElementVNode } = _Vue 21358 21359const _hoisted_1 = { class: "card dailyHero" } 21360const _hoisted_2 = { class: "fieldLabel" } 21361const _hoisted_3 = ["onUpdate:modelValue"] 21362const _hoisted_4 = ["value"] 21363const _hoisted_5 = { class: "dailyProgress" } 21364const _hoisted_6 = { class: "journeySteps" } 21365const _hoisted_7 = ["onClick"] 21366const _hoisted_8 = ["onClick"] 21367 21368return function render(_ctx, _cache) { 21369 with (_ctx) { 21370 const { createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, vModelSelect: _vModelSelect, withDirectives: _withDirectives, normalizeStyle: _normalizeStyle, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 21371 21372 const _component_PublicFrame = _resolveComponent("PublicFrame") 21373 21374 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø£ÙØ§ Ø¬Ø¯ÙØ¯ ÙÙ Ø§ÙØµÙÙ" }, { 21375 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [ 21376 _cache[1] || (_cache[1] = _createElementVNode("span", { class: "adminEyebrow" }, "Smart Onboarding", -1)), 21377 _cache[2] || (_cache[2] = _createElementVNode("h2", null, "خطة ÙØµÙÙÙ ÙÙØµÙÙ", -1)), 21378 _createElementVNode("p", null, "اختر ÙÙØ¹ رØÙØªÙØ ÙØ£Ùجز Ø§ÙØ®Ø·Ùات ÙØ§ØØ¯Ø© ÙØ§ØØ¯Ø©. " + _toDisplayString(data.completed) + " / " + _toDisplayString(data.total), 1), 21379 _createElementVNode("label", _hoisted_2, [_cache[0] || (_cache[0] = _createElementVNode("span", null, "ÙÙØ¹ Ø§ÙØ±ØÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((type) = $event) }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(types, (t) => { 21380 return (_openBlock(), _createElementBlock("option", { 21381 key: t[0], 21382 value: t[0] 21383 }, _toDisplayString(t[1]), 9, _hoisted_4)) 21384 }), 128))], 8, _hoisted_3), [[_vModelSelect, type]])]), 21385 _createElementVNode("div", _hoisted_5, [_createElementVNode("i", { style: _normalizeStyle({width:(data.total?Math.round(data.completed*100/data.total):0)+'%'}) }, null, 4)]) 21386 ]), _createElementVNode("section", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.steps, (x, i) => { 21387 return (_openBlock(), _createElementBlock("article", { 21388 class: _normalizeClass(["card journeyStep", {done:x.completed}]), 21389 key: x.key 21390 }, [_createElementVNode("button", { 21391 class: "journeyCheck", 21392 onClick: $event => (toggle(x)) 21393 }, _toDisplayString(x.completed?'â':i+1), 9, _hoisted_7), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(x.title_ar), 1), _createElementVNode("p", null, _toDisplayString(x.summary_ar), 1), _createElementVNode("button", { 21394 class: "smallbtn secondary", 21395 onClick: $event => (router.push(x.action_url)) 21396 }, "ÙØªØ اÙ٠ساعدة", 8, _hoisted_8)])], 2)) 21397 }), 128))])]), 21398 _: 1 21399 })) 21400 } 21401} 21402})()}; 21403 21404 // Ask SMT voice input. Native MediaRecorder + Web Audio only (no third-party SDK): the clip is 21405 // uploaded to our server, transcribed there, and the text is placed in the box for review. 21406 const VOICE_MIME_CANDIDATES=['audio/webm;codecs=opus','audio/mp4;codecs=mp4a.40.2','audio/mp4','audio/ogg;
21406codecs=opus','audio/webm']; 21407 const VOICE_SILENCE_STOP_MS=1600,VOICE_NO_SPEECH_MS=7000,VOICE_MIN_SPEECH_MS=200; 21408 function voiceInputSupported(){try{return !!(window.isSecureContext&&navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia==='function'&&typeof window.MediaRecorder==='function');}catch(_){return false;}} 21409 function voiceMimeType(){try{return VOICE_MIME_CANDIDATES.find(type=>window.MediaRecorder.isTypeSupported&&window.MediaRecorder.isTypeSupported(type))||'';}catch(_){return '';}} 21410 function voiceExtension(type){const t=String(type||'');return t.includes('mp4')?'m4a':t.includes('ogg')?'ogg':'webm';} 21411 function voiceStartError(error){const name=String(error&&error.name||'');if(name==='NotAllowedError'||name==='SecurityError')return 'Ø§Ø³Ù Ø Ø¨Ø§Ø³ØªØ®Ø¯Ø§Ù Ø§ÙÙ ÙÙØ±ÙÙÙÙ ÙÙØ°Ø§ اÙÙ ÙÙØ¹ ٠٠إعدادات اÙÙ ØªØµÙØØ Ø«Ù Ø£Ø¹Ø¯ اÙÙ ØØ§ÙÙØ©.';if(name==='NotFoundError'||name==='OverconstrainedError')return 'ÙÙ ÙØ¬Ø¯ Ù ÙÙØ±ÙÙÙÙØ§Ù ÙÙ ÙØ°Ø§ Ø§ÙØ¬Ùاز.';if(name==='NotReadableError'||name==='AbortError')return 'اÙÙ ÙÙØ±ÙÙÙ٠٠ستخد٠Ù٠تطبÙ٠آخر. أغÙÙ٠ث٠أعد اÙÙ ØØ§ÙÙØ©.';return 'تعذر تشغÙ٠اÙÙ ÙÙØ±ÙÙÙÙ ÙÙ ÙØ°Ø§ اÙÙ ØªØµÙØ. Ø§ÙØªØ¨ سؤاÙÙ.';} 21412 function createVoiceInput({onText,maxChars}){ 21413 const voice=reactive({supported:voiceInputSupported(),enabled:false,state:'idle',level:0,seconds:0,maxSeconds:45,message:'',messageKind:''}); 21414 let stream=null,recorder=null,chunks=[],audioCtx=null,raf=0,tick=0,cancelled=false,startedAt=0,speechMs=0,lastVoiceAt=0,noiseFloor=0.01,lastFrame=0; 21415 // Every start/cancel bumps the generation; results from an older generation are released and ignored. 21416 let generation=0; 21417 function stopTracks(target){if(target){target.getTracks().forEach(track=>{try{track.stop();}catch(_){}});}} 21418 function setMessage(text,kind='info'){voice.message=text;voice.messageKind=kind;} 21419 function release(){if(raf)cancelAnimationFrame(raf);raf=0;if(tick)clearInterval(tick);tick=0;stopTracks(stream);stream=null;if(audioCtx){audioCtx.close().catch(()=>{});}audioCtx=null;voice.level=0;} 21420 function monitor(analyser){ 21421 const data=new Uint8Array(analyser.fftSize); 21422 const frame=now=>{ 21423 analyser.getByteTimeDomainData(data); 21424 let sum=0;for(let i=0;i<data.length;i++){const v=(data[i]-128)/128;sum+=v*v;} 21425 const rms=Math.sqrt(sum/data.length),elapsed=now-startedAt,dt=lastFrame?now-lastFrame:0;lastFrame=now; 21426 if(elapsed<400)noiseFloor=Math.max(0.004,noiseFloor*0.8+rms*0.2); 21427 const threshold=Math.max(0.02,noiseFloor*3); 21428 voice.level=Math.min(1,rms/(threshold*3)); 21429 if(rms>threshold){speechMs+=dt;lastVoiceAt=now;} 21430 if(speechMs<VOICE_MIN_SPEECH_MS&&elapsed>VOICE_NO_SPEECH_MS){cancel('ÙÙ ÙØ³Ù ع ØµÙØªØ§Ù. ØªØ£ÙØ¯ أ٠اÙÙ ÙÙØ±ÙÙÙÙ ÙØ¹Ù Ù ÙØªØØ¯Ø« Ø¨ÙØ¶ÙØ.');return;} 21431 if(speechMs>=VOICE_MIN_SPEECH_MS&&now-lastVoiceAt>VOICE_SILENCE_STOP_MS){stop();return;} 21432 raf=requestAnimationFrame(frame); 21433 }; 21434 raf=requestAnimationFrame(frame); 21435 } 21436 async function upload(blob,type,gen){ 21437 voice.state='processing';setMessage('جار٠تØÙÙÙ Ø§ÙØµÙت Ø¥ÙÙ ÙØµâ¦'); 21438 const form=new FormData();form.append('audio',blob,'clip.'+voiceExtension(type)); 21439 const r=await uploadApi('/api/ask-smt/transcribe',{body:form,uploadLabel:'جار٠تØÙÙÙ Ø§ÙØµÙت Ø¥ÙÙ ÙØµâ¦'}); 21440 if(gen!==generation)return; 21441 voice.state='idle'; 21442 if(!r||!r.ok||!r.text){setMessage((r&&r.message)||'تعذر تØÙÙÙ Ø§ÙØµÙت Ø¥ÙÙ ÙØµ. أعد اÙÙ ØØ§ÙÙØ© Ø£Ù Ø§ÙØªØ¨ سؤاÙÙ.','error');return;} 21443 onText(String(r.text).slice(0,maxChars()));setMessage('ت٠تØÙÙÙ ÙÙØ§Ù ٠إÙÙ ÙØµ.','success'); 21444 } 21445 async function start(){ 21446 if(voice.state!=='idle'||!voice.supported||!voice.enabled)return; 21447 const gen=++generation; 21448 voice.state='starting';setMessage('');cancelled=false;chunks=[];speechMs=0;lastVoiceAt=0;noiseFloor=0.01;lastFrame=0; 21449 let acquired;
21450 try{acquired=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:true,noiseSuppression:true,autoGainControl:true}});} 21451 catch(error){if(gen!==generation)return;voice.state='idle';release();setMessage(voiceStartError(error),'error');return;} 21452 if(gen!==generation||cancelled){stopTracks(acquired);return;} 21453 stream=acquired; 21454 const mimeType=voiceMimeType(); 21455 try{recorder=new MediaRecorder(stream,mimeType?{mimeType,audioBitsPerSecond:32000}:{audioBitsPerSecond:32000});} 21456 catch(_){release();voice.state='idle';setMessage('ÙØ°Ø§ اÙÙ ØªØµÙØ ÙØ§ ÙØ¯Ø¹Ù تسجÙÙ Ø§ÙØµÙت. Ø§ÙØªØ¨ سؤاÙÙ.','error');return;} 21457 recorder.ondataavailable=event=>{if(event.data&&event.data.size)chunks.push(event.data);}; 21458 const ownRecorder=recorder; 21459 recorder.onstop=()=>{const type=ownRecorder.mimeType||mimeType||'audio/webm';if(recorder===ownRecorder)recorder=null;if(gen!==generation)return;release(); 21460 if(cancelled){voice.state='idle';return;} 21461 const blob=new Blob(chunks,{type});chunks=[]; 21462 if(blob.size<1024||speechMs<VOICE_MIN_SPEECH_MS){voice.state='idle';setMessage('Ø§ÙØªØ³Ø¬ÙÙ ÙØµÙر جداÙ. اضغط اÙÙ ÙÙØ±ÙÙÙÙ ÙØªØØ¯Ø« Ø¨ÙØ¶ÙØ.','error');return;} 21463 upload(blob,type,gen).catch(()=>{if(gen!==generation)return;voice.state='idle';setMessage('تعذر Ø¥Ø±Ø³Ø§Ù Ø§ÙØªØ³Ø¬ÙÙ. أعد اÙÙ ØØ§ÙÙØ©.','error');});};
21464 try{const Ctx=window.AudioContext||window.webkitAudioContext;if(Ctx){audioCtx=new Ctx(); 21465 // iOS can leave resume() pending; never let it block recording. 21466 if(audioCtx.state==='suspended')await Promise.race([audioCtx.resume().catch(()=>{}),new Promise(done=>setTimeout(done,800))]); 21467 if(gen!==generation){return;} 21468 const analyser=audioCtx.createAnalyser();analyser.fftSize=1024;audioCtx.createMediaStreamSource(stream).connect(analyser);startedAt=performance.now(); 21469 if(audioCtx.state==='running')monitor(analyser);else speechMs=VOICE_MIN_SPEECH_MS;}} 21470 catch(_){if(gen!==generation)return;speechMs=VOICE_MIN_SPEECH_MS;} 21471 if(gen!==generation)return; 21472 try{recorder.start(250);}catch(_){release();recorder=null;voice.state='idle';setMessage('تعذر بدء Ø§ÙØªØ³Ø¬ÙÙ. أعد اÙÙ ØØ§ÙÙØ©.','error');return;}voice.state='recording';voice.seconds=0;setMessage('ØªØØ¯Ø« Ø§ÙØ¢Ùâ¦ Ø³ÙØªÙÙÙ Ø§ÙØªØ³Ø¬Ù٠تÙÙØ§Ø¦ÙØ§Ù Ø¹ÙØ¯ سÙÙØªÙ.'); 21473 if(navigator.vibrate){try{navigator.vibrate(12);}catch(_){}} 21474 const began=Date.now();tick=setInterval(()=>{voice.seconds=Math.floor((Date.now()-began)/1000);if(voice.seconds>=voice.maxSeconds)stop();},250); 21475 } 21476 function stop(){if(recorder&&recorder.state!=='inactive'){try{recorder.stop();}catch(_){release();voice.state='idle';}}} 21477 function cancel(message){generation++;cancelled=true;const active=recorder;recorder=null;if(active&&active.state!=='inactive'){try{active.stop();}catch(_){}}release();chunks=[];voice.state='idle';if(message)setMessage(message,'error');else setMessage('');} 21478 function toggle(){if(voice.state==='recording')stop();else if(voice.state==='idle')start();} 21479 async function load(){if(!voice.supported)return;const r=await api('/api/ask-smt/voice',{feedback:false});voice.enabled=!!(r&&r.ok&&r.enabled);if(r&&r.max_seconds)voice.maxSeconds=Math.min(60,Math.max(10,Number(r.max_seconds)-5));} 21480 const onHidden=()=>{if(document.visibilityState==='hidden'&&(voice.state==='recording'||voice.state==='starting'))cancel('تÙÙÙ Ø§ÙØªØ³Ø¬ÙÙ ÙØ£Ù Ø§ÙØµÙØØ© Ù٠تعد Ø¸Ø§ÙØ±Ø©.');}; 21481 document.addEventListener('visibilitychange',onHidden); 21482 onUnmounted(()=>{document.removeEventListener('visibilitychange',onHidden);cancel();}); 21483 return {voice,start,stop,cancel,toggle,load}; 21484 } 21485 const AskVoiceControl={props:['voice','busy'],emits:['toggle','cancel'],setup(props){ 21486 // Five meter bars, taller in the middle, driven by the live input level. 21487 function barStyle(n){const height=Math.max(0.18,Math.min(1,props.voice.level*(1.25-Math.abs(3-n)*0.22)));return {transform:`scaleY(${height.toFixed(3)})`};} 21488 return {barStyle}; 21489 },render:(function(){ 21490const _Vue = Vue 21491const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 21492 21493const _hoisted_1 = ["disabled", "aria-pressed", "aria-label", "onClick"] 21494const _hoisted_2 = { 21495 key: 0, 21496 class: "askVoiceSpinner", 21497 "aria-hidden": "true" 21498} 21499const _hoisted_3 = { 21500 key: 1, 21501 viewBox: "0 0 24 24", 21502 "aria-hidden": "true" 21503} 21504const _hoisted_4 = { 21505 key: 2, 21506 viewBox: "0 0 24 24", 21507 "aria-hidden": "true" 21508} 21509const _hoisted_5 = { class: "askVoiceLabel" } 21510const _hoisted_6 = { 21511 key: 0, 21512 class: "askVoiceMeter", 21513 "aria-hidden": "true" 21514} 21515const _hoisted_7 = ["onClick"] 21516 21517return function render(_ctx, _cache) { 21518 with (_ctx) { 21519 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, normalizeStyle: _normalizeStyle, normalizeClass: _normalizeClass } = _Vue 21520 21521 return (_openBlock(), _createElementBlock(_Fragment, null, [(voice.supported&&voice.enabled) 21522 ? (_openBlock(), _createElementBlock("div", { 21523 key: 0, 21524 class: _normalizeClass(["askVoiceControl", 'is-'+voice.state]) 21525 }, [_createElementVNode("button", { 21526 type: "button", 21527 class: "askVoiceButton", 21528 disabled: busy||voice.state==='starting'||voice.state==='processing', 21529 "aria-pressed": voice.state==='recording'?'true':'false', 21530 "aria-label": voice.state==='recording'?'Ø¥ÙÙØ§Ù Ø§ÙØªØ³Ø¬ÙÙ':'ØªØØ¯Ø« بد٠اÙÙØªØ§Ø¨Ø©', 21531 onClick: $event => ($emit('toggle')) 21532 }, [(voice.state==='processing'||voice.state==='starting') 21533 ? (_openBlock(), _createElementBlock("span", _hoisted_2)) 21534 : (voice.state==='recording') 21535 ? (_openBlock(), _createElementBlock("svg", _hoisted_3, _cache[0] || (_cache[0] = [_createElementVNode("rect", { 21536 x: "7", 21537 y: "7", 21538 width: "10", 21539 height: "10", 21540 rx: "2" 21541 }, null, -1)]))) 21542 : (_openBlock(), _createElementBlock("svg", _hoisted_4, _cache[1] || (_cache[1] = [_createElementVNode("path", { d: "M12 15a3.5 3.5 0 0 0 3.5-3.5v-5a3.5 3.5 0 1 0-7 0v5A3.5 3.5 0 0 0 12 15Zm6-3.5a1 1 0 1 0-2 0 4 4 0 0 1-8 0 1 1 0 1 0-2 0 6 6 0 0 0 5 5.91V20H9a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-2v-2.59a6 6 0 0 0 5-5.91Z" }, null, -1)]))), _createElementVNode("span", _hoisted_5, _toDisplayString(voice.state==='recording'?('Ø¥ÙÙØ§Ù · '+voice.seconds+'Ø«'):voice.state==='processing'?'Ø¬Ø§Ø±Ù Ø§ÙØªØÙÙÙâ¦':voice.state==='starting'?'Ø¬Ø§Ø±Ù Ø§ÙØªØ´ØºÙÙâ¦':'ØªØØ¯Ø«'), 1)], 8, _hoisted_1), (voice.state==='recording') 21543 ? (_openBlock(), _createElementBlock("span", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(5, (n) => { 21544 return (_openBlock(), _createElementBlock("i", { 21545 key: n, 21546 style: _normalizeStyle(barStyle(n)) 21547 }, null, 4)) 21548 }), 128))])) 21549 : _createCommentVNode("", true), (voice.state==='recording'||voice.state==='starting') 21550 ? (_openBlock(), _createElementBlock("button", { 21551 key: 1, 21552 type: "button", 21553 class: "askVoiceCancel", 21554 "aria-label": "Ø¥ÙØºØ§Ø¡ Ø§ÙØªØ³Ø¬ÙÙ", 21555 onClick: $event => ($emit('cancel')) 21556 }, "Ø¥ÙØºØ§Ø¡", 8, _hoisted_7)) 21557 : _createCommentVNode("", true)], 2)) 21558 : _createCommentVNode("", true), (voice.supported&&voice.enabled) 21559 ? (_openBlock(), _createElementBlock("p", { 21560 key: 1, 21561 class: _normalizeClass(['askVoiceStatus','is-'+(voice.messageKind||'info'),{isEmpty:!voice.message}]), 21562 role: "status", 21563 "aria-live": "polite" 21564 }, _toDisplayString(voice.message), 3)) 21565 : _createCommentVNode("", true)], 64)) 21566 } 21567} 21568})()}; 21569 // BEGIN step-guidance (pure: no DOM, no network; tested in frontend/tests/step-guidance.test.js) 21570 const StepGuidance=(function(){ 21571 const PI=Math.PI,AXIS=6378245.0,ECC=0.00669342162296594323; 21572 function outOfChina(lng,lat){return lng<72.004||lng>137.8347||lat<0.8293||lat>55.8271;} 21573 function tLat(x,y){let r=-100+2*x+3*y+0.2*y*y+0.1*x*y+0.2*Math.sqrt(Math.abs(x));
21573r+=(20*Math.sin(6*x*PI)+20*Math.sin(2*x*PI))*2/3;r+=(20*Math.sin(y*PI)+40*Math.sin(y/3*PI))*2/3;r+=(160*Math.sin(y/12*PI)+320*Math.sin(y*PI/30))*2/3;return r;} 21574 function tLng(x,y){let r=300+x+2*y+0.1*x*x+0.1*x*y+0.1*Math.sqrt(Math.abs(x));r+=(20*Math.sin(6*x*PI)+20*Math.sin(2*x*PI))*2/3;r+=(20*Math.sin(x*PI)+40*Math.sin(x/3*PI))*2/3;r+=(150*Math.sin(x/12*PI)+300*Math.sin(x/30*PI))*2/3;return r;} 21575 // Phone GPS is WGS-84; AMap is GCJ-02. Standard public offset formula, applied on the device only. 21576 function wgs84ToGcj02(lng,lat){ 21577 if(!Number.isFinite(lng)||!Number.isFinite(lat))return null; 21578 if(outOfChina(lng,lat))return {longitude:lng,latitude:lat}; 21579 let dLat=tLat(lng-105,lat-35),dLng=tLng(lng-105,lat-35); 21580 const radLat=lat/180*PI;let magic=Math.sin(radLat);magic=1-ECC*magic*magic;const sqrtMagic=Math.sqrt(magic); 21581 dLat=(dLat*180)/((AXIS*(1-ECC))/(magic*sqrtMagic)*PI);dLng=(dLng*180)/(AXIS/sqrtMagic*Math.cos(radLat)*PI); 21582 return {longitude:lng+dLng,latitude:lat+dLat}; 21583 } 21584 function distanceMeters(a,b){ 21585 const toRad=x=>x*PI/180,dLat=toRad(b.latitude-a.latitude),dLng=toRad(b.longitude-a.longitude); 21586 const h=Math.sin(dLat/2)**2+Math.cos(toRad(a.latitude))*Math.cos(toRad(b.latitude))*Math.sin(dLng/2)**2; 21587 return 2*6371000*Math.asin(Math.min(1,Math.sqrt(h))); 21588 } 21589 // pre = announce the manoeuvre, done = step finished, off = distance beyond the step's own length that means "left the route" 21590 const PROFILES={walking:{pre:60,done:20,off:120,accuracy:70},bicycling:{pre:100,done:25,off:200,accuracy:70},electric_bicycle:{pre:100,done:25,off:200,accuracy:70},driving:{pre:300,done:40,off:400,accuracy:90},transit:{pre:60,done:20,off:150,accuracy:70},ride:{pre:400,done:120,off:600,accuracy:100}}; 21591 const isRide=step=>step&&(step.type==='transit'||step.type==='railway'); 21592 function profileFor(step,mode){return isRide(step)?PROFILES.ride:(PROFILES[mode]||PROFILES.walking);} 21593 function createTracker(steps,options){ 21594 const mode=String(options&&options.mode||'walking'); 21595 const list=(Array.isArray(steps)?steps:[]).map((step,index)=>({index,type:String(step&&step.type||''),approach:String(step&&step.approach||''),end:step&&step.end&&Number.isFinite(step.end.longitude)&&Number.isFinite(step.end.latitude)?step.end:null,distance:Number(step&&step.distance)||0})); 21596 const approached=new Set(),done=new Set(); 21597 let index=0,off=0,offSince=0,offSent=false,started=false; 21598 function advance(events,from,to){ 21599 for(let i=from;i<=to;i++){done.add(i);events.push({type:'complete',index:i});} 21600 index=to+1;off=0;offSince=0;offSent=false; 21601 if(index>=list.length)events.push({type:'arrived',index:list.length-1});else events.push({type:'next',index}); 21602 } 21603 return { 21604 get index(){return index;},done:()=>Array.from(done),size:()=>list.length, 21605 start(){if(started||!list.length)return [];started=true;return [{type:'start',index:0,total:list.length}];}, 21606 manualDone(i){if(i!==index||index>=list.length)return [];const events=[];advance(events,i,i);return events;}, 21607 update(fix){ 21608 if(!started||index>=list.length||!fix||!Number.isFinite(fix.longitude)||!Number.isFinite(fix.latitude))return []; 21609 const current=list[index],profile=profileFor(current,mode); 21610 if(Number(fix.accuracy)>profile.accuracy)return []; 21611 const events=[]; 21612 // jumped ahead (shortcut / missed announcement): finish every step up to the nearest reached end 21613 for(let j=Math.min(list.length-1,index+2);j>index;j--){ 21614 const ahead=list[j]; 21615 if(ahead.end&&distanceMeters(fix,ahead.end)<=profileFor(ahead,mode).done){advance(events,index,j);return events;} 21616 } 21617 if(!current.end){ 21618 // no coordinates for this step (e.g. the walking fallback): finish it once the NEXT step's end is near 21619 const following=list[index+1]; 21620 if(following&&following.end&&distanceMeters(fix,following.end)<=profileFor(following,mode).pre){advance(events,index,index);} 21621 return events; 21622 } 21623 const d=distanceMeters(fix,current.end); 21624 if(d<=profile.done){advance(events,index,index);return events;} 21625 if(d<=profile.pre&&!approached.has(index)){approached.add(index);events.push({type:'approach',index,distance:Math.round(d)});} 21626 if(current.distance&&d>current.distance+profile.off){ 21627 const now=Number(fix.time)||0;if(!off)offSince=now;off++; 21628 if(off>=3&&(!now||now-offSince>=10000)&&!offSent){offSent=true;events.push({type:'off_route',index});} 21629 }else{off=0;
21629offSince=0;if(offSent&¤t.distance&&d<current.distance+profile.off/2)offSent=false;} 21630 return events; 21631 } 21632 }; 21633 } 21634 function messageFor(event,steps){ 21635 const text=i=>String(steps&&steps[i]&&steps[i].instruction||''); 21636 if(event.type==='start')return 'بدأ Ø§ÙØªÙجÙÙ. Ø§ÙØ®Ø·ÙØ© 1: '+text(0); 21637 if(event.type==='approach')return (steps&&steps[event.index]&&steps[event.index].approach)||('بعد '+event.distance+' ٠تر: '+text(event.index)); 21638 if(event.type==='complete')return 'Ø§ÙØªÙ ÙØª Ø§ÙØ®Ø·ÙØ© '+(event.index+1); 21639 if(event.type==='next')return 'Ø§ÙØ®Ø·ÙØ© Ø§ÙØªØ§ÙÙØ©: '+text(event.index); 21640 if(event.type==='arrived')return 'ÙØµÙت Ø¥ÙÙ ÙØ¬ÙتÙ'; 21641 if(event.type==='off_route')return 'ÙØ¨Ø¯Ù Ø£Ù٠ابتعدت ع٠اÙ٠سار. أعد ØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ'; 21642 return ''; 21643 } 21644 return {wgs84ToGcj02,distanceMeters,createTracker,messageFor,PROFILES}; 21645 })(); 21646 // END step-guidance 21647 const AskSmtPage={components:{PublicFrame,AskVoiceControl},setup(){ 21648 const store=useGzcStore(),router=useRouter(),route=useRoute(); 21649 const mode=ref(String(route.query&&route.query.mode||'')==='route'?'route':'ask'); 21650 const question=ref(String(route.query&&route.query.q||'').slice(0,1000)),answer=ref(null),questionInput=ref(null); 21651 const navLoading=ref(false),navError=ref(''),navCandidates=ref([]),navAmbiguityToken=ref(''),navDestination=ref(null),navResolutionToken=ref(''),manualMode=ref(false),manualQuery=ref(''),manualCandidates=ref([]),manualAmbiguityToken=ref(''),routeResult=ref(null),selectedRoute=ref(null),routeDetailLoading=ref(false),locationState=ref('idle'),assistMode=ref(''),assistCopyState=ref(''),navNearby=ref([]),navNearbyAvailable=ref(false),navExpanding=ref(false); 21652 // After a voice transcription the search starts by itself 1.5 s later (like AMap); any edit, mode change or the cancel button stops it. 21653 const voiceAuto=reactive({pending:false});let voiceAutoTimer=null,voiceAutoText=''; 21654 function cancelVoiceSearch(){if(voiceAutoTimer)clearTimeout(voiceAutoTimer);voiceAutoTimer=null;voiceAuto.pending=false;} 21655 function scheduleVoiceSearch(){ 21656 cancelVoiceSearch();voiceAutoText=question.value; 21657 if(question.value.trim().length<(mode.value==='route'?2:3))return; 21658 voiceAuto.pending=true; 21659 voiceAutoTimer=setTimeout(()=>{voiceAutoTimer=null;if(!voiceAuto.pending)return;voiceAuto.pending=false;if(question.value!==voiceAutoText)return;if(mode.value==='route')resolveDestination();else ask();},1500); 21660 } 21661 const voiceInput=createVoiceInput({maxChars:()=>mode.value==='route'?240:1000,onText:text=>{const current=question.value.trim();question.value=(current?current+' '+text:text).slice(0,mode.value==='route'?240:1000);nextTick(()=>{const el=questionInput.value;if(el){el.focus();try{el.setSelectionRange(el.value.length,el.value.length);}catch(_){}}scheduleVoiceSearch();});}}); 21662 watch(question,value=>{if(voiceAuto.pending&&value!==voiceAutoText)cancelVoiceSearch();}); 21663 function toggleVoice(){cancelVoiceSearch();
21663voiceInput.toggle();} 21664 onUnmounted(cancelVoiceSearch); 21665 const voice=voiceInput.voice; 21666 // Autocomplete: local suggestions first (instant), Amap Input Tips merged a moment later. 21667 const suggest=reactive({items:[],open:false,active:-1,enabled:true}); 21668 let suggestTimer=0,suggestSeq=0,suppressSuggest=false,composerFocused=false; 21669 function closeSuggest(){suggest.open=false;suggest.active=-1;} 21670 function showSuggest(){suggest.open=composerFocused&&suggest.items.length>0;} 21671 async function fetchSuggest(text,seq){ 21672 const local=await api('/api/ask-smt/suggest?source=local&q='+encodeURIComponent(text),{feedback:false}); 21673 if(seq!==suggestSeq)return; 21674 if(!local||!local.ok){suggest.items=[];closeSuggest();return;} 21675 if(local.enabled===false){suggest.enabled=false;suggest.items=[];closeSuggest();return;} 21676 suggest.items=safeArray(local.suggestions);suggest.active=-1;showSuggest(); 21677 if(!local.amap_eligible)return; 21678 const remote=await api('/api/ask-smt/suggest?source=amap&q='+encodeURIComponent(text),{feedback:false}); 21679 if(seq!==suggestSeq||!remote||!remote.ok)return; 21680 const seen=new Set(suggest.items.map(item=>item.value)); 21681 suggest.items=[...suggest.items,...safeArray(remote.suggestions).filter(item=>!seen.has(item.value))].slice(0,8);showSuggest(); 21682 } 21683 watch(question,value=>{ 21684 if(suppressSuggest){suppressSuggest=false;return;} 21685 clearTimeout(suggestTimer); 21686 const text=String(value||'').trim(); 21687 if(!suggest.enabled||!composerFocused||text.length<2||text.length>60){suggestSeq++;suggest.items=[];closeSuggest();return;} 21688 const seq=++suggestSeq; 21689 suggestTimer=setTimeout(()=>{fetchSuggest(text,seq).catch(()=>{});},220); 21690 }); 21691 function pickSuggestion(item){ 21692 if(!item)return;suggestSeq++; 21693 const next=String(item.value||'').slice(0,mode.value==='route'?240:1000); 21694 suppressSuggest=next!==question.value;question.value=next;suggest.items=[];closeSuggest(); 21695 nextTick(()=>{const el=questionInput.value;if(el){el.focus();try{el.setSelectionRange(el.value.length,el.value.length);}catch(_){}}}); 21696 } 21697 function onComposerKeydown(event){ 21698 if(!suggest.open||!suggest.items.length)return; 21699 const count=suggest.items.length; 21700 if(event.key==='ArrowDown'){event.preventDefault();suggest.active=(suggest.active+1)%count;} 21701 else if(event.key==='ArrowUp'){event.preventDefault();suggest.active=(suggest.active-1+count)%count;} 21702 else if(event.key==='Enter'&&suggest.active>=0){event.preventDefault();pickSuggestion(suggest.items[suggest.active]);} 21703 else if(event.key==='Escape'){event.preventDefault();closeSuggest();} 21704 } 21705 function onComposerFocus(){composerFocused=true;showSuggest();} 21706 function onComposerBlur(){composerFocused=false;setTimeout(()=>{if(!composerFocused)closeSuggest();},150);} 21707 onUnmounted(()=>clearTimeout(suggestTimer)); 21708 onMounted(()=>{voiceInput.load().catch(()=>{});}); 21709 function closeAssistMode(){assistMode.value='';assistCopyState.value='';} 21710 function resetNavigation(keepQuery=true){stopGuidance();navError.value='';navCandidates.value=[];navNearby.value=[];navNearbyAvailable.value=false;navExpanding.value=false;navAmbiguityToken.value='';navDestination.value=null;navResolutionToken.value='';manualMode.value=false;manualQuery.value='';manualCandidates.value=[];manualAmbiguityToken.value='';routeResult.value=null;selectedRoute.value=null;routeDetailLoading.value=false;locationState.value='idle';closeAssistMode();if(!keepQuery)question.value='';} 21711 function switchMode(value){cancelVoiceSearch();voiceInput.cancel();suggestSeq++;suggest.items=[];closeSuggest();mode.value=value;answer.value=null;resetNavigation(true);nextTick(()=>{if(questionInput.value)questionInput.value.focus();});} 21712 async function ask(){if(!await store.requireMember(router,'/ask'))return;if(question.value.trim().length<3){store.state.msg='Ø§ÙØªØ¨ سؤاÙ٠بشÙÙ Ø£ÙØ¶Ø';return;}store.state.busy=true;answer.value=await api('/api/ask-smt',{method:'POST',body:JSON.stringify({question:question.value})});store.state.busy=false;} 21713 async function resolveDestination(){if(!await store.requireMember(router,'/ask?mode=route'))return;const query=question.value.trim();if(query.length<2){store.state.msg='Ø§ÙØªØ¨ اس٠اÙÙØ¬ÙØ© Ø¨ØµÙØ±Ø© Ø£ÙØ¶Ø';return;}
21713navLoading.value=true;navError.value='';navCandidates.value=[];navNearby.value=[];navNearbyAvailable.value=false;routeResult.value=null;selectedRoute.value=null;const r=await api('/api/map/resolve-destination',{method:'POST',body:JSON.stringify({query})});navLoading.value=false;if(!r||!r.ok){navError.value=(r&&r.message)||'تعذر Ø§ÙØ¨ØØ« ع٠اÙÙØ¬ÙØ©. أعد اÙÙ ØØ§ÙÙØ©.';return;}navNearbyAvailable.value=r.nearby_available===true;if(r.status==='resolved'&&r.target&&r.resolution_token){navDestination.value=r.target;navResolutionToken.value=r.resolution_token;return;}if(r.status==='ambiguous'||r.status==='needs_selection'){navCandidates.value=safeArray(r.candidates);navAmbiguityToken.value=String(r.ambiguity_token||'');return;}navError.value=r.resolver==='v2'?(r.message||'ÙÙ ÙØ¬Ø¯ ÙØ°Ù اÙÙØ¬ÙØ©'):'Ù٠أجد Ù ÙØ§ÙØ§Ù Ù Ø·Ø§Ø¨ÙØ§Ù. Ø§ÙØªØ¨ Ø§ÙØ§Ø³Ù Ø§ÙØµÙÙ٠أ٠أض٠اس٠اÙ٠دÙÙØ©.';} 21714 async function expandDestinationSearch(){const query=question.value.trim();if(query.length<2||navExpanding.value)return;navExpanding.value=true;const r=await api('/api/map/resolve-destination',{method:'POST',body:JSON.stringify({query,expand:true})});navExpanding.value=false;if(!r||!r.ok){navError.value=(r&&r.message)||'تعذر ØªÙØ³Ùع Ø§ÙØ¨ØØ« Ø§ÙØ¢Ù.';return;}navNearby.value=safeArray(r.nearby);if(!navNearby.value.length)navError.value='ÙØ§ ØªÙØ¬Ø¯ أ٠اÙÙ ÙØ±Ùبة Ù Ø³Ø¬ÙØ© Ù٠دÙÙÙ SMT China ÙÙØ°Ù اÙ٠دÙÙØ©.';} 21715 async function confirmDestination(candidate){if(!candidate||!navAmbiguityToken.value)return;navLoading.value=true;navError.value='';const r=await api('/api/map/resolve-destination/confirm',{method:'POST',body:JSON.stringify({ambiguity_token:navAmbiguityToken.value,candidate_id:candidate.candidate_id})});navLoading.value=false;if(!r||!r.ok){navError.value=(r&&r.message)||'تعذر تأÙÙØ¯ اÙÙØ¬ÙØ©. Ø§Ø¨ØØ« عÙÙØ§ ٠رة أخرÙ.';return;}navDestination.value=r.target;navResolutionToken.value=r.resolution_token;navCandidates.value=[];navAmbiguityToken.value='';} 21716 async function calculateRoutes(origin,locationConsent=false){if(!navResolutionToken.value)return;navLoading.value=true;navError.value='';routeResult.value=null;selectedRoute.value=null;const r=await api('/api/map/routes',{method:'POST',body:JSON.stringify({resolution_token:navResolutionToken.value,location_consent:locationConsent,origin})});navLoading.value=false;locationState.value='idle';if(!r||!r.ok){navError.value=(r&&r.message)||'ØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ ØºÙØ± Ù ØªØ§Ø Ù Ø¤ÙØªØ§Ù. ÙÙ ÙÙÙ ÙØªØ اÙÙØ¬ÙØ© ÙÙ AMap.';return;}routeResult.value=r;manualMode.value=false;manualCandidates.value=[];} 21717 function useCurrentLocation(){navError.value='';if(!navigator.geolocation){navError.value='اÙÙ ÙÙØ¹ ØºÙØ± Ù ØªØ§Ø Ø¹ÙÙ ÙØ°Ø§ Ø§ÙØ¬Ùاز. اختر ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ© ÙØ¯ÙÙØ§Ù.';manualMode.value=true;return;}locationState.value='requesting';navigator.geolocation.getCurrentPosition(position=>{calculateRoutes({longitude:position.coords.longitude,latitude:position.coords.latitude,coordinate_system:'WGS84',source:'current_location'},true);},error=>{locationState.value='idle';manualMode.value=true;navError.value=error&&error.code===1?'ØªØ¹Ø°ÙØ± استخدا٠٠ÙÙØ¹Ù. اختر ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ© ÙØ¯ÙÙØ§Ù.':'ØªØ¹Ø°ÙØ± ØªØØ¯Ùد Ù ÙÙØ¹Ù Ø§ÙØ¢Ù. اختر ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ© ÙØ¯ÙÙØ§Ù.';},{enableHighAccuracy:true,timeout:10000,maximumAge:30000});} 21718 async function resolveManualOrigin(){const query=manualQuery.value.trim();if(query.length<2){store.state.msg='Ø§ÙØªØ¨ اس٠ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ© Ø¨ØµÙØ±Ø© Ø£ÙØ¶Ø';return;}
21718navLoading.value=true;navError.value='';manualCandidates.value=[];const r=await api('/api/map/resolve-destination',{method:'POST',body:JSON.stringify({query,purpose:'origin'})});navLoading.value=false;if(!r||!r.ok){navError.value=(r&&r.message)||'تعذر Ø§ÙØ¨ØØ« ع٠ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ©.';return;}if(r.status==='resolved'&&r.target){return calculateRoutes({longitude:r.target.longitude,latitude:r.target.latitude,coordinate_system:r.target.coordinate_system,source:'amap',citycode:r.target.citycode||null},false);}if(r.status==='ambiguous'){manualCandidates.value=safeArray(r.candidates);manualAmbiguityToken.value=String(r.ambiguity_token||'');return;}navError.value='Ù٠أجد ÙÙØ·Ø© Ø¨Ø¯Ø§ÙØ© Ù Ø·Ø§Ø¨ÙØ©. Ø§ÙØªØ¨ Ø§ÙØ§Ø³Ù Ø§ÙØµÙÙ٠أ٠أض٠اس٠اÙ٠دÙÙØ©.';} 21719 async function confirmManualOrigin(candidate){if(!candidate||!manualAmbiguityToken.value)return;navLoading.value=true;navError.value='';const r=await api('/api/map/resolve-destination/confirm',{method:'POST',body:JSON.stringify({ambiguity_token:manualAmbiguityToken.value,candidate_id:candidate.candidate_id})});navLoading.value=false;if(!r||!r.ok){navError.value=(r&&r.message)||'تعذر تأÙÙØ¯ ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ©.';return;}manualCandidates.value=[];manualAmbiguityToken.value='';return calculateRoutes({longitude:r.target.longitude,latitude:r.target.latitude,coordinate_system:r.target.coordinate_system,source:'amap',citycode:r.target.citycode||null},false);} 21720 function improveQuestion(){if(questionInput.value)questionInput.value.focus();}
21721 function openEvidence(x){if(!x)return;if(x.kind==='circular'){router.push('/official-circulars');return;}if(x.kind==='guide'){router.push('/china-guide/'+x.id);return;}const u=safeExternalHttpUrl(x.source_url);if(x.kind==='amap'){openAmapAppPlace(x,message=>{store.state.msg=message;});return;}if(u)window.open(u,'_blank','noopener');} 21722 function openImageSource(x){const u=safeExternalHttpUrl(x&&x.source_url);if(u)window.open(u,'_blank','noopener');} 21723 function openPlaceSuggestion(x){if(x&&x.kind==='guide'){router.push('/china-guide/'+x.id);return;}openAmapAppPlace(x,message=>{store.state.msg=message;});} 21724 async function submitPlaceSuggestion(x){const token=answer.value&&answer.value.place_confirmation&&answer.value.place_confirmation.review_token;if(!x||x.kind!=='amap'||!token)return;const r=await api('/api/ask-smt/place-suggestion',{method:'POST',body:JSON.stringify({review_token:token,candidate_id:x.id})});store.state.msg=r&&r.message||'ØªØ¹Ø°ÙØ± إرسا٠اÙÙ ÙØ§Ù ÙÙ٠راجعة.';if(r&&r.ok)answer.value.place_confirmation.review_token='';} 21725 function sourceLabel(x){if(!x)return'';if(x.kind==='amap')return'٠عÙÙÙ Ø© Ù Ù Ø®Ø±ÙØ·Ø© AMap';if(x.kind==='circular')return'٠صدر رس٠Ù';if(x.kind==='guide')return x.trust_tier==='official'?'SMT · رس٠Ù':'SMT · Ù ÙØ«Ù';return x.source_name||'٠صدر';} 21726 function imageSourceLabel(x){return String(x&&x.source_name||'٠صدر Ø§ÙØµÙرة');} 21727 function candidateName(x){return String(x&&x.name_ar||x&&x.name_zh||'Ù ÙØ§Ù');} 21728 function modeLabel(value){return ({transit:'اÙÙ ÙØ§ØµÙات Ø§ÙØ¹Ø§Ù Ø©',driving:'Ø³ÙØ§Ø±Ø© Ø£Ù ØªØ§ÙØ³Ù',walking:'اÙÙ Ø´Ù',bicycling:'دراجة',electric_bicycle:'دراجة ÙÙØ±Ø¨Ø§Ø¦ÙØ©'}[String(value||'')])||'طرÙÙØ© ÙØµÙÙ';} 21729 function modeIcon(value){return ({transit:'ð',driving:'ð',walking:'ð¶',bicycling:'ð²',electric_bicycle:'ðµ'}[String(value||'')])||'ð';} 21730 function durationLabel(seconds){const minutes=Math.max(1,Math.round(Number(seconds||0)/60));if(minutes<60)return minutes+' دÙÙÙØ©';const hours=Math.floor(minutes/60),rest=minutes%60;return hours+' ساعة'+(rest?' Ù'+rest+' دÙÙÙØ©':'');} 21731 function distanceLabel(meters){const n=Number(meters||0);return n<1000?Math.round(n)+' ٠تر':(n/1000).toFixed(n>=10000?0:1)+' ÙÙ ';} 21732 function costLabel(option){return option&&option.cost_available?Number(option.estimated_cost_cny).toFixed(0)+' ÙÙØ§Ù':'Ø§ÙØªÙÙÙØ© ØºÙØ± ٠تÙÙØ±Ø©';} 21733 function recalculateRoutes(){stopGuidance();selectedRoute.value=null;routeResult.value=null;navError.value='';} 21734 function clearSelectedRoute(){stopGuidance();selectedRoute.value=null;} 21735 async function selectRouteOption(option){if(!option||!routeResult.value||!routeResult.value.route_result_token)return;stopGuidance();if(Date.parse(routeResult.value.expires_at||'')<=Date.now()){recalculateRoutes();navError.value='Ø§ÙØªÙت ØµÙØ§ØÙØ© ØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ. أعد Ø§ÙØØ³Ø§Ø¨ ÙÙØØµÙ٠عÙ٠طرÙÙ Ù ØØ¯Ø«.';return;}routeDetailLoading.value=true;navError.value='';const r=await api('/api/map/routes/select',{method:'POST',body:JSON.stringify({route_result_token:routeResult.value.route_result_token,route_option_id:option.route_option_id})});routeDetailLoading.value=false;if(!r||!r.ok){if(r&&r.recalculate_required)recalculateRoutes();navError.value=(r&&r.message)||'تعذر ÙØªØ ØªÙØ§ØµÙÙ Ø§ÙØ·Ø±ÙÙ Ø§ÙØ¢Ù. ÙÙ ÙÙÙ ÙØªØ اÙÙØ¬ÙØ© ÙÙ AMap.';return;}selectedRoute.value=r;nextTick(()=>{const el=document.getElementById('selected-route-detail');if(el)el.scrollIntoView({behavior:'smooth',block:'start'});});} 21736 function stepMeta(step){const values=[];if(step&&step.step_distance_meters!==null)values.push(distanceLabel(step.step_distance_meters));if(step&&step.step_duration_seconds!==null)values.push(durationLabel(step.step_duration_seconds));if(step&&step.station_count!==null)values.push(Number(step.station_count)+' Ù ØØ·Ø§Øª');return values.join(' · ');} 21737 function openAssistMode(value){if(!navDestination.value||(value!=='chinese'&&value!=='driver'))return;assistCopyState.value='';assistMode.value=value;} 21738 async function copyAssistAddress(){const value=String(navDestination.value&&(navDestination.value.address_zh||navDe
21738stination.value.name_zh)||'').trim();if(!value)return;try{if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(value);}else{const input=document.createElement('textarea');input.value=value;input.setAttribute('readonly','');input.style.position='fixed';input.style.opacity='0';document.body.appendChild(input);input.select();const copied=document.execCommand('copy');input.remove();if(!copied)throw new Error('copy_failed');}assistCopyState.value='copied';}catch(_error){assistCopyState.value='failed';}} 21739 function openAmap(){openAmapAppPlace(navDestination.value,message=>{navError.value=message;});} 21740 // ---- Step alerts (foreground, on-device): the phone's position is compared with each step's end point locally. 21741 // Nothing about the position is sent anywhere or stored. Speech / vibration / beep / notification all opt-in via the toggle. 21742 const guide=reactive({on:false,sound:true,index:0,done:[],distance:null,status:'',error:'',weak:false,offRoute:false,voiceNote:''}); 21743 let guideTracker=null,guideWatch=null,guideWake=null,guideAudio=null,guideSteps=[]; 21744 function guideStepsFrom(option){return safeArray(option&&option.steps).map(step=>({type:step.step_type,end:step.end_location,distance:step.step_distance_meters,instruction:step.instruction_ar,approach:(step.step_type==='transit'||step.step_type==='railway')?('Ø§ÙØªØ±Ø¨Øª Ù Ù Ù ØØ·Ø© اÙÙØ²ÙÙ'+(step.arrival_stop_zh?': '+step.arrival_stop_zh:'')):''}));} 21745 function guideBeep(){try{if(!guideAudio){const Ctx=window.AudioContext||window.webkitAudioContext;if(!Ctx)return;guideAudio=new Ctx();}if(guideAudio.state==='suspended')guideAudio.resume();const osc=guideAudio.createOscillator(),gain=guideAudio.createGain();osc.frequency.value=880;gain.gain.value=0.15;osc.connect(gain);gain.connect(guideAudio.destination);osc.start();osc.stop(guideAudio.currentTime+0.18);}catch(_){}} 21746 function guideAlert(text,kind){ 21747 guide.status=text; 21748 if(guide.sound){ 21749 try{if(window.speechSynthesis&&window.SpeechSynthesisUtterance){const voice=window.speechSynthesis.getVoices().find(v=>/^ar/i.test(v.lang)&&v.localService);/* on-device Arabic voice only: network voices are unreliable in China */if(voice){window.speechSynthesis.cancel();const u=new SpeechSynthesisUtterance(text);u.voice=voice;u.lang=voice.lang;window.speechSynthesis.speak(u);}}}catch(_){} 21750 guideBeep(); 21751 try{if(navigator.vibrate)navigator.vibrate(kind==='approach'?[200]:[150,80,150]);}catch(_){} 21752 } 21753 } 21754 // iOS only allows speech after a tap and often lists voices late: prime inside the tap, say so when no on-device Arabic voice exists. 21755 function guideUnlockSpeech(){ 21756 guide.voiceNote=''; 21757 try{ 21758 const synth=window.speechSynthesis; 21759 if(!synth||!window.SpeechSynthesisUtterance){guide.voiceNote='Ø¬ÙØ§Ø²Ù ÙØ§ ÙØ¯Ø¹Ù اÙÙØ·Ù: Ø³ØªØ¸ÙØ± Ø§ÙØªÙبÙÙØ§Øª ÙØµØ§Ù ٠ع ÙØºÙ Ø©.';return;} 21760 const pick=()=>synth.getVoices().find(v=>/^ar/i.test(v.lang)&&v.localService); 21761 const voice=pick(); 21762 if(voice){const u=new SpeechSynthesisUtterance('ØªÙ ØªÙØ¹ÙÙ Ø§ÙØªÙبÙÙØ§Øª');u.voice=voice;u.lang=voice.lang;synth.speak(u);} 21763 else{ 21764 guide.voiceNote='ÙØ§ ÙÙØ¬Ø¯ ØµÙØª عرب٠عÙÙ Ø¬ÙØ§Ø²Ù: ستس٠ع ÙØºÙ Ø© ÙØ§ÙÙØµ ÙØ¸Ùر عÙÙ Ø§ÙØ´Ø§Ø´Ø©.'; 21765 synth.addEventListener&&synth.addEventListener('voiceschanged',()=>{if(pick())guide.voiceNote='';},{once:true}); 21766 } 21767 }catch(_){} 21768 } 21769 function guideHandle(events){ 21770 if(!events||!events.length||!guideTracker)return; 21771 const parts=[];let kind='step'; 21772 for(const event of events){ 21773 if(event.type==='complete'&&!guide.done.includes(event.index))guide.done.push(event.index); 21774 if(event.type==='approach')kind='approach'; 21775 if(event.type==='off_route')guide.offRoute=true; 21776 const message=StepGuidance.messageFor(event,guideSteps);if(message)parts.push(message); 21777 } 21778 guide.index=Math.min(guideTracker.index,guideSteps.length-1); 21779 if(events.some(e=>e.type==='arrived')){guide.index=guideSteps.length;guideAlert(parts.join('. '),'step');stopGuidance(true);return;} 21780 guideAlert(parts.join('. '),kind); 21781 } 21782 async function guideKeepAwake(){try{if(!navigator.wakeLock||document.visibilityState!=='visible')return;if(guideWake){try{await guideWake.release();}catch(_){}guideWake=null;}const lock=await navigator.wakeLock.request('screen');if(!guide.on){try{await lock.release();}catch(_){}return;}guideWake=lock;}catch(_){guideWake=null;}}
21783 function startGuidance(){ 21784 const option=selectedRoute.value&&selectedRoute.value.route_option; 21785 if(!option||guide.on)return; 21786 if(!navigator.geolocation){guide.error='اÙÙ ØªØµÙØ ÙØ§ ÙØ¯Ø¹Ù ØªØØ¯Ùد اÙÙ ÙÙØ¹.';return;} 21787 guideSteps=guideStepsFrom(option); 21788 if(!guideSteps.some(step=>step.end)){guide.error='ÙØ§ تتÙÙØ± Ø¥ØØ¯Ø§Ø«Ùات ÙØ°Ù Ø§ÙØ®Ø·Ùات. أعد ØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ Ø«Ù Ø¬Ø±ÙØ¨ ٠رة أخرÙ.';return;} 21789 guide.error='';guide.done=[];guide.index=0;guide.distance=null;guide.on=true; 21790 guideTracker=StepGuidance.createTracker(guideSteps,{mode:option.mode}); 21791 guideBeep();guideKeepAwake(); 21792 guideUnlockSpeech(); 21793 guideHandle(guideTracker.start()); 21794 guideWatch=navigator.geolocation.watchPosition(position=>{ 21795 const point=StepGuidance.wgs84ToGcj02(position.coords.longitude,position.coords.latitude); 21796 if(!point||!guideTracker)return; 21797 const fix={longitude:point.longitude,latitude:point.latitude,accuracy:position.coords.accuracy,time:Date.now()}; 21798 guide.weak=position.coords.accuracy>90; 21799 const current=guideSteps[guideTracker.index]; 21800 guide.distance=current&¤t.end?Math.round(StepGuidance.distanceMeters(fix,current.end)):null; 21801 guide.error=''; 21802 guideHandle(guideTracker.update(fix)); 21803 },error=>{guide.error=error&&error.code===1?'ÙÙ ÙÙØ³Ù Ø Ø¨ØªØØ¯Ùد اÙÙ ÙÙØ¹. ÙØ¹ÙÙ٠٠٠إعدادات اÙÙ ØªØµÙØ ÙÙØªÙبÙÙØ§Øª.':'تعذر ØªØØ¯Ùد Ù ÙÙØ¹Ù Ø§ÙØ¢Ù. ØªØ£ÙØ¯ Ù Ù ØªÙØ¹ÙÙ GPS.';if(error&&error.code===1)stopGuidance();},{enableHighAccuracy:true,maximumAge:1500,timeout:20000}); 21804 document.addEventListener('visibilitychange',guideVisibility); 21805 } 21806 function guideVisibility(){if(guide.on&&document.visibilityState==='visible')guideKeepAwake();} 21807 function stopGuidance(keepStatus){ 21808 if(guideWatch!==null&&navigator.geolocation){try{navigator.geolocation.clearWatch(guideWatch);}catch(_){}} 21809 guideWatch=null; 21810 try{if(guideWake){guideWake.release();}}catch(_){} 21811 guideWake=null; 21812 try{if(window.speechSynthesis&&!keepStatus)window.speechSynthesis.cancel();}catch(_){} 21813 document.removeEventListener('visibilitychange',guideVisibility); 21814 guide.on=false;guideTracker=null;guide.weak=false;guide.offRoute=false; 21815 if(!keepStatus){guide.status='';guide.distance=null;guide.index=0;guide.done=[];guide.voiceNote='';} 21816 } 21817 function guideManual(index){if(guideTracker)guideHandle(guideTracker.manualDone(index));} 21818 onUnmounted(()=>stopGuidance()); 21819 return{guide,startGuidance,stopGuidance,guideManual,suggest,pickSuggestion,onComposerKeydown,onComposerFocus,onComposerBlur,voice,voiceToggle:toggleVoice,voiceAuto,cancelVoiceSearch,voiceCancel:()=>voiceInput.cancel(),navNearby,navNearbyAvailable,navExpanding,expandDestinationSearch,store,router,mode,question,questionInput,answer,ask,switchMode,improveQuestion,openEvidence,openImageSource,openPlaceSuggestion,submitPlaceSuggestion,sourceLabel,imageSourceLabel,shortDate,navLoading,navError,navCandidates,navDestination,manualMode,manualQuery,manualCandidates,routeResult,selectedRoute,routeDetailLoading,locationState,assistMode,assistCopyState,resetNavigation,resolveDestination,confirmDestination,useCurrentLocation,resolveManualOrigin,confirmManualOrigin,candidateName,modeLabel,modeIcon,durationLabel,distanceLabel,costLabel,recalculateRoutes,clearSelectedRoute,selectRouteOption,stepMeta,openAssistMode,closeAssistMode,copyAssistAddress,openAmap}; 21820 },render:(function(){ 21821const _Vue = Vue 21822const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 21823 21824const _hoisted_1 = { class: "card dailyHero askSmtHero askSmtSearchCard" } 21825const _hoisted_2 = { 21826 class: "askModeTabs", 21827 role: "tablist", 21828 "aria-label": "ÙÙØ¹ اÙ٠ساعدة" 21829} 21830const _hoisted_3 = ["onClick"] 21831const _hoisted_4 = ["onClick"] 21832const _hoisted_5 = { 21833 key: 0, 21834 class: "askVoiceAuto", 21835 role: "status", 21836 "aria-live": "polite" 21837} 21838const _hoisted_6 = ["onClick"] 21839const _hoisted_7 = { 21840 key: 1, 21841 class: "askSearchComposer" 21842} 21843const _hoisted_8 = { class: "askInputWrap" } 21844const _hoisted_9 = ["onUpdate:modelValue", "aria-activedescendant", "onKeydown", "onFocus", "onBlur"] 21845const _hoisted_10 = { 21846 id: "askSuggestList", 21847 class: "askSuggestList", 21848 role: "listbox", 21849 "aria-label": "Ø§ÙØªØ±Ø§ØØ§Øª" 21850} 21851const _hoisted_11 = ["id", "aria-selected", "onMousedown", "onClick"] 21852const _hoisted_12 = { 21853 class: "askSuggestIcon", 21854 "aria-hidden": "true" 21855} 21856const _hoisted_13 = { class: "askSuggestText" } 21857const _hoisted_14 = ["lang", "dir"] 21858const _hoisted_15 = { 21859 key: 0, 21860 dir: "auto" 21861} 21862const _hoisted_16 = { key: 0 } 21863const _hoisted_17 = { class: "askComposerActions" } 21864const _hoisted_18 = ["disabled", "onClick"] 21865const _hoisted_19 = { 21866 key: 2, 21867 class: "askSearchComposer" 21868} 21869const _hoisted_20 = { class: "askInputWrap" } 21870const _hoisted_21 = ["onUpdate:modelValue", "aria-activedescendant", "onKeydown", "onFocus", "onBlur"] 21871const _hoisted_22 = { 21872 id: "askSuggestList", 21873 class: "askSuggestList", 21874 role: "listbox", 21875 "aria-label": "Ø§ÙØªØ±Ø§ØØ§Øª" 21876} 21877const _hoisted_23 = ["id", "aria-selected", "onMousedown", "onClick"] 21878const _hoisted_24 = { 21879 class: "askSuggestIcon", 21880 "aria-hidden": "true" 21881} 21882const _hoisted_25 = { class: "askSuggestText" } 21883const _hoisted_26 = ["lang", "dir"] 21884const _hoisted_27 = { 21885 key: 0, 21886 dir: "auto" 21887} 21888const _hoisted_28 = { key: 0 } 21889const _hoisted_29 = { class: "askComposerActions" } 21890const _hoisted_30 = ["disabled", "onClick"] 21891const _hoisted_31 = { 21892 key: 3, 21893 class: "routeQuerySummary" 21894} 21895const _hoisted_32 = ["onClick"] 21896const _hoisted_33 = { 21897 key: 0, 21898 class: "card askAnswer askResultCard" 21899} 21900const _hoisted_34 = { class: "askResultHead" } 21901const _hoisted_35 = { class: "sectionEyebrow" } 21902const _hoisted_36 = { 21903 key: 0, 21904 class: "askAnswerText" 21905} 21906const _hoisted_37 = { 21907 key: 1, 21908 class: "askPlaceCandidates" 21909} 21910const _hoisted_38 = { class: "askPlaceQuery" } 21911const _hoisted_39 = ["lang", "dir"] 21912const _hoisted_40 = { 21913 key: 0, 21914 class: "askPlaceAddressZh", 21915 lang: "zh-CN", 21916 dir: "ltr" 21917} 21918const _hoisted_41 = { 21919 key: 1, 21920 class: "askPlaceAddressZh", 21921 lang: "zh-CN", 21922 dir: "ltr" 21923} 21924const _hoisted_42 = ["disabled", "onClick"] 21925const _hoisted_43 = ["onClick"] 21926const _hoisted_44 = { 21927 key: 2, 21928 class: "askImageStrip", 21929 "aria-label": "ØµÙØ± ٠رتبطة Ø¨Ø§ÙØ¨ØØ«" 21930} 21931const _hoisted_45 = ["src", "alt"] 21932const _hoisted_46 = ["onClick"] 21933const _hoisted_47 = { 21934 key: 3, 21935 class: "askSourcesSection" 21936} 21937const _hoisted_48 = { class: "askEvidenceGrid" } 21938const _hoisted_49 = ["onClick"] 21939const _hoisted_50 = { class: "askEvidenceIndex" } 21940const _hoisted_51 = { 21941 key: 4, 21942 class: "askFollowupRow" 21943} 21944const _hoisted_52 = ["onClick"] 21945const _hoisted_53 = { 21946 key: 0, 21947 class: "routeUserError", 21948 role: "alert" 21949} 21950const _hoisted_54 = { 21951 key: 1, 21952 class: "card routeChoiceCard" 21953} 21954const _hoisted_55 = { class: "routeCandidateList" } 21955const _hoisted_56 = ["disabled", "onClick"] 21956const _hoisted_57 = ["lang", "dir"] 21957const _hoisted_58 = { 21958 key: 0, 21959 lang: "zh-CN", 21960 dir: "ltr" 21961} 21962const _hoisted_59 = { 21963 key: 1, 21964 lang: "zh-CN", 21965 dir: "ltr" 21966} 21967const _hoisted_60 = { 21968 key: 2, 21969 class: "routeIndexNote" 21970} 21971const _hoisted_61 = { 21972 key: 2, 21973 class: "card routeChoiceCard routeNearbyCard" 21974} 21975const _hoisted_62 = ["disabled", "onClick"] 21976const _hoisted_63 = { 21977 key: 1, 21978 class: "routeCandidateList" 21979} 21980const _hoisted_64 = { 21981 key: 0, 21982 lang: "zh-CN", 21983 dir: "ltr" 21984} 21985const _hoisted_65 = { 21986 key: 1, 21987 lang: "zh-CN", 21988 dir: "ltr" 21989} 21990const _hoisted_66 = { 21991 key: 3, 21992 class: "card routeDestinationCard" 21993} 21994const _hoisted_67 = { 21995 key: 0, 21996 class: "routeChineseName", 21997 lang: "zh-CN", 21998 dir: "ltr" 21999} 22000const _hoisted_68 = { 22001 key: 1, 22002 class: "routeChineseAddress", 22003 lang: "zh-CN", 22004 dir: "ltr" 22005} 22006const _hoisted_69 = { 22007 key: 2, 22008 class: "routeAssistActions" 22009} 22010const _hoisted_70 = ["onClick"] 22011const _hoisted_71 = ["onClick"] 22012const _hoisted_72 = { 22013 key: 4, 22014 class: "card routeOriginCard" 22015} 22016const _hoisted_73 = ["disabled", "onClick"] 22017const _hoisted_74 = ["onClick"] 22018const _hoisted_75 = { 22019 key: 5,
22020 class: "card routeOriginCard" 22021} 22022const _hoisted_76 = { class: "routeManualComposer" } 22023const _hoisted_77 = ["onUpdate:modelValue"] 22024const _hoisted_78 = ["disabled", "onClick"] 22025const _hoisted_79 = ["onClick"] 22026const _hoisted_80 = { 22027 key: 0, 22028 class: "routeCandidateList manual" 22029} 22030const _hoisted_81 = ["disabled", "onClick"] 22031const _hoisted_82 = { 22032 key: 0, 22033 lang: "zh-CN", 22034 dir: "ltr" 22035} 22036const _hoisted_83 = { 22037 key: 1, 22038 lang: "zh-CN", 22039 dir: "ltr" 22040} 22041const _hoisted_84 = { 22042 key: 6, 22043 class: "routeOptionsSection" 22044} 22045const _hoisted_85 = { class: "routeOptionGrid" } 22046const _hoisted_86 = ["disabled", "onClick"] 22047const _hoisted_87 = { 22048 class: "routeModeIcon", 22049 "aria-hidden": "true" 22050} 22051const _hoisted_88 = { class: "routeOptionBody" } 22052const _hoisted_89 = { class: "routeOptionTitle" } 22053const _hoisted_90 = { class: "routeOptionMeta" } 22054const _hoisted_91 = { 22055 key: 0, 22056 class: "routeOptionSummary" 22057} 22058const _hoisted_92 = { 22059 key: 0, 22060 class: "routeUserError" 22061} 22062const _hoisted_93 = ["onClick"] 22063const _hoisted_94 = ["onClick"] 22064const _hoisted_95 = { 22065 key: 7, 22066 id: "selected-route-detail", 22067 class: "card routeDetailSection" 22068} 22069const _hoisted_96 = { class: "routeDetailHead" } 22070const _hoisted_97 = ["onClick"] 22071const _hoisted_98 = { class: "routeGuidanceBar" } 22072const _hoisted_99 = { class: "row" } 22073const _hoisted_100 = ["onClick"] 22074const _hoisted_101 = ["onClick"] 22075const _hoisted_102 = { class: "checkLine" } 22076const _hoisted_103 = ["onUpdate:modelValue"] 22077const _hoisted_104 = { 22078 key: 0, 22079 class: "routeGuidanceStatus", 22080 role: "status", 22081 "aria-live": "polite" 22082} 22083const _hoisted_105 = { key: 0 } 22084const _hoisted_106 = { 22085 key: 1, 22086 class: "routeGuidanceMessage", 22087 role: "status", 22088 "aria-live": "polite" 22089} 22090const _hoisted_107 = { 22091 key: 2, 22092 class: "hint" 22093} 22094const _hoisted_108 = { 22095 key: 3, 22096 class: "hint" 22097} 22098const _hoisted_109 = { 22099 key: 4, 22100 class: "routeUserError", 22101 role: "alert" 22102} 22103const _hoisted_110 = ["onClick"] 22104const _hoisted_111 = { 22105 key: 5, 22106 class: "routeUserError", 22107 role: "alert" 22108} 22109const _hoisted_112 = { class: "routeStepList" } 22110const _hoisted_113 = { class: "routeStepNumber" } 22111const _hoisted_114 = { 22112 key: 0, 22113 class: "routeStepChinese", 22114 lang: "zh-CN", 22115 dir: "ltr" 22116} 22117const _hoisted_115 = { 22118 key: 1, 22119 class: "routeStepChinese", 22120 lang: "zh-CN", 22121 dir: "ltr" 22122} 22123const _hoisted_116 = { 22124 key: 2, 22125 class: "routeStepEnglish", 22126 lang: "en", 22127 dir: "ltr" 22128} 22129const _hoisted_117 = { 22130 key: 3, 22131 class: "routeTransitFacts" 22132} 22133const _hoisted_118 = { key: 0 } 22134const _hoisted_119 = { 22135 lang: "zh-CN", 22136 dir: "ltr" 22137} 22138const _hoisted_120 = { 22139 key: 0, 22140 class: "routeStepEnglish", 22141 dir: "ltr" 22142} 22143const _hoisted_121 = { key: 1 } 22144const _hoisted_122 = { 22145 lang: "zh-CN", 22146 dir: "ltr" 22147} 22148const _hoisted_123 = { 22149 key: 0, 22150 class: "routeStepEnglish", 22151 dir: "ltr" 22152} 22153const _hoisted_124 = { key: 2 } 22154const _hoisted_125 = { 22155 lang: "zh-CN", 22156 dir: "ltr" 22157} 22158const _hoisted_126 = { 22159 key: 0, 22160 class: "routeStepEnglish", 22161 dir: "ltr" 22162} 22163const _hoisted_127 = { key: 4 } 22164const _hoisted_128 = ["onClick"] 22165const _hoisted_129 = { 22166 key: 0, 22167 class: "routeUserError" 22168} 22169const _hoisted_130 = ["onClick"] 22170const _hoisted_131 = ["aria-label"] 22171const _hoisted_132 = ["onClick"] 22172const _hoisted_133 = { 22173 lang: "zh-CN", 22174 dir: "ltr" 22175} 22176const _hoisted_134 = { class: "routeAssistPhrase" } 22177const _hoisted_135 = { key: 0 } 22178const _hoisted_136 = { 22179 key: 1, 22180 class: "routeAssistAddress" 22181} 22182const _hoisted_137 = ["onClick"] 22183const _hoisted_138 = { 22184 key: 1, 22185 role: "alert" 22186} 22187const _hoisted_139 = ["onClick"] 22188 22189return function render(_ctx, _cache) { 22190 with (_ctx) { 22191 const { normalizeClass: _normalizeClass, createElementVNode: _createElementVNode, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, vModelText: _vModelText, withDirectives: _withDirectives, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, withModifiers: _withModifiers, vShow: _vShow, resolveComponent: _resolveComponent, createVNode: _createVNode, vModelCheckbox: _vModelCheckbox, withCtx: _withCtx, createBlock: _createBlock } = _Vue 22192 22193 const _component_AskVoiceControl = _resolveComponent("AskVoiceControl") 22194 const _component_PublicFrame = _resolveComponent("PublicFrame") 22195 22196 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "اسأ٠SMT China" }, { 22197 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_createElementVNode("button", { 22198 class: _normalizeClass({active:mode==='ask'}), 22199 onClick: $event => (switchMode('ask')) 22200 }, "اسأ٠SMT", 10, _hoisted_3), _createElementVNode("button", { 22201 class: _normalizeClass({active:mode==='route'}), 22202 onClick: $event => (switchMode('route')) 22203 }, "Ø§ØØ³Ø¨ طرÙÙÙ", 10, _hoisted_4)]), (voiceAuto.pending) 22204 ? (_openBlock(), _createElementBlock("p", _hoisted_5, [_cache[0] || (_cache[0] = _createTextVNode("Ø¬Ø§Ø±Ù Ø§ÙØ¨ØØ« Ø¨ÙØµ ÙÙØ§Ù Ù⦠")), _createElementVNode("button", { 22205 type: "button", 22206 class: "smallbtn secondary", 22207 onClick: cancelVoiceSearch 22208 }, "Ø¥ÙØºØ§Ø¡", 8, _hoisted_6)])) 22209 : _createCommentVNode("", true), (mode==='ask') 22210 ? (_openBlock(), _createElementBlock("div", _hoisted_7, [_createElementVNode("div", _hoisted_8, [_withDirectives(_createElementVNode("textarea", { 22211 ref: "questionInput", 22212 "onUpdate:modelValue": $event => ((question) = $event), 22213 maxlength: "1000", 22214 placeholder: "Ø§Ø³Ø£Ù Ø¹Ù Ù ÙØ§Ù أ٠خد٠ة Ø¯Ø§Ø®Ù Ø§ÙØµÙÙ...", 22215 "aria-autocomplete": "list", 22216 "aria-controls": "askSuggestList", 22217 "aria-activedescendant": suggest.open&&suggest.active>=0?'askSuggest-'+suggest.active:null, 22218 onKeydown: onComposerKeydown, 22219 onFocus: onComposerFocus, 22220 onBlur: onComposerBlur 22221 }, null, 40, _hoisted_9), [[_vModelText, question]]), _withDirectives(_createElementVNode("ul", _hoisted_10, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(suggest.items, (x, i) => { 22222 return (_openBlock(), _createElementBlock("li", { 22223 key: x.kind+':'+(x.id||x.value), 22224 id: 'askSuggest-'+i, 22225 role: "option", 22226 "aria-selected": i===suggest.active?'true':'false', 22227 class: _normalizeClass({active:i===suggest.active}), 22228 onMousedown: _withModifiers(() => {}, ["prevent"]), 22229 onClick: $event => (pickSuggestion(x)) 22230 }
22230, [_createElementVNode("span", _hoisted_12, _toDisplayString(x.kind==='amap'?'ðºï¸':(x.kind==='guide'?'ð':(x.kind==='place'?'ð§':'ðï¸'))), 1), _createElementVNode("span", _hoisted_13, [_createElementVNode("b", { 22231 lang: x.lang||'ar', 22232 dir: x.lang==='zh-CN'?'ltr':'auto' 22233 }, _toDisplayString(x.label), 9, _hoisted_14), (x.sublabel) 22234 ? (_openBlock(), _createElementBlock("small", _hoisted_15, _toDisplayString(x.sublabel), 1)) 22235 : _createCommentVNode("", true)]), (x.kind==='amap') 22236 ? (_openBlock(), _createElementBlock("em", _hoisted_16, "AMap")) 22237 : _createCommentVNode("", true)], 42, _hoisted_11)) 22238 }), 128))], 512), [[_vShow, suggest.open]])]), _createElementVNode("div", _hoisted_17, [_createVNode(_component_AskVoiceControl, { 22239 voice: voice, 22240 busy: store.state.busy, 22241 onToggle: voiceToggle, 22242 onCancel: voiceCancel 22243 }, null, 8, ["voice", "busy", "onToggle", "onCancel"]), _createElementVNode("button", { 22244 class: "btn", 22245 disabled: store.state.busy||voice.state==='recording'||voice.state==='processing', 22246 onClick: ask 22247 }, _toDisplayString(store.state.busy?'Ø¬Ø§Ø±Ù Ø§ÙØ¨ØØ«â¦':'اسأ٠SMT'), 9, _hoisted_18)])])) 22248 : (!navDestination) 22249 ? (_openBlock(), _createElementBlock("div", _hoisted_19, [_createElementVNode("div", _hoisted_20, [_withDirectives(_createElementVNode("textarea", { 22250 ref: "questionInput", 22251 "onUpdate:modelValue": $event => ((question) = $event), 22252 maxlength: "240", 22253 placeholder: "Ø§ÙØªØ¨ اس٠اÙÙ ÙØ§Ù أ٠اÙÙ ÙØ·ÙØ© Ø§ÙØªÙ ØªØ±ÙØ¯ Ø§ÙØ°Ùاب Ø¥ÙÙÙØ§...", 22254 "aria-autocomplete": "list", 22255 "aria-controls": "askSuggestList", 22256 "aria-activedescendant": suggest.open&&suggest.active>=0?'askSuggest-'+suggest.active:null, 22257 onKeydown: onComposerKeydown, 22258 onFocus: onComposerFocus, 22259 onBlur: onComposerBlur 22260 }, null, 40, _hoisted_21), [[_vModelText, question]]), _withDirectives(_createElementVNode("ul", _hoisted_22, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(suggest.items, (x, i) => { 22261 return (_openBlock(), _createElementBlock("li", { 22262 key: x.kind+':'+(x.id||x.value), 22263 id: 'askSuggest-'+i, 22264 role: "option", 22265 "aria-selected": i===suggest.active?'true':'false', 22266 class: _normalizeClass({active:i===suggest.active}), 22267 onMousedown: _withModifiers(() => {}, ["prevent"]), 22268 onClick: $event => (pickSuggestion(x)) 22269 }, [_createElementVNode("span", _hoisted_24, _toDisplayString(x.kind==='amap'?'ðºï¸':(x.kind==='guide'?'ð':(x.kind==='place'?'ð§':'ðï¸'))), 1), _createElementVNode("span", _hoisted_25, [_createElementVNode("b", { 22270 lang: x.lang||'ar', 22271 dir: x.lang==='zh-CN'?'ltr':'auto' 22272 }, _toDisplayString(x.label), 9, _hoisted_26), (x.sublabel) 22273 ? (_openBlock(), _createElementBlock("small", _hoisted_27, _toDisplayString(x.sublabel), 1)) 22274 : _createCommentVNode("", true)]), (x.kind==='amap') 22275 ? (_openBlock(), _createElementBlock("em", _hoisted_28, "AMap")) 22276 : _createCommentVNode("", true)], 42, _hoisted_23)) 22277 }), 128))], 512), [[_vShow, suggest.open]])]), _createElementVNode("div", _hoisted_29, [_createVNode(_component_AskVoiceControl, { 22278 voice: voice, 22279 busy: navLoading, 22280 onToggle: voiceToggle, 22281 onCancel: voiceCancel 22282 }, null, 8, ["voice", "busy", "onToggle", "onCancel"]), _createElementVNode("button", { 22283 class: "btn", 22284 disabled: navLoading||voice.state==='recording'||voice.state==='processing', 22285 onClick: resolveDestination 22286 }, _toDisplayString(navLoading?'Ø¬Ø§Ø±Ù Ø§ÙØ¨ØØ«â¦':'Ø§Ø¨ØØ« ع٠اÙÙØ¬ÙØ©'), 9, _hoisted_30)])])) 22287 : (_openBlock(), _createElementBlock("div", _hoisted_31, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "اÙÙØ¬ÙØ© اÙ٠ختارة", -1)), _createElementVNode("b", null, _toDisplayString(candidateName(navDestination)), 1), _createElementVNode("button", { 22288 class: "smallbtn secondary", 22289 onClick: $event => (resetNavigation(true)) 22290 }, "تغÙÙØ± اÙÙØ¬ÙØ©", 8, _hoisted_32)]))]), (mode==='ask'&&answer) 22291 ? (_openBlock(), _createElementBlock("section", _hoisted_33, [ 22292 _createElementVNode("header", _hoisted_34, [_createElementVNode("div", null, [_createElementVNode("span", _hoisted_35, _toDisplayString(answer.place_confirmation?(answer.provider==='smt_place_candidates'?'ÙØªØ§Ø¦Ø¬ دÙÙÙ SMT China':'ÙØªØ§Ø¦Ø¬ AMap اÙÙ ÙØªØ±ØØ©'):(answer.answered?'Ù
22292ØªÙØ¬Ø© Ø§ÙØ¨ØØ«':(answer.reason==='out_of_scope'?'دÙÙÙ Ø§ÙØµÙÙ ÙÙØ·':'ÙØªÙجة Ø§ÙØ¨ØØ«'))), 1), _createElementVNode("h2", null, _toDisplayString(answer.place_confirmation?'ÙÙ ØªÙØµØ¯ ÙØ°Ø§ اÙÙ ÙØ§ÙØ':(answer.answered?'Ø§ÙØ¥Ø¬Ø§Ø¨Ø©':(answer.reason==='out_of_scope'?'ÙØ°Ø§ Ø§ÙØ³Ø¤Ø§Ù خارج ÙØ·Ø§Ù Ø§ÙØ¯ÙÙÙ':'Ù٠أت٠ÙÙ Ù Ù Ø§ÙØ¹Ø«Ùر عÙ٠إجابة Ù Ø¤ÙØ¯Ø©.'))), 1)])]), 22293 (!answer.place_confirmation) 22294 ? (_openBlock(), _createElementBlock("p", _hoisted_36, _toDisplayString(answer.answered?answer.answer:(answer.answer||'أض٠اس٠اÙ٠دÙÙØ© Ø£Ù ÙÙØ¹ اÙÙ ÙØ§Ù ÙØªØØ¯Ùد ٠ا ØªØ¨ØØ« عÙÙ.')), 1)) 22295 : _createCommentVNode("", true), 22296 (answer.place_confirmation) 22297 ? (_openBlock(), _createElementBlock("section", _hoisted_37, [_createElementVNode("p", _hoisted_38, [_cache[2] || (_cache[2] = _createTextVNode("ÙØªØ§Ø¦Ø¬ Ø§ÙØ¨ØØ« عÙ: ")), _createElementVNode("b", null, _toDisplayString(answer.place_confirmation.query_label), 1)]), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(answer.place_confirmation.candidates, (x) => { 22298 return (_openBlock(), _createElementBlock("article", { 22299 key: x.id, 22300 class: "askPlaceCandidate" 22301 }, [ 22302 _createElementVNode("b", { 22303 class: _normalizeClass({'askPlaceNameZh':x.kind!=='guide'}), 22304 lang: x.kind==='guide'?'ar':'zh-CN', 22305 dir: x.kind==='guide'?'rtl':'ltr' 22306 }, _toDisplayString(x.kind==='guide'?x.title:x.name_zh), 11, _hoisted_39), 22307 (x.kind==='guide'&&x.name_zh&&x.name_zh!==x.title) 22308 ? (_openBlock(), _createElementBlock("p", _hoisted_40, _toDisplayString(x.name_zh), 1)) 22309 : _createCommentVNode("", true), 22310 (x.address_zh) 22311 ? (_openBlock(), _createElementBlock("p", _hoisted_41, _toDisplayString(x.address_zh), 1)) 22312 : _createCommentVNode("", true), 22313 _createElementVNode("small", null, [_createTextVNode(_toDisplayString(x.city||''), 1), (x.district) 22314 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(x.district), 1)], 64)) 22315 : _createCommentVNode("", true), _createTextVNode(" · " + _toDisplayString(x.kind==='guide'?'٠٠دÙÙÙ SMT China اÙ٠عت٠د':'٠عÙÙÙ Ø© Ù Ù Ø®Ø±ÙØ·Ø© AMap ÙÙ٠تتØÙÙ Ù ÙÙØ§ SMT China'), 1)]), 22316 _createElementVNode("button", { 22317 class: "smallbtn", 22318 disabled: !x.id, 22319 onClick: $event => (openPlaceSuggestion(x)) 22320 }, _toDisplayString(x.kind==='guide'?'Ø§ÙØªØ ØµÙØØ© اÙÙ ÙØ§Ù':'Ø§ÙØªØ ÙØ°Ø§ اÙÙ ÙØ§Ù Ù٠تطبÙÙ AMap â'), 9, _hoisted_42), 22321 (x.kind==='amap'&&answer.place_confirmation.review_token) 22322 ? (_openBlock(), _createElementBlock("button", { 22323 key: 2, 22324 class: "smallbtn secondary", 22325 onClick: $event => (submitPlaceSuggestion(x)) 22326 }, "Ø£Ø±Ø³Ù ÙØ°Ø§ اÙÙ ÙØ§Ù ÙÙ٠راجعة ÙÙ Ø§ÙØ¯ÙÙÙ", 8, _hoisted_43)) 22327 : _createCommentVNode("", true) 22328 ])) 22329 }), 128))])) 22330 : _createCommentVNode("", true), 22331 (answer.answered&&answer.images&&answer.images.length) 22332 ? (_openBlock(), _createElementBlock("section", _hoisted_44, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(answer.images, (x, i) => { 22333 return (_openBlock(), _createElementBlock("article", { 22334 key: x.kind+'-'+x.id, 22335 class: _normalizeClass(['askImageCard',{featured:i===0}]) 22336 }, [_createElementVNode("img", { 22337 src: x.image_url, 22338 alt: x.title||'ØµÙØ±Ø© ٠رتبطة Ø¨Ø§ÙØ¨ØØ«', 22339 loading: "lazy"
22340 }, null, 8, _hoisted_45), _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(x.title||'ØµÙØ±Ø© Ù Ø±Ø¬Ø¹ÙØ©'), 1), _createElementVNode("small", null, [_createTextVNode(_toDisplayString(imageSourceLabel(x)), 1), (x.license) 22341 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(x.license), 1)], 64)) 22342 : _createCommentVNode("", true)]), (x.source_url) 22343 ? (_openBlock(), _createElementBlock("button", { 22344 key: 0, 22345 class: "smallbtn secondary", 22346 onClick: $event => (openImageSource(x)) 22347 }, "عرض ٠صدر Ø§ÙØµÙرة â", 8, _hoisted_46)) 22348 : _createCommentVNode("", true)])], 2)) 22349 }), 128))])) 22350 : _createCommentVNode("", true), 22351 (answer.answered&&answer.evidence&&answer.evidence.length) 22352 ? (_openBlock(), _createElementBlock("section", _hoisted_47, [_cache[4] || (_cache[4] = _createElementVNode("div", { class: "guideSearchHeader" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "sectionEyebrow" }, "اÙ٠صادر"), _createElementVNode("h3", null, "اÙ٠صادر اÙ٠رتبطة Ø¨Ø§ÙØ¥Ø¬Ø§Ø¨Ø©")])], -1)), _createElementVNode("div", _hoisted_48, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(answer.evidence, (x, i) => { 22353 return (_openBlock(), _createElementBlock("button", { 22354 key: x.kind+'-'+x.id, 22355 class: "askEvidenceCard", 22356 onClick: $event =>
22356 (openEvidence(x)) 22357 }, [_createElementVNode("span", _hoisted_50, _toDisplayString(i+1), 1), _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.title), 1), _createElementVNode("small", null, [_createTextVNode(_toDisplayString(sourceLabel(x)), 1), (x.verified_at) 22358 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · ØªØ§Ø±ÙØ® Ø§ÙØªØÙÙ: " + _toDisplayString(shortDate(x.verified_at)), 1)], 64)) 22359 : _createCommentVNode("", true)])]), _cache[3] || (_cache[3] = _createElementVNode("em", null, "عرض â", -1))], 8, _hoisted_49)) 22360 }), 128))])])) 22361 : _createCommentVNode("", true), 22362 (!answer.answered) 22363 ? (_openBlock(), _createElementBlock("div", _hoisted_51, [_createElementVNode("button", { 22364 class: "smallbtn secondary", 22365 onClick: improveQuestion 22366 }, "تعدÙÙ Ø§ÙØ³Ø¤Ø§Ù", 8, _hoisted_52)])) 22367 : _createCommentVNode("", true) 22368 ])) 22369 : _createCommentVNode("", true), (mode==='route') 22370 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ 22371 navError 22372 ? (_openBlock(), _createElementBlock("p", _hoisted_53, _toDisplayString(navError), 1)) 22373 : _createCommentVNode("", true), 22374 (navCandidates.length&&!navDestination) 22375 ? (_openBlock(), _createElementBlock("section", _hoisted_54, [ 22376 _cache[5] || (_cache[5] = _createElementVNode("span", { class: "sectionEyebrow" }, "اختر اÙÙØ¬ÙØ©", -1)), 22377 _cache[6] || (_cache[6] = _createElementVNode("h2", null, "Ø£Ù Ù ÙØ§Ù ØªÙØµØ¯Ø", -1)), 22378 _cache[7] || (_cache[7] = _createElementVNode("p", null, "اختر اÙÙØªÙجة Ø§ÙØµØÙØØ© ÙØ¨Ù ØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ.", -1)), 22379 _createElementVNode("div", _hoisted_55, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(navCandidates, (x) => { 22380 return (_openBlock(), _createElementBlock("button", { 22381 key: x.candidate_id, 22382 disabled: navLoading||!x.routable, 22383 onClick: $event => (confirmDestination(x)) 22384 }, [_createElementVNode("span", null, [ 22385 _createElementVNode("b", { 22386 lang: x.name_ar?'ar':'zh-CN', 22387 dir: x.name_ar?'rtl':'ltr' 22388 }, _toDisplayString(candidateName(x)), 9, _hoisted_57), 22389 (x.name_zh&&x.name_zh!==candidateName(x)) 22390 ? (_openBlock(), _createElementBlock("strong", _hoisted_58, _toDisplayString(x.name_zh), 1)) 22391 : _createCommentVNode("", true), 22392 (x.address_zh) 22393 ? (_openBlock(), _createElementBlock("small", _hoisted_59, _toDisplayString(x.address_zh), 1)) 22394 : _createCommentVNode("", true), 22395 (x.match==='amap_index') 22396 ? (_openBlock(), _createElementBlock("small", _hoisted_60, "Ø§ÙØªØ±Ø§Ø Ù Ù Ø®Ø±ÙØ·Ø© AMap â ØªØ£Ùد Ù Ù Ø§ÙØ§Ø³Ù ÙØ§ÙعÙÙØ§Ù ÙØ¨Ù Ø§ÙØ§Ø®ØªÙار")) 22397 : _createCommentVNode("", true) 22398 ]), _createElementVNode("em", null, _toDisplayString(x.routable?'Ø§Ø®ØªÙØ§Ø±':(x.badge_ar||'اÙÙ ÙÙØ¹ ØºÙØ± Ù ÙØªÙ Ù')), 1)], 8, _hoisted_56)) 22399 }), 128))]) 22400 ])) 22401 : _createCommentVNode("", true), 22402 (navNearbyAvailable&&!navDestination&&!navCandidates.length&&navError) 22403 ? (_openBlock(), _createElementBlock("section", _hoisted_61, [ 22404 _cache[8] || (_cache[8] = _createElementVNode("span", { class: "sectionEyebrow" }, "أ٠اÙÙ ÙØ±Ùبة", -1)), 22405 _cache[9] || (_cache[9] = _createElementVNode("p", null, "ÙØ°Ù ÙÙØ³Øª اÙÙØ¬ÙØ© Ø§ÙØªÙ Ø¨ØØ«Øª عÙÙØ§. Ø§Ø¹Ø±Ø¶ÙØ§ ÙÙØ· إذا أردت ØªÙØ³Ùع Ø§ÙØ¨ØØ«.", -1)), 22406 (!navNearby.length) 22407 ? (_openBlock(), _createElementBlock("button", { 22408 key: 0, 22409 class: "smallbtn secondary", 22410 disabled: navExpanding, 22411 onClick: expandDestinationSearch 22412 }, _toDisplayString(navExpanding?'Ø¬Ø§Ø±Ù Ø§ÙØ¨ØØ«â¦':'ØªÙØ³Ùع Ø§ÙØ¨ØØ«'), 9, _hoisted_62)) 22413 : _createCommentVNode("", true), 22414 (navNearby.length) 22415 ? (_openBlock(), _createElementBlock("div", _hoisted_63, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(navNearby, (x) => { 22416 return (_openBlock(), _createElementBlock("button", { 22417 key: x.candidate_id, 22418 disabled: "" 22419 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(candidateName(x)), 1), (x.name_zh) 22420 ? (_openBlock(), _createElementBlock("strong", _hoisted_64, _toDisplayString(x.name_zh), 1)) 22421 : _createCommentVNode("", true), (x.address_zh) 22422 ? (_openBlock(), _createElementBlock("small", _hoisted_65, _toDisplayString(x.address_zh), 1)) 22423 : _createCommentVNode("", true)]), _createElementVNode("em", null, _toDisplayString(x.badge_ar||'Ù ÙØ§Ù ÙØ±Ùب'), 1)])) 22424 }), 128))])) 22425 : _createCommentVNode("", true) 22426 ])) 22427 : _createCommentVNode("", true), 22428 navDestination 22429 ? (_openBlock(), _createElementBlock("section", _hoisted_66, [ 22430 _cache[10] || (_cache[10] = _createElementVNode("span", { class: "sectionEyebrow" }, "اÙÙØ¬ÙØ©", -1)), 22431 _createElementVNode("h2", null, _toDisplayString(candidateName(navDestination)), 1), 22432 (navDestination.name_zh) 22433 ? (_openBlock(), _createElementBlock("b", _hoisted_67, _toDisplayString(navDestination.name_zh), 1)) 22434 : _createCommentVNode("", true), 22435 (navDestination.address_zh) 22436 ? (_openBlock(), _createElementBlock("p", _hoisted_68, _toDisplayString(navDestination.address_zh), 1)) 22437 : _createCommentVNode("", true),
22438 (navDestination.name_zh||navDestination.address_zh) 22439 ? (_openBlock(), _createElementBlock("div", _hoisted_69, [_createElementVNode("button", { 22440 class: "smallbtn secondary", 22441 onClick: $event => (openAssistMode('chinese')) 22442 }, "اعرض ÙÙØµÙÙÙ", 8, _hoisted_70), _createElementVNode("button", { 22443 class: "smallbtn secondary", 22444 onClick: $event => (openAssistMode('driver')) 22445 }, "اعرض ÙÙØ³Ø§Ø¦Ù", 8, _hoisted_71)])) 22446 : _createCommentVNode("", true) 22447 ])) 22448 : _createCommentVNode("", true), 22449 (navDestination&&!routeResult&&!manualMode) 22450 ? (_openBlock(), _createElementBlock("section", _hoisted_72, [ 22451 _cache[11] || (_cache[11] = _createElementVNode("span", { class: "sectionEyebrow" }, "ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ©", -1)), 22452 _cache[12] || (_cache[12] = _createElementVNode("h2", null, "٠٠أÙ٠ستبدأØ", -1)), 22453 _cache[13] || (_cache[13] = _createElementVNode("p", null, "ÙØ³ØªØ®Ø¯Ù Ù ÙÙØ¹Ù ÙØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ ÙÙØ· بعد Ù ÙØ§ÙÙØªÙ.", -1)), 22454 _createElementVNode("button", { 22455 class: "btn", 22456 disabled: navLoading||locationState==='requesting', 22457 onClick: useCurrentLocation 22458 }, _toDisplayString(locationState==='requesting'?'Ø¬Ø§Ø±Ù ØªØØ¯Ùد Ù ÙÙØ¹Ùâ¦':'استخد٠٠ÙÙØ¹Ù ÙØ§ØØ³Ø¨ Ø§ÙØ·Ø±ÙÙ'), 9, _hoisted_73), 22459 _createElementVNode("button", { 22460 class: "smallbtn secondary routeManualStart", 22461 onClick: $event => {manualMode=true;navError=''} 22462 }, "Ø§Ø®ØªÙØ§Ø± ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ© ÙØ¯ÙÙØ§Ù", 8, _hoisted_74) 22463 ])) 22464 : _createCommentVNode("", true), 22465 (navDestination&&!routeResult&&manualMode) 22466 ? (_openBlock(), _createElementBlock("section", _hoisted_75, [ 22467 _cache[14] || (_cache[14] = _createElementVNode("span", { class: "sectionEyebrow" }, "ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ©", -1)), 22468 _cache[15] || (_cache[15] = _createElementVNode("h2", null, "Ø§ÙØªØ¨ اÙÙ ÙØ§Ù Ø§ÙØ°Ù ستبدأ Ù ÙÙ", -1)), 22469 _createElementVNode("div", _hoisted_76, [_withDirectives(_createElementVNode("input", { 22470 "onUpdate:modelValue": $event => ((manualQuery) = $event), 22471 maxlength: "240", 22472 placeholder: "٠ثاÙ: Ù ØØ·Ø© ÙÙØ§ÙØºØªØ´Ù Ø§ÙØ¬ÙÙØ¨ÙØ©" 22473 }, null, 8, _hoisted_77), [[_vModelText, manualQuery]]), _createElementVNode("button", { 22474 class: "btn", 22475 disabled: navLoading, 22476 onClick: resolveManualOrigin 22477 }, _toDisplayString(navLoading?'Ø¬Ø§Ø±Ù Ø§ÙØ¨ØØ«â¦':'تأÙÙØ¯ ÙÙØ·Ø© Ø§ÙØ¨Ø¯Ø§ÙØ©'), 9, _hoisted_78)]), 22478 _createElementVNode("button", { 22479 class: "smallbtn secondary routeManualStart", 22480 onClick: $event => {manualMode=false;manualCandidates=[];navError=''} 22481 }, "Ø§ÙØ¹Ùدة Ø¥Ù٠استخدا٠٠ÙÙØ¹Ù", 8, _hoisted_79), 22482 (manualCandidates.length) 22483 ? (_openBlock(), _createElementBlock("div", _hoisted_80, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(manualCandidates, (x) => { 22484 return (_openBlock(), _createElementBlock("button", { 22485 key: x.candidate_id, 22486 disabled: navLoading||!x.routable, 22487 onClick: $event => (confirmManualOrigin(x)) 22488 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(candidateName(x)), 1), (x.name_zh) 22489 ? (_openBlock(), _createElementBlock("strong", _hoisted_82, _toDisplayString(x.name_zh), 1)) 22490 : _createCommentVNode("", true), (x.address_zh) 22491 ? (_openBlock(), _createElementBlock("small", _hoisted_83, _toDisplayString(x.address_zh), 1)) 22492 : _createCommentVNode("", true)]), _createElementVNode("em", null, _toDisplayString(x.routable?'Ø§Ø®ØªÙØ§Ø±':'اÙÙ ÙÙØ¹ ØºÙØ± Ù ÙØªÙ Ù'), 1)], 8, _hoisted_81)) 22493 }), 128))])) 22494 : _createCommentVNode("", true) 22495 ])) 22496 : _createCommentVNode("", true), 22497 routeResult 22498 ? (_openBlock(), _createElementBlock("section", _hoisted_84, [ 22499 _cache[16] || (_cache[16] = _createElementVNode("div", { class: "routeOptionsHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "sectionEyebrow" }, "Ø®ÙØ§Ø±Ø§Øª اÙÙØµÙÙ"), _createElementVNode("h2", null, "اختر Ø§ÙØ·Ø±ÙÙØ© اÙÙ ÙØ§Ø³Ø¨Ø© ÙÙ")]), _createElementVNode("small", null, "Ø§ÙØ·Ø±ÙÙ Ù ØØ¯Ø« Ø§ÙØ¢Ù")], -1)), 22500 _createElementVNode("div", _hoisted_85, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(routeResult.options, (x) => { 22501 return (_openBlock(), _createElementBlock("button", { 22502 key: x.route_option_id, 22503 class: _normalizeClass(['card','routeOptionCard',{selected:selectedRoute&&selectedRoute.route_option.route_option_id===x.route_option_id}]),
22504 disabled: routeDetailLoading, 22505 onClick: $event => (selectRouteOption(x)) 22506 }, [_createElementVNode("span", _hoisted_87, _toDisplayString(modeIcon(x.mode)), 1), _createElementVNode("span", _hoisted_88, [ 22507 _createElementVNode("span", _hoisted_89, _toDisplayString(modeLabel(x.mode)), 1), 22508 _createElementVNode("b", null, _toDisplayString(durationLabel(x.duration_seconds)), 1), 22509 _createElementVNode("span", _hoisted_90, [_createTextVNode(_toDisplayString(distanceLabel(x.distance_meters)), 1), (x.walking_distance_meters!==null&&x.mode!=='walking') 22510 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · Ù Ø´Ù " + _toDisplayString(distanceLabel(x.walking_distance_meters)), 1)], 64)) 22511 : _createCommentVNode("", true), (x.transfer_count!==null) 22512 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createTextVNode(" · " + _toDisplayString(x.transfer_count) + " تØÙÙÙØ§Øª", 1)], 64)) 22513 : _createCommentVNode("", true)]), 22514 _createElementVNode("small", null, _toDisplayString(costLabel(x)), 1), 22515 (x.summary_ar) 22516 ? (_openBlock(), _createElementBlock("small", _hoisted_91, _toDisplayString(x.summary_ar), 1)) 22517 : _createCommentVNode("", true), 22518 _createElementVNode("em", null, _toDisplayString(routeDetailLoading?'جار٠اÙÙØªØâ¦':'عرض ØªÙØ§ØµÙÙ Ø§ÙØ·Ø±ÙÙ'), 1) 22519 ])], 10, _hoisted_86)) 22520 }), 128))]), 22521 (!routeResult.options.length) 22522 ? (_openBlock(), _createElementBlock("p", _hoisted_92, "ØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ ØºÙØ± Ù ØªØ§Ø Ù Ø¤ÙØªØ§Ù. Ø§ÙØªØ اÙÙØ¬ÙØ© ÙÙ AMap ÙØ£Ø¹Ø¯ اÙÙ ØØ§ÙÙØ© ÙØ§ØÙاÙ.")) 22523 : _createCommentVNode("", true), 22524 (navDestination.map_url) 22525 ? (_openBlock(), _createElementBlock("button", { 22526 key: 1, 22527 class: "smallbtn secondary routeOpenAmap", 22528 onClick: openAmap 22529 }, "ÙØªØ اÙÙØ¬ÙØ© ÙÙ AMap", 8, _hoisted_93)) 22530 : _createCommentVNode("", true), 22531 _createElementVNode("button", { 22532 class: "smallbtn secondary routeRecalculate", 22533 onClick: recalculateRoutes 22534 }, "إعادة Ø§ÙØØ³Ø§Ø¨", 8, _hoisted_94) 22535 ])) 22536 : _createCommentVNode("", true), 22537 selectedRoute 22538 ? (_openBlock(), _createElementBlock("section", _hoisted_95, [ 22539 _createElementVNode("div", _hoisted_96, [_createElementVNode("div", null, [_cache[17] || (_cache[17] = _createElementVNode("span", { class: "sectionEyebrow" }, "ØªÙØ§ØµÙÙ Ø§ÙØ·Ø±Ù٠اÙ٠ختار", -1)), _createElementVNode("h2", null, _toDisplayString(modeLabel(selectedRoute.route_option.mode)), 1)]), _createElementVNode("button", { 22540 class: "smallbtn secondary", 22541 onClick: clearSelectedRoute 22542 }, "Ø§Ø®ØªÙØ§Ø± ÙØ³ÙÙØ© أخرÙ", 8, _hoisted_97)]), 22543 _createElementVNode("div", _hoisted_98, [ 22544 _createElementVNode("div", _hoisted_99, [(!guide.on) 22545 ? (_openBlock(), _createElementBlock("button", { 22546 key: 0, 22547 class: "btn", 22548 type: "button", 22549 onClick: startGuidance 22550 }, "تشغÙÙ ØªÙØ¨ÙÙØ§Øª Ø§ÙØ®Ø·Ùات", 8, _hoisted_100)) 22551 : (_openBlock(), _createElementBlock("button", { 22552 key: 1, 22553 class: "btn secondary", 22554 type: "button", 22555 onClick: $event => (stopGuidance()) 22556 }, "Ø¥ÙÙØ§Ù Ø§ÙØªÙبÙÙØ§Øª", 8, _hoisted_101)), _createElementVNode("label", _hoisted_102, [_withDirectives(_createElementVNode("input", { 22557 type: "checkbox", 22558 "onUpdate:modelValue": $event => ((guide.sound) = $event) 22559 }, null, 8, _hoisted_103), [[_vModelCheckbox, guide.sound]]), _cache[18] || (_cache[18] = _createTextVNode(" ØµÙØª ÙØ§Ùتزاز"))])]), 22560 (guide.on) 22561 ? (_openBlock(), _createElementBlock("p", _hoisted_104, [_createTextVNode("Ø§ÙØ®Ø·ÙØ© " + _toDisplayString(Math.min(guide.index+1,selectedRoute.route_option.steps.length)) + " Ù Ù " + _toDisplayString(selectedRoute.route_option.steps.length), 1), (guide.distance!==null) 22562 ? (_openBlock(), _createElementBlock("span", _hoisted_105, " · " + _toDisplayString(guide.distance) + " ٠إÙÙ ÙÙØ§ÙØ© Ø§ÙØ®Ø·ÙØ©", 1)) 22563 : _createCommentVNode("", true)])) 22564 : _createCommentVNode("", true), 22565 (guide.status) 22566 ? (_openBlock(), _createElementBlock("p", _hoisted_106, _toDisplayString(guide.status), 1)) 22567 : _createCommentVNode("", true), 22568 (guide.weak&&guide.on) 22569 ? (_openBlock(), _createElementBlock("p", _hoisted_107, "إشارة GPS ضعÙÙØ© Ø§ÙØ¢ÙØ ÙØ¯ تتأخر Ø§ÙØªÙبÙÙØ§Øª.")) 22570 : _createCommentVNode("", true), 22571 (guide.voiceNote) 22572 ? (_openBlock(), _createElementBlock("p", _hoisted_108, _toDisplayString(guide.voiceNote), 1)) 22573 : _createCommentVNode("", true), 22574 (guide.offRoute&&guide.on) 22575 ? (_openBlock(), _createElementBlock("p", _hoisted_109, [_cache[19] || (_cache[19] = _createTextVNode("ÙØ¨Ø¯Ù Ø£Ù٠ابتعدت ع٠اÙ٠سار. ")), _createElementVNode("button", { 22576 class: "smallbtn", 22577 type: "button", 22578 onClick: recalculateRoutes 22579 }, "أعد ØØ³Ø§Ø¨ Ø§ÙØ·Ø±ÙÙ", 8, _hoisted_110)])) 22580 : _createCommentVNode("", true), 22581 (guide.error) 22582 ? (_openBlock(), _createElementBlock("p", _hoisted_111, _toDisplayString(guide.error), 1)) 22583 : _createCommentVNode("", true), 22584 _cache[20] || (_cache[20] = _createElementVNode("small", { class: "hint" }, "ØªØ¹Ù Ù Ø§ÙØªÙبÙÙØ§Øª ÙØ§Ùشاشة Ù ÙØªÙØØ© ÙÙØ·Ø إذا Ø§ÙØ·Ùأت Ø§ÙØ´Ø§Ø´Ø© Ø£Ù ÙÙÙ٠اÙÙØ§ØªÙ تتÙÙÙ. ÙÙØØ³Ø¨ Ù ÙÙØ¹Ù Ø¯Ø§Ø®Ù Ø¬ÙØ§Ø²Ù ÙÙØ§ ÙÙØ±Ø³Ù Ø£Ù ÙÙØÙØ¸.", -1)) 22585 ]), 22586 _createElementVNode("div", _hoisted_112, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(selectedRoute.route_option.steps, (step, index) => { 22587 return (_openBlock(), _createElementBlock("article", { 22588 key: step.step_id, 22589 class: _normalizeClass(["routeStepCard", {routeStepActive:guide.on&&guide.index===index,routeStepDone:guide.done.includes(index)}]) 22590 }, [_createElementVNode("span", _hoisted_113, _toDisplayString(guide.done.includes(index)?'â':index+1), 1), _createElementVNode("div", null, [ 22591 _createElementVNode("h3", null, _toDisplayString(step.instruction_ar), 1), 22592 (step.instruction_zh) 22593 ? (_openBlock(), _createElementBlock("p", _hoisted_114, _toDisplayString(step.instruction_zh), 1)) 22594 : _createCommentVNode("", true), 22595 (step.road_name_zh&&!step.instruction_zh.includes(step.road_name_zh)) 22596 ? (_openBlock(), _createElementBlock("p", _hoisted_115, _toDisplayString(step.road_name_zh), 1)) 22597 : _createCommentVNode("", true), 22598 (step.road_name_en) 22599 ? (_openBlock(), _createElementBlock("p", _hoisted_116, _toDisplayString(step.road_name_en), 1)) 22600 : _createCommentVNode("", true), 22601 (step.line_name_zh||step.departure_stop_zh||step.arrival_stop_zh) 22602 ? (_openBlock(), _createElementBlock("dl", _hoisted_117, [(step.line_name_zh) 22603 ? (_openBlock(), _createElementBlock("div", _hoisted_118, [_cache[21] || (_cache[21] = _createElementVNode("dt", null, "Ø§ÙØ®Ø·", -1)), _createElementVNode("dd", _hoisted_119, [_createTextVNode(_toDisplayString(step.line_name_zh), 1), (step.line_name_en) 22604 ? (_openBlock(), _createElementBlock("small", _hoisted_120, _toDisplayString(step.line_name_en), 1)) 22605 : _createCommentVNode("", true)])])) 22606 : _createCommentVNode("", true), (step.departure_stop_zh) 22607 ? (_openBlock(), _createElementBlock("div", _hoisted_121, [_cache[22] || (_cache[22] = _createElementVNode("dt", null, "Ø§ÙØµØ¹Ùد", -1)), _createElementVNode("dd", _hoisted_122, [_createTextVNode(_toDisplayString(step.departure_stop_zh), 1), (step.departure_stop_en) 22608 ? (_openBlock(), _createElementBlock("small", _hoisted_123, _toDisplayString(step.departure_stop_en), 1)) 22609 : _createCommentVNode("", true)])])) 22610 : _createCommentVNode("", true), (step.arrival_stop_zh) 22611 ? (_openBlock(), _createElementBlock("div", _hoisted_124, [_cache[23] || (_cache[23] = _createElementVNode("dt", null, "اÙÙØ²ÙÙ", -1)), _createElementVNode("dd", _hoisted_125, [_createTextVNode(_toDisplayString(step.arrival_stop_zh), 1), (step.arrival_stop_en) 22612 ? (_openBlock(), _createElementBlock("small", _hoisted_126, _toDisplayString(step.arrival_stop_en), 1)) 22613 : _createCommentVNode("", true)])])) 22614 : _createCommentVNode("", true)])) 22615 : _createCommentVNode("", true), 22616 (stepMeta(step)) 22617 ? (_openBlock(), _createElementBlock("small", _hoisted_127, _toDisplayString(stepMeta(step)), 1)) 22618 : _createCommentVNode("", true), 22619 (guide.on&&guide.index===index) 22620 ? (_openBlock(), _createElementBlock("button", { 22621 key: 5,
22622 class: "smallbtn", 22623 type: "button", 22624 onClick: $event => (guideManual(index)) 22625 }, "Ø£ÙÙÙØª ÙØ°Ù Ø§ÙØ®Ø·ÙØ©", 8, _hoisted_128)) 22626 : _createCommentVNode("", true) 22627 ])], 2)) 22628 }), 128)), (!selectedRoute.route_option.steps.length) 22629 ? (_openBlock(), _createElementBlock("p", _hoisted_129, "ÙØ§ ØªÙØ¬Ø¯ Ø®Ø·ÙØ§Øª ØªÙØµÙÙÙØ© Ù ØªØ§ØØ© ÙÙØ°Ø§ Ø§ÙØ·Ø±ÙÙ. Ø§ÙØªØ اÙÙØ¬ÙØ© ÙÙ AMap ÙÙ٠تابعة.")) 22630 : _createCommentVNode("", true)]), 22631 (navDestination.map_url) 22632 ? (_openBlock(), _createElementBlock("button", { 22633 key: 0, 22634 class: "btn routeDetailAmap", 22635 onClick: openAmap 22636 }, "ÙØªØ اÙÙØ¬ÙØ© ÙÙ AMap", 8, _hoisted_130)) 22637 : _createCommentVNode("", true) 22638 ])) 22639 : _createCommentVNode("", true), 22640 (assistMode&&navDestination) 22641 ? (_openBlock(), _createElementBlock("section", { 22642 key: 8, 22643 class: _normalizeClass(["routeAssistScreen", 'routeAssistScreen--'+assistMode]), 22644 role: "dialog", 22645 "aria-modal": "true", 22646 "aria-label": assistMode==='driver'?'عرض اÙÙØ¬ÙØ© ÙÙØ³Ø§Ø¦Ù':'عرض اÙÙØ¬ÙØ© باÙÙØºØ© Ø§ÙØµÙÙÙØ©' 22647 }, [_createElementVNode("header", null, [_createElementVNode("button", { 22648 class: "routeAssistClose", 22649 onClick: closeAssistMode, 22650 "aria-label": "Ø¥ØºÙØ§Ù Ø§ÙØ¹Ø±Ø¶" 22651 }, "Ø¹ÙØ¯Ø©", 8, _hoisted_132), _createElementVNode("span", null, _toDisplayString(assistMode==='driver'?'ÙÙØ³Ø§Ø¦Ù':'ÙÙ٠ساعدة'), 1)]), _createElementVNode("main", _hoisted_133, [_createElementVNode("p", _hoisted_134, _toDisplayString(assistMode==='driver'?'请带æå»è¿éã':'æè¦å»è¿éï¼è¯·é®æä¹èµ°ï¼'), 1), (navDestination.name_zh) 22652 ? (_openBlock(), _createElementBlock("h2", _hoisted_135, _toDisplayString(navDestination.name_zh), 1)) 22653 : _createCommentVNode("", true), (navDestination.address_zh) 22654 ? (_openBlock(), _createElementBlock("p", _hoisted_136, _toDisplayString(navDestination.address_zh), 1)) 22655 : _createCommentVNode("", true)]), _createElementVNode("footer", null, [(assistMode==='chinese'&&(navDestination.address_zh||navDestination.name_zh)) 22656 ? (_openBlock(), _createElementBlock("button", { 22657 key: 0, 22658 class: "routeAssistCopy", 22659 onClick: copyAssistAddress 22660 }
22660, _toDisplayString(assistCopyState==='copied'?'ت٠اÙÙØ³Ø®':(assistCopyState==='failed'?'ØªØ¹Ø°ÙØ± اÙÙØ³Ø®':'ÙØ³Ø® Ø§ÙØ¹ÙÙØ§Ù')), 9, _hoisted_137)) 22661 : _createCommentVNode("", true), (assistCopyState==='failed') 22662 ? (_openBlock(), _createElementBlock("p", _hoisted_138, "ÙÙ ÙÙÙ Ø¥Ø¸ÙØ§Ø± Ø§ÙØ´Ø§Ø´Ø© ٠باشرة ÙÙØ´Ø®Øµ أ٠ا٠Ù.")) 22663 : _createCommentVNode("", true), (navDestination.map_url) 22664 ? (_openBlock(), _createElementBlock("button", { 22665 key: 2, 22666 class: "routeAssistAmap", 22667 onClick: openAmap 22668 }, "Ø§ÙØªØ اÙÙØ¬ÙØ© ÙÙ AMap", 8, _hoisted_139)) 22669 : _createCommentVNode("", true)])], 10, _hoisted_131)) 22670 : _createCommentVNode("", true) 22671 ], 64)) 22672 : _createCommentVNode("", true)]), 22673 _: 1 22674 })) 22675 } 22676} 22677})()}; 22678 22679 const OfficialCircularCenterPage={components:{PublicFrame},setup(){const countries=ref([]),country=ref(''),items=ref([]);async function loadCountries(){const r=await api('/api/platform/countries');countries.value=safeArray(r.countries).filter(x=>x.circulars_enabled);if(!country.value&&countries.value.length)country.value='SD';}async function load(){const r=await api('/api/official-circulars'+(country.value?'?country='+encodeURIComponent(country.value):''));items.value=safeArray(r.items);}onMounted(async()=>{await loadCountries();await load();});watch(country,load);return{countries,country,items,shortDate,safeExternalHttpUrl};},render:(function(){ 22680const _Vue = Vue 22681const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode } = _Vue 22682 22683const _hoisted_1 = { class: "card dailyHero" } 22684const _hoisted_2 = { class: "fieldLabel" } 22685const _hoisted_3 = ["onUpdate:modelValue"] 22686const _hoisted_4 = ["value"] 22687const _hoisted_5 = { class: "dailyList card" } 22688const _hoisted_6 = ["href"] 22689const _hoisted_7 = { 22690 key: 0, 22691 class: "hint" 22692} 22693 22694return function render(_ctx, _cache) { 22695 with (_ctx) { 22696 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 22697 22698 const _component_PublicFrame = _resolveComponent("PublicFrame") 22699 22700 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©" }, { 22701 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [ 22702 _cache[2] || (_cache[2] = _createElementVNode("span", { class: "adminEyebrow" }, "Official Circulars", -1)), 22703 _cache[3] || (_cache[3] = _createElementVNode("h2", null, "Ø³ÙØ§Ø±Ø§Øª ÙÙÙØµÙÙØ§Øª ÙØ¬Ùات Ø±Ø³Ù ÙØ©", -1)), 22704 _cache[4] || (_cache[4] = _createElementVNode("p", null, "اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر ÙÙØ· ٠٠اÙÙÙÙØ§Øª Ø§ÙØ±Ø³Ù ÙØ© اÙ٠عت٠دة أ٠بعد اÙ٠راجعة Ø§ÙØ¨Ø´Ø±ÙØ©.", -1)), 22705 _createElementVNode("label", _hoisted_2, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "Ø§ÙØ¯ÙÙØ©", -1)), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((country) = $event) }, [_cache[0] || (_cache[0] = _createElementVNode("option", { value: "" }, "ÙÙ Ø§ÙØ¯ÙÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(countries, (c) => { 22706 return (_openBlock(), _createElementBlock("option", { 22707 key: c.code, 22708 value: c.code 22709 }, _toDisplayString(c.name_ar), 9, _hoisted_4)) 22710 }), 128))], 8, _hoisted_3), [[_vModelSelect, country]])]) 22711 ]), _createElementVNode("section", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (x) => { 22712 return (_openBlock(), _createElementBlock("article", { 22713 class: "officialDailyItem", 22714 key: x.id 22715 }, [ 22716 _cache[5] || (_cache[5] = _createElementVNode("span", { class: "trustBadge official" }, "رس٠Ù", -1)), 22717 _createElementVNode("h3", null, _toDisplayString(x.title), 1), 22718 _createElementVNode("small", null, _toDisplayString(x.country_name_ar) + " · " + _toDisplayString(x.source_name_ar) + " · " + _toDisplayString(shortDate(x.source_published_at||x.created_at)), 1), 22719 _createElementVNode("p", null, _toDisplayString(x.body), 1),
22720 (safeExternalHttpUrl(x.source_url)) 22721 ? (_openBlock(), _createElementBlock("a", { 22722 key: 0, 22723 class: "smallbtn secondary", 22724 href: safeExternalHttpUrl(x.source_url), 22725 target: "_blank", 22726 rel: "noopener noreferrer" 22727 }, "اÙ٠صدر Ø§ÙØ±Ø³Ù Ù â", 8, _hoisted_6)) 22728 : _createCommentVNode("", true) 22729 ])) 22730 }), 128)), (!items.length) 22731 ? (_openBlock(), _createElementBlock("p", _hoisted_7, "ÙØ§ ØªÙØ¬Ø¯ تع٠Ù٠ات Ù ÙØ´Ùرة ÙÙ ÙØ°Ø§ Ø§ÙØ§Ø®ØªÙار.")) 22732 : _createCommentVNode("", true)])]), 22733 _: 1 22734 })) 22735 } 22736} 22737})()}; 22738 22739 22740 const ServicesDirectoryPage={components:{PublicFrame},setup(){const router=useRouter(),items=ref([]),hubs=ref([]),filters=reactive({city:String(useRoute().query.city||''),trust_tier:''});async function load(){const qs=new URLSearchParams();if(filters.city)qs.set('city',filters.city);if(filters.trust_tier)qs.set('trust_tier',filters.trust_tier);const [r,h]=await Promise.all([api('/api/services-directory?'+qs.toString()),api('/api/city-hubs')]);items.value=safeArray(r.items);hubs.value=safeArray(h.hubs);}onMounted(load);watch(()=>[filters.city,filters.trust_tier],load);function trust(x){return x==='official'?'Official':x==='smt_verified'?'SMT Verified':'Community Listed';}return{router,items,hubs,filters,trust};},render:(function(){ 22741const _Vue = Vue 22742const { createElementVNode: _createElementVNode } = _Vue 22743 22744const _hoisted_1 = { class: "card dailyFilters" } 22745const _hoisted_2 = ["onUpdate:modelValue"] 22746const _hoisted_3 = ["value"] 22747const _hoisted_4 = ["onUpdate:modelValue"] 22748const _hoisted_5 = { class: "dailyGrid" } 22749const _hoisted_6 = ["onClick"] 22750 22751return function render(_ctx, _cache) { 22752 with (_ctx) { 22753 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, normalizeClass: _normalizeClass, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 22754 22755 const _component_PublicFrame = _resolveComponent("PublicFrame") 22756 22757 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø§ÙØ®Ø¯Ù ات اÙÙ ÙØ«ÙÙØ©" }, { 22758 default: _withCtx(() => [_cache[3] || (_cache[3] = _createElementVNode("section", { class: "card dailyHero" }, [_createElementVNode("span", { class: "adminEyebrow" }, "Trusted Services"), _createElementVNode("h2", null, "دÙÙ٠خد٠ات بدرجات Ø«ÙØ© ÙØ§Ø¶ØØ©"), _createElementVNode("p", null, "Official ÙÙ٠صادر Ø§ÙØ±Ø³Ù ÙØ© اÙÙ Ø±Ø¨ÙØ·Ø© بسج٠اÙÙ ØµØ§Ø¯Ø±Ø SMT Verified ÙÙ٠عÙÙ٠ات Ø§ÙØªÙ Ø±Ø§Ø¬Ø¹ØªÙØ§ SMTØ ÙCommunity Listed ÙÙØ¥Ø¯Ø±Ø§Ø¬ اÙ٠جت٠عÙ.")], -1)), _createElementVNode("section", _hoisted_1, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((filters.city) = $event) }, [_cache[0] || (_cache[0] = _createElementVNode("option", { value: "" }, "Ù٠اÙ٠دÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(hubs, (c) => { 22759 return (_openBlock(), _createElementBlock("option", { 22760 value: c.name_en, 22761 key: c.city_key 22762 }, _toDisplayString(c.name_ar), 9, _hoisted_3)) 22763 }), 128))], 8, _hoisted_2), [[_vModelSelect, filters.city]]), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((filters.trust_tier) = $event) }, _cache[1] || (_cache[1] = [ 22764 _createElementVNode("option", { value: "" }, "Ù٠درجات Ø§ÙØ«ÙØ©", -1), 22765 _createElementVNode("option", { value: "official" }, "Official", -1), 22766 _createElementVNode("option", { value: "smt_verified" }, "SMT Verified", -1), 22767 _createElementVNode("option", { value: "community_listed" }, "Community Listed", -1) 22768 ]), 8, _hoisted_4), [[_vModelSelect, filters.trust_tier]])]), _createElementVNode("section", _hoisted_5, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items, (x) => { 22769 return (_openBlock(), _createElementBlock("button", { 22770 class: "card dailyTile serviceTrustCard", 22771 key: x.id, 22772 onClick: $event => (router.push('/china-guide/'+x.id)) 22773 }, [ 22774 _createElementVNode("span", { class: _normalizeClass(["trustBadge", x.trust_tier]) }, _toDisplayString(trust(x.trust_tier)), 3), 22775 _createElementVNode("b", null, _toDisplayString(x.title_ar), 1), 22776 _createElementVNode("small", null, _toDisplayString($cityLabel(x.city)) + " · " + _toDisplayString(x.district), 1), 22777 _createElementVNode("p", null, _toDisplayString(x.summary_ar), 1), 22778 _cache[2] || (_cache[2] = _createElementVNode("em", null, "ÙØªØ Ø§ÙØªÙاصÙÙ â", -1)) 22779 ], 8, _hoisted_6)) 22780 }), 128))])]), 22781 _: 1, 22782 __: [3] 22783 })) 22784 } 22785} 22786})()}; 22787 22788 const ToolkitPage={components:{PublicFrame},setup(){const router=useRouter(),tools=ref([]);onMounted(async()=>{const r=await api('/api/toolkit');tools.value=safeArray(r.tools)});function open(x){router.push('/china-guide?search='+encodeURIComponent(x.search));}return{router,tools,open};},render:(function(){ 22789const _Vue = Vue
22790const { createElementVNode: _createElementVNode } = _Vue 22791 22792const _hoisted_1 = { class: "dailyGrid" } 22793const _hoisted_2 = ["onClick"] 22794const _hoisted_3 = { class: "dailyIcon" } 22795 22796return function render(_ctx, _cache) { 22797 with (_ctx) { 22798 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 22799 22800 const _component_PublicFrame = _resolveComponent("PublicFrame") 22801 22802 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "Ø£Ø¯ÙØ§Øª Ø§ÙØÙØ§Ø© ÙÙ Ø§ÙØµÙÙ" }, { 22803 default: _withCtx(() => [_cache[1] || (_cache[1] = _createElementVNode("section", { class: "card dailyHero" }, [_createElementVNode("span", { class: "adminEyebrow" }, "China Life Toolkit"), _createElementVNode("h2", null, "اختصارات ع٠ÙÙØ© ÙÙØÙØ§Ø© اÙÙÙÙ ÙØ©"), _createElementVNode("p", null, "Ø§ÙØ¯ÙØ¹Ø Ø§ÙÙ ÙØ§ØµÙØ§ØªØ Ø§ÙÙØ·Ø§Ø±Ø§ØªØ اÙÙ Ø·Ø§Ø±Ø§ØªØ Ø§ÙØ¹ÙاÙÙÙ ÙØ§ÙØ·ÙØ§Ø±Ø¦ Ù Ù Ù ÙØ§Ù ÙØ§ØØ¯.")], -1)), _createElementVNode("section", _hoisted_1, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tools, (x) => { 22804 return (_openBlock(), _createElementBlock("button", { 22805 class: "card dailyTile", 22806 key: x.key, 22807 onClick: $event => (open(x)) 22808 }, [ 22809 _createElementVNode("span", _hoisted_3, _toDisplayString(x.icon), 1), 22810 _createElementVNode("b", null, _toDisplayString(x.title_ar), 1), 22811 _createElementVNode("p", null, _toDisplayString(x.summary_ar), 1), 22812 _cache[0] || (_cache[0] = _createElementVNode("em", null, "Ø§Ø¨ØØ« ÙÙ Ø§ÙØ¯ÙÙÙ â", -1)) 22813 ], 8, _hoisted_2)) 22814 }), 128))])]), 22815 _: 1, 22816 __: [1] 22817 })) 22818 } 22819} 22820})()}; 22821 22822 const ChinaAppsPage={ 22823 components:{PublicFrame}, 22824 setup(){ 22825 const apps=ref([]),categories=ref([]),loading=ref(false),error=ref(''),query=ref(''),category=ref('all'),selected=ref(''); 22826 let controller=null; 22827 const filtered=computed(()=>{ 22828 const q=String(query.value||'').trim().toLocaleLowerCase(); 22829 return apps.value.filter(app=>(category.value==='all'||app.category===category.value)&&(!q||[app.name,app.zh,app.summary].some(v=>String(v||'').toLocaleLowerCase().includes(q)))); 22830 }); 22831 async function load(){ 22832 if(controller)controller.abort(); 22833 controller=new AbortController();const current=controller; 22834 loading.value=true;error.value=''; 22835 const timer=setTimeout(()=>current.abort(),8000); 22836 try{ 22837 const response=await fetch('/vue/assets/china-apps.json?v='+VERSION+'-ui027',{signal:current.signal,cache:'force-cache'}); 22838 if(!response.ok)throw new Error('HTTP '+response.status); 22839 const data=await response.json(); 22840 if(!Array.isArray(data.apps)||!Array.isArray(data.categories)||!data.apps.length)throw new Error('Invalid apps guide'); 22841 apps.value=data.apps;categories.value=data.categories; 22842 }catch(_){if(current===controller)error.value='ØªØ¹Ø°ÙØ± تØÙ Ù٠دÙÙÙ Ø§ÙØªØ·Ø¨ÙÙØ§Øª. تØÙ٠٠٠اتصاÙ٠ث٠أعد اÙÙ ØØ§ÙÙØ©.';} 22843 finally{clearTimeout(timer);if(current===controller){loading.value=false;controller=null;}} 22844 } 22845 async function toggle(id,event){ 22846 const opening=selected.value!==id; 22847 selected.value=opening?id:''; 22848 if(!opening)return; 22849 await nextTick(); 22850 const card=event&&event.currentTarget&&event.currentTarget.closest('.chinaAppCard'); 22851 if(card)card.scrollIntoView({behavior:window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches?'auto':'smooth',block:'start'}); 22852 } 22853 onMounted(load);onUnmounted(()=>{if(controller)controller.abort();}); 22854 return{apps,categories,loading,error,query,category,selected,filtered,load,toggle}; 22855 }, 22856 render:(function(){ 22857const _Vue = Vue 22858const { createElementVNode: _createElementVNode, createCommentVNode: _
22858createCommentVNode, createTextVNode: _createTextVNode } = _Vue 22859 22860const _hoisted_1 = { 22861 class: "chinaAppsControls", 22862 "aria-label": "Ø§ÙØ¨ØØ« ÙØ§ÙتصÙÙÙØ§Øª" 22863} 22864const _hoisted_2 = { class: "chinaAppsSearch" } 22865const _hoisted_3 = ["onUpdate:modelValue"] 22866const _hoisted_4 = { class: "chinaAppsFilters" } 22867const _hoisted_5 = ["aria-pressed", "onClick"] 22868const _hoisted_6 = ["aria-pressed", "onClick"] 22869const _hoisted_7 = { 22870 key: 0, 22871 class: "card chinaAppsStatus", 22872 role: "status" 22873} 22874const _hoisted_8 = { 22875 key: 1, 22876 class: "card chinaAppsStatus", 22877 role: "alert" 22878} 22879const _hoisted_9 = ["onClick"] 22880const _hoisted_10 = { 22881 class: "chinaAppsCount", 22882 role: "status" 22883} 22884const _hoisted_11 = { 22885 key: 0, 22886 class: "card chinaAppsStatus" 22887} 22888const _hoisted_12 = { 22889 class: "chinaAppsList", 22890 "aria-label": "Ø§ÙØªØ·Ø¨ÙÙØ§Øª" 22891} 22892const _hoisted_13 = ["aria-expanded", "onClick"] 22893const _hoisted_14 = { class: "chinaAppGlyph" } 22894const _hoisted_15 = ["src"] 22895const _hoisted_16 = { class: "chinaAppIdentity" } 22896const _hoisted_17 = { 22897 lang: "zh-CN", 22898 dir: "ltr" 22899} 22900const _hoisted_18 = { class: "chinaAppExpand" } 22901const _hoisted_19 = { 22902 key: 0, 22903 class: "chinaAppDetail" 22904} 22905const _hoisted_20 = { class: "chinaAppSteps" } 22906const _hoisted_21 = { class: "chinaAppDownloadStep" } 22907const _hoisted_22 = { class: "chinaAppStepCopy" } 22908const _hoisted_23 = { class: "chinaStoreLinks" } 22909const _hoisted_24 = ["href", "aria-label"] 22910const _hoisted_25 = ["href", "aria-label"] 22911const _hoisted_26 = { class: "chinaAppStepCopy" } 22912const _hoisted_27 = { class: "chinaAppStepFigure" } 22913const _hoisted_28 = ["src", "alt"] 22914const _hoisted_29 = { class: "chinaAppStepCopy" } 22915const _hoisted_30 = { class: "chinaAppStepFigure" } 22916const _hoisted_31 = ["src", "alt"] 22917const _hoisted_32 = { class: "chinaAppStepCopy" } 22918const _hoisted_33 = { class: "chinaAppStepFigure" } 22919const _hoisted_34 = ["src", "alt"] 22920const _hoisted_35 = ["href"] 22921const _hoisted_36 = { class: "chinaAppFaq" } 22922 22923return function render(_ctx, _cache) { 22924 with (_ctx) { 22925 const { createElementVNode: _createElementVNode, vModelText: _vModelText, withDirectives: _withDirectives, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 22926 22927 const _component_PublicFrame = _resolveComponent("PublicFrame") 22928 22929 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "تطبÙÙØ§Øª Ù ÙÙ Ø© ÙÙ Ø§ÙØµÙÙ" }, { 22930 default: _withCtx(() => [_cache[12] || (_cache[12] = _createElementVNode("section", { class: "card chinaAppsIntro" }, [ 22931 _createElementVNode("span", { class: "sectionEyebrow" }, "دÙÙ٠ع٠ÙÙ ÙÙØ£Ø¬Ø§Ùب ÙØ§Ùعرب"), 22932 _createElementVNode("h2", null, "تطبÙÙØ§Øª Ù ÙÙ Ø© ÙÙ Ø§ÙØµÙÙ"), 22933 _createElementVNode("p", null, "ابدأ Ø¨Ø§ÙØ¯Ùع ÙØ§ÙØ®Ø±Ø§Ø¦Ø·Ø Ø«Ù Ø§Ø®ØªØ± Ø§ÙØªØ·Ø¨ÙÙØ§Øª اÙÙ ÙØ§Ø³Ø¨Ø© ÙÙØ³Ùر ÙØ§ÙØÙاة اÙÙÙÙ ÙØ© ÙØ§Ùتجارة. Ø§ÙØªØ أ٠تطبÙÙ ÙÙØ±Ø§Ø¡Ø© Ø®Ø·ÙØ§Øª Ø§ÙØªÙزÙÙ ÙØ§ÙØªØ«Ø¨ÙØª ÙØ§ÙتسجÙÙ ÙØ§ÙØ§Ø³ØªØ®Ø¯Ø§Ù ÙØ§ÙØ£Ø³Ø¦ÙØ© Ø§ÙØ´Ø§Ø¦Ø¹Ø©."), 22934 _createElementVNode("p", { class: "chinaAppsCaution" }, "ÙØ²ÙÙ Ø§ÙØªØ·Ø¨Ù٠٠٠٠تجر ÙØ§ØªÙ٠أ٠٠ÙÙØ¹ Ø§ÙØ¬ÙØ© Ø§ÙØ±Ø³Ù ÙØ© ÙÙØ·. ÙØ¯ تختÙÙ Ø§ÙØ´Ø§Ø´Ø§Øª ÙØ§ÙØ¨Ø·Ø§ÙØ§Øª اÙÙ ÙØ¨ÙÙØ© ÙØ®Ø·Ùات Ø§ÙØªØÙÙ ØØ³Ø¨ Ø§ÙØ¨Ùد ÙØ¥ØµØ¯Ø§Ø± Ø§ÙØªØ·Ø¨ÙÙ.") 22935 ], -1)), _createElementVNode("section", _hoisted_1, [_createElementVNode("label", _hoisted_2, [_cache[0] || (_cache[0] = _createTextVNode("Ø§Ø¨ØØ« ع٠تطبÙÙ")), _withDirectives(_createElementVNode("input", { 22936 "onUpdate:modelValue": $event => ((query) = $event), 22937 type: "search", 22938 placeholder: "٠ثاÙ: Alipay أ٠اÙÙØ·Ø§Ø±Ø§Øª Ø£Ù æ¯ä»å®", 22939 autocomplete: "off" 22940 }, null, 8, _hoisted_3), [[_vModelText, query]])]), _createElementVNode("div", _hoisted_4, [_createElementVNode("button", { 22941 type: "button", 22942 class: _normalizeClass({active:category==='all'}), 22943 "aria-pressed": category==='all', 22944 onClick: $event => (category='all') 22945 }, "اÙÙÙ", 10, _hoisted_5), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(categories, (item) => { 22946 return (_openBlock(), _createElementBlock("button", { 22947 key: item.key, 22948 type: "button", 22949 class: _normalizeClass({active:category===item.key}), 22950 "aria-pressed": category===item.key, 22951 onClick: $event => (category=item.key) 22952 }, _toDisplayString(item.label), 11, _hoisted_6)) 22953 }), 128))])]), loading 22954 ? (_openBlock(), _createElementBlock("p", _hoisted_7, "جار٠تØÙ Ù٠دÙÙÙ Ø§ÙØªØ·Ø¨ÙÙØ§Øªâ¦")) 22955 : error 22956 ? (_openBlock(), _createElementBlock("section", _hoisted_8, [_createElementVNode("p", null, _toDisplayString(error), 1), _createElementVNode("button", { 22957 class: "smallbtn", 22958 type: "button", 22959 onClick: load 22960 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_9)])) 22961 : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [ 22962 _createElementVNode("p", _hoisted_10, _toDisplayString(filtered.length) + " Ù Ù " + _toDisplayString(apps.length) + " تطبÙÙÙØ§", 1), 22963 (!filtered.length) 22964 ? (_openBlock(), _createElementBlock("p", _hoisted_11, "ÙØ§ ØªÙØ¬Ø¯ تطبÙÙØ§Øª ØªØ·Ø§Ø¨Ù Ø§ÙØ¨ØØ«. Ø¬Ø±ÙØ¨ Ø§Ø³Ù ÙØ§ آخر أ٠اختر «اÙÙÙ».")) 22965 : _createCommentVNode("", true), 22966 _createElementVNode("section", _hoisted_12, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(filtered, (app) => { 22967 return (_openBlock(), _createElementBlock("article", { 22968 key: app.id, 22969 class: "card chinaAppCard" 22970 }, [_createElementVNode("button", { 22971 class: "chinaAppHead", 22972 type: "button", 22973 "aria-expanded": selected===app.id, 22974 onClick: $event => (toggle(app.id,$event)) 22975 }, [_createElementVNode("span", _hoisted_14, [_createElementVNode("img", { 22976 src: app.icon_url, 22977 alt: "", 22978 width: "52", 22979 height: "52", 22980 loading: "lazy"
22981 }, null, 8, _hoisted_15)]), _createElementVNode("span", _hoisted_16, [_createElementVNode("b", null, [_createTextVNode(_toDisplayString(app.name) + " ", 1), _createElementVNode("small", _hoisted_17, _toDisplayString(app.zh), 1)]), _createElementVNode("span", null, _toDisplayString(app.summary), 1)]), _createElementVNode("span", _hoisted_18, _toDisplayString(selected===app.id?'Ø¥ØºÙØ§Ù':'عرض Ø§ÙØ¯ÙÙÙ'), 1)], 8, _hoisted_13), (selected===app.id) 22982 ? (_openBlock(), _createElementBlock("div", _hoisted_19, [_createElementVNode("div", _hoisted_20, [ 22983 _createElementVNode("section", _hoisted_21, [_createElementVNode("div", _hoisted_22, [_cache[3] || (_cache[3] = _createElementVNode("h3", null, [_createElementVNode("span", null, "1"), _createTextVNode(" Ø§ÙØªÙزÙÙ")], -1)), _createElementVNode("p", null, _toDisplayString(app.download), 1), _createElementVNode("div", _hoisted_23, [_createElementVNode("a", { 22984 href: app.ios_url, 22985 target: "_blank", 22986 rel: "noopener noreferrer", 22987 "aria-label": 'ØªÙØ²ÙÙ '+app.name+' Ù Ù App Store' 22988 }, _cache[1] || (_cache[1] = [_createElementVNode("span", { "aria-hidden": "true" }, "â", -1), _createElementVNode("small", null, "ØªÙØ²ÙÙ Ù Ù", -1), _createElementVNode("b", null, "App Store", -1)]), 8, _hoisted_24), _createElementVNode("a", { 22989 href: app.google_play_url, 22990 target: "_blank", 22991 rel: "noopener noreferrer", 22992 "aria-label": 'ØªÙØ²ÙÙ '+app.name+' Ù Ù Google Play' 22993 }, _cache[2] || (_cache[2] = [_createElementVNode("span", { "aria-hidden": "true" }, "â¶", -1), _createElementVNode("small", null, "ØªÙØ²ÙÙ Ù Ù", -1), _createElementVNode("b", null, "Google Play", -1)]), 8, _hoisted_25)])])]), 22994 _createElementVNode("section", null, [_createElementVNode("div", _hoisted_26, [_cache[4] || (_cache[4] = _createElementVNode("h3", null, [_createElementVNode("span", null, "2"), _createTextVNode(" Ø§ÙØªØ«Ø¨Ùت")], -1)), _createElementVNode("p", null, _toDisplayString(app.install), 1)]), _createElementVNode("figure", _hoisted_27, [_createElementVNode("img", { 22995 src: app.screenshots.install, 22996 alt: 'ÙÙØ·Ø© ØÙÙÙÙØ© Ù Ù ÙØ§Ø¬ÙØ© تطبÙÙ '+app.name, 22997 width: "310",
22998 height: "550", 22999 loading: "lazy" 23000 }, null, 8, _hoisted_28), _cache[5] || (_cache[5] = _createElementVNode("figcaption", null, "ÙÙØ·Ø© ØÙÙÙÙØ© Ù Ù ØµÙØØ© Ø§ÙØªØ·Ø¨ÙÙ Ø§ÙØ±Ø³Ù ÙØ©Ø ÙØ¯ ÙØ®ØªÙÙ ØªØ±ØªÙØ¨ Ø§ÙØ´Ø§Ø´Ø© ØØ³Ø¨ Ø§ÙØ¥ØµØ¯Ø§Ø±.", -1))])]), 23001 _createElementVNode("section", null, [_createElementVNode("div", _hoisted_29, [_cache[6] || (_cache[6] = _createElementVNode("h3", null, [_createElementVNode("span", null, "3"), _createTextVNode(" Ø§ÙØªØ³Ø¬ÙÙ")], -1)), _createElementVNode("p", null, _toDisplayString(app.signup), 1)]), _createElementVNode("figure", _hoisted_30, [_createElementVNode("img", { 23002 src: app.screenshots.signup, 23003 alt: 'ÙÙØ·Ø© ØÙÙÙÙØ© Ù Ù ÙØ§Ø¬ÙØ© تطبÙÙ '+app.name, 23004 width: "310", 23005 height: "550", 23006 loading: "lazy" 23007 }, null, 8, _hoisted_31), _cache[7] || (_cache[7] = _createElementVNode("figcaption", null, "ÙØ§Ø¬ÙØ© ØÙÙÙÙØ© ÙÙØªØ·Ø¨ÙÙ. اتبع ÙØµ Ø§ÙØ®Ø·ÙØ© ÙØ£Ù Ù ÙØ¶Ø¹ Ø§ÙØ®Ùارات ÙØ¯ ÙØªØºÙر.", -1))])]), 23008 _createElementVNode("section", null, [_createElementVNode("div", _hoisted_32, [_cache[8] || (_cache[8] = _createElementVNode("h3", null, [_createElementVNode("span", null, "4"), _createTextVNode(" Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù ")], -1)), _createElementVNode("p", null, _toDisplayString(app.use), 1)]), _createElementVNode("figure", _hoisted_33, [_createElementVNode("img", { 23009 src: app.screenshots.use, 23010 alt: 'ÙÙØ·Ø© ØÙÙÙÙØ© Ù Ù ÙØ§Ø¬ÙØ© تطبÙÙ '+app.name, 23011 width: "310",
23012 height: "550", 23013 loading: "lazy" 23014 }, null, 8, _hoisted_34), _cache[9] || (_cache[9] = _createElementVNode("figcaption", null, "٠ثا٠ØÙÙÙÙ Ù Ù ÙØ§Ø¬ÙØ© Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù Ø§ÙØ±Ø³Ù ÙØ© ÙÙØªØ·Ø¨ÙÙ.", -1))])]) 23015 ]), _createElementVNode("a", { 23016 class: "chinaAppOfficial", 23017 href: app.official, 23018 target: "_blank", 23019 rel: "noopener noreferrer" 23020 }, "ÙØªØ Ù ÙÙØ¹ Ø§ÙØ¬ÙØ© Ø§ÙØ±Ø³Ù ÙØ© â", 8, _hoisted_35), _createElementVNode("div", _hoisted_36, [_cache[10] || (_cache[10] = _createElementVNode("h3", null, "Ø§ÙØ£Ø³Ø¦ÙØ© Ø§ÙØ´Ø§Ø¦Ø¹Ø© (FAQ)", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(app.faq, (faq, index) => { 23021 return (_openBlock(), _createElementBlock("details", { key: index }, [_createElementVNode("summary", null, _toDisplayString(faq.q), 1), _createElementVNode("p", null, _toDisplayString(faq.a), 1)])) 23022 }), 128))])])) 23023 : _createCommentVNode("", true)])) 23024 }), 128))]), 23025 _cache[11] || (_cache[11] = _createElementVNode("p", { class: "chinaAppsReferences" }, [_createTextVNode("آخر ٠راجعة: 5 Ø£ÙØªÙبر 2026 · "), _createElementVNode("a", { 23026 href: "https://english.www.gov.cn/2025special/bizexpatsinchina2025", 23027 target: "_blank", 23028 rel: "noopener noreferrer" 23029 }, "دÙÙÙ Ø§ÙØÙÙÙ Ø© Ø§ÙØµÙÙÙØ© ÙÙØ²Ùار ÙØ§ÙÙ ÙÙÙ ÙÙ"), _createTextVNode(" · Ø§ÙØ£ÙÙÙÙØ§Øª ÙÙÙØ·Ø§Øª اÙÙØ§Ø¬ÙØ© Ù Ø£Ø®ÙØ°Ø© Ù Ù ØµÙØØ§Øª Ø§ÙØªØ·Ø¨ÙÙØ§Øª Ø§ÙØ±Ø³Ù ÙØ© ÙÙ App StoreØ ÙÙØ¯ تختÙÙ ØØ³Ø¨ Ø§ÙØ¥ØµØ¯Ø§Ø± ÙØ§ÙÙ ÙØ·ÙØ©.")], -1)) 23030 ], 64))]), 23031 _: 1, 23032 __: [12] 23033 })) 23034 } 23035} 23036})() 23037 }; 23038 23039 const ExhibitionsPage={components:{PublicFrame},setup(){ 23040 const store=useGzcStore(),router=useRouter(),route=useRoute(),items=ref([]),hubs=ref([]),saved=ref(new Set()),reminders=ref([]), 23041 now=ref(Date.now()),filters=reactive({city:String(route.query.city||''),sector:'',showEnded:false}); 23042 let ticker=null; 23043 async function load(){ 23044 const qs=new URLSearchParams();if(filters.city)qs.set('city',filters.city);if(filters.sector)qs.set('sector',filters.sector); 23045 const [r,h]=await Promise.all([api('/api/exhibitions?'+qs.toString()),api('/api/city-hubs')]); 23046 items.value=safeArray(r.items);hubs.value=safeArray(h.hubs); 23047 if(store.state.me&&store.state.me.authenticated){ 23048 const s=await api('/api/member/saved-items'); 23049 saved.value=new Set(safeArray(s.items).filter(x=>x.item_type==='exhibition').map(x=>String(x.item_id))); 23050 const rem=await api('/api/member/exhibition-reminders');reminders.value=safeArray(rem.items); 23051 } 23052 } 23053 async function toggleSave(x){ 23054 if(!await store.requireMember(router,'/exhibitions'))return; 23055 const on=saved.value.has(String(x.id)); 23056 const r=await api(on?'/api/member/saved-items/remove':'/api/member/saved-items',{method:'POST',body:JSON.stringify({item_type:'exhibition',item_id:String(x.id)})}); 23057 store.state.msg=r.message||r.error||(r.ok?(on?'Ø£ÙÙØºÙ Ø§ÙØªØ°ÙÙØ±.':'Ø³ÙØ°ÙÙØ±Ù ÙØ¨Ù اÙ٠عرض ب٠30 Ù7 ÙÙÙÙ ÙØ§ØØ¯.'):''); 23058 if(r.ok)load(); 23059 } 23060 function addToCalendar(x){ 23061 const text=ExhibitionCountdown.icsFor(x,window.location.hostname); 23062 if(!text)return; 23063 const url=URL.createObjectURL(new Blob([text],{type:'text/calendar;charset=utf-8'})); 23064 const a=document.createElement('a');a.href=url;a.download='exhibition-'+x.id+'.ics';document.body.appendChild(a);a.click();a.remove(); 23065 setTimeout(()=>URL.revokeObjectURL(url),4000); 23066 } 23067 const rows=computed(()=>ExhibitionCountdown.sortItems(items.value,now.value).filter(r=>filters.showEnded||r.state.phase!=='ended')); 23068 const hero=computed(()=>rows.value.find(r=>r.state.phase==='ongoing'||r.state.phase==='upcoming')||null); 23069 const phaseLabel=p=>({ongoing:'Ø¬Ø§Ø±Ù Ø§ÙØ¢Ù',upcoming:'ÙØ§Ø¯Ù ',ended:'Ø§ÙØªÙÙ',unknown:'Ø§ÙØªØ§Ø±ÙØ® ÙÙØ¯ Ø§ÙØªØ£ÙÙØ¯'}[p]||''); 23070 const pad=ExhibitionCountdown.pad; 23071 onMounted(async()=>{await store.loadMe();await load();ticker=setInterval(()=>{now.value=Date.now();},1000);}); 23072 onUnmounted(()=>
23072{if(ticker)clearInterval(ticker);}); 23073 watch(()=>[filters.city,filters.sector],load); 23074 return{store,router,rows,hero,hubs,saved,filters,reminders,toggleSave,addToCalendar,phaseLabel,pad,safeExternalHttpUrl}; 23075 },render:(function(){ 23076const _Vue = Vue 23077const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 23078 23079const _hoisted_1 = { class: "adminEyebrow" } 23080const _hoisted_2 = { 23081 class: "exClock", 23082 role: "timer", 23083 "aria-live": "off" 23084} 23085const _hoisted_3 = { class: "row" } 23086const _hoisted_4 = ["onClick"] 23087const _hoisted_5 = ["onClick"] 23088const _hoisted_6 = { 23089 key: 1, 23090 class: "card dailyHero" 23091} 23092const _hoisted_7 = { 23093 key: 2, 23094 class: "card exReminders" 23095} 23096const _hoisted_8 = ["onClick"] 23097const _hoisted_9 = { class: "card dailyFilters" } 23098const _hoisted_10 = ["onUpdate:modelValue"] 23099const _hoisted_11 = ["value"] 23100const _hoisted_12 = ["onUpdate:modelValue"] 23101const _hoisted_13 = { class: "checkRow" } 23102const _hoisted_14 = ["onUpdate:modelValue"] 23103const _hoisted_15 = { class: "dailyGrid" } 23104const _hoisted_16 = { class: "exCardTop" } 23105const _hoisted_17 = { class: "row" } 23106const _hoisted_18 = ["onClick"] 23107const _hoisted_19 = ["href"] 23108const _hoisted_20 = ["onClick"] 23109const _hoisted_21 = ["onClick"] 23110const _hoisted_22 = { 23111 key: 0, 23112 class: "hint" 23113} 23114 23115return function render(_ctx, _cache) { 23116 with (_ctx) { 23117 const { toDisplayString: _toDisplayString, createElementVNode: _createElementVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, normalizeClass: _normalizeClass, renderList: _renderList, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, vModelCheckbox: _vModelCheckbox, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 23118 23119 const _component_PublicFrame = _resolveComponent("PublicFrame") 23120 23121 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "اÙ٠عارض ÙÙ Ø§ÙØµÙÙ" }, { 23122 default: _withCtx(() => [ 23123 hero 23124 ? (_openBlock(), _createElementBlock("section", { 23125 key: 0, 23126 class: _normalizeClass(["card exCountdownHero", hero.state.phase]) 23127 }, [ 23128 _createElementVNode("span", _hoisted_1, _toDisplayString(hero.state.phase==='ongoing'?'ÙØ¬Ø±Ù Ø§ÙØ¢Ù · ÙÙØªÙ٠بعد':'اÙ٠عرض اÙÙØ§Ø¯Ù · ÙØ¨Ø¯Ø£ بعد'), 1), 23129 _createElementVNode("h2", null, _toDisplayString(hero.item.title_ar), 1), 23130 _createElementVNode("div", _hoisted_2, [ 23131 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(hero.state.parts.days), 1), _cache[0] || (_cache[0] = _createElementVNode("small", null, "ÙÙÙ ", -1))]), 23132 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(pad(hero.state.parts.hours)), 1), _cache[1] || (_cache[1] = _createElementVNode("small", null, "ساعة", -1))]), 23133 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(pad(hero.state.parts.minutes)), 1), _cache[2] || (_cache[2] = _createElementVNode("small", null, "دÙÙÙØ©", -1))]), 23134 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(pad(hero.state.parts.seconds)), 1), _cache[3] || (_cache[3] = _createElementVNode("small", null, "ثاÙÙØ©", -1))]) 23135 ]), 23136 _createElementVNode("small", null, [_createTextVNode(_toDisplayString($cityLabel(hero.item.city)) + " · " + _toDisplayString(hero.item.exhibition_start_date), 1), (hero.item.exhibition_end_date) 23137 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" â " + _toDisplayString(hero.item.exhibition_end_date), 1)], 64)) 23138 : _createCommentVNode("", true), _cache[4] || (_cache[4] = _createTextVNode(" · بتÙÙÙØª Ø§ÙØµÙÙ"))]), 23139 _createElementVNode("div", _hoisted_3, [_createElementVNode("button", { 23140 class: "smallbtn", 23141 onClick: $event => (router.push('/china-guide/'+hero.item.id)) 23142 }, "Ø§ÙØªÙاصÙÙ", 8, _hoisted_4), _createElementVNode("button", { 23143 class: "smallbtn secondary", 23144 onClick: $event => (toggleSave(hero.item)) 23145 }, _toDisplayString(saved.has(String(hero.item.id))?'â Ø³Ø£ÙذÙÙÙØ±':'ذÙÙØ±ÙÙ'), 9, _hoisted_5)]) 23146 ], 2)) 23147 : (_openBlock(), _createElementBlock("section", _hoisted_6, _cache[5] || (_cache[5] = [_createElementVNode("span", { class: "adminEyebrow" }, "Exhibitions Intelligence", -1), _createElementVNode("h2", null, "خطط ÙÙ٠عارض اÙÙ ÙÙ Ø©", -1), _createElementVNode("p", null, "Ø§ÙØªØ§Ø±ÙØ®Ø Ø§ÙÙØ·Ø§Ø¹Ø اÙ٠دÙÙØ©Ø Ø§ÙØªØ³Ø¬ÙÙ Ø§ÙØ±Ø³Ù Ù ÙØ§ÙتذÙÙØ±.", -1)]))), 23148 (reminders.length) 23149 ? (_openBlock(), _createElementBlock("section", _hoisted_7, [_cache[6] || (_cache[6] = _createElementVNode("h3", null, "تذÙÙØ±Ø§ØªÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(reminders, (r) => { 23150 return (_openBlock(), _createElementBlock("button", { 23151 key: r.id, 23152 class: "exReminderRow", 23153 onClick: $event => (router.push('/china-guide/'+r.id)) 23154 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(r.title_ar), 1), _createElementVNode("small", null, _toDisplayString(r.start_date), 1)]), _createElementVNode("em", null, _toDisplayString(r.phase==='ongoing'?'Ø¬Ø§Ø±Ù Ø§ÙØ¢Ù':('بعد '+r.days_until+' ÙÙÙ ')), 1)], 8, _hoisted_8)) 23155 }
23155), 128)), _cache[7] || (_cache[7] = _createElementVNode("small", { class: "hint" }, "Ø§ÙØªØ°ÙÙØ± عبر ÙØ§ØªØ³Ø§Ø¨ ÙØµÙÙ Ø¥Ù ÙØ¹ÙÙØªÙ ٠٠إعدادات Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª.", -1))])) 23156 : _createCommentVNode("", true), 23157 _createElementVNode("section", _hoisted_9, [_withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((filters.city) = $event) }, [_cache[8] || (_cache[8] = _createElementVNode("option", { value: "" }, "Ù٠اÙ٠دÙ", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(hubs, (c) => { 23158 return (_openBlock(), _createElementBlock("option", { 23159 value: c.name_en, 23160 key: c.city_key 23161 }, _toDisplayString($cityLabel(c)), 9, _hoisted_11)) 23162 }), 128))], 8, _hoisted_10), [[_vModelSelect, filters.city]]), _withDirectives(_createElementVNode("input", { 23163 "onUpdate:modelValue": $event => ((filters.sector) = $event), 23164 placeholder: "اÙÙØ·Ø§Ø¹: Ù Ø¹Ø¯Ø§ØªØ Ø·Ø§ÙØ©Ø Ø£Ø²ÙØ§Ø¡..." 23165 }, null, 8, _hoisted_12), [[_vModelText, filters.sector]]), _createElementVNode("label", _hoisted_13, [_withDirectives(_createElementVNode("input", { 23166 type: "checkbox", 23167 "onUpdate:modelValue": $event => ((filters.showEnded) = $event) 23168 }, null, 8, _hoisted_14), [[_vModelCheckbox, filters.showEnded]]), _cache[9] || (_cache[9] = _createTextVNode(" اÙÙ ÙØªÙÙØ©"))])]), 23169 _createElementVNode("section", _hoisted_15, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (r) => { 23170 return (_openBlock(), _createElementBlock("article", { 23171 class: _normalizeClass(["card exhibitionCard exCard", r.state.phase]), 23172 key: r.item.id 23173 }, [ 23174 _createElementVNode("div", _hoisted_16, [_createElementVNode("span", { class: _normalizeClass(["exPhase", r.state.phase]) }, _toDisplayString(phaseLabel(r.state.phase)), 3), _createElementVNode("span", { class: _normalizeClass(["trustBadge", r.item.trust_tier]) }, _toDisplayString(r.item.trust_tier==='official'?'Official':(r.item.trust_tier==='smt_verified'?'SMT Verified':'Listed')), 3)]), 23175 _createElementVNode("h3", null, _toDisplayString(r.item.title_ar), 1), 23176 _createElementVNode("small", null, [_createTextVNode(_toDisplayString($cityLabel(r.item.city)) + " · " + _toDisplayString(r.item.exhibition_start_date||'Ø§ÙØªØ§Ø±ÙØ® ÙÙØ¯ Ø§ÙØªØ£ÙÙØ¯'), 1), (r.item.exhibition_end_date) 23177 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" â " + _toDisplayString(r.item.exhibition_end_date), 1)], 64)) 23178 : _createCommentVNode("", true)]), 23179 (r.state.parts) 23180 ? (_openBlock(), _createElementBlock("div", { 23181 key: 0, 23182 class: _normalizeClass(["exClock mini", {near:r.state.near}]) 23183 }, [ 23184 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(r.state.parts.days), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "ÙÙÙ ", -1))]), 23185 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(pad(r.state.parts.hours)), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "س", -1))]), 23186 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(pad(r.state.parts.minutes)), 1), _cache[12] || (_cache[12] = _createElementVNode("small", null, "د", -1))]), 23187 _createElementVNode("div", null, [_createElementVNode("b", null, _toDisplayString(pad(r.state.parts.seconds)), 1), _cache[13] || (_cache[13] = _createElementVNode("small", null, "Ø«", -1))]) 23188 ], 2)) 23189 : _createCommentVNode("", true), 23190 _createElementVNode("p", null, _toDisplayString(r.item.summary_ar), 1), 23191 _createElementVNode("div", _hoisted_17, [ 23192 _createElementVNode("button", { 23193 class: "smallbtn", 23194 onClick: $event => (router.push('/china-guide/'+r.item.id)) 23195 }, "Ø§ÙØªÙاصÙÙ", 8, _hoisted_18),
23196 (safeExternalHttpUrl(r.item.registration_url)) 23197 ? (_openBlock(), _createElementBlock("a", { 23198 key: 0, 23199 class: "smallbtn secondary", 23200 href: safeExternalHttpUrl(r.item.registration_url), 23201 target: "_blank", 23202 rel: "noopener noreferrer" 23203 }, "Ø§ÙØªØ³Ø¬ÙÙ Ø§ÙØ±Ø³Ù Ù â", 8, _hoisted_19)) 23204 : _createCommentVNode("", true), 23205 (r.state.phase!=='ended'&&r.item.exhibition_start_date) 23206 ? (_openBlock(), _createElementBlock("button", { 23207 key: 1, 23208 class: "smallbtn secondary", 23209 onClick: $event => (toggleSave(r.item)) 23210 }, _toDisplayString(saved.has(String(r.item.id))?'â Ø³Ø£ÙذÙÙÙØ±':'ذÙÙØ±ÙÙ'), 9, _hoisted_20)) 23211 : _createCommentVNode("", true), 23212 (r.state.phase!=='ended'&&r.item.exhibition_start_date) 23213 ? (_openBlock(), _createElementBlock("button", { 23214 key: 2, 23215 class: "smallbtn secondary", 23216 onClick: $event => (addToCalendar(r.item)) 23217 }, "أض٠ÙÙØªÙÙÙÙ ", 8, _hoisted_21)) 23218 : _createCommentVNode("", true) 23219 ]) 23220 ], 2)) 23221 }), 128)), (!rows.length) 23222 ? (_openBlock(), _createElementBlock("p", _hoisted_22, "ÙØ§ ØªÙØ¬Ø¯ ٠عارض Ù Ø·Ø§Ø¨ÙØ© ØØ§ÙÙØ§Ù.")) 23223 : _createCommentVNode("", true)]) 23224 ]), 23225 _: 1 23226 })) 23227 } 23228} 23229})()}; 23230 23231 const MyChinaPage={components:{PublicFrame},setup(){const store=useGzcStore(),router=useRouter(),data=ref(null),loading=ref(true);async function load(){loading.value=true;if(await store.requireMember(router,'/my-china')){const r=await api('/api/my-china');if(r&&r.ok)data.value=r;}loading.value=false;}function openNext(x){if(x&&x.path)router.push(x.path);}onMounted(load);return{store,router,data,loading,shortDate,openNext};},render:(function(){ 23232const _Vue = Vue 23233const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 23234 23235const _hoisted_1 = { 23236 key: 0, 23237 class: "card loadingState" 23238} 23239const _hoisted_2 = { class: "card dailyHero myChinaHero" } 23240const _hoisted_3 = { class: "dailyQuickRow" } 23241const _hoisted_4 = ["onClick"] 23242const _hoisted_5 = ["onClick"] 23243const _hoisted_6 = ["onClick"] 23244const _hoisted_7 = ["onClick"] 23245const _hoisted_8 = { 23246 key: 0, 23247 class: "card myChinaNext" 23248} 23249const _hoisted_9 = { class: "dailyList" } 23250const _hoisted_10 = ["onClick"] 23251const _hoisted_11 = { class: "dailyDashboardGrid myChinaDashboard" } 23252const _hoisted_12 = { class: "card journeyProgressCard" } 23253const _hoisted_13 = { class: "memberSectionHead" } 23254const _hoisted_14 = { class: "dailyProgress" } 23255const _hoisted_15 = { key: 0 } 23256const _hoisted_16 = { 23257 key: 1, 23258 class: "successText" 23259} 23260const _hoisted_17 = ["onClick"] 23261const _hoisted_18 = { class: "card" } 23262const _hoisted_19 = { class: "dailyList" } 23263const _hoisted_20 = ["onClick"] 23264const _hoisted_21 = { 23265 key: 0, 23266 class: "hint" 23267} 23268const _hoisted_22 = { class: "card" } 23269const _hoisted_23 = { class: "dailyList" } 23270const _hoisted_24 = ["onClick"] 23271const _hoisted_25 = { 23272 key: 0, 23273 class: "hint" 23274} 23275const _hoisted_26 = ["onClick"] 23276const _hoisted_27 = { class: "card" } 23277const _hoisted_28 = { class: "dailyList" } 23278const _hoisted_29 = ["onClick"] 23279const _hoisted_30 = { 23280 key: 0, 23281 class: "hint" 23282} 23283const _hoisted_31 = { class: "card digestPreviewCard" } 23284const _hoisted_32 = { class: "digestMiniGrid" } 23285const _hoisted_33 = { 23286 key: 1, 23287 class: "hint" 23288} 23289const _hoisted_34 = ["onClick"] 23290const _hoisted_35 = { class: "card" } 23291const _hoisted_36 = { class: "savedCountGrid" } 23292const _hoisted_37 = ["onClick"] 23293 23294return function render(_ctx, _cache) { 23295 with (_ctx) { 23296 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList, normalizeStyle: _normalizeStyle, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 23297 23298 const _component_PublicFrame = _resolveComponent("PublicFrame") 23299 23300 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "My China" }, { 23301 default: _withCtx(() => [loading 23302 ? (_openBlock(), _createElementBlock("section", _hoisted_1, "جار٠تجÙ
23302ÙØ² ØµÙØØªÙ Ø§ÙÙÙÙ ÙØ©...")) 23303 : data 23304 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createElementVNode("section", _hoisted_2, [ 23305 _cache[0] || (_cache[0] = _createElementVNode("span", { class: "adminEyebrow" }, "My China · Daily", -1)), 23306 _createElementVNode("h2", null, "Ù Ø±ØØ¨Ø§Ù " + _toDisplayString(data.member.full_name), 1), 23307 _createElementVNode("p", null, [_createTextVNode(_toDisplayString(data.city_hub?$cityLabel(data.city_hub):($cityLabel(data.member.china_city)||'ØØ¯Ø¯ ٠دÙÙØªÙ Ù Ù Ø§ÙØØ³Ø§Ø¨')), 1), (data.member.china_district) 23308 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" · " + _toDisplayString(data.member.china_district), 1)], 64)) 23309 : _createCommentVNode("", true)]), 23310 _createElementVNode("div", _hoisted_3, [ 23311 _createElementVNode("button", { onClick: $event => (router.push(data.city_key?'/city/'+data.city_key:'/cities')) }, "ðï¸ Ù Ø¯ÙÙØªÙ", 8, _hoisted_4), 23312 _createElementVNode("button", { onClick: $event => (router.push('/new-to-china')) }, "ð§ Ø®Ø·Ø© اÙÙØµÙÙ", 8, _hoisted_5), 23313 _createElementVNode("button", { onClick: $event => (router.push('/ask')) }, "⦠اسأ٠SMT", 8, _hoisted_6), 23314 _createElementVNode("button", { onClick: $event => (router.push('/notification-settings')) }, "ð Ø§ÙØªÙبÙÙØ§Øª", 8, _hoisted_7) 23315 ]) 23316 ]), (data.next_actions&&data.next_actions.length) 23317 ? (_openBlock(), _createElementBlock("section", _hoisted_8, [_cache[2] || (_cache[2] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØªØ§ÙÙ Ø¹ÙØ¯Ù"), _createElementVNode("h3", null, "Ø£Ø´ÙØ§Ø¡ تستØÙ Ø§ÙØªØ¨Ø§ÙÙ Ø§ÙØ¢Ù")])], -1)), _createElementVNode("div", _hoisted_9, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.next_actions, (x) => { 23318 return (_openBlock(), _createElementBlock("button", { 23319 key: x.kind+'-'+x.title, 23320 onClick: $event => (openNext(x)) 23321 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.title), 1), _createElementVNode("small", null, _toDisplayString(x.summary), 1)]), _cache[1] || (_cache[1] = _createElementVNode("em", null, "â", -1))], 8, _hoisted_10)) 23322 }), 128))])])) 23323 : _createCommentVNode("", true), _createElementVNode("section", _hoisted_11, [ 23324 _createElementVNode("article", _hoisted_12, [ 23325 _createElementVNode("div", _hoisted_13, [_cache[3] || (_cache[3] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø£ÙØ§ Ø¬Ø¯ÙØ¯ ÙÙ Ø§ÙØµÙÙ"), _createElementVNode("h3", null, "ØªÙØ¯Ù خطة اÙÙØµÙÙ")], -1)), _createElementVNode("b", null, _toDisplayString(data.journey.percent) + "%", 1)]), 23326 _createElementVNode("div", _hoisted_14, [_createElementVNode("i", { style: _normalizeStyle({width:data.journey.percent+'%'}) }, null, 4)]), 23327 (data.journey.next_step) 23328 ? (_openBlock(), _createElementBlock("p", _hoisted_15, [_
23328cache[4] || (_cache[4] = _createElementVNode("b", null, "Ø§ÙØ®Ø·ÙØ© Ø§ÙØªØ§ÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString(data.journey.next_step.title_ar), 1)])) 23329 : (_openBlock(), _createElementBlock("p", _hoisted_16, "Ø£ÙÙ ÙØª Ø®Ø·ÙØ§Øª Ø§ÙØ®Ø·Ø© Ø§ÙØ£Ø³Ø§Ø³ÙØ©.")), 23330 _createElementVNode("button", { 23331 class: "smallbtn", 23332 onClick: $event => (router.push('/new-to-china')) 23333 }, "ÙØªØ Ø§ÙØ®Ø·Ø©", 8, _hoisted_17) 23334 ]), 23335 _createElementVNode("article", _hoisted_18, [_cache[6] || (_cache[6] = _createElementVNode("h3", null, "Ø£Ù٠٠ا ØÙÙÙ", -1)), _createElementVNode("div", _hoisted_19, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.city_essentials, (x) => { 23336 return (_openBlock(), _createElementBlock("button", { 23337 key: x.id, 23338 onClick: $event => (router.push('/china-guide/'+x.id)) 23339 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.title_ar), 1), _createElementVNode("small", null, _toDisplayString(x.category_name_ar||'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ') + " · " + _toDisplayString(x.trust_tier==='official'?'رس٠Ù':(x.trust_tier==='smt_verified'?'Ù ÙØ«Ù Ù Ù SMT':'٠درج')), 1)]), _cache[5] || (_cache[5] = _createElementVNode("em", null, "â", -1))], 8, _hoisted_20)) 23340 }), 128)), (!data.city_essentials.length) 23341 ? (_openBlock(), _createElementBlock("p", _hoisted_21, "ÙØ§ ØªÙØ¬Ø¯ Ø¹ÙØ§ØµØ± Ù ÙØ«ÙØ© ÙØ§ÙÙØ© Ù٠دÙÙØªÙ بعد.")) 23342 : _createCommentVNode("", true)])]), 23343 _createElementVNode("article", _hoisted_22, [_cache[8] || (_cache[8] = _createElementVNode("h3", null, "اÙ٠عارض اÙÙØ§Ø¯Ù Ø©", -1)), _createElementVNode("div", _hoisted_23, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.exhibitions, (x) => { 23344 return (_openBlock(), _createElementBlock("button", { 23345 key: x.id, 23346 onClick: $event => (router.push('/china-guide/'+x.id)) 23347 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.title_ar), 1), _createElementVNode("small", null, _toDisplayString(x.exhibition_start_date||'ÙØ±ÙباÙ'), 1)]), _cache[7] || (_cache[7] = _createElementVNode("em", null, "â", -1))], 8, _hoisted_24)) 23348 }), 128)), (!data.exhibitions.length) 23349 ? (_openBlock(), _createElementBlock("p", _hoisted_25, "ÙØ§ ØªÙØ¬Ø¯ ٠عارض ÙØ§Ø¯Ù Ø© Ù٠دÙÙØªÙ ÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª Ø§ÙØØ§ÙÙØ©.")) 23350 : _createCommentVNode("", true)]), _createElementVNode("button", { 23351 class: "smallbtn secondary", 23352 onClick: $event => (router.push('/exhibitions')) 23353 }, "Ù٠اÙ٠عارض", 8, _hoisted_26)]), 23354 _createElementVNode("article", _hoisted_27, [_cache[10] || (_cache[10] = _createElementVNode("h3", null, "آخر Ø§ÙØªØ¹Ù Ù٠ات", -1)), _createElementVNode("div", _hoisted_28, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.circulars, (x) => { 23355 return (_openBlock(), _createElementBlock("button", { 23356 key: x.id, 23357 onClick: $event => (router.push('/official-circulars')) 23358 }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.title), 1), _createElementVNode("small", null, _toDisplayString(shortDate(x.source_published_at||x.created_at)), 1)]), _cache[9] || (_cache[9] = _createElementVNode("em", null, "â", -1))], 8, _hoisted_29)) 23359 }), 128)), (!data.circulars.length) 23360 ? (_openBlock(), _createElementBlock("p", _hoisted_30, "ÙØ§ ØªÙØ¬Ø¯ تع٠Ù٠ات ØØ¯Ùثة Ù Ø·Ø§Ø¨ÙØ© ÙØ¯ÙÙØªÙ.")) 23361 : _createCommentVNode("", true)])]), 23362 _createElementVNode("article", _hoisted_31, [_cache[11] || (_cache[11] = _createElementVNode("h3", null, "Ù ÙØ®Øµ Ø§ÙØªÙبÙÙØ§Øª", -1)), (data.digest_preview) 23363 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("b", null, _toDisplayString(data.digest_preview.item_count) + " ØªØØ¯ÙØ«", 1), _createElementVNode("small", null, _toDisplayString(data.digest_preview.digest_kind==='weekly'?'Ù ÙØ®Øµ Ø£Ø³Ø¨ÙØ¹Ù':'Ù ÙØ®Øµ ÙÙÙ Ù') + " · " + _toDisplayString(shortDate(data.digest_preview.created_at)), 1), _createElementVNode("div", _hoisted_32, [_createElementVNode("span", null, "ðï¸ " + _toDisplayString(data.digest_preview.counts.circulars), 1), _createElementVNode("span", null, "ðï¸ " + _toDisplayString(data.digest_preview.counts.exhibitions), 1
23363)])], 64)) 23364 : (_openBlock(), _createElementBlock("p", _hoisted_33, "ÙØ§ ÙÙØ¬Ø¯ Ù ÙØ®Øµ Ø¬Ø¯ÙØ¯ ØØ§ÙÙØ§Ù.")), _createElementVNode("button", { 23365 class: "smallbtn secondary", 23366 onClick: $event => (router.push('/notification-settings')) 23367 }, "إعداد Ø§ÙØªÙبÙÙØ§Øª", 8, _hoisted_34)]), 23368 _createElementVNode("article", _hoisted_35, [_cache[16] || (_cache[16] = _createElementVNode("h3", null, "اÙÙ ØÙÙØ¸Ø§Øª", -1)), _createElementVNode("div", _hoisted_36, [ 23369 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.saved_summary.city||0), 1), _cache[12] || (_cache[12] = _createElementVNode("small", null, "٠دÙ", -1))]), 23370 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.saved_summary.exhibition||0), 1), _cache[13] || (_cache[13] = _createElementVNode("small", null, "٠عارض", -1))]), 23371 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.saved_summary.china_guide||0), 1), _cache[14] || (_cache[14] = _createElementVNode("small", null, "دÙÙÙ", -1))]), 23372 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(data.saved_summary.circular||0), 1), _cache[15] || (_cache[15] = _createElementVNode("small", null, "تع٠Ù٠ات", -1))]) 23373 ]), _createElementVNode("button", { 23374 class: "smallbtn", 23375 onClick: $event => (router.push('/services')) 23376 }, "Ø§Ø³ØªÙØ´Ù Ø§ÙØ®Ø¯Ù ات", 8, _hoisted_37)]) 23377 ])], 64)) 23378 : _createCommentVNode("", true)]), 23379 _: 1 23380 })) 23381 } 23382} 23383})()}; 23384 23385 // Patch 2: registries for company sectors, countries, routes and unclassified items. 23386 const AdminTaxonomyPage={components:{AdminFrame},setup(){ 23387 const store=useGzcStore(),router=useRouter(); 23388 const tab=ref('sectors'),sectors=ref([]),countries=ref([]),routes=ref([]),statusCounts=ref([]),needs=ref({totals:{},items:[]}),flags=ref({}),routeServices=ref([]),openRoute=ref(null),msg=ref(''),busy=ref(false),loading=ref(true); 23389 const COVERAGE_AR={AVAILABLE:'٠تاØ',LIMITED:'Ù ØØ¯Ùد',UNKNOWN:'ØºÙØ± ٠عرÙÙ',NOT_SUPPORTED:'ØºÙØ± ٠دعÙÙ ',NEEDS_VERIFICATION:'ÙØØªØ§Ø¬ تØÙÙ'}; 23390 const COVERAGE_KEYS=Object.keys(COVERAGE_AR); 23391 const countryName=code=>{const row=countries.value.find(x=>x.code===code);return row?(row.name_ar||row.name_en||code):code;}; 23392 async function save(url,body){busy.value=true;const r=await api(url,{method:'POST',body:JSON.stringify(body||{}),feedback:false});busy.value=false;msg.value=r&&r.ok?'ØªÙ Ø§ÙØÙØ¸':((r&&r.message)||'تعذر Ø§ÙØÙØ¸');return r;} 23393 async function load(){ 23394 if(!await store.requireAdmin(router))return; 23395 loading.value=true; 23396 const [a,b,c,d,e]=await Promise.all([api('/api/admin/taxonomy/sectors',{feedback:false}),api('/api/admin/taxonomy/countries',{feedback:false}),api('/api/admin/taxonomy/routes',{feedback:false}),api('/api/admin/taxonomy/needs-classification',{feedback:false}),api('/api/admin/taxonomy/flags',{feedback:false})]); 23397 if(a&&a.ok)sectors.value=safeArray(a.sectors);if(b&&b.ok)countries.value=safeArray(b.countries); 23398 if(c&&c.ok){routes.value=safeArray(c.routes);statusCounts.value=safeArray(c.coverage_status_counts);} 23399 if(d&&d.ok)needs.value={totals:d.totals||{},items:safeArray(d.items)};if(e&&e.ok)flags.value=e.flags||{}; 23400 loading.value=false; 23401 } 23402 async function toggleSector(row,field){const r=await save('/api/admin/taxonomy/sectors/'+encodeURIComponent(row.sector_key),{[field]:!row[field]});if(r&&r.ok)row[field]=!row[field];} 23403 async function toggleCountry(row,field){const r=await save('/api/admin/taxonomy/countries/'+encodeURIComponent(row.code),{[field]:!row[field]});if(r&&r.ok)row[field]=!row[field];} 23404 async function toggleFlag(key){const r=await save('/api/admin/taxonomy/flags',{[key]:!flags.value[key]});if(r&&r.ok)flags.value=r.flags;} 23405 async function showRoute(row){openRoute.value=row;routeServices.value=[];const r=await api('/api/admin/taxonomy/routes/'+row.route_id+'/services',{feedback:false});if(r&&r.ok)routeServices.value=safeArray(r.services);} 23406 async function setCoverage(svc,status){ 23407 let evidence; 23408 if(status==='AVAILABLE'){evidence=prompt('Ø§ÙØªØ¨ دÙÙÙ Ø§ÙØªØºØ·ÙØ© (٠صدر Ø£Ù Ù ÙØ§ØØ¸Ø© تØÙÙ):')||'';if(evidence.trim().length<5)return;} 23409 const r=await save('/api/admin/taxonomy/routes/'+openRoute.value.route_id+'/services/'+encodeURIComponent(svc.service_type),{coverage_status:status,active:['AVAILABLE','LIMITED'].includes(status),...(evidence?{evidence_note:evidence}:{})}); 23410 if(r&&r.ok){Object.assign(svc,r.service);await load();} 23411 } 23412 async function classify(item,sectorKey){const r=await save('/api/admin/taxonomy/items/'+item.id+'/classify',{company_
23412sector_key:sectorKey||null});if(r&&r.ok)await load();} 23413 onMounted(load); 23414 return {store,tab,sectors,countries,routes,statusCounts,needs,flags,routeServices,openRoute,msg,busy,loading,COVERAGE_AR,COVERAGE_KEYS,countryName,toggleSector,toggleCountry,toggleFlag,showRoute,setCoverage,classify}; 23415 }, 23416 render:(function(){ 23417const _Vue = Vue 23418const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 23419 23420const _hoisted_1 = { class: "card" } 23421const _hoisted_2 = { 23422 class: "row adminTabs", 23423 role: "tablist" 23424} 23425const _hoisted_3 = ["aria-selected", "onClick"] 23426const _hoisted_4 = { key: 0 } 23427const _hoisted_5 = { 23428 class: "hint", 23429 role: "status", 23430 "aria-live": "polite" 23431} 23432const _hoisted_6 = { class: "row" } 23433const _hoisted_7 = ["checked", "disabled", "onChange"] 23434const _hoisted_8 = ["checked", "disabled", "onChange"] 23435const _hoisted_9 = { 23436 key: 0, 23437 class: "hint" 23438} 23439const _hoisted_10 = { 23440 key: 1, 23441 class: "card" 23442} 23443const _hoisted_11 = { class: "tableWrap" } 23444const _hoisted_12 = { class: "dataTable" } 23445const _hoisted_13 = ["checked", "disabled", "onChange"] 23446const _hoisted_14 = ["checked", "disabled", "onChange"] 23447const _hoisted_15 = ["checked", "disabled", "onChange"] 23448const _hoisted_16 = ["checked", "disabled", "onChange"] 23449const _hoisted_17 = { 23450 key: 2, 23451 class: "card" 23452} 23453const _hoisted_18 = { class: "tableWrap" } 23454const _hoisted_19 = { class: "dataTable" } 23455const _hoisted_20 = ["checked", "disabled", "onChange"] 23456const _hoisted_21 = ["checked", "disabled", "onChange"] 23457const _hoisted_22 = ["checked", "disabled", "onChange"] 23458const _hoisted_23 = { 23459 key: 3, 23460 class: "card" 23461} 23462const _hoisted_24 = { class: "hint" } 23463const _hoisted_25 = { class: "tableWrap" } 23464const _hoisted_26 = { class: "dataTable" } 23465const _hoisted_27 = ["onClick"] 23466const _hoisted_28 = { 23467 key: 0, 23468 class: "card" 23469} 23470const _hoisted_29 = ["value", "disabled", "onChange"] 23471const _hoisted_30 = ["value"] 23472const _hoisted_31 = { 23473 key: 4, 23474 class: "card" 23475} 23476const _hoisted_32 = { class: "hint" } 23477const _hoisted_33 = { 23478 key: 0, 23479 class: "hint" 23480} 23481const _hoisted_34 = ["disabled", "onChange"] 23482const _hoisted_35 = ["value"] 23483 23484return function render(_ctx, _cache) { 23485 with (_ctx) { 23486 const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, normalizeClass: _normalizeClass, createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 23487 23488 const _component_router_link = _resolveComponent("router-link") 23489 const _component_AdminFrame = _resolveComponent("AdminFrame") 23490 23491 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ø§ÙØªØµÙÙÙØ§Øª ÙØ§ÙدÙÙ ÙØ§Ù٠سارات" }, { 23492 default: _withCtx(() => [ 23493 _createElementVNode("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList([['sectors','اÙÙØ·Ø§Ø¹Ø§Øª'],['countries','Ø§ÙØ¯ÙÙ'],['routes','اÙ٠سارات'],['needs','ÙØØªØ§Ø¬ تصÙÙÙ']], (t) => { 23494 return (_openBlock(), _createElementBlock("button", { 23495 key: t[0], 23496 type: "button", 23497 role: "tab", 23498 "aria-selected": tab===t[0], 23499 class: _normalizeClass(['smallbtn',tab===t[0]?'':'secondary']), 23500 onClick: $event => (tab=t[0]) 23501 }, [_createTextVNode(_toDisplayString(t[1]), 1), (t[0]==='needs' && (needs.totals.without_category||needs.totals.company_without_sector)) 23502 ? (_openBlock(), _createElementBlock("span", _hoisted_4, " · " + _toDisplayString((needs.totals.without_category||0)+(needs.totals.company_without_sector||0)), 1)) 23503 : _createCommentVNode("", true)], 10, _hoisted_3)) 23504 }), 128))]), _createElementVNode("p", _hoisted_5, _toDisplayString(msg), 1), _createElementVNode("div", _hoisted_6, [_createElementVNode("label", null, [_createElementVNode("input", { 23505 type: "checkbox",
23506 checked: flags.company_sector_taxonomy, 23507 disabled: busy, 23508 onChange: $event => (toggleFlag('company_sector_taxonomy')) 23509 }, null, 40, _hoisted_7), _cache[0] || (_cache[0] = _createTextVNode(" Ø¥Ø¸ÙØ§Ø± ÙØ·Ø§Ø¹Ø§Øª Ø§ÙØ´Ø±Ùات ÙÙØ²Ùار"))]), _createElementVNode("label", null, [_createElementVNode("input", { 23510 type: "checkbox", 23511 checked: flags.trade_country_registry, 23512 disabled: busy, 23513 onChange: $event => (toggleFlag('trade_country_registry')) 23514 }, null, 40, _hoisted_8), _cache[1] || (_cache[1] = _createTextVNode(" Ø§ÙØªØ¬Ø§Ø±Ø© تتبع Ø³Ø¬Ù Ø§ÙØ¯ÙÙ"))])])]), 23515 loading 23516 ? (_openBlock(), _createElementBlock("p", _hoisted_9, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...")) 23517 : _createCommentVNode("", true), 23518 (tab==='sectors') 23519 ? (_openBlock(), _createElementBlock("section", _hoisted_10, [_createElementVNode("h3", null, "ÙØ·Ø§Ø¹Ø§Øª Ø§ÙØ´Ø±Ùات (" + _toDisplayString(sectors.length) + ")", 1), _createElementVNode("div", _hoisted_11, [_createElementVNode("table", _hoisted_12, [_cache[2] || (_cache[2] = _createElementVNode("thead", null, [_createElementVNode("tr", null, [ 23520 _createElementVNode("th", null, "اÙÙØ·Ø§Ø¹"), 23521 _createElementVNode("th", null, "EN"), 23522 _createElementVNode("th", null, "䏿"), 23523 _createElementVNode("th", null, "Ø§ÙØ¹Ùاصر"), 23524 _createElementVNode("th", null, "Ù ÙØ¹ÙÙ"), 23525 _createElementVNode("th", null, "Ù Ù ÙÙØ²"), 23526 _createElementVNode("th", null, "Ø¨ØØ«"), 23527 _createElementVNode("th", null, "Ø£Ø¨ØØ§Ø«") 23528 ])], -1)), _createElementVNode("tbody", null, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(sectors, (s) => { 23529 return (_openBlock(), _createElementBlock("tr", { key: s.sector_key }, [ 23530 _createElementVNode("td", null, [_createTextVNode(_toDisplayString(s.name_ar), 1), _createElementVNode("small", null, _toDisplayString(s.sector_key), 1)]), 23531 _createElementVNode("td", null, _toDisplayString(s.name_en), 1), 23532 _createElementVNode("td", null, _toDisplayString(s.name_zh), 1), 23533 _createElementVNode("td", null, _toDisplayString(s.public_item_count) + "/" + _toDisplayString(s.item_count), 1), 23534 _createElementVNode("td", null, [_createElementVNode("input", { 23535 type: "checkbox", 23536 checked: s.active, 23537 disabled: busy, 23538 onChange: $event => (toggleSector(s,'active')) 23539 }, null, 40, _hoisted_13)]), 23540 _createElementVNode("td", null, [_createElementVNode("input", { 23541 type: "checkbox", 23542 checked: s.featured, 23543 disabled: busy, 23544 onChange: $event => (toggleSector(s,'featured')) 23545 }, null, 40, _hoisted_14)]), 23546 _createElementVNode("td", null, [_createElementVNode("input", { 23547 type: "checkbox", 23548 checked: s.search_enabled, 23549 disabled: busy, 23550 onChange: $event => (toggleSector(s,'search_enabled')) 23551 }, null, 40, _hoisted_15)]), 23552 _createElementVNode("td", null, [_createElementVNode("input", { 23553 type: "checkbox", 23554 checked: s.research_enabled, 23555 disabled: busy, 23556 onChange: $event => (toggleSector(s,'research_enabled')) 23557 }, null, 40, _hoisted_16)]) 23558 ])) 23559 }), 128))])])])])) 23560 : _createCommentVNode("", true), 23561 (tab==='countries') 23562 ? (_openBlock(), _createElementBlock("section", _hoisted_17, [_createElementVNode("h3", null, "Ø³Ø¬Ù Ø§ÙØ¯ÙÙ (" + _toDisplayString(countries.length) + ")", 1), _createElementVNode("div", _hoisted_18, [_createElementVNode("table", _hoisted_19, [_cache[3] || (_cache[3] = _createElementVNode("thead", null, [_createElementVNode("tr", null, [ 23563 _createElementVNode("th", null, "Ø§ÙØ¯ÙÙØ©"), 23564 _createElementVNode("th", null, "ISO"), 23565 _createElementVNode("th", null, "اÙÙ ÙØ·ÙØ©"), 23566 _createElementVNode("th", null, "Ø§ÙØ£ÙÙÙÙØ©"), 23567 _createElementVNode("th", null, "تجارة"), 23568 _createElementVNode("th", null, "Ø´ØÙ"), 23569 _createElementVNode("th", null, "Ø£Ø¨ØØ§Ø«") 23570 ])], -1)), _createElementVNode("tbody", null, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(countries, (c) => { 23571 return (_openBlock(), _createElementBlock("tr", { key: c.code }, [ 23572 _createElementVNode("td", null, [_createTextVNode(_toDisplayString(c.name_ar), 1), _createElementVNode("small", null, _toDisplayString(c.name_zh), 1)]), 23573 _createElementVNode("td", null, _toDisplayString(c.code) + " / " + _toDisplayString(c.iso3), 1), 23574 _createElementVNode("td", null, _toDisplayString(c.subregion||c.region_group), 1), 23575 _createElementVNode("td", null, _toDisplayString(c.priority), 1), 23576 _createElementVNode("td", null, [_createElementVNode("input", { 23577 type: "checkbox", 23578 checked: c.trade_enabled, 23579 disabled: busy, 23580 onChange: $event => (toggleCountry(c,'trade_enabled')) 23581 }, null, 40, _hoisted_20)]), 23582 _createElementVNode("td", null, [_createElementVNode("input", { 23583 type: "checkbox", 23584 checked: c.shipping_enabled, 23585 disabled: busy, 23586 onChange: $event => (toggleCountry(c,'shipping_enabled')) 23587 }, null, 40, _hoisted_21)]), 23588 _createElementVNode("td", null, [_createElementVNode("input", { 23589 type: "checkbox", 23590 checked: c.research_enabled, 23591 disabled: busy, 23592 onChange: $event => (toggleCountry(c,'research_enabled')) 23593 }, null, 40, _hoisted_22)]) 23594 ])) 23595 }), 128))])])])])) 23596 : _createCommentVNode("", true), 23597 (tab==='routes') 23598 ? (_openBlock(), _createElementBlock("section", _hoisted_23, [ 23599 _createElementVNode("h3", null, "اÙ٠سارات (" + _toDisplayString(routes.length) + ")", 1), 23600 _createElementVNode("p", _hoisted_24, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(statusCounts, (c) => { 23601 return (_openBlock(), _createElementBlock("span", { key: c.coverage_status }, _toDisplayString(COVERAGE_AR[c.coverage_status]||c.coverage_status) + ": " + _toDisplayString(c.count) + " · ", 1)) 23602 }), 128))]), 23603 _createElementVNode("div", _hoisted_25, [_createElementVNode("table", _hoisted_26, [_cache[4] || (_cache[4] = _createElementVNode("thead", null, [_createElementVNode("tr", null, [ 23604 _createElementVNode("th", null, "اÙ٠سار"), 23605 _createElementVNode("th", null, "Ø§ÙØ£ÙÙÙÙØ©"), 23606 _createElementVNode("th", null, "خد٠ات Ù ØªØ§ØØ©"), 23607 _createElementVNode("th") 23608 ])], -1)), _createElementVNode("tbody", null, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(routes, (r) => { 23609 return (_openBlock(), _createElementBlock("tr", { key: r.route_id }, [ 23610 _createElementVNode("td", null, _toDisplayString(countryName(r.origin_country_code)) + " â " + _toDisplayString(countryName(r.destination_country_code)), 1), 23611 _createElementVNode("td", null, _toDisplayString(r.priority), 1), 23612 _createElementVNode("td", null, _toDisplayString(r.available_services) + "/" + _toDisplayString(r.service_rows), 1), 23613 _createElementVNode("td", null, [_createElementVNode("button", { 23614 type: "button", 23615 class: "smallbtn secondary", 23616 onClick: $event => (showRoute(r)) 23617 }, "Ø§ÙØ®Ø¯Ù ات", 8, _hoisted_27)]) 23618 ])) 23619 }), 128))])])]), 23620 openRoute 23621 ? (_openBlock(), _createElementBlock("div", _hoisted_28, [_createElementVNode("h4", null, _toDisplayString(countryName(openRoute.origin_country_code)) + " â " + _toDisplayString(countryName(openRoute.destination_country_code)), 1), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(routeServices, (svc) => { 23622 return (_openBlock(), _createElementBlock("div", { 23623 key: svc.service_type, 23624 class: "row" 23625 }, [_createElementVNode("b", null, _toDisplayString(svc.name_ar), 1), _createElementVNode("select", {
23626 value: svc.coverage_status, 23627 disabled: busy, 23628 onChange: $event => (setCoverage(svc,$event.target.value)) 23629 }, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(COVERAGE_KEYS, (k) => { 23630 return (_openBlock(), _createElementBlock("option", { 23631 key: k, 23632 value: k 23633 }, _toDisplayString(COVERAGE_AR[k]), 9, _hoisted_30)) 23634 }), 128))], 40, _hoisted_29), _createElementVNode("small", null, "٠صادر: " + _toDisplayString(svc.source_count), 1)])) 23635 }), 128))])) 23636 : _createCommentVNode("", true) 23637 ])) 23638 : _createCommentVNode("", true), 23639 (tab==='needs') 23640 ? (_openBlock(), _createElementBlock("section", _hoisted_31, [ 23641 _cache[7] || (_cache[7] = _createElementVNode("h3", null, "Ø¹ÙØ§ØµØ± ØªØØªØ§Ø¬ تصÙÙÙØ§Ù", -1)), 23642 _createElementVNode("p", _hoisted_32, "Ø¨ÙØ§ ÙØ³Ù : " + _toDisplayString(needs.totals.without_category||0) + " · Ø´Ø±ÙØ§Øª Ø¨ÙØ§ ÙØ·Ø§Ø¹: " + _toDisplayString(needs.totals.company_without_sector||0), 1), 23643 (!needs.items.length) 23644 ? (_openBlock(), _createElementBlock("div", _hoisted_33, "ÙØ§ ØªÙØ¬Ø¯ Ø¹ÙØ§ØµØ± ØªØØªØ§Ø¬ تصÙÙÙØ§Ù.")) 23645 : _createCommentVNode("", true), 23646 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(needs.items, (i) => { 23647 return (_openBlock(), _createElementBlock("div", { 23648 key: i.reason+i.id, 23649 class: "row" 23650 }, [_createElementVNode("b", null, _toDisplayString(i.title_ar), 1), _createElementVNode("small", null, _toDisplayString(i.city) + " · " + _toDisplayString(i.reason==='no_category'?'Ø¨ÙØ§ ÙØ³Ù ':'Ø´Ø±ÙØ© Ø¨ÙØ§ ÙØ·Ø§Ø¹'), 1), (i.reason==='company_without_sector') 23651 ? (_openBlock(), _createElementBlock("select", { 23652 key: 0, 23653 disabled: busy, 23654 onChange: $event => (classify(i,$event.target.value)) 23655 }, [_cache[5] || (_cache[5] = _createElementVNode("option", { value: "" }, "اختر اÙÙØ·Ø§Ø¹", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(sectors, (s) => { 23656 return (_openBlock(), _createElementBlock("option", { 23657 key: s.sector_key, 23658 value: s.sector_key 23659 }, _toDisplayString(s.name_ar), 9, _hoisted_35)) 23660 }), 128))], 40, _hoisted_34)) 23661 : (_openBlock(), _createBlock(_component_router_link, { 23662 key: 1, 23663 class: "smallbtn secondary", 23664 to: {path:'/admin/china-guide',query:{workspace:'items',item:i.id}} 23665 }, { 23666 default: _withCtx(() => _cache[6] || (_cache[6] = [_createTextVNode("ÙØªØ ÙÙØªØµÙÙÙ")])), 23667 _: 2, 23668 __: [6] 23669 }, 1032, ["to"]))])) 23670 }), 128)) 23671 ])) 23672 : _createCommentVNode("", true) 23673 ]), 23674 _: 1 23675 })) 23676 } 23677} 23678})()}; 23679 const AdminCityCoveragePage={components:{AdminFrame},setup(){const store=useGzcStore(),router=useRouter(),data=ref(null),loading=ref(true),error=ref(''),filter=reactive({focus:'',state:''}); 23680 let loadSequence=0; 23681 async function load(){const sequence=++loadSequence;loading.value=true;data.value=null;error.value=''; 23682 const qs=new URLSearchParams();if(filter.focus)qs.set('focus',filter.focus);if(filter.state)qs.set('state',filter.state);
23683 try{if(!await store.requireAdmin(router))return; 23684 const r=await api('/api/admin/city-coverage'+(qs.toString()?'?'+qs.toString():'')); 23685 if(sequence!==loadSequence)return; 23686 if(r&&r.ok)data.value=r;else error.value=(r&&r.message)||'تعذر تØÙ ÙÙ ØªØºØ·ÙØ© اÙ٠دÙ'; 23687 }catch(_){if(sequence===loadSequence)error.value='تعذر تØÙ ÙÙ ØªØºØ·ÙØ© اÙ٠دÙ. أعد اÙÙ ØØ§ÙÙØ©.';} 23688 finally{if(sequence===loadSequence)loading.value=false;}} 23689 onUnmounted(()=>{loadSequence++;}); 23690 onMounted(load); 23691 const cities=computed(()=>safeArray(data.value&&data.value.cities)); 23692 const opportunities=computed(()=>safeArray(data.value&&data.value.opportunities)); 23693 const summary=computed(()=>(data.value&&data.value.summary)||{total_cities:0,covered:0,starter:0,empty:0}); 23694 function pct(city){return Math.round((Number(city.coverage_ratio)||0)*100);} 23695 function focusLabel(k){return k==='trade'?'تجارة':(k==='tourism'?'Ø³ÙØ§ØØ©':(k==='trade_tourism'?'تجارة ÙØ³ÙØ§ØØ©':'عا٠'));} 23696 function stateLabel(k){return k==='covered'?'٠غطاة':(k==='starter'?'Ø¨Ø¯Ø§ÙØ©':'ÙØ§Ø±ØºØ©');} 23697 return{store,data,loading,error,filter,load,cities,opportunities,summary,pct,focusLabel,stateLabel};}, 23698 render:(function(){ 23699const _Vue = Vue 23700const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 23701 23702const _hoisted_1 = { class: "card" } 23703const _hoisted_2 = { class: "editGrid" } 23704const _hoisted_3 = ["onUpdate:modelValue", "onChange"] 23705const _hoisted_4 = ["onUpdate:modelValue", "onChange"] 23706const _hoisted_5 = { 23707 key: 0, 23708 class: "aiAutomationMetrics" 23709} 23710const _hoisted_6 = { 23711 key: 0, 23712 class: "card", 23713 role: "alert" 23714} 23715const _hoisted_7 = ["onClick", "disabled"] 23716const _hoisted_8 = { 23717 key: 1, 23718 class: "card loadingState", 23719 role: "status" 23720} 23721const _hoisted_9 = { 23722 key: 2, 23723 class: "card" 23724} 23725const _hoisted_10 = { class: "dailyList" } 23726const _hoisted_11 = { class: "profileLine" } 23727const _hoisted_12 = { class: "statusPill" } 23728const _hoisted_13 = { class: "hint" } 23729const _hoisted_14 = { 23730 key: 0, 23731 class: "hint" 23732} 23733const _hoisted_15 = { 23734 key: 1, 23735 class: "dailyList" 23736} 23737const _hoisted_16 = { 23738 key: 2, 23739 class: "hint" 23740} 23741const _hoisted_17 = { class: "memberCardTop" } 23742const _hoisted_18 = { class: "statusPill" } 23743const _hoisted_19 = { class: "profileLine" } 23744const _hoisted_20 = { class: "profileLine" } 23745const _hoisted_21 = { class: "profileLine" } 23746const _hoisted_22 = { class: "localCommunityGrid" } 23747const _hoisted_23 = { 23748 key: 3, 23749 class: "card" 23750} 23751 23752return function render(_ctx, _cache) { 23753 with (_ctx) { 23754 const { createElementVNode: _createElementVNode, vModelSelect: _vModelSelect, withDirectives: _withDirectives, createTextVNode: _createTextVNode, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock, normalizeClass: _normalizeClass } = _Vue 23755 23756 const _component_router_link = _resolveComponent("router-link") 23757 const _component_AdminFrame = _resolveComponent("AdminFrame") 23758 23759 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "ØªØºØ·ÙØ© اÙ٠دÙ" }, { 23760 default: _withCtx(() => [ 23761 _cache[18] || (_cache[18] = _createElementVNode("section", { class: "card noticeCard compactNotice" }, [_createElementVNode("h3", null, "ØªØºØ·ÙØ© اÙ٠دÙ"), _createElementVNode("p", null, "Ù Ø´ØªÙØ© ٠٠اÙÙ ØØªÙ٠اÙÙ ÙØ´Ùر ÙØ§ÙÙ ÙØ«Ù ÙÙØ·. ØªÙØ¸Ùر Ø£ÙÙ ÙÙÙØµ اÙÙ ØØªÙÙ Ø§ÙØ£Ø³Ø§Ø³Ù ÙÙ٠٠دÙÙØ© ØØ³Ø¨ Ø·Ø§Ø¨Ø¹ÙØ§Ø ÙÙØ§ ØªÙØ´Ø¦ Ø£Ù Ù ÙÙ Ø© Ø¨ØØ« بÙÙØ³Ùا.")], -1)), 23762 _createElementVNode("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_createElementVNode("label", null, [_cache[1] || (_cache[1] = _createTextVNode("Ø§ÙØ·Ø§Ø¨Ø¹")), _withDirectives(_createElementVNode("select", { 23763 "onUpdate:modelValue": $event => ((filter.focus) = $event), 23764 onChange: load 23765 }, _cache[0] || (_cache[0] = [ 23766 _createElementVNode("option", { value: "" }, "اÙÙÙ", -1), 23767 _createElementVNode("option", { value: "trade" }, "تجارة", -1), 23768 _createElementVNode("option", { value: "tourism" }, "Ø³ÙØ§ØØ©", -1), 23769 _createElementVNode("option", { value: "trade_tourism" }, "تجارة ÙØ³ÙØ§ØØ©", -1), 23770 _createElementVNode("option", { value: "general" }, "عا٠", -1) 23771 ]), 40, _hoisted_3), [[_vModelSelect, filter.focus]])]), _createElementVNode("label", null, [_cache[3] || (_cache[3] = _createTextVNode("Ø§ÙØØ§ÙØ©")), _withDirectives(_createElementVNode("select", { 23772 "onUpdate:modelValue": $event => ((filter.state) = $event), 23773 onChange: load 23774 }, _cache[2] || (_cache[2] = [ 23775 _createElementVNode("option", { value: "" }, "اÙÙÙ", -1), 23776 _createElementVNode("option", { value: "empty" }, "ÙØ§Ø±ØºØ©", -1), 23777 _createElementVNode("option", { value: "starter" }, "Ø¨Ø¯Ø§ÙØ©", -1), 23778 _createElementVNode("option", { value: "covered" }, "٠غطاة", -1) 23779 ]), 40, _hoisted_4), [[_vModelSelect, filter.state]])])]), data 23780 ? (_openBlock(), _createElementBlock("div", _hoisted_5, [ 23781 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.total_cities), 1), _cache[4] || (_cache[4] = _createTextVNode(" ٠دÙÙØ©"))]), 23782 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.covered), 1), _cache[5] || (_cache[5] = _createTextVNode(" ٠غطاة"))]), 23783 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.starter), 1), _cache[6] || (_cache[6] = _createTextVNode(" Ø¨Ø¯Ø§ÙØ©"))]), 23784 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(summary.empty), 1), _cache[7] || (_cache[7] = _
23784createTextVNode(" ÙØ§Ø±ØºØ©"))]) 23785 ])) 23786 : _createCommentVNode("", true)]), 23787 error 23788 ? (_openBlock(), _createElementBlock("section", _hoisted_6, [_createElementVNode("p", null, _toDisplayString(error), 1), _createElementVNode("button", { 23789 class: "smallbtn", 23790 onClick: load, 23791 disabled: loading 23792 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_7)])) 23793 : _createCommentVNode("", true), 23794 loading 23795 ? (_openBlock(), _createElementBlock("div", _hoisted_8, _cache[8] || (_cache[8] = [_createElementVNode("span", { 23796 class: "loadingSpinner", 23797 "aria-hidden": "true" 23798 }, null, -1), _createElementVNode("h3", null, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...", -1)]))) 23799 : _createCommentVNode("", true), 23800 (!loading && opportunities.length) 23801 ? (_openBlock(), _createElementBlock("section", _hoisted_9, [ 23802 _cache[11] || (_cache[11] = _createElementVNode("h3", null, "Ø£ÙÙÙÙØ§Øª Ø§ÙØªØºØ·ÙØ© اÙÙ ÙØªØ±ØØ©", -1)), 23803 _cache[12] || (_cache[12] = _createElementVNode("p", { class: "hint" }, "٠رتبة ØØ³Ø¨ Ø§ÙØ£Ø«Ø± ÙÙ ÙÙØ²Ùعة عÙ٠اÙÙ Ø¯Ù ØØªÙ ÙØ§ ØªÙØ³ØªÙÙÙ Ø§ÙØªØ´ØºÙÙØ§Øª عÙ٠٠دÙÙØ© ÙØ§ØØ¯Ø©.", -1)), 23804 _cache[13] || (_cache[13] = _createElementVNode("p", { class: "hint" }, "Ø§ÙØ¬Ø§ÙØ²ÙØ© تخص اÙÙØ¯Ù ÙÙØ·Ø Ø§ÙØªÙÙÙØ° ÙØ®Ø¶Ø¹ Ø£ÙØ¶Ø§Ù ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª Ø§ÙØªØ´ØºÙÙ ÙØ§ÙÙ ÙØ²Ø§ÙÙØ© ÙØ¨ÙÙØ© Ø§ÙØ£ÙÙÙÙØ§Øª. تغÙÙØ± اÙÙÙØªØ± ÙØØ¯ÙØ« اÙÙØ¬Ùات اÙÙ Ø¹Ø±ÙØ¶Ø©.", -1)), 23805 _createElementVNode("div", _hoisted_10, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(opportunities, (o) => { 23806 return (_openBlock(), _createElementBlock("article", { 23807 key: o.key, 23808 class: "compactNotice" 23809 }, [ 23810 _createElementVNode("h4", null, _toDisplayString($cityLabel(o.city_name_ar)) + " · " + _toDisplayString(o.intent_label_ar), 1), 23811 _createElementVNode("div", _hoisted_11, [_cache[9] || (_cache[9] = _createElementVNode("b", null, "Ø£ÙÙÙÙØ© Ø§ÙØªØºØ·ÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(o.score), 1)]), 23812 (o.research_readiness) 23813 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createElementVNode("p", _hoisted_12, _toDisplayString(o.research_readiness.label_ar), 1), _createElementVNode("p", _hoisted_13, _toDisplayString(o.research_readiness.attempts) + " Ù ØØ§ÙÙØ© Ù ÙØªÙ ÙØ© Ø®ÙØ§Ù Ù©Ù ÙÙ٠ا٠· " + _toDisplayString(o.research_readiness.approved) + " ٠عت٠د · " + _toDisplayString(o.research_readiness.pending) + " ÙÙØªØ¸Ø± اÙ٠راجعة", 1), (o.research_readiness.reason==='target_cooldown') 23814 ? (_openBlock(), _createElementBlock("p", _hoisted_14, "اÙ٠تبÙÙ Ø¹ÙØ¯ تØÙ ÙÙ Ø§ÙØµÙØØ©: " + _toDisplayString(o.research_readiness.remaining_hours) + " ساعة", 1)) 23815 : _createCommentVNode("", true)], 64)) 23816 : _createCommentVNode("", true), 23817 (o.review_links && o.review_links.length) 23818 ? (_openBlock(), _createElementBlock("div", _hoisted_15, [_
23818cache[10] || (_cache[10] = _createElementVNode("p", { class: "hint" }, "Ø£ÙØ¯Ù اÙÙ ÙØªØ±ØØ§Øª اÙÙ ÙØªØ¸Ø±Ø© ÙÙØ°Ø§ اÙÙØ¯Ù â ØØªÙ Ù£ Ù ÙØªØ±ØØ§ØªØ Ù Ù ÙØ§Ù Ù Ø§ÙØ³Ø¬Ù.", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(o.review_links, (r) => { 23819 return (_openBlock(), _createBlock(_component_router_link, { 23820 key: r.id, 23821 to: r.review_path, 23822 class: "smallbtn secondary" 23823 }, { 23824 default: _withCtx(() => [_createTextVNode(" ٠راجعة: " + _toDisplayString(r.title) + " · " + _toDisplayString(r.status==='in_review'?'ÙÙØ¯ اÙ٠راجعة':'Ø¨Ø§ÙØªØ¸Ø§Ø± اÙ٠راجعة') + " · " + _toDisplayString(r.age_days) + " ÙÙÙ ", 1)]), 23825 _: 2 23826 }, 1032, ["to"])) 23827 }), 128))])) 23828 : (o.research_readiness && o.research_readiness.pending) 23829 ? (_openBlock(), _createElementBlock("p", _hoisted_16, "ØªÙØ¬Ø¯ Ù ÙØªØ±ØØ§Øª Ù ÙØªØ¸Ø±Ø©Ø ØØ¯ÙØ« Ø§ÙØµÙØØ© ÙØ¥Ø¹Ø§Ø¯Ø© تØÙ ÙÙ Ø±ÙØ§Ø¨Ø·Ùا.")) 23830 : _createCommentVNode("", true) 23831 ])) 23832 }), 128))]) 23833 ])) 23834 : _createCommentVNode("", true), 23835 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(cities, (c) => { 23836 return (_openBlock(), _createElementBlock("section", { 23837 class: "card", 23838 key: c.city_key 23839 }, [ 23840 _createElementVNode("div", _hoisted_17, [_createElementVNode("h4", null, _toDisplayString($cityLabel(c)), 1), _createElementVNode("span", _hoisted_18, _toDisplayString(stateLabel(c.state)), 1)]), 23841 _createElementVNode("div", _hoisted_19, [_cache[14] || (_cache[14] = _createElementVNode("b", null, "Ø§ÙØ·Ø§Ø¨Ø¹", -1)), _createElementVNode("span", null, _toDisplayString(focusLabel(c.focus_kind)), 1)]), 23842 _createElementVNode("div", _hoisted_20, [_cache[15] || (_cache[15] = _createElementVNode("b", null, "Ø§ÙØªØºØ·ÙØ© Ø§ÙØ£Ø³Ø§Ø³ÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(c.essential_covered) + " / " + _toDisplayString(c.essential_total) + " (" + _toDisplayString(pct(c)) + "%)", 1)]), 23843 _createElementVNode("div", _hoisted_21, [_cache[16] || (_cache[16] = _createElementVNode("b", null, "Ø§ÙØ¹Ùاصر اÙÙ ÙØ´Ùرة", -1)), _createElementVNode("span", null, _toDisplayString(c.item_count), 1)]), 23844 _createElementVNode("div", _hoisted_22, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(c.intents, (i) => { 23845 return (_openBlock(), _createElementBlock("span", { 23846 key: i.intent_key, 23847 class: _normalizeClass(["statusPill", {danger:i.state==='empty'}]) 23848 }, _toDisplayString(i.label_ar) + ": " + _toDisplayString(i.item_count), 3)) 23849 }), 128))]) 23850 ])) 23851 }), 128)), 23852 (!loading && data && !cities.length) 23853 ? (_openBlock(), _createElementBlock("section", _hoisted_23, _cache[17] || (_cache[17] = [_createElementVNode("p", { class: "hint" }, "ÙØ§ ØªÙØ¬Ø¯ Ù Ø¯Ù Ù Ø·Ø§Ø¨ÙØ© ÙÙØ°Ø§ اÙÙÙØªØ±.", -1)]))) 23854 : _createCommentVNode("", true) 23855 ]), 23856 _: 1, 23857 __: [18] 23858 })) 23859 } 23860} 23861})()}; 23862 23863 const AdminAiEfficiencyPage={components:{AdminFrame,AiAdminCenterNav},setup(){const store=useGzcStore(),router=useRouter(),route=useRoute(),data=ref(null),loading=ref(true),error=ref(''),hub=ref(['china_guide','trade_shipping'].includes(String((route.query||{}).hub||''))?String(route.query.hub):'china_guide'); 23864 let loadSequence=0; 23865 async function load(){const sequence=++loadSequence;const requestedHub=hub.value;loading.value=true;data.value=null;error.value=''; 23866 try{if(!await store.requireAdmin(router))return; 23867 const r=await api('/api/admin/ai-research/efficiency?hub='+encodeURIComponent(requestedHub)); 23868 if(sequence!==loadSequence)return; 23869 if(r&&r.ok)data.value=r;else error.value=(r&&r.message)||'تعذر تØÙ Ù٠٠ؤشرات اÙÙÙØ§Ø¡Ø©'; 23870 }catch(_){if(sequence===loadSequence)error.value='تعذر تØÙ Ù٠٠ؤشرات اÙÙÙØ§Ø¡Ø©. أعد اÙÙ ØØ§ÙÙØ©.';} 23871 finally{if(sequence===loadSequence)loading.value=false;}} 23872 onUnmounted(()=>{loadSequence++;}); 23873 onMounted(load); 23874 const e=computed(()=>
23874(data.value&&data.value.efficiency)||null); 23875 const policy=computed(()=>(data.value&&data.value.policy)||{}); 23876 const repeated=computed(()=>safeArray(e.value&&e.value.repeated_targets)); 23877 const successRate=computed(()=>{const ok=Number(e.value&&e.value.completed_jobs||0),bad=Number(e.value&&e.value.failed_jobs||0),total=ok+bad;return total?Math.round(ok*100/total):null;}); 23878 function pct(v){return Math.round((Number(v)||0)*100);} 23879 async function changeHub(){await router.replace({path:'/admin/ai-efficiency',query:{hub:hub.value}}).catch(()=>{});await load();} 23880 function usageReason(reason){return ({no_jobs:'ÙØ§ ØªÙØ¬Ø¯ Ù ÙØ§Ù Ù٠اÙÙØªØ±Ø©',awaiting_completion:'اÙÙ ÙØ§Ù ÙÙ ØªÙØªÙ٠بعد',incomplete:'Ø¨ÙØ§Ùات Ø§ÙØ§Ø³ØªÙÙØ§Ù ØºÙØ± Ù ÙØªÙ ÙØ©',in_progress:'ØªÙØ¬Ø¯ Ù ÙØ§Ù Ø¬Ø§Ø±ÙØ©',no_approvals:'ÙÙ ÙØªØÙ٠اعت٠اد بعد'})[reason]||'ØºÙØ± ٠تاØ';} 23881 return{store,data,loading,error,hub,load,e,policy,repeated,successRate,pct,usageReason,changeHub};}, 23882 render:(function(){ 23883const _Vue = Vue 23884const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 23885 23886const _hoisted_1 = { class: "card noticeCard compactNotice aiEfficiencyHero" } 23887const _hoisted_2 = { class: "row" } 23888const _hoisted_3 = { class: "card aiEfficiencyScope" } 23889const _hoisted_4 = ["onUpdate:modelValue", "onChange"] 23890const _hoisted_5 = { 23891 key: 0, 23892 class: "card", 23893 role: "alert" 23894} 23895const _hoisted_6 = ["onClick", "disabled"] 23896const _hoisted_7 = { 23897 key: 1, 23898 class: "card loadingState", 23899 role: "status" 23900} 23901const _hoisted_8 = { class: "card aiEfficiencySummary" } 23902const _hoisted_9 = { class: "aiEfficiencySummaryHead" } 23903const _hoisted_10 = { class: "aiEfficiencySummaryGrid" } 23904const _hoisted_11 = { 23905 key: 0, 23906 class: "card" 23907} 23908const _hoisted_12 = { class: "memberCardTop" } 23909const _hoisted_13 = { class: "statusPill" } 23910const _hoisted_14 = { class: "profileLine" } 23911const _hoisted_15 = { class: "profileLine" } 23912const _hoisted_16 = { 23913 key: 0, 23914 class: "hint" 23915} 23916const _hoisted_17 = { 23917 class: "card aiAdminDisclosure", 23918 open: "" 23919} 23920const _hoisted_18 = { class: "aiDisclosureBody" } 23921const _hoisted_19 = { class: "profileLine" } 23922const _hoisted_20 = { class: "profileLine" } 23923const _hoisted_21 = { class: "profileLine" } 23924const _hoisted_22 = { class: "profileLine" } 23925const _hoisted_23 = { key: 0 } 23926const _hoisted_24 = { class: "card aiAdminDisclosure" } 23927const _hoisted_25 = { class: "aiDisclosureBody" } 23928const _hoisted_26 = { class: "profileLine" } 23929const _hoisted_27 = { class: "profileLine" } 23930const _hoisted_28 = { class: "profileLine" } 23931const _hoisted_29 = { class: "profileLine" } 23932const _hoisted_30 = { class: "profileLine" } 23933const _hoisted_31 = { key: 0 } 23934const _hoisted_32 = { class: "card aiAdminDisclosure" } 23935const _hoisted_33 = { class: "aiDisclosureBody" } 23936const _hoisted_34 = { class: "profileLine" } 23937const _hoisted_35 = { class: "profileLine" } 23938const _hoisted_36 = { class: "profileLine" } 23939 23940return function render(_ctx, _cache) { 23941 with (_ctx) { 23942 const { resolveComponent: _resolveComponent, createVNode: _createVNode, createElementVNode: _createElementVNode, createTextVNode: _createTextVNode, withCtx: _withCtx, vModelSelect: _vModelSelect, withDirectives: _withDirectives, toDisplayString: _toDisplayString, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, normalizeClass: _normalizeClass, renderList: _renderList, Fragment: _Fragment, createBlock: _createBlock } = _Vue 23943 23944 const _component_AiAdminCenterNav = _resolveComponent("AiAdminCenterNav") 23945 const _component_router_link = _resolveComponent("router-link") 23946 const _component_AdminFrame = _resolveComponent("AdminFrame") 23947 23948 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù Ø±ÙØ² AI â Ø§ÙÙÙØ§Ø¡Ø© ÙØ§ÙÙ Ø±Ø¯ÙØ¯" }, { 23949 default: _withCtx(() => [ 23950 _createVNode(_component_AiAdminCenterNav), 23951 _createElementVNode("section", _hoisted_1, [_cache[2] || (_cache[2] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ÙÙØ§Ø³ ÙØ§ ÙØ±Ø§Ø±"), _createElementVNode("h3", null, "ÙÙØ§Ø¡Ø© ÙÙ Ø±Ø¯ÙØ¯ Ø§ÙØ¨ØØ«"), _createElementVNode("p", null, "آخر 30 ÙÙ٠ا٠ÙÙØ§Ø³ØªÙÙØ§Ù ÙØ§ÙÙØªØ§Ø¦Ø¬Ø Ù90 ÙÙ٠ا٠ÙÙØ£Ùدا٠اÙÙ ØªÙØ±Ø±Ø©. اÙÙ Ø±Ø¯ÙØ¯ ÙÙØ§Ø³ ب٠ا Ø§Ø¹ØªÙ Ø¯Ù Ø§ÙØ¨Ø´Ø± ÙØ§ Ø¨ØØ¬Ù ٠ا ÙÙÙØ¯Ù اÙÙÙ ÙØ°Ø¬.")], -1)), _createElementVNode("div", _hoisted_2, [_createVNode(_component_router_link, { 23952 class: "smallbtn", 23953 to: {path:'/admin/ai-operations',query:{hub:hub,workspace:'jobs'}} 23954 }, { 23955 default: _withCtx(() => _cache[0] || (_cache[0] = [_createTextVNode("تشغÙÙ Ø¨ØØ« Ø¬Ø¯ÙØ¯")])), 23956 _: 1, 23957 __: [0] 23958 }, 8, ["to"]), _createVNode(_component_router_link, { 23959 class: "smallbtn secondary", 23960 to: {path:'/admin/ai-research',query:{hub:hub,workspace:'review'}} 23961 }, { 23962 default: _withCtx(() => _cache[1] || (_cache[1] = [_createTextVNode("ÙØªØ اÙÙ ÙØªØ±ØØ§Øª")])), 23963 _: 1, 23964 __: [1] 23965 }, 8, ["to"])])]), 23966 _createElementVNode("section", _hoisted_3, [_createElementVNode("label", null, [_cache[4] || (_cache[4] = _createTextVNode("اÙÙØ³Ù ")), _withDirectives(_createElementVNode("select", { 23967 "onUpdate:modelValue": $event => ((hub) = $event), 23968 onChange: changeHub 23969 }, _cache[3] || (_cache[3] = [_createElementVNode("option", { value: "china_guide" }, "دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ", -1), _createElementVNode("option", { value: "trade_shipping" }, "Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ", -1)]), 40, _hoisted_4), [[_vModelSelect, hub]])])]), 23970 error 23971 ? (_openBlock(), _createElementBlock("section", _hoisted_5, [_createElementVNode("p", null, _toDisplayString(error), 1), _createElementVNode("button", { 23972 class: "smallbtn", 23973 onClick: load, 23974 disabled: loading 23975 }, "إعادة اÙÙ ØØ§ÙÙØ©", 8, _hoisted_6)])) 23976 : _createCommentVNode("", true), 23977 loading 23978 ? (_openBlock(), _createElementBlock("div", _hoisted_7, _cache[5] || (_cache[5] = [_createElementVNode("span", { 23979 class: "loadingSpinner", 23980 "aria-hidden": "true" 23981 }, null, -1), _createElementVNode("h3", null, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...", -1)]))) 23982 : _createCommentVNode("", true), 23983 (!loading && e) 23984 ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [ 23985 _createElementVNode("section", _hoisted_8, [_createElementVNode("div", _hoisted_9, [_cache[6] || (_cache[6] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "آخر 30 ÙÙ٠اÙ"), _createElementVNode("h3", null, "Ù ÙØ®Øµ Ø§ÙØªØ´ØºÙÙ")], -1)), _createElementVNode("span", { class: _normalizeClass(["statusPill", {canaryPill:successRate!==null&&successRate>=90}]) }, _toDisplayString(successRate===null?'ÙØ§ Ø¨ÙØ§Ùات':successRate+'% ÙØ¬Ø§Ø'), 3)]), _createElementVNode("div", _hoisted_10, [ 23986 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.completed_jobs||0), 1), _cache[7] || (_cache[7] = _
vendor: 2,017 bytes, lines 23986-23996
23986createElementVNode("small", null, "Ù ÙØ§Ù Ù ÙØªÙ ÙØ©", -1))]), 23987 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.failed_jobs||0), 1), _cache[8] || (_cache[8] = _createElementVNode("small", null, "Ù ÙØ§Ù ÙØ§Ø´ÙØ©", -1))]), 23988 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.suggestions_generated||0), 1), _cache[9] || (_cache[9] = _createElementVNode("small", null, "Ù ÙØªØ±ØØ§Øª Ù ÙÙØ¯Ø©", -1))]), 23989 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.approved||0), 1), _cache[10] || (_cache[10] = _createElementVNode("small", null, "Ù ÙØªØ±ØØ§Øª ٠عت٠دة", -1))]), 23990 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.pending_review||0), 1), _cache[11] || (_cache[11] = _createElementVNode("small", null, "Ø¨Ø§ÙØªØ¸Ø§Ø± اÙ٠راجعة", -1))]), 23991 _createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(e.duplicates_discarded||0), 1), _cache[12] || (_cache[12] = _createElementVNode("small", null, "Ù ÙØ±Ø± ٠ستبعد", -1))]) 23992 ])]), 23993 (e.review_backlog) 23994 ? (_openBlock(), _createElementBlock("section", _hoisted_11, [ 23995 _createElementVNode("div", _hoisted_12, [_cache[13] || (_cache[13] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "ÙØØªØ§Ø¬ ÙØ±Ø§Ø±Ø§Ù Ø¨Ø´Ø±ÙØ§Ù"), _createElementVNode("h3", null, "Ø±ØµÙØ¯ اÙ٠راجعة")], -1)), _createElementVNode("span", _hoisted_13, _toDisplayString(e.review_backlog.total||0), 1)]), 23996 _createElementVNode("div", _hoisted_14, [_cache[14] || (_cache[14] = _createElementVNode("b", null, "ÙÙØªØ¸Ø± Ø§ÙØªØ¬ÙÙØ² / ÙÙØ¯ اÙ٠راجعة", -1)), _createElementVNode("span", null, _toDisplayString(e.review_backlog.pending) + " / " + _toDisplayString(e.review_backlog.in_review), 1)]),
23997 _createElementVNode("div", _hoisted_15, [_cache[15] || (_cache[15] = _createElementVNode("b", null, "Ø£ÙØ¯Ù Ù Ù 7 Ø£ÙØ§Ù / 30 ÙÙ٠اÙ", -1)), _createElementVNode("span", null, _toDisplayString(e.review_backlog.aged_7_days) + " / " + _toDisplayString(e.review_backlog.aged_30_days), 1)]), 23998 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(e.review_backlog.oldest, (s) => { 23999 return (_openBlock(), _createElementBlock("article", { 24000 key: s.id, 24001 class: "compactNotice" 24002 }, [_createElementVNode("h4", null, _toDisplayString(s.title), 1), _createElementVNode("p", null, _toDisplayString(s.age_days) + " ÙÙ٠· " + _toDisplayString(s.status==='in_review'?'ÙÙØ¯ اÙ٠راجعة':'ÙÙØªØ¸Ø± Ø§ÙØªØ¬ÙÙØ²'), 1), _createVNode(_component_router_link, { 24003 class: "smallbtn", 24004 to: s.review_path 24005 }, { 24006 default: _withCtx(() => _cache[16] || (_cache[16] = [_createTextVNode("ÙØªØ اÙÙ ÙØªØ±Ø")])), 24007 _: 2, 24008 __: [16] 24009 }, 1032, ["to"])])) 24010 }), 128)), 24011 (!e.review_backlog.total) 24012 ? (_openBlock(), _createElementBlock("p", _hoisted_16, "ÙØ§ ØªÙØ¬Ø¯ Ù ÙØªØ±ØØ§Øª ٠عÙÙÙØ© ÙÙ ÙØ°Ø§ اÙÙØ³Ù .")) 24013 : _createCommentVNode("", true) 24014 ])) 24015 : _createCommentVNode("", true), 24016 _createElementVNode("details", _hoisted_17, [_createElementVNode("summary", null, [_cache[17] || (_cache[17] = _createElementVNode("b", null, "Ø§ÙØ§Ø³ØªÙÙØ§Ù ÙØ§Ù٠زÙÙØ¯", -1)), _createElementVNode("span", null, _toDisplayString(e.total_tokens===null?'ØºÙØ± ٠تاØ':e.total_tokens+' token'), 1)]), _createElementVNode("div", _hoisted_18, [ 24017 _cache[23] || (_cache[23] = _createElementVNode("p", { class: "hint" }, "تÙÙ٠اÙ٠زÙÙØ¯ Ø§ÙØ£Ø³Ø§Ø³Ù اÙÙ Ø³Ø¬ÙØ ÙØ§ ÙØ´Ù ٠استÙÙØ§Ù Ø§ÙØµÙر أ٠اÙ٠ساعد Ø§ÙØ«Ø§ÙÙÙØ ÙÙÙØ³ ÙØ§ØªÙرة ٠اÙÙØ©.", -1)), 24018 _createElementVNode("div", _hoisted_19, [_cache[18] || (_cache[18] = _createElementVNode("b", null, "Ø§ÙØªÙ ا٠اÙÙÙØ§Ø³", -1)), _createElementVNode("span", null, [_createTextVNode(_toDisplayString(e.measured_jobs) + " Ù Ù " + _toDisplayString(e.terminal_jobs), 1), (e.usage_coverage!==null) 24019 ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [_createTextVNode(" (" + _toDisplayString(pct(e.usage_coverage)) + "%)", 1)], 64)) 24020 : _createCommentVNode("", true)])]), 24021 _createElementVNode("div", _hoisted_20, [_cache[19] || (_cache[19] = _createElementVNode("b", null, "Ù ØªÙØ³Ø· Ø§ÙØ¥Ø¯Ø®Ø§Ù", -1)), _createElementVNode("span", null, _toDisplayString(e.avg_input_tokens===null?'ØºÙØ± ٠تاØ':e.avg_input_tokens), 1)]), 24022 _createElementVNode("div", _hoisted_21, [_cache[20] || (_cache[20] = _createElementVNode("b", null, "Ù ØªÙØ³Ø· اÙ٠خرجات", -1)), _createElementVNode("span", null, _toDisplayString(e.avg_output_tokens===null?'ØºÙØ± ٠تاØ':e.avg_output_tokens), 1)]), 24023 _createElementVNode("div", _hoisted_22, [_cache[21] || (_cache[21] = _createElementVNode("b", null, "تÙÙÙ ÙÙÙ Ù ÙØªØ±Ø ٠عت٠د", -1)), _createElementVNode("span", null, _toDisplayString(e.tokens_per_approved===null?usageReason(e.tokens_per_approved_unavailable_reason):e.tokens_per_approved), 1)]), 24024 (e.provider_models&&e.provider_models.length) 24025 ? (_openBlock(), _createElementBlock("div", _hoisted_23, [_cache[22] || (_cache[22] = _createElementVNode("h4", null, "ØØ³Ø¨ اÙ٠زÙÙØ¯ ÙØ§ÙÙÙ ÙØ°Ø¬", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(e.provider_models, (p) => { 24026 return (_openBlock(), _createElementBlock("div", { 24027 class: "profileLine", 24028 key: p.provider+':'+p.model 24029 }, [_createElementVNode("b", null, _toDisplayString(p.provider) + " · " + _toDisplayString(p.model), 1), _createElementVNode("span", null, _toDisplayString(p.total_tokens===null?'ØºÙØ± ٠تاØ':p.total_tokens) + " إج٠اÙ٠· ÙÙØ§Ø³ " + _toDisplayString(p.measured_jobs) + "/" + _toDisplayString(p.jobs), 1)])) 24030 }), 128))])) 24031 : _createCommentVNode("", true) 24032 ])]), 24033 _createElementVNode("details", _hoisted_24, [_createElementVNode("summary", null, [_cache[24] || (_cache[24] = _createElementVNode("b", null, "اÙÙ Ø±Ø¯ÙØ¯ ÙØ§ÙØªÙØ±Ø§Ø±", -1)), _createElementVNode("span", null, _toDisplayString(pct(e.approval_rate)) + "% اعت٠اد", 1)]), _createElementVNode("div", _hoisted_25, [ 24034 _createElementVNode("div", _hoisted_26, [_cache[25] || (_cache[25] = _createElementVNode("b", null, "Ù ÙØªØ±ØØ§Øª Ù ÙÙØ¯Ø©", -1)), _createElementVNode("span", null, _toDisplayString(e.suggestions_generated), 1)]), 24035 _createElementVNode("div", _hoisted_27, [_cache[26] || (_cache[26] = _createElementVNode("b", null, "Ù ÙØ±Ø±Ø§Øª ٠ستبعدة", -1)), _createElementVNode("span", null, _toDisplayString(e.duplicates_discarded) + " (" + _toDisplayString(pct(e.duplicate_rate)) + "%)", 1)]), 24036 _createElementVNode("div", _hoisted_28, [_cache[27] || (_cache[27] = _
24036createElementVNode("b", null, "٠عت٠دة", -1)), _createElementVNode("span", null, _toDisplayString(e.approved) + " Ù Ù " + _toDisplayString(e.decided) + " ØªÙ Ø§ÙØ¨Øª ÙÙÙØ§ (" + _toDisplayString(pct(e.approval_rate)) + "%)", 1)]), 24037 _createElementVNode("div", _hoisted_29, [_cache[28] || (_cache[28] = _createElementVNode("b", null, "Ø£ÙØ¯Ø§Ù ØªÙØªØ¸Ø± ÙØ±Ø§Ø± اÙ٠راجعة", -1)), _createElementVNode("span", null, _toDisplayString(e.awaiting_review_targets), 1)]), 24038 _createElementVNode("div", _hoisted_30, [_cache[29] || (_cache[29] = _createElementVNode("b", null, "Ø£ÙØ¯Ø§Ù ٠ج٠دة", -1)), _createElementVNode("span", null, _toDisplayString(e.frozen_targets), 1)]), 24039 (repeated.length) 24040 ? (_openBlock(), _createElementBlock("div", _hoisted_31, [_cache[30] || (_cache[30] = _createElementVNode("h4", null, "Ø£ÙØ¯Ø§Ù Ù ØªÙØ±Ø±Ø©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(repeated, (t) => { 24041 return (_openBlock(), _createElementBlock("div", { 24042 class: "profileLine", 24043 key: t.target_key 24044 }, [_createElementVNode("b", null, _toDisplayString(t.target_key), 1), _createElementVNode("span", null, _toDisplayString(t.attempts) + " Ù ØØ§ÙÙØ© · " + _toDisplayString(t.approved) + " ٠عت٠د · " + _toDisplayString(t.pending) + " ÙÙØªØ¸Ø± اÙ٠راجعة", 1)])) 24045 }), 128))])) 24046 : _createCommentVNode("", true) 24047 ])]), 24048 _createElementVNode("details", _hoisted_32, [_cache[34] || (_cache[34] = _createElementVNode("summary", null, [_createElementVNode("b", null, "ØØ¯Ùد Ø§ÙØªØ´ØºÙÙ"), _createElementVNode("span", null, "Ø³ÙØ§Ø³Ø© اÙÙ ØØ±Ù")], -1)), _createElementVNode("div", _hoisted_33, [_createElementVNode("div", _hoisted_34, [_cache[31] || (_cache[31] = _createElementVNode("b", null, "سÙ٠جرد Ø§ÙØ¨Ø±Ù٠بت", -1)), _createElementVNode("span", null, _toDisplayString(policy.prompt_inventory_limit) + " سطراÙ", 1)]), _createElementVNode("div", _hoisted_35, [_cache[32] || (_cache[32] = _createElementVNode("b", null, "سÙ٠٠خرجات Ø§ÙØ§Ø³ØªØ¯Ø¹Ø§Ø¡", -1)), _createElementVNode("span", null, _toDisplayString(policy.max_output_tokens) + " تÙÙÙ", 1)]), _createElementVNode("div", _hoisted_36, [_cache[33] || (_cache[33] = _createElementVNode("b", null, "Ø°Ø§ÙØ±Ø© اÙ٠رÙÙØ¶Ø§Øª", -1)), _createElementVNode("span", null, _toDisplayString(policy.negative_memory_days) + " ÙÙ٠اÙ", 1)])])]) 24049 ], 64)) 24050 : _createCommentVNode("", true) 24051 ]), 24052 _: 1 24053 })) 24054 } 24055} 24056})()}; 24057 24058 24059 const CountryCommunitiesPage={components:{PublicFrame},setup(){const store=useGzcStore(),router=useRouter(),data=ref(null),loading=ref(true),showForm=ref(false),form=reactive({city_key:'',contact_person:'',contact_whatsapp:'',contact_email:'',contact_url:'',about_ar:'',request_note:''}); 24060 async function load(){loading.value=true;if(!await store.requireMember(router,'/country-communities'))return;const r=await api('/api/country-communities');if(r&&r.ok)data.value=r;else store.state.msg=(r&&r.message)||'تعذر تØÙ ÙÙ Ø§ÙØ¬Ø§ÙÙØ§Øª';loading.value=false;} 24061 async function submit(){if(!form.city_key){store.state.msg='اختر اÙ٠دÙÙØ©';return;}if(!form.contact_whatsapp){store.state.msg='رÙÙ ÙØ§ØªØ³Ø§Ø¨ ÙÙØªÙاص٠٠طÙÙØ¨';return;}store.state.busy=true;const r=await api('/api/country-communities/request',{method:'POST',body:JSON.stringify(form)});store.state.busy=false;store.state.msg=r.message||r.error||'';if(r&&r.ok){showForm.value=false;form.city_key='';form.contact_person='';form.contact_whatsapp='';form.contact_email='';form.contact_url='';form.about_ar='';form.request_note='';await load();}} 24062 function openCommunity(cc){if(cc&&cc.slug)router.push('/community/'+encodeURIComponent(cc.slug));} 24063 onMounted(load); 24064 const communities=computed(()=>safeArray(data.value&&data.value.communities)); 24065 const pending=computed(()=>safeArray(data.value&&data.value.pending)); 24066 const cities=computed(()=>safeArray(data.value&&data.value.cities)); 24067 const country=computed(()=>(data.value&&data.value.country)||null); 24068 return{store,data,loading,showForm,form,submit,communities,pending,cities,country,openCommunity};}, 24069 render:(function(){ 24070const _Vue = Vue
24071const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 24072 24073const _hoisted_1 = { 24074 key: 0, 24075 class: "card loadingState", 24076 role: "status" 24077} 24078const _hoisted_2 = { 24079 key: 1, 24080 class: "card" 24081} 24082const _hoisted_3 = { 24083 key: 0, 24084 class: "hint" 24085} 24086const _hoisted_4 = { 24087 key: 2, 24088 class: "card" 24089} 24090const _hoisted_5 = { 24091 key: 3, 24092 class: "card" 24093} 24094const _hoisted_6 = { class: "localCommunityGrid" } 24095const _hoisted_7 = ["onClick"] 24096const _hoisted_8 = { class: "memberCardTop" } 24097const _hoisted_9 = { key: 0 } 24098const _hoisted_10 = { 24099 key: 4, 24100 class: "card" 24101} 24102const _hoisted_11 = { class: "statusPill" } 24103const _hoisted_12 = { 24104 key: 5, 24105 class: "card" 24106} 24107const _hoisted_13 = ["onClick"] 24108const _hoisted_14 = { 24109 key: 0, 24110 class: "editGrid" 24111} 24112const _hoisted_15 = ["onUpdate:modelValue"] 24113const _hoisted_16 = ["value"] 24114const _hoisted_17 = ["onUpdate:modelValue"] 24115const _hoisted_18 = ["onUpdate:modelValue"] 24116const _hoisted_19 = ["onUpdate:modelValue"] 24117const _hoisted_20 = ["onUpdate:modelValue"] 24118const _hoisted_21 = ["onUpdate:modelValue"] 24119const _hoisted_22 = ["onUpdate:modelValue"] 24120const _hoisted_23 = ["onClick"] 24121 24122return function render(_ctx, _cache) { 24123 with (_ctx) { 24124 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createVNode: _createVNode, renderList: _renderList, Fragment: _Fragment, vModelSelect: _vModelSelect, withDirectives: _withDirectives, vModelText: _vModelText, createBlock: _createBlock } = _Vue 24125 24126 const _component_router_link = _resolveComponent("router-link") 24127 const _component_PublicFrame = _resolveComponent("PublicFrame") 24128 24129 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "جاÙÙØ§Øª دÙÙØªÙ" }, { 24130 default: _withCtx(() => [ 24131 _cache[19] || (_cache[19] = _createElementVNode("section", { class: "card dailyHero" }, [_createElementVNode("span", { class: "adminEyebrow" }, "Country Communities"), _createElementVNode("h2", null, "جاÙÙØ§Øª دÙÙØªÙ ÙÙ Ø§ÙØµÙÙ"), _createElementVNode("p", null, "Ø§ÙØ¬ÙØ³ÙØ© ØµÙØ© ÙÙØ¹Ø¶Ù ÙÙØ·. ØªØ¸ÙØ± Ù٠جاÙÙØ§Øª دÙÙØªÙØ ÙØ£Ù جاÙÙØ© ØªØ·ÙØ¨ تسجÙÙ ØµÙØØªÙØ§ Ù٠عÙÙ٠ات Ø§ÙØªÙØ§ØµÙ Ù Ø¹ÙØ§ ث٠تÙÙØ´Ø± بعد اÙ٠راجعة.")], -1)), 24132 loading 24133 ? (_openBlock(), _createElementBlock("div", _hoisted_1, _c
24133ache[0] || (_cache[0] = [_createElementVNode("span", { 24134 class: "loadingSpinner", 24135 "aria-hidden": "true" 24136 }, null, -1), _createElementVNode("h3", null, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...", -1)]))) 24137 : _createCommentVNode("", true), 24138 (!loading && country) 24139 ? (_openBlock(), _createElementBlock("section", _hoisted_2, [_cache[2] || (_cache[2] = _createElementVNode("h3", null, "دÙÙØªÙ", -1)), _createElementVNode("p", null, [_createElementVNode("b", null, _toDisplayString(country.name_ar), 1), _cache[1] || (_cache[1] = _createTextVNode()), (country.demonym_ar) 24140 ? (_openBlock(), _createElementBlock("span", _hoisted_3, "(" + _toDisplayString(country.demonym_ar) + ")", 1)) 24141 : _createCommentVNode("", true)])])) 24142 : _createCommentVNode("", true), 24143 (!loading && !country) 24144 ? (_openBlock(), _createElementBlock("section", _hoisted_4, [_cache[4] || (_cache[4] = _createElementVNode("h3", null, "ØØ¯Ø¯ دÙÙØªÙ Ø£ÙÙØ§Ù", -1)), _cache[5] || (_cache[5] = _createElementVNode("p", { class: "hint" }, "أض٠دÙÙØªÙ ÙÙ Ù ÙÙÙ Ø§ÙØ´Ø®ØµÙ ØØªÙ ØªØ¸ÙØ± Ù٠جاÙÙØ§Øª دÙÙØªÙ.", -1)), _createVNode(_component_router_link, { 24145 class: "btn secondary", 24146 to: "/account" 24147 }, { 24148 default: _withCtx(() => _cache[3] || (_cache[3] = [_createTextVNode("ÙØªØ Ù ÙÙÙ")])), 24149 _: 1, 24150 __: [3] 24151 })])) 24152 : _createCommentVNode("", true), 24153 (!loading && communities.length) 24154 ? (_openBlock(), _createElementBlock("section", _hoisted_5, [_cache[9] || (_cache[9] = _createElementVNode("h3", null, "Ø§ÙØ¬Ø§ÙÙØ§Øª اÙÙ ÙØ´Ùرة", -1)), _createElementVNode("div", _hoisted_6, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(communities, (cc) => { 24155 return (_openBlock(), _createElementBlock("button", { 24156 type: "button", 24157 class: "localCommunityPublicCard clickable", 24158 key: cc.id, 24159 onClick: $event => (openCommunity(cc)) 24160 }, [ 24161 _createElementVNode("span", _hoisted_8, [_createElementVNode("h4", null, _toDisplayString(cc.name_ar), 1)]), 24162 _createElementVNode("span", null, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "اÙ٠دÙÙØ©:", -1)), _createTextVNode(" " + _toDisplayString($cityLabel(cc.main_city) || '-'), 1)]), 24163 (cc.contact_whatsapp) 24164 ? (_openBlock(), _createElementBlock("span", _hoisted_9, [_cache[7] || (_cache[7] = _createElementVNode("b", null, "ÙØ§ØªØ³Ø§Ø¨:", -1)), _createTextVNode(" " + _toDisplayString(cc.contact_whatsapp), 1)])) 24165 : _createCommentVNode("", true), 24166 _cache[8] || (_cache[8] = _createElementVNode("small", { class: "openHint" }, "اضغط ÙÙØªØ Ø§ÙØµÙØØ©", -1)) 24167 ], 8, _hoisted_7)) 24168 }), 128))])])) 24169 : _createCommentVNode("", true), 24170 (!loading && pending.length) 24171 ? (_openBlock(), _createElementBlock("section", _hoisted_10, [_cache[10] || (_cache[10] = _createElementVNode("h3", null, "Ø·ÙØ¨Ø§Øª ÙÙØ¯ اÙ٠راجعة", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(pending, (p) => { 24172 return (_openBlock(), _createElementBlock("div", { 24173 class: "profileLine", 24174 key: p.id 24175 }, [_createElementVNode("b", null, _toDisplayString(p.name_ar), 1), _createElementVNode("span", _hoisted_11, _toDisplayString(p.publication_status==='under_review'?'ÙÙØ¯ اÙ٠راجعة':'٠ستÙÙ '), 1)])) 24176 }), 128))])) 24177 : _createCommentVNode("", true), 24178 (!loading && country) 24179 ? (_openBlock(), _createElementBlock("section", _hoisted_12, [ 24180 _cache[17] || (_cache[17] = _createElementVNode("h3", null, "Ø·ÙØ¨ تسجÙ٠جاÙÙØ©", -1)), 24181 _cache[18] || (_cache[18] = _createElementVNode("p", { class: "hint" }, "ÙÙØ¯ÙÙÙ Ø§ÙØ·Ùب Ù Ù Ù Ù Ø«Ù Ø§ÙØ¬Ø§ÙÙØ©. ØªÙØ±Ø§Ø¬Ø¹ Ø§ÙØ¥Ø¯Ø§Ø±Ø© Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ¨Ù اÙÙØ´Ø±.", -1)), 24182 _createElementVNode("button", { 24183 class: "btn secondary", 24184 onClick: $event => (showForm=!showForm) 24185 }, _toDisplayString(showForm?'Ø¥ØºÙØ§Ù اÙÙÙ ÙØ°Ø¬':'ÙØªØ ÙÙ ÙØ°Ø¬ Ø§ÙØ·Ùب'), 9, _hoisted_13), 24186 showForm 24187 ? (_openBlock(), _createElementBlock("div", _hoisted_14, [ 24188 _createElementVNode("label", null, [_cache[12] || (_cache[12] = _createTextVNode("اÙ٠دÙÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((form.city_key) = $event) }, [_cache[11] || (_cache[11] = _createElementVNode("option", { value: "" }, "اختر اÙ٠دÙÙØ©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(cities, (c) => { 24189 return (_openBlock(), _createElementBlock("option", { 24190 key: c.city_key, 24191 value: c.city_key 24192 }, _toDisplayString(c.name_ar), 9, _hoisted_16)) 24193 }), 128))], 8, _hoisted_15), [[_vModelSelect, form.city_key]])]), 24194 _createElementVNode("label", null, [_cache[13] || (_cache[13] = _createTextVNode("اس٠اÙ٠سؤÙÙ")), _withDirectives(_createElementVNode("input", { 24195 "onUpdate:modelValue": $event => ((form.contact_person) = $event), 24196 placeholder: "Ø§Ø³Ù Ù Ù Ø«Ù Ø§ÙØ¬Ø§ÙÙØ©" 24197 }, null, 8, _hoisted_17), [[_vModelText, form.contact_person]])]), 24198 _createElementVNode("label", null, [_cache[14] || (_cache[14] = _createTextVNode("ÙØ§ØªØ³Ø§Ø¨ Ø§ÙØªÙاصÙ")), _withDirectives(_createElementVNode("input", { 24199 "onUpdate:modelValue": $event => ((form.contact_whatsapp) = $event), 24200 placeholder: "٠ثاÙ: 8613000000000" 24201 }, null, 8, _hoisted_18), [[_vModelText, form.contact_whatsapp]])]), 24202 _createElementVNode("label", null, [_cache[15] || (_cache[15] = _createTextVNode("Ø§ÙØ¨Ø±Ùد Ø§ÙØ¥ÙÙØªØ±ÙÙÙ")), _withDirectives(_createElementVNode("input", { 24203 "onUpdate:modelValue": $event => ((form.contact_email) = $event), 24204 placeholder: "Ø§Ø®ØªÙØ§Ø±Ù" 24205 }, null, 8, _hoisted_19), [[_vModelText, form.contact_email]])]), 24206 _createElementVNode("label", null, [_cache[16] || (_cache[16] = _createTextVNode("رابط رس٠Ù")), _withDirectives(_createElementVNode("input", { 24207 "onUpdate:modelValue": $event => ((form.contact_url) = $event), 24208 placeholder: "Ø§Ø®ØªÙØ§Ø±Ù" 24209 }, null, 8, _hoisted_20), [[_vModelText, form.contact_url]])]) 24210 ])) 24211 : _createCommentVNode("", true), 24212 showForm 24213 ? _withDirectives((_openBlock(), _createElementBlock("textarea", { 24214 key: 1, 24215 "onUpdate:modelValue": $event => ((form.about_ar) = $event), 24216 placeholder: "ÙØ¨Ø°Ø© Ø¹Ù Ø§ÙØ¬Ø§ÙÙØ© ÙØ®Ø¯Ù Ø§ØªÙØ§" 24217 }, null, 8, _hoisted_21)), [[_vModelText, form.about_ar]]) 24218 : _createCommentVNode("", true), 24219 showForm 24220 ? _withDirectives((_openBlock(), _createElementBlock("textarea", { 24221 key: 2, 24222 "onUpdate:modelValue": $event => ((form.request_note) = $event), 24223 placeholder: "Ù ÙØ§ØØ¸Ø§Øª ÙÙØ¥Ø¯Ø§Ø±Ø© (Ø§Ø®ØªÙØ§Ø±Ù)" 24224 }, null, 8, _hoisted_22)), [[_vModelText, form.request_note]]) 24225 : _createCommentVNode("", true), 24226 showForm 24227 ? (_openBlock(), _createElementBlock("button", { 24228 key: 3, 24229 class: "btn", 24230 onClick: submit 24231 }, "Ø¥Ø±Ø³Ø§Ù Ø§ÙØ·Ùب", 8, _hoisted_23)) 24232 : _createCommentVNode("", true) 24233 ])) 24234 : _createCommentVNode("", true) 24235 ]), 24236 _: 1, 24237 __: [19] 24238 })) 24239 } 24240} 24241})()}; 24242 24243 const AdminCountryCommunitiesPage={components:{AdminFrame},setup(){const store=useGzcStore(),router=useRouter(),rows=ref([]),loading=ref(true),filter=reactive({status:'all'}); 24244 async function load(){loading.value=true;if(!await store.requireAdmin(router))return;const r=await api('/api/admin/country-communities?status='+encodeURIComponent(filter.status));if(r&&r.ok)rows.value=safeArray(r.communities);else store.state.msg=(r&&r.message)||'تعذر Ø§ÙØªØÙ ÙÙ';loading.value=false;} 24245 async function decide(row,status){store.state.busy=true;const r=await api('/api/admin/country-communities/'+encodeURIComponent(row.id)+'/decision',{method:'POST',body:JSON.stringify({publication_status:status})});store.state.busy=false;store.state.msg=r.message||r.error||'';await load();} 24246 onMounted(load); 24247 return{store,rows,loading,filter,load,decide};}, 24248 render:(function(){ 24249const _Vue = Vue
24250const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 24251 24252const _hoisted_1 = { class: "card" } 24253const _hoisted_2 = { class: "editGrid" } 24254const _hoisted_3 = ["onUpdate:modelValue", "onChange"] 24255const _hoisted_4 = { 24256 key: 0, 24257 class: "card loadingState", 24258 role: "status" 24259} 24260const _hoisted_5 = { class: "memberCardTop" } 24261const _hoisted_6 = { class: "statusPill" } 24262const _hoisted_7 = { class: "profileLine" } 24263const _hoisted_8 = { class: "profileLine" } 24264const _hoisted_9 = { 24265 key: 0, 24266 class: "profileLine" 24267} 24268const _hoisted_10 = { 24269 key: 1, 24270 class: "profileLine" 24271} 24272const _hoisted_11 = { 24273 key: 2, 24274 class: "profileLine" 24275} 24276const _hoisted_12 = { 24277 key: 3, 24278 class: "hint" 24279} 24280const _hoisted_13 = { 24281 key: 4, 24282 class: "hint" 24283} 24284const _hoisted_14 = { class: "row" } 24285const _hoisted_15 = ["onClick"] 24286const _hoisted_16 = ["onClick"] 24287const _hoisted_17 = ["onClick"] 24288const _hoisted_18 = { 24289 key: 1, 24290 class: "card" 24291} 24292 24293return function render(_ctx, _cache) { 24294 with (_ctx) { 24295 const { createElementVNode: _createElementVNode, vModelSelect: _vModelSelect, withDirectives: _withDirectives, createTextVNode: _createTextVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, renderList: _renderList, Fragment: _Fragment, toDisplayString: _toDisplayString, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 24296 24297 const _component_AdminFrame = _resolveComponent("AdminFrame") 24298 24299 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "جاÙÙØ§Øª Ø§ÙØ¯ÙÙ" }, { 24300 default: _withCtx(() => [ 24301 _cache[10] || (_cache[10] = _createElementVNode("section", { class: "card noticeCard compactNotice" }, [_createElementVNode("h3", null, "جاÙÙØ§Øª Ø§ÙØ¯ÙÙ"), _createElementVNode("p", null, "ÙÙØ§Ù Ø§ÙØ¬Ø§ÙÙØ© تعرÙÙÙ ÙÙØ·: ØµÙØØ© Ù٠عÙÙ٠ات ØªÙØ§ØµÙ ØªØ¸ÙØ± ÙØ£Ø¹Ø¶Ø§Ø¡ ÙÙØ³ Ø§ÙØ¯ÙÙØ©. ÙØ§ ÙÙ ÙØ Ø£Ù ØµÙØ§ØÙØ© تشغÙÙÙØ© ÙÙØ§ ÙØºÙÙØ± ÙÙÙØ© اÙÙ ÙØµØ©.")], -1)), 24302 _createElementVNode("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [_createElementVNode("label", null, [_cache[1] || (_cache[1] = _createTextVNode("Ø§ÙØØ§ÙØ©")), _withDirectives(_createElementVNode("select", { 24303 "onUpdate:modelValue": $event => ((filter.status) = $event), 24304 onChange: load 24305 }, _cache[0] || (_cache[0] = [ 24306 _createElementVNode("option", { value: "all" }, "اÙÙÙ", -1), 24307 _createElementVNode("option", { value: "requested" }, "٠ستÙÙ ", -1), 24308 _createElementVNode("option", { value: "under_review" }, "ÙÙØ¯ اÙ٠راجعة", -1), 24309 _createElementVNode("option", { value: "published" }, "Ù ÙØ´Ùر", -1), 24310 _createElementVNode("option", { value: "rejected" }, "٠رÙÙØ¶", -1) 24311 ]), 40, _hoisted_3), [[_vModelSelect, filter.status]])])])]), 24312 loading 24313 ? (_openBlock(), _createElementBlock("div", _hoisted_4, _cache[2] || (_cache[2] = [_createElementVNode("span", { 24314 class: "loadingSpinner", 24315 "aria-hidden": "true" 24316 }, null, -1), _createElementVNode("h3", null, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...", -1)]))) 24317 : _createCommentVNode("", true), 24318 (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(rows, (row) => { 24319 return (_openBlock(), _createElementBlock("section", { 24320 class: "card", 24321 key: row.id 24322 }, [ 24323 _createElementVNode("div", _hoisted_5, [_createElementVNode("h4", null, _toDisplayString(row.name_ar), 1), _createElementVNode("span", _hoisted_6, _toDisplayString(row.publication_status), 1)]), 24324 _createElementVNode("div", _hoisted_7, [_cache[3] || (_cache[3] = _createElementVNode("b", null, "Ø§ÙØ¯ÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString(row.country_name_ar || row.country_code), 1)]), 24325 _createElementVNode("div", _hoisted_8, [_cache[4] || (_cache[4] = _createElementVNode("b", null, "اÙ٠دÙÙØ©", -1)), _createElementVNode("span", null, _toDisplayString($cityLabel(row.city_key)), 1)]), 24326 (row.contact_person) 24327 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [_cache[5] || (_cache[5] = _createElementVNode("b", null, "اÙ٠سؤÙÙ", -1)), _createElementVNode("span", null, _toDisplayString(row.
24327contact_person), 1)])) 24328 : _createCommentVNode("", true), 24329 (row.contact_whatsapp) 24330 ? (_openBlock(), _createElementBlock("div", _hoisted_10, [_cache[6] || (_cache[6] = _createElementVNode("b", null, "ÙØ§ØªØ³Ø§Ø¨", -1)), _createElementVNode("span", null, _toDisplayString(row.contact_whatsapp), 1)])) 24331 : _createCommentVNode("", true), 24332 (row.contact_email) 24333 ? (_openBlock(), _createElementBlock("div", _hoisted_11, [_cache[7] || (_cache[7] = _createElementVNode("b", null, "Ø§ÙØ¨Ø±Ùد", -1)), _createElementVNode("span", null, _toDisplayString(row.contact_email), 1)])) 24334 : _createCommentVNode("", true), 24335 (row.about_ar) 24336 ? (_openBlock(), _createElementBlock("p", _hoisted_12, _toDisplayString(row.about_ar), 1)) 24337 : _createCommentVNode("", true), 24338 (row.request_note) 24339 ? (_openBlock(), _createElementBlock("p", _hoisted_13, [_cache[8] || (_cache[8] = _createElementVNode("b", null, "Ù ÙØ§ØØ¸Ø© Ø§ÙØ·Ùب:", -1)), _createTextVNode(" " + _toDisplayString(row.request_note), 1)])) 24340 : _createCommentVNode("", true), 24341 _createElementVNode("div", _hoisted_14, [_createElementVNode("button", { 24342 class: "btn", 24343 onClick: $event => (decide(row,'published')) 24344 }, "ÙØ´Ø±", 8, _hoisted_15), _createElementVNode("button", { 24345 class: "btn secondary", 24346 onClick: $event => (decide(row,'under_review')) 24347 }, "ÙÙØ¯ اÙ٠راجعة", 8, _hoisted_16), _createElementVNode("button", { 24348 class: "smallbtn danger", 24349 onClick: $event => (decide(row,'rejected')) 24350 }, "Ø±ÙØ¶", 8, _hoisted_17)]) 24351 ])) 24352 }), 128)), 24353 (!loading && !rows.length) 24354 ? (_openBlock(), _createElementBlock("section", _hoisted_18, _cache[9] || (_cache[9] = [_createElementVNode("p", { class: "hint" }, "ÙØ§ ØªÙØ¬Ø¯ جاÙÙØ§Øª Ù Ø³Ø¬ÙØ© ÙÙ ÙØ°Ù Ø§ÙØØ§ÙØ©.", -1)]))) 24355 : _createCommentVNode("", true) 24356 ]), 24357 _: 1, 24358 __: [10] 24359 })) 24360 } 24361} 24362})()}; 24363 24364 const NotificationSettingsPage={components:{PublicFrame},setup(){const store=useGzcStore(),router=useRouter(),hubs=ref([]),countries=ref([]),p=reactive({city_key:'',country_code:'',official_circulars:true,city_updates:true,exhibitions:true,trade_shipping:true,emergency_only:false,digest_mode:'daily',whatsapp_digest:false});async function load(){if(!await store.requireMember(router,'/notification-settings'))return;const [r,h,c]=await Promise.all([api('/api/member/notification-preferences'),api('/api/city-hubs'),api('/api/platform/countries')]);if(r&&r.preferences)Object.assign(p,r.preferences);hubs.value=safeArray(h.hubs);countries.value=safeArray(c.countries);}async function save(){const r=await api('/api/member/notification-preferences',{method:'POST',body:JSON.stringify(p)});store.state.msg=r.message||r.error||'';}onMounted(load);return{store,p,hubs,countries,save};},render:(function(){ 24365const _Vue = Vue 24366const { createElementVNode: _createElementVNode, createTextVNode: _createTextVNode } = _Vue 24367 24368const _hoisted_1 = { class: "card notificationPreferenceForm" } 24369const _hoisted_2 = { class: "formTwo" } 24370const _hoisted_3 = ["onUpdate:modelValue"] 24371const _hoisted_4 = ["value"] 24372const _hoisted_5 = ["onUpdate:modelValue"] 24373const _hoisted_6 = ["value"] 24374const _hoisted_7 = { class: "checkRow" } 24375const _hoisted_8 = ["onUpdate:modelValue"] 24376const _hoisted_9 = { class: "checkRow" } 24377const _hoisted_10 = ["onUpdate:modelValue"] 24378const _hoisted_11 = { class: "checkRow" } 24379const _hoisted_12 = ["onUpdate:modelValue"] 24380const _hoisted_13 = { class: "checkRow" } 24381const _hoisted_14 = ["onUpdate:modelValue"] 24382const _hoisted_15 = { class: "checkRow" } 24383const _hoisted_16 = ["onUpdate:modelValue"] 24384const _hoisted_17 = ["onUpdate:modelValue"] 24385const _hoisted_18 = { class: "checkRow" } 24386const _hoisted_19 = ["onUpdate:modelValue"] 24387const _hoisted_20 = ["onClick"] 24388 24389return function render(_ctx, _cache) { 24390 with (_ctx) { 24391 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelSelect: _vModelSelect, withDirectives: _withDirectives, createTextVNode: _
24391createTextVNode, vModelCheckbox: _vModelCheckbox, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 24392 24393 const _component_PublicFrame = _resolveComponent("PublicFrame") 24394 24395 return (_openBlock(), _createBlock(_component_PublicFrame, { title: "ØªÙØ¶ÙÙØ§Øª Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª" }, { 24396 default: _withCtx(() => [_cache[12] || (_cache[12] = _createElementVNode("section", { class: "card dailyHero" }, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª Ø§ÙØ°ÙÙØ©"), _createElementVNode("h2", null, "استÙ٠اÙÙ ÙÙ ÙÙØ·"), _createElementVNode("p", null, "ØØ¯Ø¯ Ø¨ÙØ¯Ù Ù٠دÙÙØªÙ ÙØ§ÙÙ ÙØ¶Ùعات Ø§ÙØªÙ ØªØ±ÙØ¯ Ù ØªØ§Ø¨Ø¹ØªÙØ§. ÙØ§ تغÙÙØ± ÙØ°Ù Ø§ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª إشعارات Ø§ÙØ·Ùارئ Ø£Ù Ø£Ù Ø§Ù Ø§ÙØØ³Ø§Ø¨.")], -1)), _createElementVNode("section", _hoisted_1, [ 24397 _createElementVNode("div", _hoisted_2, [_createElementVNode("label", null, [_cache[1] || (_cache[1] = _createTextVNode("٠دÙÙØªÙ")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((p.city_key) = $event) }, [_cache[0] || (_cache[0] = _createElementVNode("option", { value: "" }, "ØºÙØ± Ù ØØ¯Ø¯Ø©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(hubs, (c) => { 24398 return (_openBlock(), _createElementBlock("option", { 24399 value: c.city_key, 24400 key: c.city_key 24401 }, _toDisplayString($cityLabel(c)), 9, _hoisted_4)) 24402 }), 128))], 8, _hoisted_3), [[_vModelSelect, p.city_key]])]), _createElementVNode("label", null, [_cache[3] || (_cache[3] = _createTextVNode("دÙÙØªÙ")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((p.country_code) = $event) }, [_cache[2] || (_cache[2] = _createElementVNode("option", { value: "" }, "ØºÙØ± Ù ØØ¯Ø¯Ø©", -1)), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(countries, (c) => { 24403 return (_openBlock(), _createElementBlock("option", { 24404 value: c.code, 24405 key: c.code 24406 }, _toDisplayString(c.name_ar), 9, _hoisted_6)) 24407 }), 128))], 8, _hoisted_5), [[_vModelSelect, p.country_code]])])]), 24408 _createElementVNode("label", _hoisted_7, [_withDirectives(_createElementVNode("input", { 24409 type: "checkbox", 24410 "onUpdate:modelValue": $event => ((p.official_circulars) = $event) 24411 }, null, 8, _hoisted_8), [[_vModelCheckbox, p.official_circulars]]), _cache[4] || (_cache[4] = _createTextVNode(" Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©"))]), 24412 _createElementVNode("label", _hoisted_9, [_withDirectives(_createElementVNode("input", { 24413 type: "checkbox", 24414 "onUpdate:modelValue": $event => ((p.city_updates) = $event) 24415 }, null, 8, _hoisted_10), [[_vModelCheckbox, p.city_updates]]), _cache[5] || (_cache[5] = _createTextVNode(" ØªØØ¯Ùثات ٠دÙÙØªÙ"))]), 24416 _createElementVNode("label", _hoisted_11, [_withDirectives(_createElementVNode("input", { 24417 type: "checkbox", 24418 "onUpdate:modelValue": $event => ((p.exhibitions) = $event) 24419 }, null, 8, _hoisted_12), [[_vModelCheckbox, p.exhibitions]]), _cache[6] || (_cache[6] = _createTextVNode(" اÙ٠عارض"))]), 24420 _createElementVNode("label", _hoisted_13, [_withDirectives(_createElementVNode("input", { 24421 type: "checkbox", 24422 "onUpdate:modelValue": $event => ((p.trade_shipping) = $event) 24423 }, null, 8, _hoisted_14), [[_vModelCheckbox, p.trade_shipping]]), _cache[7] || (_cache[7] = _createTextVNode(" Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ"))]), 24424 _createElementVNode("label", _hoisted_15, [_withDirectives(_createElementVNode("input", { 24425 type: "checkbox", 24426 "onUpdate:modelValue": $event => ((p.emergency_only) = $event) 24427 }, null, 8, _hoisted_16), [[_vModelCheckbox, p.emergency_only]]), _cache[8] || (_cache[8] = _createTextVNode(" ÙØ¶Ø¹ Ø§ÙØ·Ùارئ ÙÙØ·"))]), 24428 _createElementVNode("label", null, [_cache[10] || (_cache[10] = _createTextVNode("ØªØ¬Ù ÙØ¹ Ø§ÙØªÙبÙÙØ§Øª")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((p.digest_mode) = $event) }, _cache[9] || (_cache[9] = [ 24429 _createElementVNode("option", { value: "instant" }, "ÙÙØ±Ù Ø¹ÙØ¯ تÙÙØ±Ù", -1), 24430 _createElementVNode("option", { value: "daily" }, "Ù ÙØ®Øµ ÙÙÙ Ù", -1), 24431 _createElementVNode("option", { value: "weekly" }, "Ù ÙØ®Øµ Ø£Ø³Ø¨ÙØ¹Ù", -1), 24432 _createElementVNode("option", { value: "off" }, "بدÙÙ Ù ÙØ®Øµ", -1) 24433 ]), 8, _hoisted_17), [[_vModelSelect, p.digest_mode]])]), 24434 _createElementVNode("label", _hoisted_18, [_withDirectives(_createElementVNode("input", { 24435 type: "checkbox", 24436 "onUpdate:modelValue": $event => ((p.whatsapp_digest) = $event) 24437 }, null, 8, _hoisted_19), [[_vModelCheckbox, p.whatsapp_digest]]), _cache[11] || (_cache[11] = _createTextVNode(" Ø§ÙØ³Ù Ø§Ø Ø¨Ù ÙØ®Øµ ÙØ§ØªØ³Ø§Ø¨ Ø¹ÙØ¯ ØªÙØ¹ÙÙ٠تشغÙÙÙØ§Ù"))]), 24438 _createElementVNode("button", { 24439 class: "btn", 24440 onClick: save 24441 }, "ØÙظ Ø§ÙØªÙضÙÙØ§Øª", 8, _hoisted_20) 24442 ])]), 24443 _: 1, 24444 __: [12] 24445 })) 24446 } 24447} 24448})()}; 24449 24450 const AdminDailyUtilityPage={components:{AdminFrame},setup(){const store=useGzcStore(),router=useRouter(),data=ref(null),loading=ref(true),processing=ref('');async function load(){loading.value=true;if(!await store.requireAdmin(router))return;const r=await api('/api/admin/daily-utility/overview');if(r&&r.ok)data.value=r;else store.state.msg=r.message||r.error||'تعذر تØÙ ÙÙ Ø§ÙØªØ´ØºÙ٠اÙÙÙÙ Ù';loading.value=false;}async function processDigest(kind){processing.value=kind;const r=await api('/api/admin/daily-utility/digests/process',{method:'POST',body:JSON.stringify({kind})});processing.value='';store.state.msg=r.message||r.error||'';if(r.ok)load();}function severity(v){return v==='high'?'عاجÙ':'٠تابعة';}onMounted(load);return{store,router,data,loading,processing,load,processDigest,severity,shortDate};},render:(function(){ 24451const _Vue = Vue
24452const { createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 24453 24454const _hoisted_1 = { class: "card dashboardHeaderCard dailyOpsHeader" } 24455const _hoisted_2 = ["onClick"] 24456const _hoisted_3 = { 24457 key: 0, 24458 class: "card loadingState" 24459} 24460const _hoisted_4 = { class: "dailyOpsMetrics" } 24461const _hoisted_5 = { class: "card" } 24462const _hoisted_6 = { class: "card" } 24463const _hoisted_7 = { class: "card" } 24464const _hoisted_8 = { class: "card" } 24465const _hoisted_9 = { class: "card" } 24466const _hoisted_10 = { class: "adminTwo dailyOpsColumns" } 24467const _hoisted_11 = { class: "card" } 24468const _hoisted_12 = { class: "dailyList" } 24469const _hoisted_13 = ["onClick"] 24470const _hoisted_14 = { 24471 key: 0, 24472 class: "successText" 24473} 24474const _hoisted_15 = { class: "card" } 24475const _hoisted_16 = { class: "row" } 24476const _hoisted_17 = ["disabled", "onClick"] 24477const _hoisted_18 = ["disabled", "onClick"] 24478const _hoisted_19 = { class: "dailyList digestRunList" } 24479const _hoisted_20 = { class: "card" } 24480const _hoisted_21 = { class: "memberSectionHead" } 24481const _hoisted_22 = ["onClick"] 24482const _hoisted_23 = { class: "cityCoverageGrid" } 24483const _hoisted_24 = ["onClick"] 24484const _hoisted_25 = { key: 0 } 24485const _hoisted_26 = { key: 1 } 24486 24487return function render(_ctx, _cache) { 24488 with (_ctx) { 24489 const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, toDisplayString: _toDisplayString, renderList: _renderList, Fragment: _Fragment, normalizeClass: _normalizeClass, createTextVNode: _createTextVNode, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 24490 24491 const _component_AdminFrame = _resolveComponent("AdminFrame") 24492 24493 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "تشغÙÙ SMT China اÙÙÙÙ Ù" }, { 24494 default: _withCtx(() => [_createElementVNode("section", _hoisted_1, [_cache[0] || (_cache[0] = _createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "Daily Utility Operations"), _createElementVNode("h3", null, "Ù٠تجربة اÙ٠ستخد٠اÙÙÙÙ ÙØ© سÙÙÙ Ø©Ø"), _createElementVNode("p", { class: "hint" }, "Ù Ø±Ø§ÙØ² اÙÙ Ø¯ÙØ Ø§ÙØªØ¹Ù ÙÙ Ø§ØªØ Ø§ÙÙ Ø¹Ø§Ø±Ø¶Ø Ø®Ø·Ø© اÙÙØµÙÙ ÙØ§Ùإشعارات Ø§ÙØ°ÙÙØ© Ù٠شاشة تشغÙÙ ÙØ§ØØ¯Ø©.")], -1)), _createElementVNode("button", { 24495 class: "smallbtn secondary", 24496 onClick: load 24497 }, "ØªØØ¯ÙØ«", 8, _hoisted_2)]), loading 24498 ? (_openBlock(), _createElementBlock("section", _hoisted_3, "Ø¬Ø§Ø±Ù ÙØ±Ø§Ø¡Ø© ٠ؤشرات Ø§ÙØªØ´ØºÙÙ...")) 24499 : data 24500 ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [_createElementVNode("section", _hoisted_4, [ 24501 _createElementVNode("article", _hoisted_5, [_cache[1] || (_cache[1] = _createElementVNode("span", null, "اÙ٠د٠اÙÙØ´Ø·Ø©", -1)), _createElementVNode("b", null, _toDisplayString(data.cities.filter(x=>x.status==='active').length), 1), _createElementVNode("small", null, _toDisplayString(data.cities.filter(x=>x.content_gap).length) + " ØªØØªØ§Ø¬ ØªØºØ·ÙØ©", 1)]), 24502 _createElementVNode("article", _hoisted_6, [_cache[2] || (_cache[2] = _createElementVNode("span", null, "تع٠Ù٠ات ÙØ¹Ø§ÙØ©", -1)), _createElementVNode("b", null, _toDisplayString(data.circulars.active), 1), _createElementVNode("small", null, _toDisplayString(data.circulars.expiring_7d) + " ØªÙØªÙÙ Ø®ÙØ§Ù 7 Ø£ÙØ§Ù ", 1)]), 24503 _createElementVNode("article", _hoisted_7, [_cache[3] || (_cache[3] = _createElementVNode("span", null, "٠عارض ÙØ§Ø¯Ù Ø©", -1)), _createElementVNode("b", null, _toDisplayString(data.exhibitions.upcoming), 1), _createElementVNode("small", null, _toDisplayString(data.exhibitions.missing_registration) + " Ø¨ÙØ§ رابط تسجÙÙ", 1)]), 24504 _createElementVNode("article", _hoisted_8, [_cache[4] || (_cache[4] = _createElementVNode("span", null, "اÙÙØ§Ø¯Ù ÙÙ Ø§ÙØ¬Ø¯Ø¯", -1)), _createElementVNode("b", null, _toDisplayString(data.onboarding.engaged_members), 1), _cache[5] || (_cache[5] = _createElementVNode("small", null, "ÙØ´Ø·Ùا ÙÙ Ø§ÙØ®Ø·Ø© Ø®ÙØ§Ù 30 ÙÙ٠اÙ", -1))]), 24505 _createElementVNode("article", _hoisted_9, [_cache[6] || (_cache[6] = _createElementVNode("span", null, "Ù ÙØ®ØµØ§Øª Ø¬Ø§ÙØ²Ø©", -1)), _createElementVNode("b", null, _toDisplayString(data.digests.deliveries.ready), 1), _createElementVNode("small", null, _toDisplayString(data.digests.deliveries.failed) + " ØªØ¹Ø°ÙØ± Ø§ÙØªØ³ÙÙÙ ", 1)]) 24506 ]), _createElementVNode("section", _hoisted_10, [_createElementVNode("article", _hoisted_11, [_cache[8] || (_cache[8] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "ÙØØªØ§Ø¬ ÙØ±Ø§Ø±"), _createElementVNode("h3", null, "Ø£ÙÙÙÙØ© Ø§ÙØªØ´ØºÙÙ")])], -1)), _createElementVNode("div", _hoisted_12, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.attention, (x) => { 24507 return (_openBlock(), _createElementBlock("button", { 24508 key: x.title, 24509 onClick: $event => (router.push(x.path)) 24510 }, [_createElementVNode("span", null, [_createElementVNode("b", null, [_createElementVNode("i", { class: _normalizeClass(["opsSeverity", x.severity]) }
24510, _toDisplayString(severity(x.severity)), 3), _createTextVNode(" " + _toDisplayString(x.title), 1)]), _createElementVNode("small", null, _toDisplayString(x.summary), 1)]), _cache[7] || (_cache[7] = _createElementVNode("em", null, "â", -1))], 8, _hoisted_13)) 24511 }), 128)), (!data.attention.length) 24512 ? (_openBlock(), _createElementBlock("p", _hoisted_14, "ÙØ§ ØªÙØ¬Ø¯ Ø£Ù ÙØ± تشغÙÙÙØ© ØªØªØ·ÙØ¨ ØªØ¯Ø®ÙØ§Ù Ø§ÙØ¢Ù.")) 24513 : _createCommentVNode("", true)])]), _createElementVNode("article", _hoisted_15, [ 24514 _cache[9] || (_cache[9] = _createElementVNode("div", { class: "memberSectionHead" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª Ø§ÙØ°ÙÙØ©"), _createElementVNode("h3", null, "تشغÙ٠اÙÙ ÙØ®ØµØ§Øª")])], -1)), 24515 _cache[10] || (_cache[10] = _createElementVNode("p", { class: "hint" }, "ÙÙ ÙØ¹ اÙÙØ¸Ø§Ù ØªÙØ±Ø§Ø± اÙÙ ÙØ®Øµ ÙÙÙØªØ±Ø© ÙÙØ³ÙØ§Ø ÙÙÙØªØ²Ù بإعدادات Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª ÙÙØ§ØªØ³Ø§Ø¨.", -1)), 24516 _createElementVNode("div", _hoisted_16, [_createElementVNode("button", { 24517 class: "smallbtn", 24518 disabled: processing, 24519 onClick: $event => (processDigest('daily')) 24520 }, _toDisplayString(processing==='daily'?'جارÙ...':'ØªØØ¯ÙØ« اÙÙÙÙ Ù'), 9, _hoisted_17), _createElementVNode("button", { 24521 class: "smallbtn secondary", 24522 disabled: processing, 24523 onClick: $event => (processDigest('weekly')) 24524 }, _toDisplayString(processing==='weekly'?'جارÙ...':'ØªØØ¯ÙØ« Ø§ÙØ£Ø³Ø¨ÙعÙ'), 9, _hoisted_18)]), 24525 _createElementVNode("div", _hoisted_19, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.digests.runs.slice(0,4), (x) => { 24526 return (_openBlock(), _createElementBlock("div", { key: x.digest_kind+'-'+x.period_start }, [_createElementVNode("span", null, [_createElementVNode("b", null, _toDisplayString(x.digest_kind==='weekly'?'Ø£Ø³Ø¨ÙØ¹Ù':'ÙÙÙ Ù') + " · " + _toDisplayString(x.status), 1), _createElementVNode("small", null, _toDisplayString(shortDate(x.period_start)) + " · " + _toDisplayString(x.deliveries_created) + " تسÙÙÙ ", 1)])])) 24527 }), 128))]) 24528 ])]), _createElementVNode("section", _hoisted_20, [_createElementVNode("div", _hoisted_21, [_cache[11] || (_cache[11] = _createElementVNode("div", null, [_createElementVNode("span", { class: "adminEyebrow" }, "City Coverage"), _createElementVNode("h3", null, "ØªØºØ·ÙØ© Ù Ø±Ø§ÙØ² اÙ٠دÙ")], -1)), _createElementVNode("button", { 24529 class: "smallbtn secondary", 24530 onClick: $event => (router.push('/admin/city-hubs')) 24531 }, "إدارة اÙ٠دÙ", 8, _hoisted_22)]), _createElementVNode("div", _hoisted_23, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(data.cities, (x) => { 24532 return (_openBlock(), _createElementBlock("button", { 24533 key: x.city_key, 24534 class: _normalizeClass(["cityCoverageCard", {gap:x.content_gap}]), 24535 onClick: $event => (router.push('/admin/china-guide')) 24536 }, [ 24537 _createElementVNode("b", null, _toDisplayString($cityLabel(x)), 1), 24538 _createElementVNode("small", null, _toDisplayString(x.status) + " · " + _toDisplayString(x.verified_items) + " Ø¹ÙØµØ± Ù ÙØ«Ù", 1), 24539 _createElementVNode("div", null, [_createElementVNode("span", null, "خد٠ات " + _toDisplayString(x.services), 1), _createElementVNode("span", null, "٠عارض " + _toDisplayString(x.exhibitions), 1)]), 24540 (x.content_gap) 24541 ? (_openBlock(), _createElementBlock("em", _hoisted_25, "ØªØØªØ§Ø¬ ØªØºØ·ÙØ©")) 24542 : (_openBlock(), _createElementBlock("em", _hoisted_26, "ØªØºØ·ÙØ© Ø£Ø³Ø§Ø³ÙØ© Ù ØªØ§ØØ©")) 24543 ], 10, _hoisted_24)) 24544 }), 128))])])], 64)) 24545 : _createCommentVNode("", true)]), 24546 _: 1 24547 })) 24548 } 24549} 24550})()}; 24551 24552 const AdminCityHubsPage={components:{AdminFrame},setup(){const store=useGzcStore(),hubs=ref([]),edit=reactive({city_key:'',name_ar:'',name_en:'',province_ar:'',province_en:'',hero_image_url:'',summary_ar:'',summary_en:'',status:'active',sort_order:100,featured:false});async function load(){const r=await api('/api/admin/city-hubs');hubs.value=safeArray(r.hubs);}function open(x){Object.assign(edit,x);}async function save(){if(!edit.city_key){store.state.msg='اختر ٠دÙÙØ© Ù ÙØ¬Ùدة Ø£Ù Ø§ÙØªØ¨ Ù ÙØªØ§ØØ§Ù ØµØ§ÙØØ§Ù';return;}const r=await api('/api/admin/city-hubs/'+encodeURIComponent(edit.city_key),{method:'POST',body:JSON.stringify(edit)});store.state.msg=r.message||r.error||'';if(r.ok)load();}onMounted(load);return{store,hubs,edit,open,save};},render:(function(){ 24553const _Vue = Vue
24554const { createElementVNode: _createElementVNode, createTextVNode: _createTextVNode } = _Vue 24555 24556const _hoisted_1 = { class: "adminTwo" } 24557const _hoisted_2 = { class: "card adminGuideList" } 24558const _hoisted_3 = ["onClick"] 24559const _hoisted_4 = { class: "card dailyForm" } 24560const _hoisted_5 = ["onUpdate:modelValue"] 24561const _hoisted_6 = { class: "formTwo" } 24562const _hoisted_7 = ["onUpdate:modelValue"] 24563const _hoisted_8 = ["onUpdate:modelValue"] 24564const _hoisted_9 = { class: "formTwo" } 24565const _hoisted_10 = ["onUpdate:modelValue"] 24566const _hoisted_11 = ["onUpdate:modelValue"] 24567const _hoisted_12 = ["onUpdate:modelValue"] 24568const _hoisted_13 = ["onUpdate:modelValue"] 24569const _hoisted_14 = ["onUpdate:modelValue"] 24570const _hoisted_15 = { class: "checkRow" } 24571const _hoisted_16 = ["onUpdate:modelValue"] 24572const _hoisted_17 = ["onUpdate:modelValue"] 24573const _hoisted_18 = ["onClick"] 24574 24575return function render(_ctx, _cache) { 24576 with (_ctx) { 24577 const { createElementVNode: _createElementVNode, renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, toDisplayString: _toDisplayString, vModelText: _vModelText, withDirectives: _withDirectives, createTextVNode: _createTextVNode, vModelSelect: _vModelSelect, vModelCheckbox: _vModelCheckbox, resolveComponent: _resolveComponent, withCtx: _withCtx, createBlock: _createBlock } = _Vue 24578 24579 const _component_AdminFrame = _resolveComponent("AdminFrame") 24580 24581 return (_openBlock(), _createBlock(_component_AdminFrame, { title: "Ù Ø±Ø§ÙØ² اÙ٠دÙ" }, { 24582 default: _withCtx(() => [_cache[11] || (_cache[11] = _createElementVNode("section", { class: "card dashboardHeaderCard" }, [_createElementVNode("div", null, [_createElementVNode("span", { class: "vueBadge" }, "City Hubs"), _createElementVNode("h3", null, "إدارة ÙØ§Ø¬Ùات اÙ٠دÙ"), _createElementVNode("p", { class: "hint" }, "اÙÙ ØØªÙ٠اÙÙØ¹ÙÙ ÙÙØ³ØØ¨ Ù Ù China GuideØ ÙÙØ§ تتØÙÙ ÙÙ ÙÙÙØ© ÙØªØ±ØªÙب Ù Ø±ÙØ² اÙ٠دÙÙØ©.")])], -1)), _createElementVNode("section", _hoisted_1, [_createElementVNode("div", _hoisted_2, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(hubs, (x) => { 24583 return (_openBlock(), _createElementBlock("button", { 24584 class: "guideAdminItem", 24585 key: x.city_key, 24586 onClick: $event => (open(x)) 24587 }, [_createElementVNode("b", null, _toDisplayString($cityLabel(x)), 1), _createElementVNode("small", null, " · " + _toDisplayString(x.status) + " · " + _toDisplayString(x.featured?'Ù Ù ÙØ²Ø©':'Ø¹Ø§Ø¯ÙØ©'), 1)], 8, _hoisted_3)) 24588 }), 128))]), _createElementVNode("div", _hoisted_4, [ 24589 _createElementVNode("label", null, [_cache[0] || (_cache[0] = _createTextVNode("Ù ÙØªØ§Ø اÙ٠دÙÙØ©")), _withDirectives(_createElementVNode("input", { 24590 "onUpdate:modelValue": $event => ((edit.city_key) = $event), 24591 placeholder: "guangzhou" 24592 }, null, 8, _hoisted_5), [[_vModelText, edit.city_key]])]), 24593 _createElementVNode("div", _hoisted_6, [_createElementVNode("label", null, [_cache[1] || (_cache[1] = _createTextVNode("Ø§ÙØ§Ø³Ù Ø§ÙØ¹Ø±Ø¨Ù")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit.name_ar) = $event) }, null, 8, _hoisted_7), [[_vModelText, edit.name_ar]])]), _createElementVNode("label", null, [_cache[2] || (_cache[2] = _createTextVNode("English")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit.name_en) = $event) }, null, 8, _hoisted_8), [[_vModelText, edit.name_en]])])]), 24594 _createElementVNode("div", _hoisted_9, [_createElementVNode("label", null, [_cache[3] || (_cache[3] = _createTextVNode("اÙÙ ÙØ§Ø·Ø¹Ø© عربÙ")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit.province_ar) = $event) }, null, 8, _hoisted_10), [[_vModelText, edit.province_ar]])]), _createElementVNode("label", null, [_cache[4] || (_cache[4] = _createTextVNode("Province")), _withDirectives(_createElementVNode("input", { "onUpdate:modelValue": $event => ((edit.province_en) = $event) }, null, 8, _hoisted_11), [[_vModelText, edit.province_en]])])]), 24595 _createElementVNode("label", null, [_cache[5] || (_cache[5] = _createTextVNode("رابط ØµÙØ±Ø© Ø§ÙØºÙاÙ")), _withDirectives(_createElementVNode("input", { 24596 class: "ltr", 24597 "onUpdate:modelValue": $event => ((edit.hero_image_url) = $event) 24598 }, null, 8, _hoisted_12), [[_vModelText, edit.hero_image_url]])]), 24599 _createElementVNode("label", null, [_cache[6] || (_cache[6] = _createTextVNode("اÙÙØµÙ Ø§ÙØ¹Ø±Ø¨Ù")), _withDirectives(_createElementVNode("textarea", { "onUpdate:modelValue": $event => ((edit.summary_ar) = $event) }, null, 8, _hoisted_13), [[_vModelText, edit.summary_ar]])]), 24600 _createElementVNode("label", null, [_cache[8] || (_cache[8] = _createTextVNode("Ø§ÙØØ§ÙØ©")), _withDirectives(_createElementVNode("select", { "onUpdate:modelValue": $event => ((edit.status) = $event) }, _cache[7] || (_cache[7] = [_createElementVNode("option", { value: "draft" }, "Ù Ø³ÙØ¯Ø©", -1), _createElementVNode("option", { value: "active" }, "Ù ÙØ¹ÙØ©", -1), _createElementVNode("option", { value: "disabled" }, "Ù Ø¹Ø·ÙØ©", -1)]), 8, _hoisted_14), [[_vModelSelect, edit.status]])]), 24601 _createElementVNode("label", _hoisted_15, [_withDirectives(_createElementVNode("input", { 24602 type: "checkbox", 24603 "onUpdate:modelValue": $event => ((edit.featured) = $event) 24604 }, null, 8, _hoisted_16), [[_vModelCheckbox, edit.featured]]), _cache[9] || (_cache[9] = _createTextVNode(" ٠دÙÙØ© Ù Ù ÙØ²Ø©"))]), 24605 _createElementVNode("label", null, [_cache[10] || (_cache[10] = _createTextVNode("Ø§ÙØªØ±ØªÙب")), _withDirectives(_createElementVNode("input", { 24606 type: "number", 24607 "onUpdate:modelValue": $event => ((edit.sort_order) = $event) 24608 }, null, 8, _hoisted_17), [[ 24609 _vModelText, 24610 edit.sort_order, 24611 void 0, 24612 { number: true } 24613 ]])]), 24614 _createElementVNode("button", { 24615 class: "btn", 24616 onClick: save 24617 }, "ØÙظ Ù Ø±ÙØ² اÙ٠دÙÙØ©", 8, _hoisted_18) 24618 ])])]), 24619 _: 1, 24620 __: [11] 24621 })) 24622 } 24623} 24624})()}; 24625 24626 24627 24628 const routes=[ 24629 {path:'/',component:PublicHomePage,meta:{title:'Ø§ÙØ±Ø¦ÙØ³ÙØ©'}}, 24630 {path:'/official/login',component:OfficialLoginPage}, 24631 {path:'/official/tour',component:OfficialTourPage}, 24632 {path:'/official',component:OfficialDashboardPage}, 24633 {path:'/official/members',component:OfficialMembersPage}, 24634 {path:'/official/member/:id',component:OfficialMemberDetailPage}, 24635 {path:'/official/cases',component:OfficialCasesPage}, 24636 {path:'/official/emergency',component:OfficialEmergencyPage}, 24637 {path:'/official/events',component:OfficialEventsPage}, 24638 {path:'/official/announcements',component:OfficialAnnouncementsPage}, 24639 {path:'/official/publish',component:OfficialPublishAnnouncementPage}, 24640 {path:'/official/about',component:AboutPage}, 24641 {path:'/community/:slug',component:CommunityDetailPage,meta:{title:'اÙ٠جت٠عات ÙØ§ÙجاÙÙØ§Øª'}}, 24642 {path:'/login',component:MemberLoginPage,meta:{title:'دخÙÙ Ø§ÙØ¹Ø¶ÙÙØ©'}}, 24643 {path:'/register',component:MemberRegisterPage,meta:{title:'Ø·ÙØ¨ عضÙÙØ©'}}, 24644 {path:'/demo',component:PublicDemoPage}, 24645 {path:'/account',component:PublicAccountPage,meta:{requiresMember:true,title:'ØØ³Ø§Ø¨Ù'}}, 24646 {path:'/wallet',component:MemberWalletPage,meta:{requiresMember:true,title:'Ù ØÙظتÙ'}}, 24647 {path:'/orders',component:MemberOrdersPage,meta:{requiresMember:true,title:'Ø·ÙØ¨Ø§ØªÙ'}}, 24648 {path:'/notifications',component:MemberNotificationsPage,meta:{requiresMember:true,title:'إشعاراتÙ'}}, 24649 {path:'/procurement/new',component:MemberProcurementPage,meta:{requiresMember:true,title:'Ø·ÙØ¨ Ø¬Ø¯ÙØ¯'}}, 24650 {path:'/procurement',component:MemberProcurementPage,meta:{requiresMember:true,title:'ØªÙØ§ØµÙÙ Ø·ÙØ¨ Ø§ÙØªÙØ±ÙØ¯'}}, 24651 {path:'/card',redirect:'/account'}, 24652 {path:'/cities',component:CitiesPage,meta:{title:'Ù Ø¯Ù Ø§ÙØµÙÙ'}}, 24653 {path:'/city/:city',component:CityHubPage,meta:{title:'Ù Ø±ÙØ² اÙ٠دÙÙØ©'}}, 24654 {path:'/new-to-china',component:NewToChinaPage,meta:{requiresMember:true,title:'Ø£ÙØ§ Ø¬Ø¯ÙØ¯ ÙÙ Ø§ÙØµÙÙ'}}, 24655 {path:'/ask',component:AskSmtPage,meta:{requiresMember:true,title:'اسأ٠SMT China'}}, 24656 {path:'/official-circulars',component:OfficialCircularCenterPage,meta:{title:'Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©'}}, 24657 {path:'/services',component:ServicesDirectoryPage,meta:{title:'Ø§ÙØ®Ø¯Ù ات اÙÙ ÙØ«ÙÙØ©'}}, 24658 {path:'/toolkit',component:ToolkitPage,meta:{title:'Ø£Ø¯ÙØ§Øª Ø§ÙØÙØ§Ø© ÙÙ Ø§ÙØµÙÙ'}}, 24659 {path:'/apps-in-china',component:ChinaAppsPage,meta:{title:'تطبÙÙØ§Øª Ù ÙÙ Ø© ÙÙ Ø§ÙØµÙÙ'}}, 24660 {path:'/exhibitions',component:ExhibitionsPage,meta:{title:'اÙ٠عارض ÙÙ Ø§ÙØµÙÙ'}}, 24661 {path:'/my-china',component:MyChinaPage,meta:{requiresMember:true,title:'My China'}}, 24662 {path:'/notification-settings',component:NotificationSettingsPage,meta:{requiresMember:true,title:'ØªÙØ¶ÙÙØ§Øª Ø§ÙØ¥Ø´Ø¹Ø§Ø±Ø§Øª'}}, 24663 {path:'/china-guide/city/:city',component:ChinaGuidePage,meta:{title:'دÙÙ٠اÙ٠دÙÙØ© ÙÙ Ø§ÙØµÙÙ'}}, 24664 {path:'/china-guide/topic/:service',component:ChinaGuidePage,meta:{title:'Ù ÙØ¶Ùع Ù٠دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ'}}, 24665 {path:'/trade-shipping/topic/:service',component:ChinaGuidePage,meta:{title:'Ù ÙØ¶Ùع ÙÙ Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ'}}, 24666 {path:'/china-guide/china-emergency',redirect:"/china-guide?category_key=emergency"}, 24667 {path:'/china-guide/china-residence-immigration',redirect:"/china-guide?category_key=visa_residence"}, 24668 {path:'/china-guide/china-health-pharmacies',redirect:"/china-guide?category_key=health"}, 24669 {path:'/china-guide/china-transport',redirect:"/china-guide?category_key=transport"}, 24670 {path:'/china-guide/china-payments-banking',redirect:"/china-guide?category_key=payments"}, 24671 {path:'/china-guide/china-telecom-internet',redirect:"/china-guide?category_key=telecom"}, 24672 {path:'/china-guide/china-education-universities',redirect:"/china-guide?category_key=education"}, 24673 {path:'/china-guide/china-business-markets',redirect:"/china-guide?category_key=markets"}, 24674 {path:'/china-guide/china-shipping-logistics',redirect:"/china-guide?category_key=logistics"}, 24675 {path:'/china-guide/china-hotels-accommodation',redirect:"/china-guide?category_key=hotels"}, 24676 {path:'/china-guide/china-government-services',redirect:"/china-guide?category_key=gov_consulate"}, 24677 {path:'/china-guide/china-exhibitions-conferences',redirect:"/china-guide?category_key=exhibitions"}, 24678 {path:'/china-guide/china-exhibitions',redirect:"/china-guide?category_key=exhibitions"}, 24679 {path:'/china-guide/hospitals',redirect:"/china-guide?category_key=health"}, 24680 {path:'/china-guide/business',redirect:"/china-guide?category_key=markets"}, 24681 {path:'/china-guide/china-sudanese-services',redirect:"/china-guide?community=sudanese"}, 24682 {path:'/china-guide/china-tourism-restaurants',redirect:"/china-guide"}, 24683 {path:'/china-guide/topic/general',redirect:"/china-guide"}, 24684 {path:'/china-guide/tourism',redirect:"/china-guide"}, 24685 {path:'/china-guide/halal-food',redirect:"/china-guide?category_key=restaurants&diet=halal"}, 24686 {path:'/china-guide/services',redirect:"/china-guide"}, 24687 {path:'/china-guide/tips',redirect:"/china-guide"}, 24688 {path:'/china-guide/guide-in-china',redirect:"/china-guide"}, 24689 {path:'/china-guide/:id',component:ChinaGuideDetailPage,meta:{title:'ØªÙØ§ØµÙ٠دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ'}}, 24690 {path:'/trade-shipping/:id',component:ChinaGuideDetailPage,meta:{title:'ØªÙØ§ØµÙÙ Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ'}}, 24691 {path:'/china-guide',component:ChinaGuidePage,meta:{title:'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ'}},{path:'/sudan-digital/:pathMatch(.*)*',redirect:'/china-guide',meta:{title:'دÙÙÙÙ ÙÙ Ø§ÙØµÙÙ'}},{path:'/trade-shipping',component:ChinaGuidePage,meta:{title:'Ø§ÙØªØ¬Ø§Ø±Ø© ÙØ§ÙØ´ØÙ'}},{path:'/knowledge',redirect:'/china-guide'}, 24692 {path:'/guide',redirect:'/china-guide'}, 24693 {path:'/circulars/:channel/:id',component:AnnouncementDetailPage,meta:{requiresMember:true,title:'ØªÙØ§ØµÙÙ Ø§ÙØªØ¹Ù ÙÙ '}}, 24694 {path:'/circulars/:channel',component:PublicOfficialCircularsPage,meta:{requiresMember:true,title:'Ø§ÙØªØ¹Ù Ù٠ات Ø§ÙØ±Ø³Ù ÙØ©'}}, 24695 {path:'/announcements/:id',component:AnnouncementDetailPage,meta:{requiresMember:true,title:'ØªÙØ§ØµÙÙ Ø§ÙØ¥Ø¹ÙاÙ'}}, 24696 {path:'/announcements',component:PublicAnnouncementsPage,meta:{requiresMember:true,title:'Ø§ÙØ¥Ø¹ÙØ§ÙØ§Øª'}}, 24697 {path:'/events',component:PublicEventsPage,meta:{title:'اÙÙØ¹Ø§ÙÙØ§Øª'}}, 24698 {path:'/events/:id',component:PublicEventDetailPage,meta:{title:'ØªÙØ§ØµÙ٠اÙÙØ¹Ø§ÙÙØ©'}}, 24699 {path:'/help',component:HelpPage,meta:{requiresMember:true,title:'Ø·ÙØ¨ ٠ساعدة'}}, 24700 {path:'/feedback',component:FeedbackPage,meta:{requiresMember:true,title:'اÙÙ ÙØ§ØØ¸Ø§Øª ÙØ§ÙØ§ÙØªØ±Ø§ØØ§Øª'}}, 24701 {path:'/emergency',component:EmergencyPage,meta:{requiresMember:true,title:'Ø§ÙØ·Ùارئ'}}, 24702 {path:'/arrival',component:ArrivalPage}, 24703 {path:'/country-communities',component:CountryCommunitiesPage,meta:{requiresMember:true,title:'جاÙÙØ§Øª دÙÙØªÙ'}}, 24704 {path:'/about',component:AboutPage,meta:{title:'ع٠اÙÙ ÙØµØ©'}}, 24705 {path:'/privacy',component:PrivacyPage,meta:{title:'Ø³ÙØ§Ø³Ø© Ø§ÙØ®ØµÙØµÙØ©'}}, 24706 {path:'/terms',component:TermsPage,meta:{title:'Ø´Ø±ÙØ· Ø§ÙØ§Ø³ØªØ®Ø¯Ø§Ù '}}, 24707 {path:'/contact',component:ContactPage,meta:{title:'Ø§ÙØªÙاصÙ'}}, 24708 {path:'/complete',component:CompleteProfilePage,meta:{requiresMember:true,title:'Ø¥ÙÙ Ø§Ù Ø§ÙØ¨ÙØ§ÙØ§Øª'}}, 24709 {path:'/admin/login',component:LoginPage}, 24710 {path:'/admin',component:DashboardPage}, 24711 {path:'/admin/visitors',component:AdminVisitorAnalyticsPage,meta:{title:'Ø§ÙØ²Ùار ÙØ§ÙØ¥ØØµØ§Ø¦Ùات'}}, 24712 {path:'/admin/daily-utility',component:AdminDailyUtilityPage,meta:{title:'تشغÙÙ SMT China اÙÙÙÙ Ù'}}, 24713 {path:'/admin/search',component:AdminUniversalSearchPage}, 24714 {path:'/admin/notifications',component:NotificationsPage}, 24715 {path:'/admin/task/:id',component:AdminTaskWorkspacePage,meta:{title:'Ù Ø³Ø§ØØ© اÙÙ ÙÙ Ø©'}}, 24716 {path:'/admin/register',component:RegisterPage}, 24717 {path:'/admin/members',component:MembersPage}, 24718 {path:'/admin/supervisors',component:AdminSupervisorsPage}, 24719 {path:'/admin/committees',component:AdminCommitteesPage}, 24720 {path:'/admin/communities',component:AdminCommunitiesPage}, 24721 {path:'/admin/city-hubs',component:AdminCityHubsPage,meta:{title:'Ù Ø±Ø§ÙØ² اÙ٠دÙ'}}, 24722 {path:'/admin/country-communities',component:AdminCountryCommunitiesPage,meta:{title:'جاÙÙØ§Øª Ø§ÙØ¯ÙÙ'}}, 24723 {path:'/admin/city-coverage',component:AdminCityCoveragePage,meta:{title:'ØªØºØ·ÙØ© اÙ٠دÙ'}}, 24724 {path:'/admin/taxonomy',component:AdminTaxonomyPage,meta:{title:'Ø§ÙØªØµÙÙÙØ§Øª ÙØ§ÙدÙÙ ÙØ§Ù٠سارات'}}, 24725 {path:'/admin/ai-efficiency',component:AdminAiEfficiencyPage,meta:{title:'ÙÙØ§Ø¡Ø© Ù ØØ±Ù AI'}}, 24726 {path:'/admin/demo',component:AdminDemoPage}, 24727 {path:'/admin/account',component:AdminAccountPage}, 24728 {path:'/admin/member/:id',component:MemberDetailPage}, 24729 {path:'/admin/arrivals',component:AdminCasesPage,props:{mode:'arrival'}}, 24730 {path:'/admin/arrivals/:id',component:AdminCasesPage,props:{mode:'arrival'},meta:{title:'Ù Ø³Ø§ØØ© ØØ§ÙØ© ÙØµÙÙ'}}, 24731 {path:'/admin/help',component:AdminCasesPage,props:{mode:'help'}}, 24732 {path:'/admin/help/:id',component:AdminCasesPage,props:{mode:'help'},meta:{title:'Ù Ø³Ø§ØØ© Ø·ÙØ¨ ٠ساعدة'}}, 24733 {path:'/admin/emergency',component:AdminEmergencyPage}, 24734 {path:'/admin/emergency/:id',component:AdminEmergencyPage,meta:{title:'Ù Ø³Ø§ØØ© Ø¨ÙØ§Øº Ø·ÙØ§Ø±Ø¦'}}, 24735 {path:'/admin/events',component:AdminEventsPage}, 24736 {path:'/admin/events/:id',component:AdminEventsPage,meta:{title:'Ù Ø³Ø§ØØ© اÙÙØ¹Ø§ÙÙØ©'}}, 24737 {path:'/admin/event/:id/album',component:AdminEventAlbumPage}, 24738 {path:'/admin/media',component:AdminMediaLibraryPage}, 24739 {path:'/admin/announcements',component:AdminAnnouncementsPage}, 24740 {path:'/admin/announcements/:id',component:AdminAnnouncementsPage,meta:{title:'٠سا
24740ØØ© Ø¥Ø¹ÙØ§Ù'}}, 24741 {path:'/admin/content-intake',component:AdminContentIntakePage,meta:{title:'اÙÙ ØØªÙÙ Ø§ÙØ°ÙÙ'}},{path:'/admin/content-intake/:id',component:AdminContentIntakePage,meta:{title:'٠راجعة Ù Ø³ÙØ¯Ø© AI'}}, 24742 {path:'/admin/wallet',component:AdminWalletPage,meta:{title:'Ù ØÙظة SMT'}},{path:'/admin/wallet/:id',component:AdminWalletPage,meta:{title:'سج٠اÙÙ ØÙظة'}}, 24743 {path:'/admin/participation-points',component:AdminParticipationPointsPage,meta:{title:'ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©'}},{path:'/admin/participation-points/:id',component:AdminParticipationPointsPage,meta:{title:'سج٠ÙÙØ§Ø· اÙÙ Ø´Ø§Ø±ÙØ©'}},{path:'/admin/community-points',redirect:'/admin/participation-points'},{path:'/admin/community-points/:id',redirect:to=>'/admin/participation-points/'+encodeURIComponent(to.params.id)}, 24744 {path:'/admin/orders',component:AdminOrdersPage}, 24745 {path:'/admin/orders/:id',component:AdminOrdersPage,meta:{title:'Ù Ø³Ø§ØØ© Ø·ÙØ¨ Ø§ÙØ¹Ù ÙÙ'}}, 24746 {path:'/admin/procurement',component:AdminProcurementPage}, 24747 {path:'/admin/procurement/:id',component:AdminProcurementPage,meta:{title:'Ù Ø³Ø§ØØ© Ø·ÙØ¨ Ø§ÙØªÙØ±ÙØ¯'}}, 24748 {path:'/admin/official-accounts',component:AdminOfficialAccountsPage}, 24749 {path:'/admin/whatsapp',component:AdminWhatsappPage}, 24750 {path:'/admin/whatsapp-settings',component:AdminWhatsappPage,meta:{title:'إعدادات ÙØ§ØªØ³Ø§Ø¨ Ø§ÙØªÙÙÙØ©'}}, 24751 {path:'/admin/workflows',component:AdminWorkflowPage}, 24752 {path:'/admin/audit',component:AdminAuditPage}, 24753 {path:'/admin/system',component:AdminSystemPage}, 24754 {path:'/admin/seo',component:AdminSeoPage}, 24755 {path:'/admin/health',component:AdminHealthPage}, 24756 {path:'/admin/backup-settings',component:AdminBackupSettingsPage,meta:{title:'اÙÙØ³Ø® Ø§ÙØ®Ø§Ø±Ø¬ÙØ© ÙØ§ÙتعاÙÙ'}}, 24757 {path:'/admin/releases',component:AdminReleasePage}, 24758 {path:'/admin/pwa',component:AdminPwaPage}, 24759 {path:'/admin/platform',component:AdminPlatformBrandingPage}, 24760 {path:'/admin/brand-assets',component:AdminBrandAssetsPage,meta:{title:'أصÙ٠اÙÙÙÙØ© Ø§ÙØ¨ØµØ±ÙØ©'}}, 24761 {path:'/admin/options',component:AdminOptionsPage}, 24762 {path:'/admin/community',component:AdminCommunityPage}, 24763 {path:'/admin/feedback',component:AdminFeedbackPage}, 24764 {path:'/admin/engineering-advisor',component:AdminEngineeringAdvisorPage,meta:{title:'اÙ٠ستشار اÙÙÙØ¯Ø³Ù AI'}}, 24765 {path:'/admin/ai-research',component:AdminAiResearchPage,meta:{title:'إدارة Ù ØØªÙÙ AI'}}, 24766 {path:'/admin/ai-operations',component:AdminAiResearchPage,meta:{title:'تشغÙÙ ÙØ¥Ø¹Ø¯Ø§Ø¯Ø§Øª AI'}}, 24767 {path:'/admin/china-guide',component:AdminChinaGuidePage},{path:'/admin/sudan-digital',component:AdminChinaGuidePage},{path:'/admin/trade-shipping',component:AdminChinaGuidePage}, 24768 {path:'/admin/:pathMatch(.*)*',component:AdminNotFoundPage}, 24769 {path:'/:pathMatch(.*)*',redirect:'/'} 24770 ]; 24771 const router=createRouter({history:createWebHistory('/'),routes,scrollBehavior(){return {top:0}}}); 24772 const PROFILE_COMPLETE_ONLY_ALLOWED=new Set(['/complete','/admin/login','/official/login']); 24773 function isProfileCompletionBypassPath(path){return PROFILE_COMPLETE_ONLY_ALLOWED.has(String(path||''));} 24774 let __routeInteractionToken=0;let __routePerfStarted=0; 24775 router.beforeEach(async(to,from,next)=>{ 24776 if(String(to.fullPath||'')!==String(from.fullPath||'')){__routePerfStarted=performance&&performance.now?performance.now():Date.now();finishGlobalInteraction(__routeInteractionToken);__routeInteractionToken=beginGlobalInteraction('Ø¬Ø§Ø±Ù ÙØªØ Ø§ÙØµÙØØ©...','navigation');} 24777 try{ 24778 const store=useGzcStore(); 24779 const me=await store.loadMe(); 24780 const m=me&&me.authenticated&&me.member?me.member:null; 24781 if(String(to.path||'').startsWith('/admin')&&to.path!=='/admin/login'){ 24782 if(!me||!me.authenticated||!me.admin)return next('/admin/login'); 24783 if(!adminCanPath(me.admin,to.path)){ 24784 store.state.msg='ÙØ°Ø§ اÙÙØ³Ù ØºÙØ± Ù ØªØ§Ø Ø¶Ù Ù ØµÙØ§ØÙات ØØ³Ø§Ø¨Ù Ø§ÙØ¥Ø¯Ø§Ø±Ù.'; 24785 return next('/admin'); 24786 } 24787 } 24788 if(to.meta&&to.meta.requiresMember&&!m){ 24789 const target=safeMemberNext(to.fullPath||to.path,'/account'); 24790 try{sessionStorage.setItem('gzc_vue_next',target);}catch(e){} 24791 store.state.msg=to.path==='/emergency'?'سجÙÙ Ø§ÙØ¯Ø®Ù٠أÙÙØ§Ù ÙÙØªØ Ø¨ÙØ§Øº Ø§ÙØ·ÙØ§Ø±Ø¦Ø ÙØ¨Ø¹Ø¯ Ø§ÙØªØÙÙ Ø³ÙØ¹Ùد٠ÙÙØ°Ù Ø§ÙØµÙØØ©.':'تسجÙÙ Ø§ÙØ¯Ø®ÙÙ Ù Ø·ÙÙØ¨ ÙÙØªØ ÙØ°Ù Ø§ÙØµÙØØ©.'; 24792 return next({path:'/login',query:{next:target}}); 24793 } 24794 if(m && profileNeedsCompletion(m) && !isProfileCompletionBypassPath(to.path)){ 24795 if(to.path!=='/complete'){ 24796 store.state.msg='Ø£ÙÙ Ù Ø¨ÙØ§Ùات٠أÙÙØ§Ù. ÙØ§ ÙÙ ÙÙ ÙØªØ Ø£Ù ØµÙØØ© Ø£Ø®Ø±Ù ÙØ¨Ù Ø¥ÙÙ Ø§Ù Ø§ÙØªØ³Ø¬ÙÙ.'; 24797 return next({path:'/complete',query:{locked:'profile',from:to.fullPath}}); 24798 } 24799 } 24800 }catch(e){ 24801 if(to.meta&&to.meta.requiresMember){ 24802 const target=safeMemberNext(to.fullPath||to.path,'/account'); 24803 try{sessionStorage.setItem('gzc_vue_next',target);}catch(_){} 24804 return next({path:'/login',query:{next:target}}); 24805 } 24806 } 24807 next(); 24808 }); 24809 function visitorAttributionPayload(){try{const key='gzc_visit_attribution_v2';let row=null;try{row=JSON.parse(sessionStorage.getItem(key)||'null')}catch(_){}if(!row){let referrer_host='';try{referrer_host=document.referrer?new URL(document.referrer).hostname:''}catch(_){}const qs=new URLSearchParams(location.search||'');const clean=v=>String(v||'').replace(/[^A-Za-z0-9._+:-]/g,'').slice(0,80);row={referrer_host:String(referrer_host||'').toLowerCase().replace(/^www\./,'').slice(0,120),utm_source:clean(qs.get('utm_source')),utm_medium:clean(qs.get('utm_medium'))};try{sessionStorage.setItem(key,JSON.stringify(row))}catch(_){}}return row||{};}catch(_){return{}}} 24810 function trackRouteVisit(path){try{fetch('/api/visitor/track',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({page:String(path||'/').split('?')[0],...visitorAttributionPayload()}),credentials:'same-origin',keepalive:true}).catch(()=>{});}catch(e){}} 24811 router.afterEach(to=>{finishGlobalInteraction(__routeInteractionToken);__routeInteractionToken=0;try{const seoMarker=document.querySelector('meta[name="gzc-seo-path"]');const serverPath=seoMarker&&seoMarker.getAttribute('content');if(seoMarker&&serverPath===String(to.path||'/'))seoMarker.remove();else document.title=((to.meta&&to.meta.title)||'Ù ÙØµØ© SMT')+' | SMT China';}catch(e){} trackRouteVisit(to&&to.path);try{if(__routePerfStarted){const now=performance&&performance.now?performance.now():Date.now();const ms=Math.max(0,Number(now-__routePerfStarted));__routePerfStarted=0;sendFrontendPerformanceTelemetry([{metric:'route_transition_ms',value_ms:ms}],safeRoutePattern(to));}}catch(_){__routePerfStarted=0;}}); 24812 router.onError(()=>{finishGlobalInteraction(__routeInteractionToken);__routeInteractionToken=0;}); 24813 const App={ 24814 setup(){ 24815 const store=useGzcStore(); 24816 const route=useRoute(); 24817 const online=ref(navigator.onLine); 24818 function syncViewportMode(){try{document.body.classList.toggle('adminDesktop',String(route.path||'').startsWith('/admin') && window.matchMedia('(min-width:1024px)').matches);document.body.classList.toggle('mobileMode',window.matchMedia('(max-width:767px)').matches);}catch(e){}} 24819 function syncOnline(){online.value=navigator.onLine;} 24820 onMounted(()=>{store.loadPublicOptions&&store.loadPublicOptions();syncViewportMode();syncOnline();setupInitialFrontendPerformanceTelemetry(route);window.addEventListener('resize',syncViewportMode);window.addEventListener('online',syncOnline);window.addEventListener('offline',syncOnline);setTimeout(syncCollapsibleSections,80);setInterval(()=>{const m=store.state.me&&store.state.me.member;if(m&&m.is_demo_member)api('/api/demo-member/touch',{method:'POST',feedback:false}).catch(()=>{});},60000);}); 24821 onUnmounted(()=>{window.removeEventListener('resize',syncViewportMode);window.removeEventListener('online',syncOnline);window.removeEventListener('offline',syncOnline);}); 24822 watch(()=>route.fullPath,()=>{syncViewportMode();setTimeout(syncCollapsibleSections,80);}); 24823 watch(()=>store.state.msg,(v)=>{if(v) setTimeout(()=>{if(store.state.msg===v) store.state.msg='';},4500);}); 24824 const isAdminRoute=computed(()=>String(route.path||'').startsWith('/admin')); 24825 return {store,online,VERSION,isAdminRoute}; 24826 }, 24827 render:(function(){ 24828const _Vue = Vue
24829const { createVNode: _createVNode, createElementVNode: _createElementVNode, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode } = _Vue 24830 24831const _hoisted_1 = { 24832 key: 0, 24833 class: "offlineBanner", 24834 role: "status" 24835} 24836const _hoisted_2 = { 24837 key: 1, 24838 class: "globalInteractionFeedback", 24839 role: "status", 24840 "aria-live": "polite" 24841} 24842const _hoisted_3 = { class: "globalInteractionPill" } 24843const _hoisted_4 = { 24844 key: 2, 24845 class: "busy" 24846} 24847const _hoisted_5 = { 24848 key: 3, 24849 class: "globalUploadProgress", 24850 role: "status", 24851 "aria-live": "polite" 24852} 24853const _hoisted_6 = { class: "globalUploadHead" } 24854const _hoisted_7 = { class: "globalUploadTrack" } 24855const _hoisted_8 = { 24856 key: 4, 24857 class: "toast" 24858} 24859const _hoisted_9 = { 24860 key: 5, 24861 class: "version" 24862} 24863 24864return function render(_ctx, _cache) { 24865 with (_ctx) { 24866 const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, createElementVNode: _createElementVNode, toDisplayString: _toDisplayString, normalizeClass: _normalizeClass, normalizeStyle: _normalizeStyle, resolveComponent: _resolveComponent, createVNode: _createVNode, createTextVNode: _createTextVNode } = _Vue 24867 24868 const _component_router_view = _resolveComponent("router-view") 24869 24870 return (_openBlock(), _createElementBlock("main", { class: _normalizeClass(["app vue-shell", {adminApp:isAdminRoute}]) }, [ 24871 (!online) 24872 ? (_openBlock(), _createElementBlock("div", _hoisted_1, "Ø£ÙØª ØºÙØ± Ù ØªØµÙ Ø¨Ø§ÙØ¥ÙØªØ±ÙØª. ÙÙ ÙÙÙ ØªØµÙØ Ø§ÙØµÙØØ§Øª اÙÙ ØÙÙØ¸Ø©Ø ÙÙÙ Ø§ÙØ¥Ø±Ø³Ø§Ù ÙØ§ÙØªØØ¯ÙØ« ÙØØªØ§Ø¬Ø§Ù Ø§ØªØµØ§ÙØ§Ù.")) 24873 : _createCommentVNode("", true), 24874 (store.state.interaction&&store.state.interaction.active&&!(store.state.upload&&store.state.upload.active)) 24875 ? (_openBlock(), _createElementBlock("div", _hoisted_2, [_cache[1] || (_cache[1] = _createElementVNode("div", { class: "globalInteractionTopBar" }, [_createElementVNode("i")], -1)), _createElementVNode("div", _hoisted_3, [_cache[0] || (_cache[0] = _createElementVNode("span", { 24876 class: "globalInteractionSpinner", 24877 "aria-hidden": "true" 24878 }, null, -1)), _createElementVNode("b", null, _toDisplayString(store.state.interaction.label||'Ø¬Ø§Ø±Ù Ø§ÙØªÙÙÙØ°...'), 1)])])) 24879 : _createCommentVNode("", true), 24880 (store.state.busy&&!(store.state.interaction&&store.state.interaction.active)&&!(store.state.upload&&store.state.upload.active)) 24881 ? (_openBlock(), _createElementBlock("div", _hoisted_4, "Ø¬Ø§Ø±Ù Ø§ÙØªØÙ ÙÙ...")) 24882 : _createCommentVNode("", true), 24883 (store.state.upload&&store.state.upload.active) 24884 ? (_openBlock(), _createElementBlock("div", _hoisted_5, [_createElementVNode("div", _hoisted_6, [_createElementVNode("span", null, _toDisplayString(store.state.upload.label||'Ø¬Ø§Ø±Ù Ø§ÙØ±Ùع...'), 1), _createElementVNode("b", null, _toDisplayString(store.state.upload.progress>=0?store.state.upload.progress+'%':'...'), 1)]), _createElementVNode("div", _hoisted_7, [_createElementVNode("i", { 24885 class: _normalizeClass({indeterminate:store.state.upload.progress<0}), 24886 style: _normalizeStyle(store.state.upload.progress>=0?{width:store.state.upload.progress+'%'}:{}) 24887 }, null, 6)])])) 24888 : _createCommentVNode("", true), 24889 (store.state.msg) 24890 ? (_openBlock(), _createElementBlock("div", _hoisted_8, _toDisplayString(store.state.msg), 1)) 24891 : _createCommentVNode("", true), 24892 _createVNode(_component_router_view), 24893 (store.state.me&&store.state.me.admin) 24894 ? (_openBlock(), _createElementBlock("div", _hoisted_9, [_cache[2] || (_cache[2] = _createTextVNode("SMT v")), _createElementVNode("b", null, _toDisplayString(VERSION), 1)])) 24895 : _createCommentVNode("", true), 24896 _cache[3] || (_cache[3] = _createElementVNode("div", { class: "footerGap" }, null, -1)) 24897 ], 2)) 24898 } 24899} 24900})() 24901 }; 24902 function runtimeErrorMessage(err){try{return String(err&&err.message||err&&err.reason&&err.reason.message||err||'خطأ ØºÙØ± ٠عرÙÙ').slice(0,300);}catch(_){return 'خطأ ØºÙØ± ٠عرÙÙ';}} 24903 function recordClientRuntimeError(kind,err,info){ 24904 try{ 24905 const row={at:new Date().toISOString(),route:String(location.pathname||''),kind:String(kind||'runtime'),info:String(info||''),message:runtimeErrorMessage(err)}; 24906 console.error('GZC runtime error',row,err||'');
24907 const key='gzc_runtime_errors';const rows=JSON.parse(sessionStorage.getItem(key)||'[]');rows.push(row);sessionStorage.setItem(key,JSON.stringify(rows.slice(-20))); 24908 if(__gzcStore&&__gzcStore.state)__gzcStore.state.msg='ØØ¯Ø« خطأ ØºÙØ± ٠تÙÙØ¹ ÙÙ ÙØ°Ø§ Ø§ÙØ¥Ø¬Ø±Ø§Ø¡. Ø§ÙØµÙØØ© ٠ا Ø²Ø§ÙØª Ø¢Ù ÙØ©Ø أعد اÙÙ ØØ§ÙÙØ©.'; 24909 }catch(_){ } 24910 } 24911 function renderAdminFatalError(err,info){ 24912 try{ 24913 if(!String(location.pathname||'').startsWith('/admin'))return; 24914 recordClientRuntimeError('vue-fatal',err,info); 24915 var el=document.getElementById('app');if(!el)return; 24916 var retry=String(location.pathname||'/admin')+String(location.search||''); 24917 el.innerHTML='<main class="app vue-shell"><div class="card errorCard"><h3>تعذر عرض ÙØ°Ù Ø§ÙØµÙØØ©</h3><p>ØØ¯Ø«Øª Ù Ø´ÙÙØ© Ø£Ø«ÙØ§Ø¡ ÙØªØ Ø§ÙØµÙØØ©.</p><p class="hint">أعد اÙÙ ØØ§ÙÙØ©Ø ÙØ¥Ø°Ø§ است٠رت اÙÙ Ø´ÙÙØ© ØªÙØ§ØµÙ ٠ع Ø§ÙØ¯Ø¹Ù .</p><a class="btn secondary" href="/">Ø§ÙØ±Ø¦ÙØ³ÙØ©</a><a class="btn secondary" href="'+retry.replace(/&/g,'&').replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>')+'">إعادة اÙÙ ØØ§ÙÙØ©</a></div></main>'; 24918 }catch(_){ } 24919 } 24920 const LOCAL_MEDIA_FALLBACK='/brand/smt-gold-v1/smt-icon-192.png?v='+VERSION; 24921 function resourceTag(e){try{const t=e&&e.target;return t&&Number(t.nodeType)===1?String(t.tagName||'').toUpperCase():'';}catch(_){return '';}} 24922 function isResourceLoadErrorEvent(e){return ['IMG','VIDEO','AUDIO','SOURCE','LINK','SCRIPT','IFRAME'].includes(resourceTag(e));} 24923 function isMediaResourceLoadErrorEvent(e){return ['IMG','VIDEO','AUDIO','SOURCE'].includes(resourceTag(e));} 24924 function applyLocalMediaFallback(e){ 24925 try{ 24926 const t=e&&e.target,tag=resourceTag(e);if(!t||!isMediaResourceLoadErrorEvent(e))return false; 24927 if(t.dataset&&t.dataset.gzcFallbackApplied==='1')return true; 24928 if(t.dataset)t.dataset.gzcFallbackApplied='1'; 24929 if(t.classList)t.classList.add('gzcResourceFallback'); 24930 if(tag==='IMG'){t.removeAttribute&&t.removeAttribute('srcset');t.src=LOCAL_MEDIA_FALLBACK;t.alt=t.alt||'تعذر تØÙ ÙÙ Ø§ÙØµÙرة';} 24931 else if(tag==='VIDEO'){t.poster=LOCAL_MEDIA_FALLBACK;t.setAttribute&&t.setAttribute('data-resource-error','1');} 24932 else if(tag==='AUDIO'){t.setAttribute&&t.setAttribute('data-resource-error','1');} 24933 else if(tag==='SOURCE'){const p=t.parentElement;if(p&&String(p.tagName||'').toUpperCase()==='VIDEO')p.poster=LOCAL_MEDIA_FALLBACK;if(p&&p.setAttribute)p.setAttribute('data-resource-error','1');} 24934 return true; 24935 }catch(_){return false;} 24936 } 24937 function recordResourceLoadError(e){ 24938 try{ 24939 const tag=resourceTag(e),t=e&&e.target; 24940 const row={at:new Date().toISOString(),route:String(location.pathname||''),kind:'resource',info:tag,message:'resource load failed'}; 24941 console.warn('GZC non-fatal resource/browser error',tag,t&&t.currentSrc||t&&t.src||''); 24942 const key='gzc_resource_errors';const rows=JSON.parse(sessionStorage.getItem(key)||'[]');rows.push(row);sessionStorage.setItem(key,JSON.stringify(rows.slice(-30))); 24943 }catch(_){ } 24944 } 24945 function isIgnorableWindowError(e){ 24946 if(isResourceLoadErrorEvent(e))return true; 24947 const msg=String(e&&e.message||''); 24948 if(/ResizeObserver loop/i.test(msg))return true; 24949 return /Script error\.?$/i.test(msg); 24950 } 24951 function isFatalVuePhase(info){ 24952 const phase=String(info||'').toLowerCase(); 24953 return /render function|setup function|component update|scheduler flush|template ref function/.test(phase); 24954 } 24955 window.addEventListener('error',function(e){ 24956 try{ 24957 if(isIgnorableWindowError(e)){ 24958 if(isResourceLoadErrorEvent(e)){if(isMediaResourceLoadErrorEvent(e))applyLocalMediaFallback(e);recordResourceLoadError(e);} 24959 return; 24960 } 24961 recordClientRuntimeError('window',e&&e.error||e&&e.message||e,'window.error'); 24962 }catch(_){ } 24963 },true); 24964 window.addEventListener('unhandledrejection',function(e){try{recordClientRuntimeError('promise',e&&e.reason||e,'unhandledrejection');}catch(_){ }},true); 24965 const app=createApp(App); 24966 app.config.errorHandler=function(err,vm,info){try{if(isFatalVuePhase(info))renderAdminFatalError(err,info);else recordClientRuntimeError('vue',err,info);}catch(_){} }; 24967 app.config.globalProperties.$memberPhoto=memberPhoto; 24968 app.config.globalProperties.$cityList=cityList; 24969 app.config.globalProperties.$cityLabel=cityLabel; 24970 app.config.globalProperties.$countryList=countryList; 24971 app.config.globalProperties.$districtList=districtList; 24972 app.config.globalProperties.$sudanCityList=sudanCityList; 24973 app.config.globalProperties.$professionList=professionList; 24974 app.config.globalProperties.$optionList=optionList; 24975 app.use(window.__GZC_PINIA); app.use(router);
24975 app.component('AdminFrame',AdminFrame); 24976 assertRuntimeRelease().then(function(reloading){if(!reloading)app.mount('#app');}).catch(function(){app.mount('#app');}); 24977})();
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.