1import{_ as E}from"./nuxt-link-D_rgCK5z-29.js";import{f as J,u as Q,Z as W,c as V,b as Z,_ as G}from"#entry";import{a8 as N,H as c,$ as e,O as v,W as j,B as s,a0 as a,a9 as K,aa as X,F as z,ab as $,a3 as T,a2 as B,c as w,r as I,U as d,a1 as q}from"./lazy-qrcode-oXPcgXJC-29.js";import{u as Y}from"./coloringpages-CDdRYSzE-29.js";import{u as ee}from"./useColoringI18n-CSeegN-8-29.js";import"./lazy-pdf-GO-7vVHk-29.js";import"./dynamic-import-helper-BheWnx7M-29.js";const te={class:"min-h-screen bg-gradient-to-b from-[#f8f9fa] to-[#e0f7ff] py-6 md:py-10"},oe={class:"container mx-auto px-4"},se={key:0,class:"flex justify-center items-center min-h-[50vh]"},ae={key:1},re={class:"flex items-center gap-2 mb-4"},le={class:"text-[#48c5e8]"},ne={class:"text-center mb-6"},ie={class:"text-3xl md:text-4xl font-bold text-[#2689b0] mb-3"},ce={class:"text-gray-600 max-w-5xl mx-auto"},de={class:"relative mb-6 mx-auto max-w-2xl"},ue={class:"relative overflow-hidden bg-blue-400 rounded-lg shadow-lg"},ge={class:"relative px-4 py-4 text-center"},he={class:"flex flex-col sm:flex-row items-center justify-between gap-3"},fe={class:"flex items-center gap-3"},me={class:"text-left"},pe={class:"text-lg font-bold text-white leading-tight"},ve={class:"text-white/80 text-xs"},xe={class:"flex justify-between items-center mb-8"},_e={class:"text-3xl font-bold"},we={class:"relative w-full max-w-md"},be=["placeholder"],ye={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4 md:gap-6"},Pe={class:"bg-white rounded-xl shadow-md overflow-hidden transition-all duration-300 group-hover:shadow-lg group-hover:shadow-[#48c5e8]/20 group-hover:-translate-y-1 border border-[#48c5e8]/5 group-hover:border-[#48c5e8]/30 h-full flex flex-col"},ke={class:"aspect-square p-3 relative overflow-hidden bg-[#fafafa]"},Ce={class:"p-3 bg-white border-t border-gray-100 flex-1 flex flex-col justify-between"},Ne={class:"font-medium text-sm text-gray-800 mb-1 line-clamp-1"},je={class:"flex items-center justify-between"},Be={class:"text-xs text-gray-500"},De={key:0,class:"flex flex-col items-center justify-center py-16"},Le={class:"text-xl font-semibold text-gray-700 mb-2"},Me={class:"text-gray-500 text-center max-w-md"},Se={key:1,class:"flex justify-center mt-10"},Ve={class:"flex space-x-1"},ze=["disabled"],$e=["onClick"],Te=["disabled"],A=15,Je={__name:"index",async setup(Ie){let i,g;const{t:l,locale:b}=J(),y=Q();[i,g]=N(()=>ee()),await i,g();const f=W().params.tag,D=Y(),m=I(""),n=I(1),{data:L,pending:F}=([i,g]=N(async()=>V("tags",async()=>await D.fetchTags())),i=await i,g(),i),{data:u,pending:H}=([i,g]=N(()=>V(`coloring-pages-${f}`,()=>D.fetchColoringPagesByTag(f,n.value),{watch:[()=>f,()=>n.value]})),i=await i,g(),i),O=w(()=>F.value||H.value),x=w(()=>
1{if(!L.value)return{};let o=L.value.find(t=>t.tag_key===f)||{};return Z({title:o?.page_title[b.value],meta:[{name:"description",content:o?.page_des[b.value]}]}),o}),P=w(()=>u.value?Math.ceil(u.value.length/A):1),M=w(()=>{if(!u.value)return[];if(!m.value.trim())return u.value;const o=m.value.toLowerCase().trim();return u.value.filter(t=>{const p=h(t.title).toLowerCase(),_=t.description?h(t.description).toLowerCase():"";return p.includes(o)||_.includes(o)})});function k(o){n.value=o}function R(){n.value=1}function h(o){if(!o)return"";try{const t=typeof o=="string"?JSON.parse(o):o;return t[b.value]||t.en||""}catch{return String(o)}}function C(o){return o?h(o).replace(/(coloring pages|coloring)$/i,"").trim():""}function U(o){return o?h(o):""}return(o,t)=>{const p=E,_=G;return d(),c("div",te,[e("div",oe,[O.value?(d(),c("div",se,[...t[3]||(t[3]=[e("div",{class:"animate-spin rounded-full h-14 w-14 border-t-4 border-b-4 border-[#48c5e8]"},null,-1)])])):(d(),c("div",ae,[e("div",re,[v(p,{to:s(y)("/coloring-pages"),class:"text-gray-500 hover:text-[#48c5e8]"},{default:j(()=>[q(a(s(l)("coloringPages.coloringpages")),1)]),_:1},8,["to"]),t[4]||(t[4]=e("span",{class:"text-gray-500"},">",-1)),e("span",le,a(C(x.value?.title)),1)]),e("div",ne,[e("h1",ie,a(C(x.value?.title)),1),e("p",ce,a(U(x.value?.description)||s(l)("coloringPages.tagPage.defaultDescription")),1),t[5]||(t[5]=e("div",{class:"w-24 h-1 bg-[#48c5e8] mx-auto mt-4 rounded-full"},null,-1))]),e("div",de,[e("div",ue,[t[8]||(t[8]=e("div",{class:"absolute inset-0 overflow-hidden"},[e("div",{class:"absolute -top-4 -right-4 w-16 h-16 bg-white/10 rounded-full blur-xl"}),e("div",{class:"absolute -bottom-2 -left-2 w-12 h-12 bg-white/5 rounded-full blur-lg"})],-1)),e("div",ge,[e("div",he,[e("div",fe,[t[6]||(t[6]=e("div",{class:"flex-shrink-0 w-10 h-10 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})])],-1)),e("div",me,[e("h2",pe,a(s(l)("coloringPages.tagPage.createCustom")),1),e("p",ve,a(s(l)("coloringPages.tagPage.aiPowered")),1)])]),v(p,{to:s(y)("/tools/coloring-page-generator"),class:"group flex-shrink-0 inline-flex items-center justify-center px-5 py-2.5 bg-white text-[#2689b0] font-semibold rounded-full shadow-md hover:shadow-lg transition-all duration-300 transform hover:scale-105"},{default:j(()=>[t[7]||(t[7]=e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 mr-1.5 transition-transform group-hover:rotate-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)),q(" "+a(s(l)("coloringPages.tagPage.generateNow")),1)]),_:1},8,["to"])])])])]),e("div",xe,[e("h2",_e,a(C(x.value?.title))+" "+a(s(l)("coloringPages.tagPage.coloringPagesSuffix")),1),e("div",we,[t[9]||(t[9]=e("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[e("svg",{class:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])],-1)),K(e("input",{type:"search",class:"bg-white border border-gray-200 text-gray-700 text-sm rounded-lg pl-10 pr-4 py-3 focus:outline-none focus:ring-2 focus:ring-[#48c5e8]/50 focus:border-[#48c5e8] w-full shadow-sm",placeholder:s(l)("coloringPages.searchcolroingpage"),"onUpdate:modelValue":t[0]||(t[0]=r=>m.value=r),onInput:R},null,40,be),[[X,m.value]])])]),e("div",ye,[(d(!0),c(z,null,$(M.value,(r,S)=>(d(),c("div",{key:S,class:"group"},[v(p,{to:s(y)({name:"coloring-pages-tag-key",params:{tag:s(f),key:r.key}}),class:"block"},{default:j(()=>[e("div",Pe,[e("div",ke,[v(_,{src:r.image_url[0],alt:h(r.title),width:"200",height:"200",class:"w-full h-full object-contain transition-transform duration-300 group-hover:scale-105",loading:"lazy"},null,8,["src","alt"])]),e("div",Ce,[e("h3",Ne,a(h(r.title)),1),e("div",je,[e("span",Be,a(r.download_count)+" "+a(s(l)("coloringPages.downloads")),1)])])])]),_:2},1032,["to"])]))),128))]),M.value.length===0?(d(),c("div",De,[v(_,{src:"https://img.icons8.com/bubbles/100/000000/search.png",width:"80",height:"80",class:"w-20 h-20 mb-4",alt:"No results"}),e("h3",Le,a(s(l)("coloringPages.tagPage.noResultsFound")),1),e("p",Me,a(s(l)("coloringPages.tagPage.noResultsDescription",{query:m.value})),1)])):T("",!0),s(u)&&s(u).length>A?(d(),c("div",Se,[e("div",Ve,[e("button",{class:B(["px-4 py-2 border border-gray-300 rounded-lg text-gray-700 bg-white hover:bg-gray-50 transition-colors",{"opacity-50 cursor-not-allowed":n.value===1}]),disabled:n.value===1,onClick:t[1]||(t[1]=r=>k(n.value-1))},a(s(l)("coloringPages.tagPage.previous")),11,ze),(d(!0),c(z,null,$(P.value,r=>(d(),c("button",{key:r,onClick:S=>k(r),class:B(["px-4 py-2 border rounded-lg transition-colors",n.value===r?"bg-[#48c5e8] text-white border-[#48c5e8]":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"])},a(r),11,$e))),128)),e("button",{class:B(["px-4 py-2 border border-gray-300 rounded-lg text-gray-700 bg-white hover:bg-gray-50 transition-colors",{"opacity-50 cursor-not-allowed":n.value===P.value}]),disabled:n.value===P.value,onClick:t[2]||(t[2]=r=>k(n.value+1))},a(s(l)("coloringPages.tagPage.next")),11,Te)])])):T("",!0)]))])])}}};export{Je as default};
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.