1 line
2.6 KiB
JavaScript
1 line
2.6 KiB
JavaScript
"use strict";(()=>{var e={};e.id=1980,e.ids=[1980],e.modules={14126:(e,t,r)=>{r.r(t),r.d(t,{config:()=>v,default:()=>S,getServerSideProps:()=>b,getStaticPaths:()=>P,getStaticProps:()=>f,reportWebVitals:()=>_,routeModule:()=>q,unstable_getServerProps:()=>x,unstable_getServerSideProps:()=>E,unstable_getStaticParams:()=>M,unstable_getStaticPaths:()=>m,unstable_getStaticProps:()=>h});var a={};r.r(a),r.d(a,{default:()=>g,getStaticPaths:()=>d,getStaticProps:()=>c});var s=r(63865),i=r(9455),l=r(30671),u=r(49407),p=r(89600);r(8732),r(82015),r(71457),r(87472),r(6845),r(91479),r(84895);var n=r(69436),o=r.n(n);function g({pages:e,targetPage:t}){return null}async function c({params:e}){let t=e?.["sub-page"],r=await o()("SELECT id, title, slug, level, parent_id FROM docs_pages ORDER BY page_order ASC"),a=r?.filter(t=>t.slug===e?.page&&1==t.level);if(!a)return{redirect:{destination:"/docs",permanent:!1}};let s=await o()("SELECT title, slug, description, content FROM docs_pages WHERE slug = ? AND level = ? AND parent_id = ?",[t,2,a[0]?.id]);return{props:{user:null,pages:r,targetPage:s?.[0]?s[0]:{}}}}async function d(){try{let e=await o()("SELECT id, title, slug, level, parent_id FROM docs_pages"),t=e?.filter(e=>2==parseInt(e?.level)),r=[],a=e?.filter(e=>e?.level==1);if(!a?.[0])return{paths:[],fallback:!1};return a.forEach(e=>{let a=t?.filter(t=>t.parent_id==e?.id);a?.forEach(t=>{r.push({params:{page:e.slug,"sub-page":t.slug}})})}),{paths:r,fallback:!1}}catch(e){return console.log("Error =>",e.message),{paths:[],fallback:!1}}}let S=(0,l.M)(a,"default"),f=(0,l.M)(a,"getStaticProps"),P=(0,l.M)(a,"getStaticPaths"),b=(0,l.M)(a,"getServerSideProps"),v=(0,l.M)(a,"config"),_=(0,l.M)(a,"reportWebVitals"),h=(0,l.M)(a,"unstable_getStaticProps"),m=(0,l.M)(a,"unstable_getStaticPaths"),M=(0,l.M)(a,"unstable_getStaticParams"),x=(0,l.M)(a,"unstable_getServerProps"),E=(0,l.M)(a,"unstable_getServerSideProps"),q=new s.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/docs/[page]/[sub-page]",pathname:"/docs/[page]/[sub-page]",bundlePath:"",filename:""},components:{App:p.default,Document:u.default},userland:a})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[883,9821,9600,5674],()=>r(14126));module.exports=a})(); |