PageSourceSearch

https://useclade.com/assets/DahliaColorDirectory-BA4CEBt5.js

js useclade.com collected 2026-10-07 14:26:20 UTC 6,584 bytes, 1 lines download raw bytes

1import{_ as to,h as lo,at as so,au as io,av as F,m as no,an as co,aw as uo,ax as J,ay as mo,b as vo,az as po,X as ho,aA as V,aB as fo}from"./index-BE6tbDiz.js";import{o as _o,w as R,a0 as yo,b as go,e as s,l,i as u,u as i,t as m,y as h,j as D,p as bo,F as Co,m as wo,h as O,A as Do,r as g,c as a,v as Io,z as ko,d as r,R as I}from"./vendor-vue-ugSA5z41.js";import{c as Ro}from"./vendor-supabase-B6vtjUvU.js";import{S as Oo}from"./SideNav-BdLJ9e9a.js";import{C as No}from"./CatalogModuleNavigation-Bq4-oor2.js";import{D as Lo}from"./DataUseNotice-Dg9hE4Zs.js";import{D as Po}from"./DahliaProductImage-CYUP-0Hu.js";import{_ as Eo}from"./DahliaDescription-B0X8rvdf.js";import{F as So,g as To,p as xo,a as Ao}from"./FormPopularDahliasTable-Ct5Q_TLU.js";import{D as Fo}from"./DahliaPublicPageSkeleton-DeJHhqSB.js";import{c as Jo,d as Vo,i as zo,C as z}from"./dahliaPublicRouteSeo-CV_UyEll.js";/* empty css                               */import"./useInAppModuleNav-CxnoYwsr.js";import"./imageUtils-CwB-vkvr.js";import"./countries-CeaO2P8Q.js";import"./usa-DfilSUnI.js";import"./formImages-BxceXRMa.js";import"./resized-BA-aiiz_LED.js";import"./sharedDataTableUtils-B5cs1EDT.js";import"./CatalogAdsDirectoryLink-CpV3yPom.js";import"./AdsTooltip-BzwCPGVE.js";import"./search-RHthSusW.js";/* empty css                         */const Uo={style:{display:"flex",gap:"2rem",position:"relative"}},Bo={class:"content-container"},Mo={key:0,class:"color-directory-content"},Yo={class:"header-row"},Ho={class:"flex-center"},$o={class:"heading-1"},jo={key:0,class:"color-directory-intro"},Zo={class:"color-directory-hub","aria-label":"Browse dahlias by color"},Xo={class:"color-directory-hub-list"},Go={key:1,class:"color-directory-error color-directory-content"},qo={key:2,class:"dahlia-content color-directory-page"},Qo={class:"breadcrumb","aria-label":"Breadcrumb"},Wo={class:"breadcrumb-current"},Ko={key:1,class:"color-directory-error"},oe={key:2,class:"dahlia-body color-directory-body"},ee={key:1,class:"color-directory-swatch-wrap","aria-hidden":"true"},ae={class:"dahlia-info color-directory-info"},re={class:"color-directory-title"},te={key:1,class:"color-directory-empty"},N=1e3,le={__name:"DahliaColorDirectory",setup(se){const f=Io(),U=ko(),B=Ro("https://auth.useclade.com","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJ4YmJjdnVubmN3bWRwb3JrcWdqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDYzMDM5NTgsImV4cCI6MjA2MTg3OTk1OH0.MwLPGonzw8HbPCJ968Cez08b90ZTJpZbEibPEgvQ59A"),d=g(!1),{email:L,userFirstName:M,userProfilePictureUrl:Y,profileLoaded:H,initAuth:$,fetchUserProfile:j}=lo(!1),b=g(!1),_=g(null),v=g([]),C=g([]),Z=mo,y=a(()=>f.name==="dahlia-color-directory-index"),X=a(()=>{const e=f.params.colorSlug;return typeof e=="string"?e.trim().toLowerCase():""}),n=a(()=>V(X.value)),w=a(()=>y.value?!1:!n.value),p=a(()=>n.value?vo(n.value):""),P=a(()=>y.value?"Dahlia Colors":w.value?"Color not found":`${p.value} Dahlias`),E=a(()=>{var e;return y.value?((e=F("/dahlias/colors"))==null?void 0:e.intro)??"":""}),G=a(()=>n.value?po(n.value):""),q=a(()=>n.value?ho(n.value):"#9ca3af"),k=a(()=>To(C.value)),Q=a(()=>p.value?`${p.value} dahlia examples`:"Dahlia color examples"),S=a(()=>xo(v.value)),W=a(()=>v.value.some(e=>e.popular===!0)),K=a(()=>W.value?`Popular ${p.value} Dahlias`:`${p.value} Dahlias`),oo=a(()=>v.value.length);function T(){d.value=!d.value}function eo(){d.value&&(d.value=!1)}_o(async()=>{await $()}),R(d,async e=>{e&&!H.value&&L.value&&await j()}),R(()=>f.params.colorSlug,e=>{if(typeof e!="string"||!e.length)return;const o=e.toLowerCase(),t=V(o);if(!t)return;const c=fo(t);e!==c&&U.replace({name:"dahlia-color-directory",params:{colorSlug:c}})},{immediate:!0});async function ao(e){b.value=!0,_.value=null,v.value=[],C.value=[];try{const o=[];let t=0,c=!0;for(;c;){const{data:ro,error:x}=await B.from("dahlias").select("name, popular, main_photo, more_photos, height, bloom_size, country, hybridizer, ads_form").eq("ads_color",e).order("popular",{ascending:!1,nullsFirst:!1}).order("name",{ascending:!0,nullsFirst:!1}).range(t,t+N-1);if(x)throw x;const A=ro||[];o.push(...A),c=A.length===N,c&&(t+=N)}v.value=o,C.value=Ao(o)}catch(o){console.error("[DahliaColorDirectory] fetch:",o),_.value=o.message||"Could not load varieties for this color."}finally{b.value=!1}}return R(()=>[f.name,n.value],async()=>
1{if(y.value||w.value){v.value=[],C.value=[],_.value=null,b.value=!1;return}await ao(n.value)},{immediate:!0}),yo(()=>{if(w.value){Vo(so);return}const e=io(f.path);if(!e)return;const o=F(e,{totalCount:oo.value});if(!o)return;const t=`${no}${o.canonicalPath}`,c=co(k.value[0],o.ogImage);zo({title:o.title,description:o.description,url:t,image:c,robots:"index, follow",jsonLdId:z,schema:uo(o,t)})}),go(()=>{Jo({jsonLdIds:[z]})}),(e,o)=>(r(),s("main",{class:"page-container",onClick:eo},[l("div",Uo,[u(Oo,{"show-navigation":d.value,email:i(L),"user-first-name":i(M),"user-profile-picture-url":i(Y),onClose:T},null,8,["show-navigation","email","user-first-name","user-profile-picture-url"]),l("div",Bo,[u(No,{"show-navigation":d.value,"toggle-navigation":T,"show-module-tabs":!1},null,8,["show-navigation"]),y.value?(r(),s("div",Mo,[l("div",Yo,[l("div",Ho,[l("h1",$o,m(P.value),1)])]),E.value?(r(),s("p",jo,[h(m(E.value)+" ",1),u(i(I),{to:i(J).path,class:"color-directory-intro-link"},{default:D(()=>[h(m(i(J).label),1)]),_:1},8,["to"])])):bo("",!0),l("nav",Zo,[l("ul",Xo,[(r(!0),s(Co,null,wo(i(Z),t=>(r(),s("li",{key:t.abbrev},[u(i(I),{to:t.path,class:"color-directory-link"},{default:D(()=>[h(m(t.name),1)]),_:2},1032,["to"])]))),128))])])])):w.value?(r(),s("p",Go,[o[1]||(o[1]=h(" Color not found. ",-1)),u(i(I),{to:"/dahlias/colors"},{default:D(()=>[...o[0]||(o[0]=[h("Browse all colors",-1)])]),_:1})])):(r(),s("div",qo,[l("nav",Qo,[u(i(I),{to:"/dahlias/colors",class:"breadcrumb-link"},{default:D(()=>[...o[2]||(o[2]=[h("Colors",-1)])]),_:1}),o[3]||(o[3]=l("span",{class:"breadcrumb-separator"},"›",-1)),l("span",Wo,m(p.value),1)]),b.value?(r(),O(Fo,{key:0})):_.value?(r(),s("div",Ko,m(_.value),1)):(r(),s("div",oe,[k.value.length?(r(),O(Po,{key:0,"gallery-raw-urls":k.value,alt:Q.value},null,8,["gallery-raw-urls","alt"])):(r(),s("div",ee,[l("div",{class:"color-directory-swatch",style:Do({backgroundColor:q.value})},null,4)])),l("div",ae,[l("h1",re,m(P.value),1),u(Eo,{description:G.value},null,8,["description"]),S.value.length?(r(),O(So,{key:0,rows:S.value,title:K.value},null,8,["rows","title"])):(r(),s("p",te,"No varieties listed for this color yet."))])]))])),u(Lo)])])]))}},Pe=to(le,[["__scopeId","data-v-44d0415a"]]);export{Pe 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.