mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-12 18:10:06 -04:00
Rebuild /docs
This commit is contained in:
parent
eef41debec
commit
4ae887f321
49 changed files with 66 additions and 66 deletions
1
docs/_app/chunks/store-2c58625c.js
Normal file
1
docs/_app/chunks/store-2c58625c.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{D as c,_ as l,Y as m,Z as d}from"./vendor-585ed223.js";const C=c(""),b=c(!1),g=c([]),j=c({}),f=c([]);function $(n){B("q",n);const o=n.toLowerCase().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)||[],t=[];for(let a of o){let h="_key";a.includes(":")&&([h,a]=a.split(":")),a=a.replace(/\"/g,""),h&&a&&t.push({field:h,value:a})}if(!t.length){b.set(!1),f.set(d(g));return}const r=d(g).filter(a=>{for(let h of t)if(!a._searchable[h.field]||a._searchable[h.field].indexOf(h.value)===-1)return!1;return!0});f.set(r),b.set(!0),console.log(".")}async function L(){let n=await fetch("https://iptv-org.github.io/api/countries.json").then(e=>e.json()).then(e=>e.length?e:[]).then(e=>e.map(s=>(s.expanded=!1,s))).then(e=>l.keyBy(e,"code")).catch(console.error);j.set(n);let o=await fetch("https://iptv-org.github.io/api/regions.json").then(e=>e.json()).then(e=>e.length?e:[]).then(e=>l.keyBy(e,"code")).catch(console.error),t=await fetch("https://iptv-org.github.io/api/subdivisions.json").then(e=>e.json()).then(e=>e.length?e:[]).then(e=>l.keyBy(e,"code")).catch(console.error),r=await fetch("https://iptv-org.github.io/api/languages.json").then(e=>e.json()).then(e=>e.length?e:[]).then(e=>l.keyBy(e,"code")).catch(console.error),a=await fetch("https://iptv-org.github.io/api/categories.json").then(e=>e.json()).then(e=>e.length?e:[]).then(e=>l.keyBy(e,"id")).catch(console.error),h=await fetch("https://iptv-org.github.io/api/streams.json").then(e=>e.json()).then(e=>e.length?e:[]).then(e=>l.groupBy(e,"channel")).catch(console.error),w=await fetch("https://iptv-org.github.io/api/guides.json").then(e=>e.json()).then(e=>e.length?e:[]).then(e=>l.groupBy(e,"channel")).catch(console.error),p=await fetch("https://iptv-org.github.io/api/channels.json").then(e=>e.json()).then(e=>e.map(s=>{s._raw=JSON.parse(JSON.stringify(s)),s._streams=h[s.id]||[],s._guides=w[s.id]||[];for(let y in s)switch(y){case"languages":s.languages=s.languages.map(i=>r[i]).filter(i=>i);break;case"broadcast_area":s.broadcast_area=s.broadcast_area.map(i=>{const[_,u]=i.split("/");switch(_){case"c":return n[u];case"r":return o[u];case"s":return t[u]}}).filter(i=>i);break;case"categories":s.categories=s.categories.map(i=>a[i]).filter(i=>i);break;case"country":s.country=n[s.country];break;case"subdivision":s.subdivision=t[s.subdivision];break}return s._searchable=k(s),s})).catch(e=>(console.error(e),[]));g.set(p),f.set(p)}function v(n){const o=n.native_name?m(n.native_name):null;return[n.id,n.name,n.native_name,o].map(t=>t||"").filter(t=>t).join("|").toLowerCase()}function k(n){const o={};for(let t in n)t.startsWith("_")||n[t]===null||n[t]===void 0||(Array.isArray(n[t])?o[t]=n[t].map(r=>r.name?r.name.toLowerCase():null).filter(r=>r).join(","):typeof n[t]=="object"&&n[t].name?o[t]=n[t].name.toLowerCase():o[t]=n[t].toString().toLowerCase());return o._key=v(n),o}function B(n,o){if(window.history.pushState){let t=n&&o?`?${n}=${o}`:"";t=t.replace(/\+/g,"%2B");const r=`${window.location.protocol}//${window.location.host}${window.location.pathname}${t}`;window.history.pushState({path:r},"",r)}}export{L as a,j as c,f,b as h,C as q,$ as s};
|
Loading…
Add table
Add a link
Reference in a new issue