PageSourceSearch

https://mentor3.ai/assets/bookCoverDescriptor-liaIpuvB.js

js mentor3.ai collected 2026-10-05 13:31:25 UTC 14,720 bytes, 1 lines download raw bytes

1import{t as e}from"./jsx-runtime-CPNstcaJ.js";import{t}from"./compiler-runtime-DvOTxATX.js";import{t as n}from"./reactUtils-DOQQTBMN.js";import{t as r}from"./ui-B-E-sxsO.js";import"./components-FoGKpGVK.js";import{a as i}from"./bookCoverTemplates-faXWayzU.js";import{s as a}from"./CategoryIcon-Cq1zQLyr.js";var o=e(),s=t();function c(e){if(typeof e!=`number`||!Number.isFinite(e))return null;let t=Math.floor(e);return t>0?t:null}function l({duration:e,pageCount:t,currentPage:n}){let r=c(e),i=typeof t==`number`&&Number.isFinite(t)?Math.floor(t):null;if(r===null||i===null||i<=0)return null;let a=Math.max(0,Math.max(1,Math.min(i,Math.floor(n??1)))-1),o=Math.max(0,i-a);return Math.max(1,Math.ceil(r*o/i))}function u(e){let t=c(e);if(t===null)return null;let n=Math.floor(t/60),r=t%60;return n===0?`${r}分`:r===0?`${n}時間`:`${n}時間${r}分`}function d(e){return e.reduce((e,t)=>e+(c(t?.duration)??0),0)}var f=[{name:`oxblood`,tones:[`#2A0A0E`,`#4C1218`,`#1B0608`],accent:`#FDA4AF`,accentRgb:`253, 164, 175`},{name:`sienna`,tones:[`#2B1206`,`#55250C`,`#1C0B04`],accent:`#FDBA74`,accentRgb:`253, 186, 116`},{name:`bronze`,tones:[`#271A04`,`#4E3608`,`#191103`],accent:`#FCD34D`,accentRgb:`252, 211, 77`},{name:`forest`,tones:[`#0E2410`,`#1C4A1E`,`#081608`],accent:`#86EFAC`,accentRgb:`134, 239, 172`},{name:`teal`,tones:[`#062A2A`,`#0C4A4A`,`#041A1A`],accent:`#5EEAD4`,accentRgb:`94, 234, 212`},{name:`emerald`,tones:[`#04281F`,`#0E5C46`,`#052018`],accent:`#6EE7B7`,accentRgb:`110, 231, 183`},{name:`navy`,tones:[`#0A1230`,`#16307D`,`#080F28`],accent:`#93C5FD`,accentRgb:`147, 197, 253`},{name:`indigo`,tones:[`#10123A`,`#232A7C`,`#0A0B26`],accent:`#A5B4FC`,accentRgb:`165, 180, 252`}
1,{name:`slate`,tones:[`#0D1526`,`#2B3B55`,`#0A0F1B`],accent:`#CBD5E1`,accentRgb:`203, 213, 225`},{name:`aubergine`,tones:[`#200F3D`,`#472A7C`,`#170B2D`],accent:`#C4B5FD`,accentRgb:`196, 181, 253`},{name:`plum`,tones:[`#2A0C2A`,`#561A56`,`#1B071B`],accent:`#F0ABFC`,accentRgb:`240, 171, 252`},{name:`charcoal`,tones:[`#16181D`,`#2E323B`,`#0D0E11`],accent:`#D1D5DB`,accentRgb:`209, 213, 219`}],p=[152,158,164,170,176];function m(e){let t=5381;for(let n=0;n<e.length;n+=1)t=t*33^e.charCodeAt(n);return t>>>0}function h(e){let t=m(e.bookId),n=t%f.length,r=p[(t>>>5)%p.length],i=f[n],[a,o,s]=i.tones;return{identityKey:e.bookId,hueName:i.name,gradient:`linear-gradient(${r}deg, ${a} 0%, ${o} 55%, ${s} 100%)`,glow:`radial-gradient(120% 80% at 50% -12%, rgba(${i.accentRgb}, 0.16), transparent 55%)`,accent:i.accent,frame:`rgba(255, 255, 255, 0.44)`,frameInner:`rgba(255, 255, 255, 0.2)`,frameStyle:`corners`,ruleStyle:`line`,toneIndex:n,angle:r}}var g=[`/default/mentor3_thumbnail.png`,`photos/159711/books-bookstore-book-reading-159711`],_={tiny:{content:`px-2 py-2`,title:``,showTitle:!1,showColophon:!1,accentWidth:`w-0.5`},compact:{content:`px-2.5 py-2.5`,title:`line-clamp-2 text-[10px] leading-[1.25]`,showTitle:!0,showColophon:!1,accentWidth:`w-[3px]`},standard:{content:`px-3.5 py-3.5`,title:`line-clamp-3 text-xs leading-snug`,showTitle:!0,showColophon:!0,accentWidth:`w-[3px]`},hero:{content:`px-5 py-5`,title:`line-clamp-4 text-sm leading-snug sm:text-base`,showTitle:!0,showColophon:!0,accentWidth:`w-1`}};function v(e){return!e||g.some(t=>e.includes(t))}function y(e){let t=(0,s.c)(16),{recipe:n}=e,r;t[0]===n.frameInner?r=t[1]:(r=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-[6px] z-10 rounded-[3px] border`,style:{borderColor:n.frameInner}}),t[0]=n.frameInner,t[1]=r);let i;t[2]===n.frame?i=t[3]:(i=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute z-10 h-2.5 w-2.5 left-[10px] top-[10px] border-l border-t`,style:{borderColor:n.frame}}),t[2]=n.frame,t[3]=i);let a;t[4]===n.frame?a=t[5]:(a=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute z-10 h-2.5 w-2.5 right-[10px] top-[10px] border-r border-t`,style:{borderColor:n.frame}}),t[4]=n.frame,t[5]=a);let c;t[6]===n.frame?c=t[7]:(c=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute z-10 h-2.5 w-2.5 bottom-[10px] left-[10px] border-b border-l`,style:{borderColor:n.frame}}),t[6]=n.frame,t[7]=c);let l;t[8]===n.frame?l=t[9]:(l=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute z-10 h-2.5 w-2.5 bottom-[10px] right-[10px] border-b border-r`,style:{borderColor:n.frame}}),t[8]=n.frame,t[9]=l);let u;return t[10]!==r||t[11]!==i||t[12]!==a||t[13]!==c||t[14]!==l?(u=(0,o.jsxs)(o.Fragment,{children:[r,i,a,c,l]}),t[10]=r,t[11]=i,t[12]=a,t[13]=c,t[14]=l,t[15]=u):u=t[15],u}function b(e){let t=(0,s.c)(47),{cover:r,recipe:i,coverSize:a,accessibleLabel:c,testId:l}=e,u=_[a],d;t[0]===c?d=t[1]:(d=c?{role:`img`,"aria-label":c}:{"aria-hidden":!0},t[0]=c,t[1]=d);let f=d,p=i.identityKey,m=i.toneIndex,h=i.angle,g;t[2]===i.gradient?g=t[3]:(g={background:i.gradient},t[2]=i.gradient,t[3]=g);let v;t[4]===i.glow?v=t[5]:(v=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0`,style:{background:i.glow}}),t[4]=i.glow,t[5]=v);let b;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0 bg-[linear-gradient(180deg,transparent_52%,rgba(2,6,23,0.34)_100%)]`}),t[6]=b):b=t[6];let x;t[7]===i?x=t[8]:(x=(0,o.jsx)(y,{recipe:i}),t[7]=i,t[8]=x);let S=l?`${l}-level-accent`:void 0,C;t[9]===u.accentWidth?C=t[10]:(C=n(`pointer-events-none absolute inset-y-0 left-0 z-30`,u.accentWidth),t[9]=u.accentWidth,t[10]=C);let w;t[11]===i.accent?w=t[12]:(w={background:i.accent},t[11]=i.accent,t[12]=w);let T;t[13]!==C||t[14]!==w||t[15]!==S?(T=(0,o.jsx)(`span`,{"aria-hidden":!0,"data-testid":S,className:C,style:w}),t[13]=C,t[14]=w,t[15]=S,t[16]=T):T=t[16];let E;t[17]===i.accent?E=t[18]:(E=(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 bottom-0 z-30 h-[3px]`,style:{background:i.accent}}),t[17]=i.accent,t[18]=E);let D;t[19]===u.content?D=t[20]:(D=n(`absolute inset-0 z-20 flex flex-col items-center text-center`,u.content),t[19]=u.content,t[20]=D);let O;t[21]!==r||t[22]!==i.accent||t[23]!==u.showTitle||t[24]!==u.title?(O=u.showTitle?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{className:n(`block text-balance font-serif font-bold tracking-[0.01em] text-white drop-shadow-[0_1px_10px_rgba(2,6,23,0.58)]`,u.title),children:r.title}
1),(0,o.jsx)(`span`,{"aria-hidden":!0,className:`h-px w-10`,style:{background:i.accent,opacity:.74}})]}):null,t[21]=r,t[22]=i.accent,t[23]=u.showTitle,t[24]=u.title,t[25]=O):O=t[25];let k;t[26]===O?k=t[27]:(k=(0,o.jsx)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col items-center justify-center gap-2.5`,children:O}),t[26]=O,t[27]=k);let A;t[28]!==i.frame||t[29]!==u.showColophon?(A=u.showColophon?(0,o.jsx)(`span`,{"aria-hidden":!0,className:`text-[8px] font-semibold leading-none tracking-[0.3em]`,style:{color:i.frame},children:`BOOK3`}):null,t[28]=i.frame,t[29]=u.showColophon,t[30]=A):A=t[30];let j;t[31]!==D||t[32]!==k||t[33]!==A?(j=(0,o.jsxs)(`div`,{className:D,children:[k,A]}),t[31]=D,t[32]=k,t[33]=A,t[34]=j):j=t[34];let M;return t[35]!==f||t[36]!==i.angle||t[37]!==i.identityKey||t[38]!==i.toneIndex||t[39]!==T||t[40]!==E||t[41]!==j||t[42]!==g||t[43]!==v||t[44]!==x||t[45]!==l?(M=(0,o.jsxs)(`div`,{...f,"data-testid":l,"data-cover-identity":p,"data-cover-tone":m,"data-cover-angle":h,className:`absolute inset-0 h-full w-full overflow-hidden text-white`,style:g,children:[v,b,x,T,E,j]}),t[35]=f,t[36]=i.angle,t[37]=i.identityKey,t[38]=i.toneIndex,t[39]=T,t[40]=E,t[41]=j,t[42]=g,t[43]=v,t[44]=x,t[45]=l,t[46]=M):M=t[46],M}function x(e){let t=(0,s.c)(11),{testId:n}=e,r=n?`${n}-paper-texture`:void 0,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={backgroundImage:`radial-gradient(circle at 20% 18%, rgba(255,255,255,0.5) 0 1px, transparent 1px), radial-gradient(circle at 72% 54%, rgba(15,23,42,0.06) 0 1px, transparent 1px), repeating-linear-gradient(112deg, rgba(15,23,42,0.028) 0 1px, transparent 1px 12px)`,backgroundSize:`12px 12px, 14px 14px, 100% 100%`},t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=(0,o.jsx)(`span`,{"aria-hidden":!0,"data-testid":r,className:`pointer-events-none absolute inset-0 opacity-55 mix-blend-multiply`,style:i}),t[1]=r,t[2]=a);let c=n?`${n}-spine`:void 0,l;t[3]===c?l=t[4]:(l=(0,o.jsx)(`span`,{"aria-hidden":!0,"data-testid":c,className:`pointer-events-none absolute inset-y-0 left-0 w-5 bg-gradient-to-r from-slate-950/22 via-slate-700/10 to-transparent mix-blend-multiply`}),t[3]=c,t[4]=l);let u=n?`${n}-cover-sheen`:void 0,d;t[5]===u?d=t[6]:(d=(0,o.jsx)(`span`,{"aria-hidden":!0,"data-testid":u,className:`pointer-events-none absolute inset-0 bg-[linear-gradient(135deg,rgba(255,255,255,0.24)_0%,transparent_34%,transparent_62%,rgba(255,255,255,0.1)_100%)]`}),t[5]=u,t[6]=d);let f;return t[7]!==a||t[8]!==l||t[9]!==d?(f=(0,o.jsxs)(o.Fragment,{children:[a,l,d]}),t[7]=a,t[8]=l,t[9]=d,t[10]=f):f=t[10],f}function S(e){let t=(0,s.c)(20),{cover:r,template:i,coverSize:a}=e,c=_[a];if(!c.showTitle)return null;let l=i.titleTone===`light`,u;t[0]===c.content?u=t[1]:(u=n(`pointer-events-none absolute inset-0 z-20 flex flex-col items-center text-center`,c.content),t[0]=c.content,t[1]=u);let d=l?`text-white drop-shadow-[0_1px_10px_rgba(2,6,23,0.72)]`:`text-slate-950 drop-shadow-[0_1px_8px_rgba(255,255,255,0.58)]`,f;t[2]!==c.title||t[3]!==d?(f=n(`block text-balance font-serif font-bold tracking-[0.01em]`,d,c.title),t[2]=c.title,t[3]=d,t[4]=f):f=t[4];let p;t[5]!==r.title||t[6]!==f?(p=(0,o.jsx)(`span`,{className:f,children:r.title}),t[5]=r.title,t[6]=f,t[7]=p):p=t[7];let m;t[8]===i.accent?m=t[9]:(m=(0,o.jsx)(`span`,{className:`h-px w-10`,style:{background:i.accent,opacity:.88}}),t[8]=i.accent,t[9]=m);let h;t[10]!==p||t[11]!==m?(h=(0,o.jsxs)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col items-center justify-center gap-2.5`,children:[p,m]}),t[10]=p,t[11]=m,t[12]=h):h=t[12];let g;t[13]!==l||t[14]!==c.showColophon?(g=c.showColophon?(0,o.jsx)(`span`,{className:n(`text-[8px] font-semibold leading-none tracking-[0.3em]`,l?`text-white/70`:`text-slate-700/80`),children:`BOOK3`}):null,t[13]=l,t[14]=c.showColophon,t[15]=g):g=t[15];let v;return t[16]!==u||t[17]!==h||t[18]!==g?(v=(0,o.jsxs)(`div`,{"aria-hidden":!0,className:u,children:[h,g]}),t[16]=u,t[17]=h,t[18]=g,t[19]=v):v=t[19],v}function C(e){let t=(0,s.c)(42),{cover:a,coverSize:c,accessibleLabel:l,className:u,imageClassName:d,sizes:f,loading:p,fetchPriority:m,viewTransitionName:g,forceFallback:_,disableHoverMotion:y,testId:C,fallbackTestId:w}
1=e,T=c===void 0?`standard`:c,E=f===void 0?`160px`:f,D=p===void 0?`lazy`:p,O=_!==void 0&&_,k=y!==void 0&&y,A;t[0]===a?A=t[1]:(A=h(a),t[0]=a,t[1]=A);let j=A,M;t[2]!==a||t[3]!==O?(M=O||v(a.thumbnail),t[2]=a,t[3]=O,t[4]=M):M=t[4];let N=M,P;t[5]!==a||t[6]!==N?(P=N?null:i(a.thumbnail),t[5]=a,t[6]=N,t[7]=P):P=t[7];let F=P,I;t[8]!==l||t[9]!==a||t[10]!==T||t[11]!==w||t[12]!==j?(I=(0,o.jsx)(b,{cover:a,recipe:j,coverSize:T,accessibleLabel:l,testId:w}),t[8]=l,t[9]=a,t[10]=T,t[11]=w,t[12]=j,t[13]=I):I=t[13];let L=I,R;t[14]===u?R=t[15]:(R=n(`relative aspect-[2/3] shrink-0 overflow-hidden rounded-[0.7rem_1rem_1rem_0.7rem] border border-slate-300/70 bg-slate-100 shadow-[20px_26px_38px_-30px_rgba(15,23,42,0.88),inset_0_1px_0_rgba(255,255,255,0.82)]`,u),t[14]=u,t[15]=R);let z;t[16]===g?z=t[17]:(z=g?{viewTransitionName:g}:void 0,t[16]=g,t[17]=z);let B;t[18]!==l||t[19]!==a||t[20]!==k||t[21]!==L||t[22]!==m||t[23]!==d||t[24]!==D||t[25]!==E||t[26]!==N?(B=!N&&a.thumbnail?(0,o.jsx)(r,{path:a.thumbnail,alt:l??``,className:n(`h-full w-full object-cover`,!k&&`transition-transform duration-state group-hover:scale-[1.03]`,d),sizes:E,loading:D,fetchPriority:m,fallback:L}):L,t[18]=l,t[19]=a,t[20]=k,t[21]=L,t[22]=m,t[23]=d,t[24]=D,t[25]=E,t[26]=N,t[27]=B):B=t[27];let V;t[28]!==a||t[29]!==T||t[30]!==F?(V=F?(0,o.jsx)(S,{cover:a,template:F,coverSize:T}):null,t[28]=a,t[29]=T,t[30]=F,t[31]=V):V=t[31];let H;t[32]===C?H=t[33]:(H=(0,o.jsx)(x,{testId:C}),t[32]=C,t[33]=H);let U;return t[34]!==T||t[35]!==R||t[36]!==z||t[37]!==B||t[38]!==V||t[39]!==H||t[40]!==C?(U=(0,o.jsxs)(`div`,{className:R,style:z,"data-testid":C,"data-cover-size":T,children:[B,V,H]}),t[34]=T,t[35]=R,t[36]=z,t[37]=B,t[38]=V,t[39]=H,t[40]=C,t[41]=U):U=t[41],U}var w={novice:`入門`,beginner:`初級`,intermediate:`中級`,advanced:`上級`,unspecified:`レベル未設定`};function T(e){let t=e.toLowerCase();return t===`novice`||t===`intro`||t===`introductory`||t===`introduction`||t===`entry`||t===`starter`||t===`入門`?`novice`:t===`beginner`||t===`intermediate`||t===`advanced`?t:e}var E={englishCategory:`英語学習`};function D(e,t){return e===`English`?t.englishCategory:e}function O(e,t,n){return n.levelLabel?n.levelLabel(e,t):w[e]??(t||w.unspecified)}function k(e,t=E){let n=typeof e.user==`string`?null:e.user??null,r=e.level?.trim()??``,i=r?T(r):`unspecified`,a=e.producer_label??(typeof e.user==`string`?e.user:n?.username)??`Producer未設定`,o=e.producer_slug??(typeof e.user==`string`?e.user:n?.username)??null,s=e.tags??[],c=(e.categories??[]).filter(e=>e?.slug||e?.name),l=e.description??``,d=e,f=d.rating??d.average_rating??null;return{id:e.id,slug:e.slug??null,title:e.title,description:l,categoryLabels:c.map(e=>{let n=e.name?.trim();return n?D(n,t):null}).filter(e=>!!e),categorySlugs:c.map(e=>e.slug?.trim()??null).filter(e=>!!e),curriculumLevelKey:i,curriculumLevelLabel:O(i,r,t),rating:f,producer:a,producerSlug:o,canonicalProducerSlug:e.producer_slug?.trim()||null,bookCount:d.book_count??0,videoCount:d.video_count??0,totalPageCount:e.total_page_count??0,totalDuration:e.total_duration??0,durationLabel:t.durationLabel?t.durationLabel(e.total_duration):u(e.total_duration),tags:s,thumbnail:e.thumbnail,bookTitlePreview:(e.book_title_preview??[]).map(e=>e.trim()).filter(Boolean).slice(0,3),bookThumbnailPreview:(e.book_thumbnail_preview??[]).map(e=>e.trim()).filter(Boolean).slice(0,3),searchableText:[e.title,l,a,c.map(e=>D(e.name??``,t)).join(` `),s.map(e=>e.name).join(` `)].join(` `).toLowerCase(),publishedAt:d.published_at??null,createdAt:d.created_at??null}}function A(e){return(e?.trim()??``)||null}function j(e){let t=A(e);if(!t)return`unspecified`;let n=T(t);return n===`novice`||n===`beginner`||n===`intermediate`||n===`advanced`?n:`unspecified`}function M(e){return[...new Set((e??[]).map(e=>e?.trim().toLowerCase()??``).filter(Boolean))].sort((e,t)=>e.localeCompare(t)).find(e=>a(e)!==null)??null}function N(e){let t=e.bookId.trim().toLowerCase();if(!t)throw Error(`Book cover descriptors require a book ID.`);return Object.freeze({bookId:t,title:A(e.title)??`Book3`,thumbnail:A(e.thumbnail),level:j(e.level),categorySlug:M(e.categorySlugs)})}export{C as a,l as c,d,T as i,u as l,w as n,v as o,k as r,m as s,N as t,c as u};

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.