import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{er as t}from"./control-ui-foundation-CeFMP1Ly.js";import{fl as n,lr as r,ml as i}from"./control-ui-core-pH6nakZ-.js";import{G as a,J as o,W as s,Z as c,rt as l}from"./lit-runtime-BEtFSUCp.js";import{Cn as u,ln as d}from"./control-ui-core-DGVkFhVB.js";import{Gt as f,Ht as p,Lt as m,Rt as h,qt as g}from"./control-ui-core-Br5DB0Zj.js";import{Br as _,Fr as v,Ir as y,Lr as b,Nr as x,Pr as S,Rr as C,Ur as w,Wr as T,jr as E,zr as D}from"./control-ui-boot-Cdpgu1Gm.js";import{n as O,t as k}from"./settings-workspace-Bo4nqRhI.js";function A(e){return new Date(e).toLocaleDateString(f.getLocale())}function j(e,t={}){let n=y.filter(t=>e.has(t.id)).length,r=n===y.length,i=g(`quickSettings.appearance.lobsterdexSeen`,{seen:String(n),total:String(y.length)});return o`

${g(`tabs.lobsterdex`)}

${g(`subtitles.lobsterdex`)}

${i}
${t.copyFeedback?.status===`error`?o``:a}
${y.map(n=>{let r=E(n),i=e.get(n.id),s=i!==void 0,c=s?i.name??_(n.id):`?`,l=C[n.id],u=s&&i.firstSeenAt!==null?g(`quickSettings.appearance.lobsterdexCardFirstVisited`,{date:A(i.firstSeenAt)}):null,d=i?.shinySeenAt==null?null:g(`quickSettings.appearance.lobsterdexCardShinySeen`,{date:A(i.shinySeenAt)});return o`
${v(r,{standalone:!0})} ${i?.shinySeenAt==null?a:o``}

${c}

${s?l.flavor:l.hint}

${u?o`

`:a} ${d?o`

`:a}
`})}
`}function M(){return(M=e((()=>{s(),h(),x(),D(),b(),p()})))()}var N;function P(){return(P=e((()=>{s(),c(),d(),T(),b(),k(),i(),M(),N=class extends n{constructor(...e){super(...e),this.copyFeedback=null,this.copyAttempt=0,this.copyResetTimer=null,this.copyLink=async e=>{let t=++this.copyAttempt;this.copyFeedback=null,this.copyResetTimer!==null&&(window.clearTimeout(this.copyResetTimer),this.copyResetTimer=null);let n=`${location.origin}${location.pathname}#lobsterdex-${e}`,i=await r(n,()=>this.isConnected&&t===this.copyAttempt);!this.isConnected||t!==this.copyAttempt||(this.copyFeedback={paletteId:e,status:i?`copied`:`error`},this.copyResetTimer=window.setTimeout(()=>{this.copyFeedback=null,this.copyResetTimer=null},1500))}}disconnectedCallback(){this.copyAttempt+=1,this.copyFeedback=null,this.copyResetTimer!==null&&(window.clearTimeout(this.copyResetTimer),this.copyResetTimer=null),super.disconnectedCallback()}firstUpdated(){if(!location.hash.startsWith(`#lobsterdex-`))return;let e=y.find(e=>e.id===location.hash.slice(12));if(!e)return;let t=this.querySelector(`#lobsterdex-${e.id}`);if(!t)return;let n=e=>{e.target===t&&e.animationName===`lobsterdex-card-highlight`&&(t.classList.remove(`lobsterdex-page__card--highlight`),t.removeEventListener(`animationend`,n))};t.addEventListener(`animationend`,n),t.classList.add(`lobsterdex-page__card--highlight`),requestAnimationFrame(()=>{requestAnimationFrame(()=>t.scrollIntoView({block:`center`}))})}render(){return o`
${u(`lobsterdex`)}
${O(j(w(),{copyFeedback:this.copyFeedback,onCopyLink:e=>void this.copyLink(e)}))} `}},t([l()],N.prototype,`copyFeedback`,void 0),customElements.get(`openclaw-lobsterdex-page`)||customElements.define(`openclaw-lobsterdex-page`,N)})))()}P(); //# sourceMappingURL=lobsterdex-page-bHiZugyT.js.map