(()=>{var t={};t.id=1685,t.ids=[1685],t.modules={1463:(t,e,r)=>{"use strict";r.d(e,{U9:()=>a});var s=r(49930);function a(t){return(0,s.ll)`count(${t||s.ll.raw("*")})`.mapWith(Number)}},3295:t=>{"use strict";t.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:t=>{"use strict";t.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:t=>{"use strict";t.exports=require("next/dist/server/app-render/work-async-storage.external.js")},39300:(t,e,r)=>{"use strict";r.r(e),r.d(e,{categories:()=>d,medias:()=>u,metaRelations:()=>g,options:()=>l,posts:()=>p,tags:()=>c,templates:()=>m});var s=r(81598),a=r(70932),n=r(22077),o=r(89283),i=r(49930);let l=(0,s.D)("options",{id:(0,a.nd)("id").primaryKey({autoIncrement:!0}).notNull(),optionName:(0,n.sH)("option_name").default().notNull(),optionValue:(0,n.sH)("option_value").notNull()}),u=(0,s.D)("medias",{id:(0,a.nd)("id").primaryKey({autoIncrement:!0}),name:(0,o.Qq)("name").notNull(),description:(0,o.Qq)("description"),extension:(0,o.Qq)("extension").default("NA").notNull(),url:(0,o.Qq)("url").notNull(),timeCreated:(0,n.sH)("time_created").default((0,i.ll)`(CURRENT_TIMESTAMP)`),timeModified:(0,n.sH)("time_modified").default((0,i.ll)`(CURRENT_TIMESTAMP)`)}),d=(0,s.D)("categories",{id:(0,a.nd)("id").primaryKey({autoIncrement:!0}).notNull(),category:(0,n.sH)("category").notNull(),description:(0,n.sH)("description").notNull(),slug:(0,n.sH)("slug").notNull(),parent:(0,n.sH)("parent").notNull()}),p=(0,s.D)("posts",{id:(0,a.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,o.Qq)("title").notNull(),content:(0,n.sH)("content"),slug:(0,n.sH)("slug").notNull(),timeCreated:(0,n.sH)("time_created").default((0,i.ll)`(CURRENT_TIMESTAMP)`).notNull(),timeModified:(0,n.sH)("time_modified").default((0,i.ll)`(NULL)`),status:(0,n.sH)("status").default("draft").notNull(),isTop:(0,n.sH)("is_top").notNull(),excerpt:(0,o.Qq)("excerpt"),featureImg:(0,o.Qq)("feature_img")}),c=(0,s.D)("tags",{id:(0,a.nd)("id").primaryKey({autoIncrement:!0}).notNull(),tag:(0,n.sH)("tag").notNull(),description:(0,n.sH)("description").notNull(),slug:(0,n.sH)("slug").notNull()}),m=(0,s.D)("templates",{id:(0,a.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,o.Qq)("title").notNull(),content:(0,n.sH)("content").notNull()}),g=(0,s.D)("meta_relations",{id:(0,a.nd)("id").primaryKey({autoIncrement:!0}).notNull(),metaId:(0,n.sH)("meta_id"),type:(0,n.sH)("type"),postId:(0,n.sH)("post_id").references(()=>p.id)})},44870:t=>{"use strict";t.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:t=>{"use strict";t.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63095:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});var s=r(87550),a=r.n(s),n=r(46267),o=r(39300);let i=()=>{let t=new(a())("./contents/data.db");return(0,n.f)(t,{schema:o})}},70943:(t,e,r)=>{"use strict";r.r(e),r.d(e,{patchFetch:()=>x,routeModule:()=>g,serverHooks:()=>y,workAsyncStorage:()=>N,workUnitAsyncStorage:()=>f});var s={};r.r(s),r.d(s,{POST:()=>m});var a=r(96559),n=r(48088),o=r(37719),i=r(32190),l=r(63095),u=r(39300),d=r(94634),p=r(16048),c=r(1463);async function m(t){let e,r=await t.json(),s=Number(r.pageNum),a=Number(r.pageSize),n=r.keyword;e=""==n?await (0,l.A)().select().from(u.tags).limit(a).offset(s*a):await (0,l.A)().select().from(u.tags).where((0,d.mj)(u.tags.tag,`%${n}%`),(0,d.mj)(u.tags.description,`%${n}%`),(0,d.mj)(u.tags.slug,`%${n}%`)).orderBy((0,p.Y)(u.tags.id));let o=await (0,l.A)().select({count:(0,c.U9)()}).from(u.tags);return i.NextResponse.json({data:e,success:!0,total:o[0].count})}let g=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/[locale]/api/tag/get-tag/route",pathname:"/[locale]/api/tag/get-tag",filename:"route",bundlePath:"app/[locale]/api/tag/get-tag/route"},resolvedPagePath:"E:\\xampp01\\htdocs\\wx-saas\\timynote\\app\\[locale]\\api\\tag\\get-tag\\route.tsx",nextConfigOutput:"standalone",userland:s}),{workAsyncStorage:N,workUnitAsyncStorage:f,serverHooks:y}=g;function x(){return(0,o.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:f})}},78335:()=>{},87550:t=>{"use strict";t.exports=require("better-sqlite3")},96487:()=>{}};var e=require("../../../../../webpack-runtime.js");e.C(t);var r=t=>e(e.s=t),s=e.X(0,[4447,580,902],()=>r(70943));module.exports=s})();