@infinilabs/search-results 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -64,7 +64,7 @@ export declare type SearchResultMediaItem = SearchResultCommon & {
64
64
  onClick?: () => void;
65
65
  };
66
66
 
67
- declare function SearchResults({ section, className, theme, footerAction, onRecordClick, onItemClick, hideHeader }: SearchResultsProps): JSX_2.Element;
67
+ declare function SearchResults({ section, className, theme, footerAction, onRecordClick, onItemClick, hideHeader, requestHeaders }: SearchResultsProps): JSX_2.Element;
68
68
  export default SearchResults;
69
69
 
70
70
  export declare type SearchResultsAction = {
@@ -91,6 +91,7 @@ export declare type SearchResultsProps = {
91
91
  onRecordClick?: (record: SearchResultsRecord, index: number) => void;
92
92
  onItemClick?: (item: SearchResultsItem) => void;
93
93
  hideHeader?: boolean;
94
+ requestHeaders?: Record<string, string>;
94
95
  };
95
96
 
96
97
  export declare type SearchResultsRecord = {
@@ -1,2 +1,2 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0,0,.2,1);--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]\\!{height:90px!important}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]\\!{width:160px!important}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#e8e8e8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#e8e8e8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-6\\!{padding-inline:calc(var(--spacing)*6)!important}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4\\!{padding-block:calc(var(--spacing)*4)!important}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#666\\]{color:#666}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:scale-\\[1\\.1\\]:is(:where(.group):hover *){scale:1.1}.group-hover\\:scale-\\[1\\.03\\]:is(:where(.group):hover *){scale:1.03}.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100\\/70:hover{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-100\\/70:hover{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}.focus-visible\\:ring-slate-600:focus-visible{--tw-ring-color:var(--color-slate-600)}.dark\\:border-slate-700:where(.dark,.dark *){border-color:var(--color-slate-700)}.dark\\:bg-slate-700:where(.dark,.dark *){background-color:var(--color-slate-700)}.dark\\:bg-slate-800:where(.dark,.dark *){background-color:var(--color-slate-800)}.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:where(.dark,.dark *){color:var(--color-slate-300)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-500:where(.dark,.dark *):hover{border-color:var(--color-slate-500)}.dark\\:hover\\:border-slate-700:where(.dark,.dark *):hover{border-color:var(--color-slate-700)}.dark\\:hover\\:bg-slate-800:where(.dark,.dark *):hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}}.dark\\:focus-visible\\:ring-slate-600:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--color-slate-600)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),o=require("clsx"),u=require("lucide-react");function h({breadcrumbs:e}){return e?.length?r.jsx("div",{className:"min-w-0 truncate text-xs",children:e.map((t,n)=>r.jsxs("span",{children:[n>0?r.jsx("span",{className:"mx-1",children:">"}):null,r.jsx("span",{className:"",children:t})]},`${t}-${n}`))}):null}function A(e,t){const n=t==="_blank"?"noreferrer noopener":"";return e?n?[...new Set([...e.split(" "),...n.split(" ")].filter(Boolean))].join(" "):e:n||void 0}function v({href:e,target:t,rel:n,onClick:s,className:i,children:l}){const a=i?`${i} cursor-pointer`:"cursor-pointer";return e?r.jsx("a",{href:e,target:t,rel:A(n,t),className:a,onClick:()=>s?.(),children:l}):r.jsx("button",{type:"button",className:a,onClick:s,children:l})}function F({item:e,onItemClick:t}){const n=e.onClick?void 0:e.href,s=e.breadcrumbs??[];return r.jsxs(v,{href:n,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"),children:[r.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700",children:r.jsx("div",{className:"relative aspect-video bg-slate-100 dark:bg-slate-800",children:r.jsx("img",{src:e.imageUrl,alt:e.imageAlt??e.title,className:"absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.03]",loading:"lazy"})})}),r.jsxs("div",{className:"mt-2",children:[r.jsx("div",{className:"mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]",children:e.title}),e.subtitle?r.jsx("div",{className:"mb-1 truncate text-sm text-[#666]",children:e.subtitle}):null,s.length?r.jsx("div",{className:"text-[#666]",children:r.jsx(h,{breadcrumbs:s})}):null]})]})}function T({author:e,date:t}){return!e&&!t?null:r.jsxs("div",{className:"flex-none truncate text-xs",children:[e?r.jsx("span",{className:"",children:e}):null,e&&t?r.jsx("span",{className:"mx-1",children:"·"}):null,t?r.jsx("span",{className:"",children:t}):null]})}function G({meta:e}){return e?.length?r.jsx("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200",children:e.map((t,n)=>r.jsx("span",{className:"inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1 dark:border-slate-700 dark:bg-slate-900",children:t},`${t}-${n}`))}):null}function g({title:e,titleIcon:t,titleIconBgColor:n,source:s,className:i,titleClassName:l,titleAction:a}){return!e&&!t&&!s?null:r.jsxs("div",{className:o("mb-2 flex min-w-0 items-center gap-2",i),children:[t?r.jsx("span",{className:o("inline-flex h-6 w-6 flex-none items-center justify-center",n&&"rounded-md text-white"),style:n?{backgroundColor:n}:void 0,children:t}):null,e?a?.href?r.jsx("a",{className:o("min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),href:a.href,target:a.target,rel:a.rel,onClick:()=>a.onClick?.(),children:e}):r.jsx("button",{type:"button",className:o("min-w-0 cursor-pointer bg-transparent p-0 text-left text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),onClick:a?.onClick,children:e}):null]})}function S(e){switch(e){case"doc":case"word":return"bg-[#027FFE] text-white";case"pdf":return"bg-[#E02E2E] text-white";default:return"bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200"}}function L(e){switch(e){case"xls":return r.jsx(u.FileSpreadsheet,{className:"h-5 w-5"});case"ppt":return r.jsx(u.Presentation,{className:"h-5 w-5"});case"pdf":case"doc":case"word":case"text":return r.jsx(u.FileText,{className:"h-5 w-5"});default:return r.jsx(u.File,{className:"h-5 w-5"})}}function k({fileType:e,typeIcon:t}){return t?r.jsx("span",{className:"inline-flex h-6 w-6 items-center justify-center",children:t}):e?r.jsx("span",{className:o("inline-flex h-6 w-6 items-center justify-center rounded-md",S(e)),children:L(e)}):null}const _=u.ExternalLink;function $({item:e,onItemClick:t}){const n=e.typeIcon?r.jsx(k,{typeIcon:e.typeIcon}):e.fileType?r.jsx(k,{fileType:e.fileType}):null,s=e.onClick||t?()=>{e.onClick?.(),t?.(e)}:void 0,i=e.onClick?void 0:e.href,l=r.jsxs("div",{className:"w-full",children:[r.jsx("div",{className:"flex min-w-0 items-center gap-2",children:r.jsx(g,{className:"mb-0 w-full",title:e.title,titleIcon:n,source:e.source,titleClassName:"truncate text-[#1A0CAB] dark:text-[#8AB4F8]"})}),r.jsxs("div",{className:"flex gap-3",children:[e.cover?r.jsx("img",{src:e.cover,alt:e.thumbnailAlt??e.title,className:"h-[90px]! w-[160px]! flex-none rounded-lg object-cover ring-1 ring-slate-200 dark:ring-slate-700",loading:"lazy"}):null,r.jsxs("div",{className:"min-w-0 flex-1 flex flex-col justify-between",children:[e.summary?r.jsx("div",{className:"line-clamp-3 text-sm text-[#666]",children:e.summary}):null,e.breadcrumbs?.length||e.author||e.date?r.jsxs("div",{className:"mt-2 flex min-w-0 items-center gap-3 text-[#666]",children:[r.jsx(h,{breadcrumbs:e.breadcrumbs}),r.jsx("span",{className:"h-3 w-px flex-none bg-[#666]","aria-hidden":"true"}),r.jsxs("div",{className:"flex flex-none items-center gap-2",children:[r.jsx(T,{author:e.author,date:e.date}),e.href?r.jsx("span",{className:"flex-none text-[#007EFF]",children:r.jsx(_,{className:"h-3 w-3"})}):null]})]}):r.jsx(G,{meta:e.meta})]})]})]});return!i&&!s?l:r.jsx(v,{href:i,target:e.target,rel:e.rel,onClick:s,className:o("group block w-full rounded-xl border border-transparent px-6! py-4! text-left no-underline transition-colors","hover:border-slate-200 hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300","dark:hover:border-slate-700 dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600",e.isActive?"border-slate-200 bg-slate-100/70 dark:border-slate-700 dark:bg-slate-800/60":""),children:l})}function E({item:e,onItemClick:t}){const n=e.breadcrumbs??[e.sourceLabel,e.categoryLabel].filter(Boolean),s=e.onClick?void 0:e.href;return r.jsxs(v,{href:s,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"),children:[r.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700",children:r.jsxs("div",{className:"relative aspect-4/3 bg-slate-100 dark:bg-slate-800",children:[r.jsx("img",{src:e.cover,alt:e.thumbnailAlt??e.title,className:"absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.1]",loading:"lazy"}),e.mediaType==="video"?r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30",children:r.jsx(u.Play,{className:"h-5 w-5 translate-x-px"})})}):null]})}),r.jsxs("div",{className:"mt-2",children:[r.jsx("div",{className:"mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]",children:e.title}),e.matchCountText?r.jsx("div",{className:"mb-1 truncate text-xs text-[#666]",children:e.matchCountText}):null,n.length?r.jsxs("div",{className:"text-[#666]",children:[r.jsx(h,{breadcrumbs:n})," "]}):null]})]})}function M({action:e,className:t}){const n=o("flex-none inline-flex items-center justify-center rounded-full border border-[#e8e8e8] bg-white","h-7 px-12 text-sm text-[#666] no-underline transition","cursor-pointer hover:border-slate-300 hover:bg-slate-50 hover:no-underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300","dark:border-slate-700 dark:bg-transparent dark:text-slate-300 dark:hover:border-slate-500 dark:hover:bg-slate-800 dark:focus-visible:ring-slate-600",t);return e.href?r.jsx("a",{className:n,href:e.href,target:e.target,rel:A(e.rel,e.target),onClick:()=>e.onClick?.(),children:e.label}):r.jsx("button",{className:n,type:"button",onClick:e.onClick,children:e.label})}function y({action:e}){return e?r.jsxs("div",{className:"mt-4 flex w-full items-center",children:[r.jsx("span",{className:"h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700","aria-hidden":"true"}),r.jsx(M,{action:e,className:o("px-4")}),r.jsx("span",{className:"h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700","aria-hidden":"true"})]}):null}function U(e,t,n){if(e.layout==="list")return r.jsxs("div",{className:o("space-y-6",e.className),children:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),e.items.map(l=>r.jsx($,{item:l,onItemClick:t},l.id)),r.jsx(y,{action:e.footerAction})]});if(e.layout==="mediaGrid"){const l=e.columns??3,a=l===2?"grid-cols-2":l===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:o("px-6 py-3",e.className),children:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),r.jsx("div",{className:o("grid gap-3",a),children:e.items.map(c=>r.jsx(E,{item:c,onItemClick:t},c.id))}),r.jsx(y,{action:e.footerAction})]})}const s=e.columns??3,i=s===2?"grid-cols-2":s===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:o("px-6 py-3",e.className),children:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),r.jsx("div",{className:o("grid gap-3",i),children:e.items.map(l=>r.jsx(F,{item:l,onItemClick:t},l.id))}),r.jsx(y,{action:e.footerAction})]})}function z(e){if(!e)return;const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(0,10)}function R(e){const t=e?.trim().toLowerCase();if(t)return t==="pdf"?"pdf":t==="doc"||t==="docx"||t==="word"?"doc":t==="ppt"||t==="pptx"?"ppt":t==="xls"||t==="xlsx"||t==="excel"?"xls":t==="link"||t==="url"||t==="html"?"link":t==="txt"||t==="text"?"text":"unknown"}function b(e,t,n){const s=e.thumbnail??e.cover??e.metadata?.thumbnail_link,i=e.summary??e.content,l=R(e.metadata?.file_extension??e.type),a=e.source?.name,c=e.category??e.categories?.join(" / ")??"Categories",d=[a,c].filter(Boolean),f=e.last_updated_by?.user?.username??e.owner?.username,x=z(e.last_updated_by?.timestamp??e.metadata?.last_reviewed),m=e.metadata?.icon_link??e.icon,p=m?r.jsx("img",{src:m,alt:"",className:"h-5 w-5 rounded-sm object-contain"}):void 0;return{type:"result",id:`${e.source?.id??e.url??e.title}-${t}`,title:e.title,href:e.url,summary:i,cover:s,fileType:l,typeIcon:p,breadcrumbs:d.length?d:void 0,author:f,date:x,onClick:n,isActive:!!e.isActive}}function j({section:e,className:t,theme:n,footerAction:s,onRecordClick:i,onItemClick:l,hideHeader:a}){const c=q(C(e,i),s),d=V(n);return r.jsx("div",{className:o(d==="dark"&&"dark",t),children:U(c,l,a)})}function V(e){if(e)return e==="light"?"light":e==="dark"||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function q(e,t){return!t||e.footerAction?e:e.layout==="list"?{...e,footerAction:t}:e.layout==="mediaGrid"?{...e,footerAction:t}:{...e,footerAction:t}}function D(e){return r.jsx(j,{...e})}function P(e){return r.jsx(j,{...e})}function C(e,t){if(Array.isArray(e))return H(e,t);if(J(e))return e;const n=e;if(n.type==="imageGroup"&&Array.isArray(n.items)){const s=n;return s.items[0]?.type==="media"?{type:"section",title:s.title,layout:"mediaGrid",items:s.items.filter(l=>typeof l=="object"&&!!l&&l.type==="media"),columns:s.columns,footerAction:s.footerAction,className:s.className}:{type:"section",title:s.title,layout:"imageGrid",items:s.items.filter(l=>typeof l=="object"&&!!l&&l.type==="image"),columns:s.columns,footerAction:s.footerAction,className:s.className}}if(n.type==="videoGroup"&&Array.isArray(n.items)){const s=n;return{type:"section",title:s.title,layout:"mediaGrid",items:s.items,columns:s.columns,footerAction:s.footerAction,className:s.className}}return n.type==="result"?{type:"section",layout:"list",items:[e]}:n.type==="media"?{type:"section",layout:"mediaGrid",items:[e]}:n.type==="image"&&typeof n.imageUrl=="string"?{type:"section",layout:"imageGrid",items:[e]}:{type:"section",layout:"list",items:[b(e,0,t?()=>t(e,0):void 0)]}}function H(e,t){if(!e.length)return{type:"section",layout:"list",items:[]};if(e.every(I)){if(e.every(l=>l.type==="result"))return{type:"section",layout:"list",items:e};if(e.every(l=>l.type==="media"))return{type:"section",layout:"mediaGrid",items:e};if(e.every(l=>l.type==="image"&&"imageUrl"in l))return{type:"section",layout:"imageGrid",items:e};if(e.length===1)return C(e[0],t)}const n=[],s=[];for(const[l,a]of e.entries()){const c=O(a,l,t);c?n.push(c):s.push(b(a,l,t?()=>t(a,l):void 0))}return n.length&&!s.length?{type:"section",title:w(e,a=>a.category??a.source?.name),layout:"mediaGrid",items:n}:{type:"section",title:w(e,l=>l.category??l.source?.name),layout:"list",items:s}}function I(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="result"||t.type==="media"||t.type==="imageGroup"||t.type==="videoGroup"||t.type==="image"&&typeof e.imageUrl=="string"}function O(e,t,n){const s=e,i=s.metadata,l=typeof i=="object"&&i?i.content_type:void 0,a=typeof l=="string"?l.trim().toLowerCase():typeof s.type=="string"?s.type.trim().toLowerCase():void 0;if(a!=="image"&&a!=="video")return;const c=typeof s.id=="string"?s.id:void 0,d=typeof s.thumbnail=="string"?s.thumbnail:typeof s.cover=="string"?s.cover:typeof s.metadata=="object"&&s.metadata&&typeof s.metadata.thumbnail_link=="string"?s.metadata.thumbnail_link:void 0;if(!d)return;const f=typeof s.category=="string"?s.category:Array.isArray(s.categories)?s.categories.filter(B=>typeof B=="string").join(" / "):void 0,x=typeof s.title=="string"?s.title:"Untitled",m=typeof s.url=="string"?s.url:void 0,p=typeof s.source=="object"&&s.source&&typeof s.source.name=="string"?s.source.name:void 0,N=!!n&&!I(e);return{type:"media",id:c??`${m??x}-0`,mediaType:a==="video"?"video":"image",title:x,href:N?void 0:m,cover:d,sourceLabel:p,categoryLabel:f,breadcrumbs:[p,f].filter(Boolean),...N?{onClick:()=>n(e,t)}:{}}}function w(e,t){const n=e[0],s=t(n);if(s){for(const i of e)if(t(i)!==s)return;return s}}function J(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="section"&&(t.layout==="list"||t.layout==="imageGrid"||t.layout==="mediaGrid")&&Array.isArray(t.items)}function K(e,t){const n=[];for(const s of e){const i=n.length?n[n.length-1]:void 0;if(s.type==="imageGroup"){s.items[0]?.type==="media"?n.push({type:"section",title:s.title,titleIcon:r.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:s.items.filter(a=>a.type==="media"),columns:s.columns??t,footerAction:s.footerAction,className:s.className}):n.push({type:"section",title:s.title,titleIcon:r.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"imageGrid",items:s.items.filter(a=>a.type==="image"),columns:s.columns??t,footerAction:s.footerAction,className:s.className});continue}if(s.type==="videoGroup"){n.push({type:"section",title:s.title,titleIcon:r.jsx(u.Video,{className:"h-4 w-4"}),titleIconBgColor:"#1784FC",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:s.items,columns:s.columns??t,footerAction:s.footerAction,className:s.className});continue}if(s.type==="result"){if(i?.layout==="list"){i.items.push(s);continue}n.push({type:"section",layout:"list",items:[s]});continue}if(s.type==="media"){if(i?.layout==="mediaGrid"){i.items.push(s);continue}n.push({type:"section",layout:"mediaGrid",...t?{columns:t}:{},items:[s]});continue}if(i?.layout==="imageGrid"){i.items.push(s);continue}n.push({type:"section",layout:"imageGrid",...t?{columns:t}:{},items:[s]})}return n}function Q(e){return e.map((t,n)=>b(t,n))}exports.SearchResultsImageGroup=D;exports.SearchResultsVideoGroup=P;exports.default=j;exports.itemsToSections=K;exports.recordsToItems=Q;
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0,0,.2,1);--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]\\!{height:90px!important}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]\\!{width:160px!important}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#e8e8e8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#e8e8e8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-4\\!{padding:calc(var(--spacing)*4)!important}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-3{padding-block:calc(var(--spacing)*3)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#666\\]{color:#666}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:scale-\\[1\\.1\\]:is(:where(.group):hover *){scale:1.1}.group-hover\\:scale-\\[1\\.03\\]:is(:where(.group):hover *){scale:1.03}.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100\\/70:hover{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-100\\/70:hover{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}.focus-visible\\:ring-slate-600:focus-visible{--tw-ring-color:var(--color-slate-600)}.dark\\:border-slate-700:where(.dark,.dark *){border-color:var(--color-slate-700)}.dark\\:bg-slate-700:where(.dark,.dark *){background-color:var(--color-slate-700)}.dark\\:bg-slate-800:where(.dark,.dark *){background-color:var(--color-slate-800)}.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:where(.dark,.dark *){color:var(--color-slate-300)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-500:where(.dark,.dark *):hover{border-color:var(--color-slate-500)}.dark\\:hover\\:border-slate-700:where(.dark,.dark *):hover{border-color:var(--color-slate-700)}.dark\\:hover\\:bg-slate-800:where(.dark,.dark *):hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}}.dark\\:focus-visible\\:ring-slate-600:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--color-slate-600)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),o=require("clsx"),p=require("react"),f=require("lucide-react"),I=p.createContext(void 0);function S(e){try{return new URL(e).pathname.startsWith("/assets")}catch{return!1}}function y(e){const t=p.useContext(I),{src:n,...r}=e,i=!!(n&&t&&!S(n)),[l,a]=p.useState(void 0),c=p.useRef(void 0);return p.useEffect(()=>{if(!n||!i)return;let u=!1;return fetch(n,{headers:t}).then(d=>d.blob()).then(d=>{if(u)return;const m=URL.createObjectURL(d);c.current=m,a(m)}).catch(()=>{u||a(void 0)}),()=>{u=!0,c.current&&(URL.revokeObjectURL(c.current),c.current=void 0)}},[n,i,t]),i?s.jsx("img",{...r,src:l}):s.jsx("img",{...e})}function b({breadcrumbs:e}){return e?.length?s.jsx("div",{className:"min-w-0 truncate text-xs",children:e.map((t,n)=>s.jsxs("span",{children:[n>0?s.jsx("span",{className:"mx-1",children:">"}):null,s.jsx("span",{className:"",children:t})]},`${t}-${n}`))}):null}function B(e,t){const n=t==="_blank"?"noreferrer noopener":"";return e?n?[...new Set([...e.split(" "),...n.split(" ")].filter(Boolean))].join(" "):e:n||void 0}function j({href:e,target:t,rel:n,onClick:r,className:i,children:l}){const a=i?`${i} cursor-pointer`:"cursor-pointer";return e?s.jsx("a",{href:e,target:t,rel:B(n,t),className:a,onClick:()=>r?.(),children:l}):s.jsx("button",{type:"button",className:a,onClick:r,children:l})}function L({item:e,onItemClick:t}){const n=e.onClick?void 0:e.href,r=e.breadcrumbs??[];return s.jsxs(j,{href:n,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"),children:[s.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700",children:s.jsx("div",{className:"relative aspect-video bg-slate-100 dark:bg-slate-800",children:s.jsx(y,{src:e.imageUrl,alt:e.imageAlt??e.title,className:"absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.03]",loading:"lazy"})})}),s.jsxs("div",{className:"mt-2",children:[s.jsx("div",{className:"mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]",children:e.title}),e.subtitle?s.jsx("div",{className:"mb-1 truncate text-sm text-[#666]",children:e.subtitle}):null,r.length?s.jsx("div",{className:"text-[#666]",children:s.jsx(b,{breadcrumbs:r})}):null]})]})}function U({author:e,date:t}){return!e&&!t?null:s.jsxs("div",{className:"min-w-0 truncate text-xs",children:[e?s.jsx("span",{className:"",children:e}):null,e&&t?s.jsx("span",{className:"mx-1",children:"·"}):null,t?s.jsx("span",{className:"",children:t}):null]})}function _({meta:e}){return e?.length?s.jsx("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200",children:e.map((t,n)=>s.jsx("span",{className:"inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1 dark:border-slate-700 dark:bg-slate-900",children:t},`${t}-${n}`))}):null}function g({title:e,titleIcon:t,titleIconBgColor:n,source:r,className:i,titleClassName:l,titleAction:a}){return!e&&!t&&!r?null:s.jsxs("div",{className:o("mb-2 flex min-w-0 items-center gap-2",i),children:[t?s.jsx("span",{className:o("inline-flex h-6 w-6 flex-none items-center justify-center",n&&"rounded-md text-white"),style:n?{backgroundColor:n}:void 0,children:t}):null,e?a?.href?s.jsx("a",{className:o("min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),href:a.href,target:a.target,rel:a.rel,onClick:()=>a.onClick?.(),children:e}):a?.onClick?s.jsx("button",{type:"button",className:o("min-w-0 cursor-pointer bg-transparent p-0 text-left text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),onClick:a.onClick,children:e}):s.jsx("span",{className:o("min-w-0 text-xl group-hover:underline group-hover:underline-offset-2",l),children:e}):null]})}function R(e){switch(e){case"doc":case"word":return"bg-[#027FFE] text-white";case"pdf":return"bg-[#E02E2E] text-white";default:return"bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200"}}function E(e){switch(e){case"xls":return s.jsx(f.FileSpreadsheet,{className:"h-5 w-5"});case"ppt":return s.jsx(f.Presentation,{className:"h-5 w-5"});case"pdf":case"doc":case"word":case"text":return s.jsx(f.FileText,{className:"h-5 w-5"});default:return s.jsx(f.File,{className:"h-5 w-5"})}}function A({fileType:e,typeIcon:t}){return t?s.jsx("span",{className:"inline-flex h-6 w-6 items-center justify-center",children:t}):e?s.jsx("span",{className:o("inline-flex h-6 w-6 items-center justify-center rounded-md",R(e)),children:E(e)}):null}const $=f.ExternalLink;function M({item:e,onItemClick:t}){const n=e.typeIcon?s.jsx(A,{typeIcon:e.typeIcon}):e.fileType?s.jsx(A,{fileType:e.fileType}):null,r=e.onClick||t?()=>{e.onClick?.(),t?.(e)}:void 0,i=e.onClick?void 0:e.href,l=s.jsxs("div",{className:"min-w-0 w-full",children:[s.jsx("div",{className:"flex min-w-0 items-center gap-2",children:s.jsx(g,{className:"mb-0 w-full",title:e.title,titleIcon:n,source:e.source,titleClassName:"truncate text-[#1A0CAB] dark:text-[#8AB4F8]"})}),s.jsxs("div",{className:"flex min-w-0 gap-3",children:[e.cover?s.jsx(y,{src:e.cover,alt:e.thumbnailAlt??e.title,className:"h-[90px]! w-[160px]! flex-none rounded-lg object-cover ring-1 ring-slate-200 dark:ring-slate-700",loading:"lazy"}):null,s.jsxs("div",{className:"min-w-0 flex-1 flex flex-col justify-between overflow-hidden",children:[e.summary?s.jsx("div",{className:"line-clamp-3 text-sm text-[#666]",children:e.summary}):null,e.breadcrumbs?.length||e.author||e.date?s.jsxs("div",{className:"mt-2 flex min-w-0 items-center gap-3 text-[#666]",children:[s.jsx("div",{className:"min-w-0 shrink-0",children:s.jsx(b,{breadcrumbs:e.breadcrumbs})}),s.jsx("span",{className:"h-3 w-px flex-none bg-[#666]","aria-hidden":"true"}),s.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[s.jsx(U,{author:e.author,date:e.date}),e.href?s.jsx("span",{className:"flex-none text-[#007EFF]",children:s.jsx($,{className:"h-3 w-3"})}):null]})]}):s.jsx(_,{meta:e.meta})]})]})]});return!i&&!r?l:s.jsx(j,{href:i,target:e.target,rel:e.rel,onClick:r,className:o("group block w-full rounded-xl border border-transparent p-4! text-left no-underline transition-colors","hover:border-slate-200 hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300","dark:hover:border-slate-700 dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600",e.isActive?"border-slate-200 bg-slate-100/70 dark:border-slate-700 dark:bg-slate-800/60":""),children:l})}function q({item:e,onItemClick:t}){const n=e.breadcrumbs??[e.sourceLabel,e.categoryLabel].filter(Boolean),r=e.onClick?void 0:e.href;return s.jsxs(j,{href:r,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"),children:[s.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700",children:s.jsxs("div",{className:"relative aspect-4/3 bg-slate-100 dark:bg-slate-800",children:[s.jsx(y,{src:e.cover,alt:e.thumbnailAlt??e.title,className:"absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.1]",loading:"lazy"}),e.mediaType==="video"?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30",children:s.jsx(f.Play,{className:"h-5 w-5 translate-x-px"})})}):null]})}),s.jsxs("div",{className:"mt-2",children:[s.jsx("div",{className:"mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]",children:e.title}),e.matchCountText?s.jsx("div",{className:"mb-1 truncate text-xs text-[#666]",children:e.matchCountText}):null,n.length?s.jsxs("div",{className:"text-[#666]",children:[s.jsx(b,{breadcrumbs:n})," "]}):null]})]})}function z({action:e,className:t}){const n=o("flex-none inline-flex items-center justify-center rounded-full border border-[#e8e8e8] bg-white","h-7 px-12 text-sm text-[#666] no-underline transition","cursor-pointer hover:border-slate-300 hover:bg-slate-50 hover:no-underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300","dark:border-slate-700 dark:bg-transparent dark:text-slate-300 dark:hover:border-slate-500 dark:hover:bg-slate-800 dark:focus-visible:ring-slate-600",t);return e.href?s.jsx("a",{className:n,href:e.href,target:e.target,rel:B(e.rel,e.target),onClick:()=>e.onClick?.(),children:e.label}):s.jsx("button",{className:n,type:"button",onClick:e.onClick,children:e.label})}function v({action:e}){return e?s.jsxs("div",{className:"mt-4 flex w-full items-center",children:[s.jsx("span",{className:"h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700","aria-hidden":"true"}),s.jsx(z,{action:e,className:o("px-4")}),s.jsx("span",{className:"h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700","aria-hidden":"true"})]}):null}function H(e,t,n){if(e.layout==="list")return s.jsxs("div",{className:o("space-y-6",e.className),children:[!n&&s.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),e.items.map(l=>s.jsx(M,{item:l,onItemClick:t},l.id)),s.jsx(v,{action:e.footerAction})]});if(e.layout==="mediaGrid"){const l=e.columns??3,a=l===2?"grid-cols-2":l===4?"grid-cols-4":"grid-cols-3";return s.jsxs("div",{className:o("px-6 py-3",e.className),children:[!n&&s.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),s.jsx("div",{className:o("grid gap-3",a),children:e.items.map(c=>s.jsx(q,{item:c,onItemClick:t},c.id))}),s.jsx(v,{action:e.footerAction})]})}const r=e.columns??3,i=r===2?"grid-cols-2":r===4?"grid-cols-4":"grid-cols-3";return s.jsxs("div",{className:o("px-6 py-3",e.className),children:[!n&&s.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),s.jsx("div",{className:o("grid gap-3",i),children:e.items.map(l=>s.jsx(L,{item:l,onItemClick:t},l.id))}),s.jsx(v,{action:e.footerAction})]})}function O(e){if(!e)return;const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(0,10)}function P(e){const t=e?.trim().toLowerCase();if(t)return t==="pdf"?"pdf":t==="doc"||t==="docx"||t==="word"?"doc":t==="ppt"||t==="pptx"?"ppt":t==="xls"||t==="xlsx"||t==="excel"?"xls":t==="link"||t==="url"||t==="html"?"link":t==="txt"||t==="text"?"text":"unknown"}function N(e,t,n){const r=e.thumbnail??e.cover??e.metadata?.thumbnail_link,i=e.summary??e.content,l=P(e.metadata?.file_extension??e.type),a=e.source?.name,c=e.category??e.categories?.join(" / ")??"Categories",u=[a,c].filter(Boolean),d=e.last_updated_by?.user?.username??e.owner?.username,m=O(e.last_updated_by?.timestamp??e.metadata?.last_reviewed),x=e.metadata?.icon_link??e.icon,h=x?s.jsx(y,{src:x,alt:"",className:"h-5 w-5 rounded-sm object-contain"}):void 0;return{type:"result",id:`${e.source?.id??e.url??e.title}-${t}`,title:e.title,href:e.url,summary:i,cover:r,fileType:l,typeIcon:h,breadcrumbs:u.length?u:void 0,author:d,date:m,onClick:n,isActive:!!e.isActive}}function w({section:e,className:t,theme:n,footerAction:r,onRecordClick:i,onItemClick:l,hideHeader:a,requestHeaders:c}){const u=D(F(e,i),r),d=V(n);return s.jsx(I.Provider,{value:c,children:s.jsx("div",{className:o(d==="dark"&&"dark",t),children:H(u,l,a)})})}function V(e){if(e)return e==="light"?"light":e==="dark"||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function D(e,t){return!t||e.footerAction?e:e.layout==="list"?{...e,footerAction:t}:e.layout==="mediaGrid"?{...e,footerAction:t}:{...e,footerAction:t}}function W(e){return s.jsx(w,{...e})}function J(e){return s.jsx(w,{...e})}function F(e,t){if(Array.isArray(e))return K(e,t);if(X(e))return e;const n=e;if(n.type==="imageGroup"&&Array.isArray(n.items)){const r=n;return r.items[0]?.type==="media"?{type:"section",title:r.title,layout:"mediaGrid",items:r.items.filter(l=>typeof l=="object"&&!!l&&l.type==="media"),columns:r.columns,footerAction:r.footerAction,className:r.className}:{type:"section",title:r.title,layout:"imageGrid",items:r.items.filter(l=>typeof l=="object"&&!!l&&l.type==="image"),columns:r.columns,footerAction:r.footerAction,className:r.className}}if(n.type==="videoGroup"&&Array.isArray(n.items)){const r=n;return{type:"section",title:r.title,layout:"mediaGrid",items:r.items,columns:r.columns,footerAction:r.footerAction,className:r.className}}return n.type==="result"?{type:"section",layout:"list",items:[e]}:n.type==="media"?{type:"section",layout:"mediaGrid",items:[e]}:n.type==="image"&&typeof n.imageUrl=="string"?{type:"section",layout:"imageGrid",items:[e]}:{type:"section",layout:"list",items:[N(e,0,t?()=>t(e,0):void 0)]}}function K(e,t){if(!e.length)return{type:"section",layout:"list",items:[]};if(e.every(T)){if(e.every(l=>l.type==="result"))return{type:"section",layout:"list",items:e};if(e.every(l=>l.type==="media"))return{type:"section",layout:"mediaGrid",items:e};if(e.every(l=>l.type==="image"&&"imageUrl"in l))return{type:"section",layout:"imageGrid",items:e};if(e.length===1)return F(e[0],t)}const n=[],r=[];for(const[l,a]of e.entries()){const c=Q(a,l,t);c?n.push(c):r.push(N(a,l,t?()=>t(a,l):void 0))}return n.length&&!r.length?{type:"section",title:C(e,a=>a.category??a.source?.name),layout:"mediaGrid",items:n}:{type:"section",title:C(e,l=>l.category??l.source?.name),layout:"list",items:r}}function T(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="result"||t.type==="media"||t.type==="imageGroup"||t.type==="videoGroup"||t.type==="image"&&typeof e.imageUrl=="string"}function Q(e,t,n){const r=e,i=r.metadata,l=typeof i=="object"&&i?i.content_type:void 0,a=typeof l=="string"?l.trim().toLowerCase():typeof r.type=="string"?r.type.trim().toLowerCase():void 0;if(a!=="image"&&a!=="video")return;const c=typeof r.id=="string"?r.id:void 0,u=typeof r.thumbnail=="string"?r.thumbnail:typeof r.cover=="string"?r.cover:typeof r.metadata=="object"&&r.metadata&&typeof r.metadata.thumbnail_link=="string"?r.metadata.thumbnail_link:void 0;if(!u)return;const d=typeof r.category=="string"?r.category:Array.isArray(r.categories)?r.categories.filter(G=>typeof G=="string").join(" / "):void 0,m=typeof r.title=="string"?r.title:"Untitled",x=typeof r.url=="string"?r.url:void 0,h=typeof r.source=="object"&&r.source&&typeof r.source.name=="string"?r.source.name:void 0,k=!!n&&!T(e);return{type:"media",id:c??`${x??m}-0`,mediaType:a==="video"?"video":"image",title:m,href:k?void 0:x,cover:u,sourceLabel:h,categoryLabel:d,breadcrumbs:[h,d].filter(Boolean),...k?{onClick:()=>n(e,t)}:{}}}function C(e,t){const n=e[0],r=t(n);if(r){for(const i of e)if(t(i)!==r)return;return r}}function X(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="section"&&(t.layout==="list"||t.layout==="imageGrid"||t.layout==="mediaGrid")&&Array.isArray(t.items)}function Y(e,t){const n=[];for(const r of e){const i=n.length?n[n.length-1]:void 0;if(r.type==="imageGroup"){r.items[0]?.type==="media"?n.push({type:"section",title:r.title,titleIcon:s.jsx(f.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:r.items.filter(a=>a.type==="media"),columns:r.columns??t,footerAction:r.footerAction,className:r.className}):n.push({type:"section",title:r.title,titleIcon:s.jsx(f.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"imageGrid",items:r.items.filter(a=>a.type==="image"),columns:r.columns??t,footerAction:r.footerAction,className:r.className});continue}if(r.type==="videoGroup"){n.push({type:"section",title:r.title,titleIcon:s.jsx(f.Video,{className:"h-4 w-4"}),titleIconBgColor:"#1784FC",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:r.items,columns:r.columns??t,footerAction:r.footerAction,className:r.className});continue}if(r.type==="result"){if(i?.layout==="list"){i.items.push(r);continue}n.push({type:"section",layout:"list",items:[r]});continue}if(r.type==="media"){if(i?.layout==="mediaGrid"){i.items.push(r);continue}n.push({type:"section",layout:"mediaGrid",...t?{columns:t}:{},items:[r]});continue}if(i?.layout==="imageGrid"){i.items.push(r);continue}n.push({type:"section",layout:"imageGrid",...t?{columns:t}:{},items:[r]})}return n}function Z(e){return e.map((t,n)=>N(t,n))}exports.SearchResultsImageGroup=W;exports.SearchResultsVideoGroup=J;exports.default=w;exports.itemsToSections=Y;exports.recordsToItems=Z;
@@ -1,24 +1,49 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0,0,.2,1);--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]\\!{height:90px!important}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]\\!{width:160px!important}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#e8e8e8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#e8e8e8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-6\\!{padding-inline:calc(var(--spacing)*6)!important}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4\\!{padding-block:calc(var(--spacing)*4)!important}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#666\\]{color:#666}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:scale-\\[1\\.1\\]:is(:where(.group):hover *){scale:1.1}.group-hover\\:scale-\\[1\\.03\\]:is(:where(.group):hover *){scale:1.03}.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100\\/70:hover{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-100\\/70:hover{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}.focus-visible\\:ring-slate-600:focus-visible{--tw-ring-color:var(--color-slate-600)}.dark\\:border-slate-700:where(.dark,.dark *){border-color:var(--color-slate-700)}.dark\\:bg-slate-700:where(.dark,.dark *){background-color:var(--color-slate-700)}.dark\\:bg-slate-800:where(.dark,.dark *){background-color:var(--color-slate-800)}.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:where(.dark,.dark *){color:var(--color-slate-300)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-500:where(.dark,.dark *):hover{border-color:var(--color-slate-500)}.dark\\:hover\\:border-slate-700:where(.dark,.dark *):hover{border-color:var(--color-slate-700)}.dark\\:hover\\:bg-slate-800:where(.dark,.dark *):hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}}.dark\\:focus-visible\\:ring-slate-600:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--color-slate-600)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0,0,.2,1);--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]\\!{height:90px!important}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]\\!{width:160px!important}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#e8e8e8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#e8e8e8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-4\\!{padding:calc(var(--spacing)*4)!important}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-3{padding-block:calc(var(--spacing)*3)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#666\\]{color:#666}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:scale-\\[1\\.1\\]:is(:where(.group):hover *){scale:1.1}.group-hover\\:scale-\\[1\\.03\\]:is(:where(.group):hover *){scale:1.03}.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100\\/70:hover{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-100\\/70:hover{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}.focus-visible\\:ring-slate-600:focus-visible{--tw-ring-color:var(--color-slate-600)}.dark\\:border-slate-700:where(.dark,.dark *){border-color:var(--color-slate-700)}.dark\\:bg-slate-700:where(.dark,.dark *){background-color:var(--color-slate-700)}.dark\\:bg-slate-800:where(.dark,.dark *){background-color:var(--color-slate-800)}.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:where(.dark,.dark *){color:var(--color-slate-300)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-500:where(.dark,.dark *):hover{border-color:var(--color-slate-500)}.dark\\:hover\\:border-slate-700:where(.dark,.dark *):hover{border-color:var(--color-slate-700)}.dark\\:hover\\:bg-slate-800:where(.dark,.dark *):hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}}.dark\\:focus-visible\\:ring-slate-600:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--color-slate-600)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  import { jsx as n, jsxs as o } from "react/jsx-runtime";
3
3
  import c from "clsx";
4
- import { File as G, FileText as T, Presentation as S, FileSpreadsheet as L, ExternalLink as _, Play as $, Image as k, Video as E } from "lucide-react";
5
- function v({ breadcrumbs: e }) {
6
- return e?.length ? /* @__PURE__ */ n("div", { className: "min-w-0 truncate text-xs", children: e.map((t, l) => /* @__PURE__ */ o("span", { children: [
7
- l > 0 ? /* @__PURE__ */ n("span", { className: "mx-1", children: ">" }) : null,
4
+ import { createContext as L, useContext as S, useState as U, useRef as _, useEffect as E } from "react";
5
+ import { File as R, FileText as $, Presentation as z, FileSpreadsheet as M, ExternalLink as H, Play as D, Image as k, Video as O } from "lucide-react";
6
+ const I = L(void 0);
7
+ function P(e) {
8
+ try {
9
+ return new URL(e).pathname.startsWith("/assets");
10
+ } catch {
11
+ return !1;
12
+ }
13
+ }
14
+ function y(e) {
15
+ const t = S(I), { src: s, ...r } = e, i = !!(s && t && !P(s)), [l, a] = U(void 0), u = _(void 0);
16
+ return E(() => {
17
+ if (!s || !i) return;
18
+ let d = !1;
19
+ return fetch(s, { headers: t }).then((f) => f.blob()).then((f) => {
20
+ if (d) return;
21
+ const m = URL.createObjectURL(f);
22
+ u.current = m, a(m);
23
+ }).catch(() => {
24
+ d || a(void 0);
25
+ }), () => {
26
+ d = !0, u.current && (URL.revokeObjectURL(u.current), u.current = void 0);
27
+ };
28
+ }, [s, i, t]), i ? /* @__PURE__ */ n("img", { ...r, src: l }) : /* @__PURE__ */ n("img", { ...e });
29
+ }
30
+ function b({ breadcrumbs: e }) {
31
+ return e?.length ? /* @__PURE__ */ n("div", { className: "min-w-0 truncate text-xs", children: e.map((t, s) => /* @__PURE__ */ o("span", { children: [
32
+ s > 0 ? /* @__PURE__ */ n("span", { className: "mx-1", children: ">" }) : null,
8
33
  /* @__PURE__ */ n("span", { className: "", children: t })
9
- ] }, `${t}-${l}`)) }) : null;
34
+ ] }, `${t}-${s}`)) }) : null;
10
35
  }
11
- function C(e, t) {
12
- const l = t === "_blank" ? "noreferrer noopener" : "";
13
- return e ? l ? [...new Set([...e.split(" "), ...l.split(" ")].filter(Boolean))].join(" ") : e : l || void 0;
36
+ function B(e, t) {
37
+ const s = t === "_blank" ? "noreferrer noopener" : "";
38
+ return e ? s ? [...new Set([...e.split(" "), ...s.split(" ")].filter(Boolean))].join(" ") : e : s || void 0;
14
39
  }
15
- function b({
40
+ function x({
16
41
  href: e,
17
42
  target: t,
18
- rel: l,
43
+ rel: s,
19
44
  onClick: r,
20
45
  className: i,
21
- children: s
46
+ children: l
22
47
  }) {
23
48
  const a = i ? `${i} cursor-pointer` : "cursor-pointer";
24
49
  return e ? /* @__PURE__ */ n(
@@ -26,22 +51,22 @@ function b({
26
51
  {
27
52
  href: e,
28
53
  target: t,
29
- rel: C(l, t),
54
+ rel: B(s, t),
30
55
  className: a,
31
56
  onClick: () => r?.(),
32
- children: s
57
+ children: l
33
58
  }
34
- ) : /* @__PURE__ */ n("button", { type: "button", className: a, onClick: r, children: s });
59
+ ) : /* @__PURE__ */ n("button", { type: "button", className: a, onClick: r, children: l });
35
60
  }
36
- function U({
61
+ function V({
37
62
  item: e,
38
63
  onItemClick: t
39
64
  }) {
40
- const l = e.onClick ? void 0 : e.href, r = e.breadcrumbs ?? [];
65
+ const s = e.onClick ? void 0 : e.href, r = e.breadcrumbs ?? [];
41
66
  return /* @__PURE__ */ o(
42
- b,
67
+ x,
43
68
  {
44
- href: l,
69
+ href: s,
45
70
  target: e.target,
46
71
  rel: e.rel,
47
72
  onClick: () => {
@@ -52,7 +77,7 @@ function U({
52
77
  ),
53
78
  children: [
54
79
  /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700", children: /* @__PURE__ */ n("div", { className: "relative aspect-video bg-slate-100 dark:bg-slate-800", children: /* @__PURE__ */ n(
55
- "img",
80
+ y,
56
81
  {
57
82
  src: e.imageUrl,
58
83
  alt: e.imageAlt ?? e.title,
@@ -63,36 +88,36 @@ function U({
63
88
  /* @__PURE__ */ o("div", { className: "mt-2", children: [
64
89
  /* @__PURE__ */ n("div", { className: "mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]", children: e.title }),
65
90
  e.subtitle ? /* @__PURE__ */ n("div", { className: "mb-1 truncate text-sm text-[#666]", children: e.subtitle }) : null,
66
- r.length ? /* @__PURE__ */ n("div", { className: "text-[#666]", children: /* @__PURE__ */ n(v, { breadcrumbs: r }) }) : null
91
+ r.length ? /* @__PURE__ */ n("div", { className: "text-[#666]", children: /* @__PURE__ */ n(b, { breadcrumbs: r }) }) : null
67
92
  ] })
68
93
  ]
69
94
  }
70
95
  );
71
96
  }
72
- function z({ author: e, date: t }) {
73
- return !e && !t ? null : /* @__PURE__ */ o("div", { className: "flex-none truncate text-xs", children: [
97
+ function q({ author: e, date: t }) {
98
+ return !e && !t ? null : /* @__PURE__ */ o("div", { className: "min-w-0 truncate text-xs", children: [
74
99
  e ? /* @__PURE__ */ n("span", { className: "", children: e }) : null,
75
100
  e && t ? /* @__PURE__ */ n("span", { className: "mx-1", children: "·" }) : null,
76
101
  t ? /* @__PURE__ */ n("span", { className: "", children: t }) : null
77
102
  ] });
78
103
  }
79
- function M({ meta: e }) {
80
- return e?.length ? /* @__PURE__ */ n("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200", children: e.map((t, l) => /* @__PURE__ */ n(
104
+ function W({ meta: e }) {
105
+ return e?.length ? /* @__PURE__ */ n("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200", children: e.map((t, s) => /* @__PURE__ */ n(
81
106
  "span",
82
107
  {
83
108
  className: "inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1 dark:border-slate-700 dark:bg-slate-900",
84
109
  children: t
85
110
  },
86
- `${t}-${l}`
111
+ `${t}-${s}`
87
112
  )) }) : null;
88
113
  }
89
- function y({
114
+ function g({
90
115
  title: e,
91
116
  titleIcon: t,
92
- titleIconBgColor: l,
117
+ titleIconBgColor: s,
93
118
  source: r,
94
119
  className: i,
95
- titleClassName: s,
120
+ titleClassName: l,
96
121
  titleAction: a
97
122
  }) {
98
123
  return !e && !t && !r ? null : /* @__PURE__ */ o("div", { className: c("mb-2 flex min-w-0 items-center gap-2", i), children: [
@@ -101,9 +126,9 @@ function y({
101
126
  {
102
127
  className: c(
103
128
  "inline-flex h-6 w-6 flex-none items-center justify-center",
104
- l && "rounded-md text-white"
129
+ s && "rounded-md text-white"
105
130
  ),
106
- style: l ? { backgroundColor: l } : void 0,
131
+ style: s ? { backgroundColor: s } : void 0,
107
132
  children: t
108
133
  }
109
134
  ) : null,
@@ -112,7 +137,7 @@ function y({
112
137
  {
113
138
  className: c(
114
139
  "min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",
115
- s
140
+ l
116
141
  ),
117
142
  href: a.href,
118
143
  target: a.target,
@@ -120,21 +145,30 @@ function y({
120
145
  onClick: () => a.onClick?.(),
121
146
  children: e
122
147
  }
123
- ) : /* @__PURE__ */ n(
148
+ ) : a?.onClick ? /* @__PURE__ */ n(
124
149
  "button",
125
150
  {
126
151
  type: "button",
127
152
  className: c(
128
153
  "min-w-0 cursor-pointer bg-transparent p-0 text-left text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",
129
- s
154
+ l
155
+ ),
156
+ onClick: a.onClick,
157
+ children: e
158
+ }
159
+ ) : /* @__PURE__ */ n(
160
+ "span",
161
+ {
162
+ className: c(
163
+ "min-w-0 text-xl group-hover:underline group-hover:underline-offset-2",
164
+ l
130
165
  ),
131
- onClick: a?.onClick,
132
166
  children: e
133
167
  }
134
168
  ) : null
135
169
  ] });
136
170
  }
137
- function D(e) {
171
+ function J(e) {
138
172
  switch (e) {
139
173
  case "doc":
140
174
  case "word":
@@ -145,22 +179,22 @@ function D(e) {
145
179
  return "bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200";
146
180
  }
147
181
  }
148
- function V(e) {
182
+ function K(e) {
149
183
  switch (e) {
150
184
  case "xls":
151
- return /* @__PURE__ */ n(L, { className: "h-5 w-5" });
185
+ return /* @__PURE__ */ n(M, { className: "h-5 w-5" });
152
186
  case "ppt":
153
- return /* @__PURE__ */ n(S, { className: "h-5 w-5" });
187
+ return /* @__PURE__ */ n(z, { className: "h-5 w-5" });
154
188
  case "pdf":
155
189
  case "doc":
156
190
  case "word":
157
191
  case "text":
158
- return /* @__PURE__ */ n(T, { className: "h-5 w-5" });
192
+ return /* @__PURE__ */ n($, { className: "h-5 w-5" });
159
193
  default:
160
- return /* @__PURE__ */ n(G, { className: "h-5 w-5" });
194
+ return /* @__PURE__ */ n(R, { className: "h-5 w-5" });
161
195
  }
162
196
  }
163
- function w({
197
+ function A({
164
198
  fileType: e,
165
199
  typeIcon: t
166
200
  }) {
@@ -169,33 +203,33 @@ function w({
169
203
  {
170
204
  className: c(
171
205
  "inline-flex h-6 w-6 items-center justify-center rounded-md",
172
- D(e)
206
+ J(e)
173
207
  ),
174
- children: V(e)
208
+ children: K(e)
175
209
  }
176
210
  ) : null;
177
211
  }
178
- const H = _;
179
- function P({
212
+ const Q = H;
213
+ function X({
180
214
  item: e,
181
215
  onItemClick: t
182
216
  }) {
183
- const l = e.typeIcon ? /* @__PURE__ */ n(w, { typeIcon: e.typeIcon }) : e.fileType ? /* @__PURE__ */ n(w, { fileType: e.fileType }) : null, r = e.onClick || t ? () => {
217
+ const s = e.typeIcon ? /* @__PURE__ */ n(A, { typeIcon: e.typeIcon }) : e.fileType ? /* @__PURE__ */ n(A, { fileType: e.fileType }) : null, r = e.onClick || t ? () => {
184
218
  e.onClick?.(), t?.(e);
185
- } : void 0, i = e.onClick ? void 0 : e.href, s = /* @__PURE__ */ o("div", { className: "w-full", children: [
219
+ } : void 0, i = e.onClick ? void 0 : e.href, l = /* @__PURE__ */ o("div", { className: "min-w-0 w-full", children: [
186
220
  /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ n(
187
- y,
221
+ g,
188
222
  {
189
223
  className: "mb-0 w-full",
190
224
  title: e.title,
191
- titleIcon: l,
225
+ titleIcon: s,
192
226
  source: e.source,
193
227
  titleClassName: "truncate text-[#1A0CAB] dark:text-[#8AB4F8]"
194
228
  }
195
229
  ) }),
196
- /* @__PURE__ */ o("div", { className: "flex gap-3", children: [
230
+ /* @__PURE__ */ o("div", { className: "flex min-w-0 gap-3", children: [
197
231
  e.cover ? /* @__PURE__ */ n(
198
- "img",
232
+ y,
199
233
  {
200
234
  src: e.cover,
201
235
  alt: e.thumbnailAlt ?? e.title,
@@ -203,43 +237,43 @@ function P({
203
237
  loading: "lazy"
204
238
  }
205
239
  ) : null,
206
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1 flex flex-col justify-between", children: [
240
+ /* @__PURE__ */ o("div", { className: "min-w-0 flex-1 flex flex-col justify-between overflow-hidden", children: [
207
241
  e.summary ? /* @__PURE__ */ n("div", { className: "line-clamp-3 text-sm text-[#666]", children: e.summary }) : null,
208
242
  e.breadcrumbs?.length || e.author || e.date ? /* @__PURE__ */ o("div", { className: "mt-2 flex min-w-0 items-center gap-3 text-[#666]", children: [
209
- /* @__PURE__ */ n(v, { breadcrumbs: e.breadcrumbs }),
243
+ /* @__PURE__ */ n("div", { className: "min-w-0 shrink-0", children: /* @__PURE__ */ n(b, { breadcrumbs: e.breadcrumbs }) }),
210
244
  /* @__PURE__ */ n("span", { className: "h-3 w-px flex-none bg-[#666]", "aria-hidden": "true" }),
211
- /* @__PURE__ */ o("div", { className: "flex flex-none items-center gap-2", children: [
212
- /* @__PURE__ */ n(z, { author: e.author, date: e.date }),
213
- e.href ? /* @__PURE__ */ n("span", { className: "flex-none text-[#007EFF]", children: /* @__PURE__ */ n(H, { className: "h-3 w-3" }) }) : null
245
+ /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
246
+ /* @__PURE__ */ n(q, { author: e.author, date: e.date }),
247
+ e.href ? /* @__PURE__ */ n("span", { className: "flex-none text-[#007EFF]", children: /* @__PURE__ */ n(Q, { className: "h-3 w-3" }) }) : null
214
248
  ] })
215
- ] }) : /* @__PURE__ */ n(M, { meta: e.meta })
249
+ ] }) : /* @__PURE__ */ n(W, { meta: e.meta })
216
250
  ] })
217
251
  ] })
218
252
  ] });
219
- return !i && !r ? s : /* @__PURE__ */ n(
220
- b,
253
+ return !i && !r ? l : /* @__PURE__ */ n(
254
+ x,
221
255
  {
222
256
  href: i,
223
257
  target: e.target,
224
258
  rel: e.rel,
225
259
  onClick: r,
226
260
  className: c(
227
- "group block w-full rounded-xl border border-transparent px-6! py-4! text-left no-underline transition-colors",
261
+ "group block w-full rounded-xl border border-transparent p-4! text-left no-underline transition-colors",
228
262
  "hover:border-slate-200 hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",
229
263
  "dark:hover:border-slate-700 dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600",
230
264
  e.isActive ? "border-slate-200 bg-slate-100/70 dark:border-slate-700 dark:bg-slate-800/60" : ""
231
265
  ),
232
- children: s
266
+ children: l
233
267
  }
234
268
  );
235
269
  }
236
- function O({
270
+ function Y({
237
271
  item: e,
238
272
  onItemClick: t
239
273
  }) {
240
- const l = e.breadcrumbs ?? [e.sourceLabel, e.categoryLabel].filter(Boolean), r = e.onClick ? void 0 : e.href;
274
+ const s = e.breadcrumbs ?? [e.sourceLabel, e.categoryLabel].filter(Boolean), r = e.onClick ? void 0 : e.href;
241
275
  return /* @__PURE__ */ o(
242
- b,
276
+ x,
243
277
  {
244
278
  href: r,
245
279
  target: e.target,
@@ -253,7 +287,7 @@ function O({
253
287
  children: [
254
288
  /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700", children: /* @__PURE__ */ o("div", { className: "relative aspect-4/3 bg-slate-100 dark:bg-slate-800", children: [
255
289
  /* @__PURE__ */ n(
256
- "img",
290
+ y,
257
291
  {
258
292
  src: e.cover,
259
293
  alt: e.thumbnailAlt ?? e.title,
@@ -261,13 +295,13 @@ function O({
261
295
  loading: "lazy"
262
296
  }
263
297
  ),
264
- e.mediaType === "video" ? /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30", children: /* @__PURE__ */ n($, { className: "h-5 w-5 translate-x-px" }) }) }) : null
298
+ e.mediaType === "video" ? /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30", children: /* @__PURE__ */ n(D, { className: "h-5 w-5 translate-x-px" }) }) }) : null
265
299
  ] }) }),
266
300
  /* @__PURE__ */ o("div", { className: "mt-2", children: [
267
301
  /* @__PURE__ */ n("div", { className: "mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]", children: e.title }),
268
302
  e.matchCountText ? /* @__PURE__ */ n("div", { className: "mb-1 truncate text-xs text-[#666]", children: e.matchCountText }) : null,
269
- l.length ? /* @__PURE__ */ o("div", { className: "text-[#666]", children: [
270
- /* @__PURE__ */ n(v, { breadcrumbs: l }),
303
+ s.length ? /* @__PURE__ */ o("div", { className: "text-[#666]", children: [
304
+ /* @__PURE__ */ n(b, { breadcrumbs: s }),
271
305
  " "
272
306
  ] }) : null
273
307
  ] })
@@ -275,11 +309,11 @@ function O({
275
309
  }
276
310
  );
277
311
  }
278
- function q({
312
+ function Z({
279
313
  action: e,
280
314
  className: t
281
315
  }) {
282
- const l = c(
316
+ const s = c(
283
317
  "flex-none inline-flex items-center justify-center rounded-full border border-[#e8e8e8] bg-white",
284
318
  "h-7 px-12 text-sm text-[#666] no-underline transition",
285
319
  "cursor-pointer hover:border-slate-300 hover:bg-slate-50 hover:no-underline",
@@ -290,20 +324,20 @@ function q({
290
324
  return e.href ? /* @__PURE__ */ n(
291
325
  "a",
292
326
  {
293
- className: l,
327
+ className: s,
294
328
  href: e.href,
295
329
  target: e.target,
296
- rel: C(e.rel, e.target),
330
+ rel: B(e.rel, e.target),
297
331
  onClick: () => e.onClick?.(),
298
332
  children: e.label
299
333
  }
300
- ) : /* @__PURE__ */ n("button", { className: l, type: "button", onClick: e.onClick, children: e.label });
334
+ ) : /* @__PURE__ */ n("button", { className: s, type: "button", onClick: e.onClick, children: e.label });
301
335
  }
302
- function h({ action: e }) {
336
+ function v({ action: e }) {
303
337
  return e ? /* @__PURE__ */ o("div", { className: "mt-4 flex w-full items-center", children: [
304
338
  /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700", "aria-hidden": "true" }),
305
339
  /* @__PURE__ */ n(
306
- q,
340
+ Z,
307
341
  {
308
342
  action: e,
309
343
  className: c("px-4")
@@ -312,11 +346,11 @@ function h({ action: e }) {
312
346
  /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700", "aria-hidden": "true" })
313
347
  ] }) : null;
314
348
  }
315
- function J(e, t, l) {
349
+ function ee(e, t, s) {
316
350
  if (e.layout === "list")
317
351
  return /* @__PURE__ */ o("div", { className: c("space-y-6", e.className), children: [
318
- !l && /* @__PURE__ */ n(
319
- y,
352
+ !s && /* @__PURE__ */ n(
353
+ g,
320
354
  {
321
355
  title: e.title,
322
356
  titleIcon: e.titleIcon,
@@ -324,14 +358,14 @@ function J(e, t, l) {
324
358
  titleClassName: e.titleClassName
325
359
  }
326
360
  ),
327
- e.items.map((s) => /* @__PURE__ */ n(P, { item: s, onItemClick: t }, s.id)),
328
- /* @__PURE__ */ n(h, { action: e.footerAction })
361
+ e.items.map((l) => /* @__PURE__ */ n(X, { item: l, onItemClick: t }, l.id)),
362
+ /* @__PURE__ */ n(v, { action: e.footerAction })
329
363
  ] });
330
364
  if (e.layout === "mediaGrid") {
331
- const s = e.columns ?? 3, a = s === 2 ? "grid-cols-2" : s === 4 ? "grid-cols-4" : "grid-cols-3";
365
+ const l = e.columns ?? 3, a = l === 2 ? "grid-cols-2" : l === 4 ? "grid-cols-4" : "grid-cols-3";
332
366
  return /* @__PURE__ */ o("div", { className: c("px-6 py-3", e.className), children: [
333
- !l && /* @__PURE__ */ n(
334
- y,
367
+ !s && /* @__PURE__ */ n(
368
+ g,
335
369
  {
336
370
  title: e.title,
337
371
  titleIcon: e.titleIcon,
@@ -340,14 +374,14 @@ function J(e, t, l) {
340
374
  titleAction: e.footerAction
341
375
  }
342
376
  ),
343
- /* @__PURE__ */ n("div", { className: c("grid gap-3", a), children: e.items.map((u) => /* @__PURE__ */ n(O, { item: u, onItemClick: t }, u.id)) }),
344
- /* @__PURE__ */ n(h, { action: e.footerAction })
377
+ /* @__PURE__ */ n("div", { className: c("grid gap-3", a), children: e.items.map((u) => /* @__PURE__ */ n(Y, { item: u, onItemClick: t }, u.id)) }),
378
+ /* @__PURE__ */ n(v, { action: e.footerAction })
345
379
  ] });
346
380
  }
347
381
  const r = e.columns ?? 3, i = r === 2 ? "grid-cols-2" : r === 4 ? "grid-cols-4" : "grid-cols-3";
348
382
  return /* @__PURE__ */ o("div", { className: c("px-6 py-3", e.className), children: [
349
- !l && /* @__PURE__ */ n(
350
- y,
383
+ !s && /* @__PURE__ */ n(
384
+ g,
351
385
  {
352
386
  title: e.title,
353
387
  titleIcon: e.titleIcon,
@@ -356,22 +390,22 @@ function J(e, t, l) {
356
390
  titleAction: e.footerAction
357
391
  }
358
392
  ),
359
- /* @__PURE__ */ n("div", { className: c("grid gap-3", i), children: e.items.map((s) => /* @__PURE__ */ n(U, { item: s, onItemClick: t }, s.id)) }),
360
- /* @__PURE__ */ n(h, { action: e.footerAction })
393
+ /* @__PURE__ */ n("div", { className: c("grid gap-3", i), children: e.items.map((l) => /* @__PURE__ */ n(V, { item: l, onItemClick: t }, l.id)) }),
394
+ /* @__PURE__ */ n(v, { action: e.footerAction })
361
395
  ] });
362
396
  }
363
- function K(e) {
397
+ function te(e) {
364
398
  if (!e) return;
365
399
  const t = new Date(e);
366
400
  return Number.isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
367
401
  }
368
- function Q(e) {
402
+ function re(e) {
369
403
  const t = e?.trim().toLowerCase();
370
404
  if (t)
371
405
  return t === "pdf" ? "pdf" : t === "doc" || t === "docx" || t === "word" ? "doc" : t === "ppt" || t === "pptx" ? "ppt" : t === "xls" || t === "xlsx" || t === "excel" ? "xls" : t === "link" || t === "url" || t === "html" ? "link" : t === "txt" || t === "text" ? "text" : "unknown";
372
406
  }
373
- function x(e, t, l) {
374
- const r = e.thumbnail ?? e.cover ?? e.metadata?.thumbnail_link, i = e.summary ?? e.content, s = Q(e.metadata?.file_extension ?? e.type), a = e.source?.name, u = e.category ?? e.categories?.join(" / ") ?? "Categories", d = [a, u].filter(Boolean), m = e.last_updated_by?.user?.username ?? e.owner?.username, p = K(e.last_updated_by?.timestamp ?? e.metadata?.last_reviewed), f = e.metadata?.icon_link ?? e.icon, g = f ? /* @__PURE__ */ n("img", { src: f, alt: "", className: "h-5 w-5 rounded-sm object-contain" }) : void 0;
407
+ function N(e, t, s) {
408
+ const r = e.thumbnail ?? e.cover ?? e.metadata?.thumbnail_link, i = e.summary ?? e.content, l = re(e.metadata?.file_extension ?? e.type), a = e.source?.name, u = e.category ?? e.categories?.join(" / ") ?? "Categories", d = [a, u].filter(Boolean), f = e.last_updated_by?.user?.username ?? e.owner?.username, m = te(e.last_updated_by?.timestamp ?? e.metadata?.last_reviewed), p = e.metadata?.icon_link ?? e.icon, h = p ? /* @__PURE__ */ n(y, { src: p, alt: "", className: "h-5 w-5 rounded-sm object-contain" }) : void 0;
375
409
  return {
376
410
  type: "result",
377
411
  id: `${e.source?.id ?? e.url ?? e.title}-${t}`,
@@ -379,52 +413,53 @@ function x(e, t, l) {
379
413
  href: e.url,
380
414
  summary: i,
381
415
  cover: r,
382
- fileType: s,
383
- typeIcon: g,
416
+ fileType: l,
417
+ typeIcon: h,
384
418
  breadcrumbs: d.length ? d : void 0,
385
- author: m,
386
- date: p,
387
- onClick: l,
419
+ author: f,
420
+ date: m,
421
+ onClick: s,
388
422
  isActive: !!e.isActive
389
423
  };
390
424
  }
391
- function I({
425
+ function j({
392
426
  section: e,
393
427
  className: t,
394
- theme: l,
428
+ theme: s,
395
429
  footerAction: r,
396
430
  onRecordClick: i,
397
- onItemClick: s,
398
- hideHeader: a
431
+ onItemClick: l,
432
+ hideHeader: a,
433
+ requestHeaders: u
399
434
  }) {
400
- const u = W(B(e, i), r), d = R(l);
401
- return /* @__PURE__ */ n("div", { className: c(d === "dark" && "dark", t), children: J(u, s, a) });
435
+ const d = se(F(e, i), r), f = ne(s);
436
+ return /* @__PURE__ */ n(I.Provider, { value: u, children: /* @__PURE__ */ n("div", { className: c(f === "dark" && "dark", t), children: ee(d, l, a) }) });
402
437
  }
403
- function R(e) {
438
+ function ne(e) {
404
439
  if (e)
405
440
  return e === "light" ? "light" : e === "dark" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
406
441
  }
407
- function W(e, t) {
442
+ function se(e, t) {
408
443
  return !t || e.footerAction ? e : e.layout === "list" ? { ...e, footerAction: t } : e.layout === "mediaGrid" ? { ...e, footerAction: t } : { ...e, footerAction: t };
409
444
  }
410
- function ne(e) {
411
- return /* @__PURE__ */ n(I, { ...e });
445
+ function fe(e) {
446
+ return /* @__PURE__ */ n(j, { ...e });
412
447
  }
413
- function le(e) {
414
- return /* @__PURE__ */ n(I, { ...e });
448
+ function me(e) {
449
+ return /* @__PURE__ */ n(j, { ...e });
415
450
  }
416
- function B(e, t) {
417
- if (Array.isArray(e)) return X(e, t);
418
- if (Z(e)) return e;
419
- const l = e;
420
- if (l.type === "imageGroup" && Array.isArray(l.items)) {
421
- const r = l;
451
+ function F(e, t) {
452
+ if (Array.isArray(e)) return le(e, t);
453
+ if (ie(e)) return e;
454
+ const s = e;
455
+ if (s.type === "imageGroup" && Array.isArray(s.items)) {
456
+ const r = s;
422
457
  return r.items[0]?.type === "media" ? {
423
458
  type: "section",
424
459
  title: r.title,
425
460
  layout: "mediaGrid",
426
461
  items: r.items.filter(
427
- (s) => typeof s == "object" && !!s && s.type === "media"
462
+ (l) => typeof l == "object" && !!l && l.type === "media"
428
463
  ),
429
464
  columns: r.columns,
430
465
  footerAction: r.footerAction,
@@ -434,15 +469,15 @@ function B(e, t) {
434
469
  title: r.title,
435
470
  layout: "imageGrid",
436
471
  items: r.items.filter(
437
- (s) => typeof s == "object" && !!s && s.type === "image"
472
+ (l) => typeof l == "object" && !!l && l.type === "image"
438
473
  ),
439
474
  columns: r.columns,
440
475
  footerAction: r.footerAction,
441
476
  className: r.className
442
477
  };
443
478
  }
444
- if (l.type === "videoGroup" && Array.isArray(l.items)) {
445
- const r = l;
479
+ if (s.type === "videoGroup" && Array.isArray(s.items)) {
480
+ const r = s;
446
481
  return {
447
482
  type: "section",
448
483
  title: r.title,
@@ -453,15 +488,15 @@ function B(e, t) {
453
488
  className: r.className
454
489
  };
455
490
  }
456
- return l.type === "result" ? {
491
+ return s.type === "result" ? {
457
492
  type: "section",
458
493
  layout: "list",
459
494
  items: [e]
460
- } : l.type === "media" ? {
495
+ } : s.type === "media" ? {
461
496
  type: "section",
462
497
  layout: "mediaGrid",
463
498
  items: [e]
464
- } : l.type === "image" && typeof l.imageUrl == "string" ? {
499
+ } : s.type === "image" && typeof s.imageUrl == "string" ? {
465
500
  type: "section",
466
501
  layout: "imageGrid",
467
502
  items: [e]
@@ -469,7 +504,7 @@ function B(e, t) {
469
504
  type: "section",
470
505
  layout: "list",
471
506
  items: [
472
- x(
507
+ N(
473
508
  e,
474
509
  0,
475
510
  t ? () => t(e, 0) : void 0
@@ -477,74 +512,74 @@ function B(e, t) {
477
512
  ]
478
513
  };
479
514
  }
480
- function X(e, t) {
515
+ function le(e, t) {
481
516
  if (!e.length)
482
517
  return { type: "section", layout: "list", items: [] };
483
- if (e.every(F)) {
484
- if (e.every((s) => s.type === "result"))
518
+ if (e.every(G)) {
519
+ if (e.every((l) => l.type === "result"))
485
520
  return { type: "section", layout: "list", items: e };
486
- if (e.every((s) => s.type === "media"))
521
+ if (e.every((l) => l.type === "media"))
487
522
  return { type: "section", layout: "mediaGrid", items: e };
488
- if (e.every((s) => s.type === "image" && "imageUrl" in s))
523
+ if (e.every((l) => l.type === "image" && "imageUrl" in l))
489
524
  return { type: "section", layout: "imageGrid", items: e };
490
- if (e.length === 1) return B(e[0], t);
525
+ if (e.length === 1) return F(e[0], t);
491
526
  }
492
- const l = [], r = [];
493
- for (const [s, a] of e.entries()) {
494
- const u = Y(a, s, t);
495
- u ? l.push(u) : r.push(
496
- x(
527
+ const s = [], r = [];
528
+ for (const [l, a] of e.entries()) {
529
+ const u = ae(a, l, t);
530
+ u ? s.push(u) : r.push(
531
+ N(
497
532
  a,
498
- s,
499
- t ? () => t(a, s) : void 0
533
+ l,
534
+ t ? () => t(a, l) : void 0
500
535
  )
501
536
  );
502
537
  }
503
- return l.length && !r.length ? { type: "section", title: A(e, (a) => a.category ?? a.source?.name), layout: "mediaGrid", items: l } : { type: "section", title: A(e, (s) => s.category ?? s.source?.name), layout: "list", items: r };
538
+ return s.length && !r.length ? { type: "section", title: C(e, (a) => a.category ?? a.source?.name), layout: "mediaGrid", items: s } : { type: "section", title: C(e, (l) => l.category ?? l.source?.name), layout: "list", items: r };
504
539
  }
505
- function F(e) {
540
+ function G(e) {
506
541
  if (!e || typeof e != "object") return !1;
507
542
  const t = e;
508
543
  return t.type === "result" || t.type === "media" || t.type === "imageGroup" || t.type === "videoGroup" || t.type === "image" && typeof e.imageUrl == "string";
509
544
  }
510
- function Y(e, t, l) {
511
- const r = e, i = r.metadata, s = typeof i == "object" && i ? i.content_type : void 0, a = typeof s == "string" ? s.trim().toLowerCase() : typeof r.type == "string" ? r.type.trim().toLowerCase() : void 0;
545
+ function ae(e, t, s) {
546
+ const r = e, i = r.metadata, l = typeof i == "object" && i ? i.content_type : void 0, a = typeof l == "string" ? l.trim().toLowerCase() : typeof r.type == "string" ? r.type.trim().toLowerCase() : void 0;
512
547
  if (a !== "image" && a !== "video") return;
513
548
  const u = typeof r.id == "string" ? r.id : void 0, d = typeof r.thumbnail == "string" ? r.thumbnail : typeof r.cover == "string" ? r.cover : typeof r.metadata == "object" && r.metadata && typeof r.metadata.thumbnail_link == "string" ? r.metadata.thumbnail_link : void 0;
514
549
  if (!d) return;
515
- const m = typeof r.category == "string" ? r.category : Array.isArray(r.categories) ? r.categories.filter((j) => typeof j == "string").join(" / ") : void 0, p = typeof r.title == "string" ? r.title : "Untitled", f = typeof r.url == "string" ? r.url : void 0, g = typeof r.source == "object" && r.source && typeof r.source.name == "string" ? r.source.name : void 0, N = !!l && !F(e);
550
+ const f = typeof r.category == "string" ? r.category : Array.isArray(r.categories) ? r.categories.filter((T) => typeof T == "string").join(" / ") : void 0, m = typeof r.title == "string" ? r.title : "Untitled", p = typeof r.url == "string" ? r.url : void 0, h = typeof r.source == "object" && r.source && typeof r.source.name == "string" ? r.source.name : void 0, w = !!s && !G(e);
516
551
  return {
517
552
  type: "media",
518
- id: u ?? `${f ?? p}-0`,
553
+ id: u ?? `${p ?? m}-0`,
519
554
  mediaType: a === "video" ? "video" : "image",
520
- title: p,
521
- href: N ? void 0 : f,
555
+ title: m,
556
+ href: w ? void 0 : p,
522
557
  cover: d,
523
- sourceLabel: g,
524
- categoryLabel: m,
525
- breadcrumbs: [g, m].filter(Boolean),
526
- ...N ? { onClick: () => l(e, t) } : {}
558
+ sourceLabel: h,
559
+ categoryLabel: f,
560
+ breadcrumbs: [h, f].filter(Boolean),
561
+ ...w ? { onClick: () => s(e, t) } : {}
527
562
  };
528
563
  }
529
- function A(e, t) {
530
- const l = e[0], r = t(l);
564
+ function C(e, t) {
565
+ const s = e[0], r = t(s);
531
566
  if (r) {
532
567
  for (const i of e)
533
568
  if (t(i) !== r) return;
534
569
  return r;
535
570
  }
536
571
  }
537
- function Z(e) {
572
+ function ie(e) {
538
573
  if (!e || typeof e != "object") return !1;
539
574
  const t = e;
540
575
  return t.type === "section" && (t.layout === "list" || t.layout === "imageGrid" || t.layout === "mediaGrid") && Array.isArray(t.items);
541
576
  }
542
- function se(e, t) {
543
- const l = [];
577
+ function pe(e, t) {
578
+ const s = [];
544
579
  for (const r of e) {
545
- const i = l.length ? l[l.length - 1] : void 0;
580
+ const i = s.length ? s[s.length - 1] : void 0;
546
581
  if (r.type === "imageGroup") {
547
- r.items[0]?.type === "media" ? l.push({
582
+ r.items[0]?.type === "media" ? s.push({
548
583
  type: "section",
549
584
  title: r.title,
550
585
  titleIcon: /* @__PURE__ */ n(k, { className: "h-4 w-4" }),
@@ -555,7 +590,7 @@ function se(e, t) {
555
590
  columns: r.columns ?? t,
556
591
  footerAction: r.footerAction,
557
592
  className: r.className
558
- }) : l.push({
593
+ }) : s.push({
559
594
  type: "section",
560
595
  title: r.title,
561
596
  titleIcon: /* @__PURE__ */ n(k, { className: "h-4 w-4" }),
@@ -570,10 +605,10 @@ function se(e, t) {
570
605
  continue;
571
606
  }
572
607
  if (r.type === "videoGroup") {
573
- l.push({
608
+ s.push({
574
609
  type: "section",
575
610
  title: r.title,
576
- titleIcon: /* @__PURE__ */ n(E, { className: "h-4 w-4" }),
611
+ titleIcon: /* @__PURE__ */ n(O, { className: "h-4 w-4" }),
577
612
  titleIconBgColor: "#1784FC",
578
613
  titleClassName: "text-[#1A0CAB] dark:text-[#8AB4F8]",
579
614
  layout: "mediaGrid",
@@ -589,7 +624,7 @@ function se(e, t) {
589
624
  i.items.push(r);
590
625
  continue;
591
626
  }
592
- l.push({
627
+ s.push({
593
628
  type: "section",
594
629
  layout: "list",
595
630
  items: [r]
@@ -601,7 +636,7 @@ function se(e, t) {
601
636
  i.items.push(r);
602
637
  continue;
603
638
  }
604
- l.push({
639
+ s.push({
605
640
  type: "section",
606
641
  layout: "mediaGrid",
607
642
  ...t ? { columns: t } : {},
@@ -613,22 +648,22 @@ function se(e, t) {
613
648
  i.items.push(r);
614
649
  continue;
615
650
  }
616
- l.push({
651
+ s.push({
617
652
  type: "section",
618
653
  layout: "imageGrid",
619
654
  ...t ? { columns: t } : {},
620
655
  items: [r]
621
656
  });
622
657
  }
623
- return l;
658
+ return s;
624
659
  }
625
- function ae(e) {
626
- return e.map((t, l) => x(t, l));
660
+ function he(e) {
661
+ return e.map((t, s) => N(t, s));
627
662
  }
628
663
  export {
629
- ne as SearchResultsImageGroup,
630
- le as SearchResultsVideoGroup,
631
- I as default,
632
- se as itemsToSections,
633
- ae as recordsToItems
664
+ fe as SearchResultsImageGroup,
665
+ me as SearchResultsVideoGroup,
666
+ j as default,
667
+ pe as itemsToSections,
668
+ he as recordsToItems
634
669
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinilabs/search-results",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },