@modoitaliano/giorgia 0.1.108 → 0.1.110
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/README.md +4 -0
- package/dist/components/live-program/radio/ModoItalianoPodcastPlayer.js +26 -5
- package/dist/cronkite-manifest.json +1 -1
- package/dist/live-program-page/live-program-manifest.json +3 -3
- package/dist/live-program-page/live-program.js +1 -1
- package/dist/schemas/canonical-document.schema.json +60 -4
- package/dist/types/canonical-document-schema.generated.d.ts +116 -0
- package/dist/types/canonical-document-schema.generated.js +116 -0
- package/dist/types/canonical-document.generated.d.ts +32 -0
- package/package.json +1 -1
- package/src/templates/layouts/link-in-bio.hbs +1 -1
- package/src/templates/partials/blocks/image.hbs +1 -1
- package/src/templates/partials/blocks/live-update.hbs +1 -1
- package/src/templates/partials/components/article-main.hbs +2 -8
- package/src/templates/partials/components/category/main-grid.hbs +3 -2
- package/src/templates/partials/components/category/more-grid.hbs +1 -1
- package/src/templates/partials/components/home/landing.hbs +4 -2
- package/src/templates/partials/components/home/must-read.hbs +3 -3
- package/src/templates/partials/components/live-story/main.hbs +5 -28
- package/src/templates/partials/components/snack.hbs +6 -2
- package/src/templates/partials/shell/doc-start-standard.hbs +1 -1
package/README.md
CHANGED
|
@@ -194,6 +194,10 @@ The TV graphics components live in `src/components/live-program/tv/`: `ModoItali
|
|
|
194
194
|
|
|
195
195
|
TV images ship in the bundle under `modoitaliano/tv/` and are referenced bundle-relative through `MODOITALIANO_ASSETS.tv` (`src/components/live-program/assets.ts`), so they load when the bundle is served from a sub-path. Only `reloj.png`, the `ClockWidget` plate (byte-identical to `gaulatti/alcantara` `frontend/public/reloj.png` at `f13ee4d`, sha256 `3b62d40e…ce04823`), is carried; `ClockWidget` sets it as an inline `backgroundImage` so Vite does not resolve it at build time. Alcantara's three ModoRadio marks (`bug-sm.svg`, `bug-big.svg`, `reloj-modoradio_full_negro.svg`) are retired from Giorgia and are not bundled: `LogoWidget` draws only a scene-supplied `logoUrl` and draws nothing without one (so `CronicaLayout`, which passes none, shows no logo), and `RelojClone` draws its analogue clock without the wordmark plate beneath it. `src/live-program-bundle.test.ts` builds the bundle with the real config and checks that none of the retired marks or their names are in the output and that the manifest lists `reloj.png` with its sha256.
|
|
196
196
|
|
|
197
|
+
## Image variants
|
|
198
|
+
|
|
199
|
+
`featuredImage`, and the image blocks of a body, may carry the original's `width` and `height` (integers, pixels) and `variants`, an array of `{ url, width, height }` sorted by width ascending and holding only variants that exist. All three are optional and the original `url` is unchanged. When `variants` is present the templates emit `srcset` (the variants plus the original, when its width is known) and `sizes` for the slot, with `width` and `height` set; when it is absent they emit the original `url` exactly as before. Images below the fold are `loading='lazy'`; the lead image of a page is not, and carries `fetchpriority='high'`. The markup is written out at each image (Cronkite's contract lets a template name a partial only once, so a shared partial cannot serve a template with several images). Unknown extra fields are ignored. CSS background images (the editorial hero and the landing story card) cannot use `srcset` and still load the original.
|
|
200
|
+
|
|
197
201
|
## Publish flow
|
|
198
202
|
|
|
199
203
|
- CI validates typecheck, unit tests, and package build on pull requests and `main` pushes.
|
|
@@ -36,7 +36,13 @@ export const ModoItalianoPodcastPlayer = ({ show = true, coverUrl = '', episodeT
|
|
|
36
36
|
return;
|
|
37
37
|
audioRef.current.volume = Math.max(0, Math.min(1, masterGain));
|
|
38
38
|
audioRef.current.muted = masterGain <= 0.0001;
|
|
39
|
-
|
|
39
|
+
// `show` re-applies the gain to the audio element mounted when the player
|
|
40
|
+
// is shown (gaulatti/alcantara#192).
|
|
41
|
+
}, [masterGain, show]);
|
|
42
|
+
// Every effect that binds to the canvases or the audio element depends on
|
|
43
|
+
// `show`: those elements exist only while the player is shown, so a player
|
|
44
|
+
// mounted hidden and shown later (RadioSceneLayers keys it by component
|
|
45
|
+
// type) binds them when they appear (gaulatti/alcantara#192).
|
|
40
46
|
// ── Background canvas animation ──────────────────────────────────────────
|
|
41
47
|
// Smooth animated mesh gradient: 4 color orbs drifting on slow sine paths,
|
|
42
48
|
// blended into a single radial gradient fill each frame.
|
|
@@ -85,7 +91,7 @@ export const ModoItalianoPodcastPlayer = ({ show = true, coverUrl = '', episodeT
|
|
|
85
91
|
};
|
|
86
92
|
bgRafRef.current = requestAnimationFrame(draw);
|
|
87
93
|
return () => cancelAnimationFrame(bgRafRef.current);
|
|
88
|
-
}, []);
|
|
94
|
+
}, [show]);
|
|
89
95
|
// ── Waveform visualizer ──────────────────────────────────────────────────
|
|
90
96
|
// When playing: mirrored FFT bar visualizer.
|
|
91
97
|
// When paused / no audio: gentle idle sine wave.
|
|
@@ -157,7 +163,7 @@ export const ModoItalianoPodcastPlayer = ({ show = true, coverUrl = '', episodeT
|
|
|
157
163
|
};
|
|
158
164
|
vizRafRef.current = requestAnimationFrame(draw);
|
|
159
165
|
return () => cancelAnimationFrame(vizRafRef.current);
|
|
160
|
-
}, []);
|
|
166
|
+
}, [show]);
|
|
161
167
|
// ── Audio events ─────────────────────────────────────────────────────────
|
|
162
168
|
useEffect(() => {
|
|
163
169
|
const audio = audioRef.current;
|
|
@@ -182,7 +188,7 @@ export const ModoItalianoPodcastPlayer = ({ show = true, coverUrl = '', episodeT
|
|
|
182
188
|
audio.removeEventListener('pause', onPause);
|
|
183
189
|
audio.removeEventListener('ended', onEnded);
|
|
184
190
|
};
|
|
185
|
-
}, []);
|
|
191
|
+
}, [show]);
|
|
186
192
|
// ── Web Audio analyser setup ─────────────────────────────────────────────
|
|
187
193
|
const initAnalyser = () => {
|
|
188
194
|
const audio = audioRef.current;
|
|
@@ -228,7 +234,22 @@ export const ModoItalianoPodcastPlayer = ({ show = true, coverUrl = '', episodeT
|
|
|
228
234
|
};
|
|
229
235
|
audio.addEventListener('canplay', tryPlay, { once: true });
|
|
230
236
|
return () => { audio.removeEventListener('canplay', tryPlay); };
|
|
231
|
-
}, [audioUrl]);
|
|
237
|
+
}, [audioUrl, show]);
|
|
238
|
+
// The audio graph belongs to the audio element it was built on. Hiding the
|
|
239
|
+
// player unmounts that element, so the graph is closed and rebuilt for the
|
|
240
|
+
// element mounted when the player is shown again (gaulatti/alcantara#192).
|
|
241
|
+
useEffect(() => {
|
|
242
|
+
if (!show)
|
|
243
|
+
return;
|
|
244
|
+
return () => {
|
|
245
|
+
void audioCtxRef.current?.close();
|
|
246
|
+
audioCtxRef.current = null;
|
|
247
|
+
analyserRef.current = null;
|
|
248
|
+
sourceRef.current = null;
|
|
249
|
+
dataArrayRef.current = null;
|
|
250
|
+
timeArrayRef.current = null;
|
|
251
|
+
};
|
|
252
|
+
}, [show]);
|
|
232
253
|
// ── Cleanup ──────────────────────────────────────────────────────────────
|
|
233
254
|
useEffect(() => {
|
|
234
255
|
return () => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"id": "modoitaliano.live-program",
|
|
6
6
|
"name": "Modo Italiano Live Program",
|
|
7
7
|
"package": "@modoitaliano/giorgia",
|
|
8
|
-
"bundleVersion": "0.1.
|
|
8
|
+
"bundleVersion": "0.1.110",
|
|
9
9
|
"entrypoint": "index.html",
|
|
10
10
|
"capabilities": [
|
|
11
11
|
"audio.playback",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"key": "live-program.js",
|
|
80
|
-
"bytes":
|
|
80
|
+
"bytes": 332344,
|
|
81
81
|
"contentType": "application/javascript; charset=utf-8",
|
|
82
|
-
"sha256": "
|
|
82
|
+
"sha256": "8f4b6b4deaa307dd2030f5e2f177d4fda13b167d440219d28d6aab9035fb8765"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"key": "modoitaliano/audio/pipes.ogg",
|
|
@@ -63,7 +63,7 @@ Details: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image`);ret
|
|
|
63
63
|
from { transform: translateX(1920px); }
|
|
64
64
|
to { transform: translateX(-100%); }
|
|
65
65
|
}
|
|
66
|
-
`,ct=new Set([`es`]),lt=new Map,ut=`__default__`;function dt(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();if(!t)return null;let n=t.split(`-`)[0];return ct.has(n)?n:null}function j(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){let e=dt(n);e&&t.add(e)}return[...t]}function ft(e){let t=e,n=dt(t.language)??dt(t.lang)??dt(t.locale);if(n)return n;for(let t of e.posts||[]){let e=t,n=dt(e.language)??dt(e.lang)??dt(e.locale);if(n)return n}return null}function pt(e,t){if(t.length===0)return e;let n=new Set(t);return e.filter(e=>{let t=ft(e);return t?n.has(t):!0})}function mt(e,t){return`${e??`any`}__${t.length>0?[...t].sort().join(`,`):`all`}`}async function ht(e={}){let t=j(e.allowedLanguages),n=dt(e.language),r=mt(n??void 0,t),i=new URL(`https://api.monitor.gaulatti.com/events`);n&&i.searchParams.set(`language`,n);let a=await fetch(i.toString());if(!a.ok)throw Error(`Failed to fetch events: ${a.status}`);let o=pt((await a.json()).events||[],t),s=lt.get(r)?.events??null,c;if(s&&s.length>0){let e=new Map;s.forEach(t=>{e.set(t.uuid,t)}),o.forEach(t=>{let n=e.get(t.uuid);if(!n){e.set(t.uuid,t);return}let r=new Map;n.posts.forEach(e=>{r.set(e.uuid,e)}),t.posts.forEach(e=>{r.set(e.uuid,e)}),e.set(t.uuid,{...n,title:t.title,summary:t.summary,status:t.status,updated_at:t.updated_at,posts_count:t.posts_count,posts:Array.from(r.values()).sort((e,t)=>t.relevance-e.relevance)})}),c=Array.from(e.values()).sort((e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime())}else c=o;let l=new Date;return lt.set(r,{events:c,lastFetchTime:l}),ut=r,c}function gt(){return lt.get(ut)?.events??null}function _t(e,t){if(e.length!==t.length)return!0;let n=new Map(e.map(e=>[e.uuid,e])),r=new Map(t.map(e=>[e.uuid,e]));for(let e of r.keys())if(!n.has(e))return!0;for(let e of n.keys())if(!r.has(e))return!0;for(let[e,t]of r.entries()){let r=n.get(e);if(r.title!==t.title||r.status!==t.status||r.posts_count!==t.posts_count||r.posts.length!==t.posts.length)return!0;let i=new Map(r.posts.map(e=>[e.uuid,e]));for(let e of t.posts)if(!i.has(e.uuid))return!0}return!1}var vt=`data:image/svg+xml,%3csvg%20width='104'%20height='20'%20viewBox='0%200%20104%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1327_9581)'%3e%3cpath%20d='M55.4628%202.66119C51.239%202.55563%2048.8707%206.32132%2048.9409%2010.035C48.967%2019.8327%2061.8386%2019.728%2061.8524%209.95667C61.899%206.3877%2059.6156%202.55963%2055.4636%202.66119M55.5526%200.0630266C66.6273%20-0.410384%2069.6364%2014.59%2060.2214%2018.9107C53.4464%2022.0382%2044.7473%2018.1078%2044.9832%2010.1534C44.8257%204.20857%2049.6691%20-0.0617235%2055.5518%200.0622269M103.861%2010.6244H88.8853C88.8176%2017.7831%2097.0718%2018.2454%20102.102%2016.2669L102.806%2018.7484C98.658%2020.4669%2091.1556%2020.6596%2087.9686%2017.2985C83.6125%2013.2969%2084.4811%204.44527%2089.8331%201.44008C97.3959%20-2.53753%20105.138%202.21257%20103.861%2010.6244ZM88.9302%208.14619H100.255C100.287%200.417285%2089.7001%200.837117%2088.9302%208.14619ZM66.5253%2019.5344C66.4714%2015.7336%2066.6763%204.02944%2066.3498%200.456469H69.7793L69.9989%203.60561C72.0675%200.50365%2076.6473%20-0.853407%2080.4026%200.713166C83.3423%201.99505%2084.6362%204.59801%2084.6656%208.17898V19.5344H80.7944V8.53564C80.8042%205.3785%2079.4556%202.91149%2075.8595%202.89629C73.226%202.90189%2070.9238%204.72996%2070.4609%207.19457C70.3173%207.05543%2070.4275%2019.2561%2070.3948%2019.5352H66.5253V19.5344Z'%20fill='%2300A3FD'/%3e%3cpath%20d='M14.5077%2016.9908C9.63975%2018%203.69666%2016.7764%203.70483%2010.6349H18.7136C19.9969%202.20228%2012.2317%20-2.55662%204.6567%201.42978C-0.709223%204.44058%20-1.58028%2013.3138%202.78806%2017.3234C5.98328%2020.6917%2013.5011%2020.4982%2017.6572%2018.7756L16.9519%2016.2886C16.2621%2016.5717%2015.4481%2016.806%2014.5085%2016.99L14.5077%2016.9908ZM4.54894%205.62171C5.89267%202.58772%2010.4602%201.58572%2013.0619%203.50655C14.5379%204.59092%2015.1428%206.51335%2015.0987%208.1487H3.74973C3.84687%207.32023%204.11382%206.47817%204.54894%205.62171Z'%20fill='%2300A3FD'/%3e%3cpath%20d='M34.3213%2014.9806C34.0054%2010.8182%2035.6903%203.80745%2031.2101%201.22369C28.1741%20-0.677954%2022.3339%20-0.0925881%2019.1395%201.70589L20.0211%204.03696C22.3143%202.65751%2026.5953%201.95219%2028.8296%203.39082C30.237%204.32644%2030.5464%205.97059%2030.4852%207.39881C24.1739%207.54756%2018.0953%208.35763%2017.6406%2014.5096C17.7174%2017.8882%2020.4424%2019.9914%2024.169%2019.9994C26.7945%2019.9914%2029.2288%2018.9886%2030.7056%2017.1581H30.8387L31.1465%2019.5643H34.6299C34.3915%2018.1289%2034.3205%2016.5128%2034.3205%2014.9806H34.3213ZM30.5742%2013.1229C30.4893%2015.7467%2027.8916%2017.4404%2025.1413%2017.4356C21.5542%2017.6179%2020.2375%2013.3572%2022.9257%2011.3268C24.9389%209.90741%2028.0304%209.77307%2030.5742%209.80425V13.1229Z'%20fill='%2300A3FD'/%3e%3cpath%20d='M46.1687%200.074947C43.2951%20-0.176952%2040.6672%201.56315%2039.6631%204.23408H39.5317L39.3554%200.445199H35.9609C36.2785%204.42681%2036.0883%2015.3904%2036.1373%2019.5655H40.0174C40.064%2018.4132%2039.8893%208.61633%2040.1489%207.75028C40.6909%204.63792%2043.5596%202.82665%2046.6822%203.40402V0.128526L46.1695%200.074947H46.1687Z'%20fill='%2300A3FD'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1327_9581'%3e%3crect%20width='104'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`;function yt(e){if(e==null)return``;if(typeof e==`number`&&Number.isFinite(e))return e.toLocaleString(`en-US`);let t=String(e).trim();return t?/^\d+$/.test(t)?Number(t).toLocaleString(`en-US`):t:``}var bt=({rank:e=``,spins:t=``,label:n=`EARONE`})=>{let r=yt(e),i=yt(t),[a,o]=_.useState(r),[s,c]=_.useState(i),[l,u]=_.useState(!1);return _.useEffect(()=>{if(r===a&&i===s)return;u(!0);let e=window.setTimeout(()=>{o(r),c(i),u(!1)},180);return()=>window.clearTimeout(e)},[r,i,a,s]),!r&&!i&&!a&&!s?null:(0,T.jsxs)(`div`,{className:`earone-box`,children:[(0,T.jsx)(`div`,{className:`earone-brand`,children:(0,T.jsx)(`img`,{src:vt,alt:n,className:`earone-brand-image`})}),(0,T.jsx)(`div`,{className:`earone-live-badge`,children:`EN TIEMPO REAL`}),(0,T.jsxs)(`div`,{className:`earone-metric${l?` earone-metric--transitioning`:``}`,children:[(0,T.jsx)(`span`,{className:`earone-metric-label`,children:`RANKING`}),(0,T.jsx)(`span`,{className:`earone-metric-value`,children:a?`#${a}`:`--`})]}),(0,T.jsx)(`div`,{className:`earone-divider`,"aria-hidden":`true`}),(0,T.jsxs)(`div`,{className:`earone-metric${l?` earone-metric--transitioning`:``}`,children:[(0,T.jsx)(`span`,{className:`earone-metric-label`,children:`REPRODUCCIONES EN RADIO HOY`}),(0,T.jsx)(`span`,{className:`earone-metric-value`,children:s||`--`})]})]})},xt=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20595.27%20206.59'%20fill='%23fff'%3e%3cpath%20d='M160.26%20103.3c0%2044.25-35.88%2080.13-80.12%2080.13S0%20147.55%200%20103.3s35.87-80.14%2080.14-80.14c44.25%200%2080.12%2035.88%2080.12%2080.14Z'/%3e%3crect%20x='211.95'%20y='23.16'%20width='160.26'%20height='160.27'/%3e%3cpath%20d='m415.46%20181.15%2089.9-155.71%2089.91%20155.71H415.46Z'/%3e%3c/svg%3e`,St={signal:`#ed0076`,navy:`#0a1234`,font:`'Barlow Condensed', 'Encode Sans', system-ui, sans-serif`};function Ct(e){let t=Number.isFinite(e)?Math.max(0,Math.floor(e)):0;return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}function wt({show:e=!0,coverUrl:t=``,episodeTitle:n=``,showName:r=``,audioUrl:i=``,masterGain:a=1}){let o=(0,_.useRef)(null),s=(0,_.useRef)(null),c=(0,_.useRef)(null),l=(0,_.useRef)(null),[u,d]=(0,_.useState)(0),[f,p]=(0,_.useState)(0),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1);async function x(){let e=o.current;if(!(!e||!i))try{if(!c.current){let t=new AudioContext,n=t.createAnalyser();n.fftSize=256,n.smoothingTimeConstant=.85,t.createMediaElementSource(e).connect(n),n.connect(t.destination),c.current=t,l.current=n}await c.current.resume(),await e.play(),h(!1)}catch{e.error?v(!0):h(!0)}}return(0,_.useEffect)(()=>{let e=o.current;e.volume=Number.isFinite(a)?Math.max(0,Math.min(1,a)):0,e.muted=a<=1e-4},[a,e]),(0,_.useEffect)(()=>{let e=o.current;return e.pause(),d(0),p(0),h(!1),v(!1),e.load(),()=>e.pause()},[i,e]),(0,_.useEffect)(()=>{if(!e)return;let t=s.current,n=t?.getContext(`2d`);if(!t||!n)return;let r=window.matchMedia(`(prefers-reduced-motion: reduce)`),i=0,a=new Uint8Array(128),c=()=>{if(n.clearRect(0,0,t.width,t.height),n.fillStyle=St.signal,o.current&&!o.current.paused&&l.current&&!r.matches){l.current.getByteFrequencyData(a);for(let e=0;e<80;e++){let t=Math.max(2,a[e]/255*100);n.globalAlpha=.5+t/200,n.fillRect(e*12,(120-t)/2,5,t)}}else n.globalAlpha=.5,n.fillRect(0,59,t.width,2);i=window.requestAnimationFrame(c)};return c(),()=>window.cancelAnimationFrame(i)},[e]),(0,_.useEffect)(()=>()=>{c.current?.close(),c.current=null,l.current=null},[]),(0,T.jsxs)(`div`,{hidden:!e,"aria-label":`Modo Italiano Giorgia podcast player`,style:{position:`absolute`,inset:0,overflow:`hidden`,color:`#fff`,fontFamily:St.font,display:e?`flex`:`none`,alignItems:`center`,justifyContent:`center`},children:[t&&(0,T.jsx)(`img`,{src:t,alt:`Episode cover`,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,objectFit:`cover`,objectPosition:`center center`,filter:`saturate(0.84) contrast(1.07)`}}),(0,T.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,inset:0,background:`linear-gradient(180deg, rgba(10,18,52,0.48), rgba(10,18,52,0.04) 30%, rgba(10,18,52,0.66) 58%, rgba(10,18,52,0.98) 100%), linear-gradient(90deg, rgba(10,18,52,0.32), transparent 70%)`}}),(0,T.jsx)(`audio`,{ref:o,src:i||void 0,crossOrigin:`anonymous`,preload:`metadata`,onCanPlay:()=>{e&&x()},onTimeUpdate:e=>d(e.currentTarget.currentTime),onDurationChange:e=>p(Number.isFinite(e.currentTarget.duration)?e.currentTarget.duration:0),onError:()=>v(!0)}),(0,T.jsxs)(`section`,{"aria-label":`Episode artwork and title`,style:{position:`absolute`,inset:0},children:[(0,T.jsx)(`img`,{src:xt,alt:`ModoItaliano`,style:{position:`absolute`,top:`69px`,left:`96px`,width:`222px`,height:`auto`,objectFit:`contain`,filter:`brightness(0) invert(1) drop-shadow(0 15px 51px rgba(0,0,0,0.72))`}}),!t&&(0,T.jsx)(`p`,{style:{position:`absolute`,top:`180px`,left:`110px`,fontSize:`32px`},children:`No cover selected`}),(0,T.jsxs)(`div`,{style:{position:`absolute`,left:`110px`,right:`110px`,bottom:`280px`,paddingLeft:`44px`,borderLeft:`10px solid ${St.signal}`},children:[(0,T.jsx)(`p`,{style:{margin:`0 0 26px`,fontFamily:St.font,fontSize:`34px`,fontWeight:600,color:`#fff`,letterSpacing:`0.12em`,textTransform:`uppercase`,overflowWrap:`anywhere`},children:r}),(0,T.jsx)(`h1`,{style:{margin:0,maxWidth:`1560px`,fontFamily:St.font,fontSize:n.length>90?`100px`:n.length>60?`124px`:`164px`,lineHeight:.92,fontWeight:700,letterSpacing:`-0.025em`,textTransform:`uppercase`,textWrap:`balance`,overflowWrap:`anywhere`,whiteSpace:`pre-wrap`,textShadow:`0 8px 36px rgba(0,0,0,0.45)`},children:n})]})]}),(0,T.jsxs)(`div`,{style:{position:`absolute`,left:`110px`,right:`110px`,bottom:`64px`,display:`flex`,flexDirection:`column`,gap:`18px`},children:[(0,T.jsx)(`canvas`,{ref:s,width:960,height:120,"aria-hidden":`true`,style:{width:`100%`,height:`70px`,display:`block`,opacity:.85}}),(0,T.jsxs)(`div`,{style:{position:`relative`,height:`20px`,display:`flex`,alignItems:`center`,outline:y?`2px solid white`:`none`,outlineOffset:`5px`},children:[(0,T.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,left:0,right:0,height:`3px`,background:`rgba(255,255,255,0.22)`},children:(0,T.jsx)(`div`,{style:{height:`100%`,width:`${f>0?Math.min(100,u/f*100):0}%`,background:St.signal}})}),(0,T.jsx)(`input`,{"aria-label":`Episode progress`,type:`range`,min:0,max:f||0,step:.1,value:Math.min(u,f),disabled:!f,onFocus:()=>b(!0),onBlur:()=>b(!1),onChange:e=>{o.current.currentTime=Number(e.target.value)},style:{position:`relative`,width:`100%`,height:`20px`,margin:0,opacity:0,cursor:`pointer`}})]}),(0,T.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontSize:`30px`,fontVariantNumeric:`tabular-nums`,color:`rgba(255,255,255,0.7)`},children:[(0,T.jsx)(`span`,{children:Ct(u)}),(0,T.jsx)(`span`,{children:Ct(f)})]}),g?(0,T.jsx)(`p`,{role:`alert`,style:{margin:0,fontSize:`28px`},children:`Unable to play this audio.`}):m?(0,T.jsx)(`button`,{type:`button`,onClick:()=>void x(),style:{alignSelf:`flex-start`,border:`1px solid ${St.signal}`,color:`#fff`,background:St.navy,padding:`8px 18px`,fontFamily:St.font,fontSize:`28px`},children:`Start playback`}):null]})]})}var Tt=`#e91e8c`,Et=`'Barlow Condensed', 'Encode Sans', system-ui, sans-serif`,Dt=`'Outfit', 'Encode Sans', system-ui, sans-serif`;function Ot(e){if(!Number.isFinite(e)||e<0)return`0:00`;let t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${String(n).padStart(2,`0`)}`}var kt=({show:e=!0,coverUrl:t=``,episodeTitle:n=``,showName:r=``,audioUrl:i=``,masterGain:a=1})=>{let o=(0,_.useRef)(null),s=(0,_.useRef)(null),c=(0,_.useRef)(null),l=(0,_.useRef)(null),u=(0,_.useRef)(null),d=(0,_.useRef)(null),f=(0,_.useRef)(null),p=(0,_.useRef)(null),m=(0,_.useRef)(null),h=(0,_.useRef)(null);(0,_.useRef)(0);let g=(0,_.useRef)(!1),v=(0,_.useRef)(0),y=(0,_.useRef)(0),[b,x]=(0,_.useState)(!1),[ee,te]=(0,_.useState)(0),[S,ne]=(0,_.useState)(0),[re,ie]=(0,_.useState)(!1);(0,_.useEffect)(()=>{o.current&&(o.current.volume=Math.max(0,Math.min(1,a)),o.current.muted=a<=1e-4)},[a]),(0,_.useEffect)(()=>{let e=s.current;if(!e)return;let t=[{x:.15,y:.35,r:.7,hue:82,sat:100,spd:31e-5,phase:0},{x:.8,y:.25,r:.6,hue:22,sat:100,spd:27e-5,phase:1.1},{x:.55,y:.75,r:.55,hue:330,sat:90,spd:19e-5,phase:2.3},{x:.1,y:.8,r:.5,hue:48,sat:100,spd:23e-5,phase:3.7}],n=r=>{let i=e.width,a=e.height,o=e.getContext(`2d`,{alpha:!0});if(!o)return;o.clearRect(0,0,i,a),o.globalCompositeOperation=`source-over`,o.fillStyle=`rgba(10, 18, 52, 0.55)`,o.fillRect(0,0,i,a);for(let e of t){let t=r*e.spd+e.phase,n=(e.x+Math.sin(t)*.22+Math.cos(t*.6)*.1)*i,s=(e.y+Math.cos(t*.8)*.18+Math.sin(t*.4)*.12)*a,c=e.r*Math.max(i,a),l=o.createRadialGradient(n,s,0,n,s,c);l.addColorStop(0,`hsla(${e.hue}, ${e.sat}%, 60%, 0.55)`),l.addColorStop(.5,`hsla(${e.hue}, ${e.sat}%, 40%, 0.2)`),l.addColorStop(1,`hsla(${e.hue}, ${e.sat}%, 20%, 0)`),o.globalCompositeOperation=`screen`,o.fillStyle=l,o.fillRect(0,0,i,a)}o.globalCompositeOperation=`source-over`;let s=o.createRadialGradient(i/2,a/2,a*.1,i/2,a/2,a*.85);s.addColorStop(0,`rgba(0,0,0,0)`),s.addColorStop(1,`rgba(0,0,0,0.72)`),o.fillStyle=s,o.fillRect(0,0,i,a),f.current=requestAnimationFrame(n)};return f.current=requestAnimationFrame(n),()=>cancelAnimationFrame(f.current)},[]),(0,_.useEffect)(()=>{let e=c.current;if(!e)return;let t=0,n=()=>{let r=e.getContext(`2d`);if(!r)return;let i=e.width,a=e.height;r.clearRect(0,0,i,a);let o=l.current,s=m.current;if(h.current,o&&s&&g.current){o.getByteFrequencyData(s);let e=Math.floor(s.length*.6),t=i/e,n=a/2;for(let i=0;i<e;i++){let a=s[i]/255,o=a*n*.95;o<1||(r.fillStyle=`hsla(${310-i/e*200}, 90%, 60%, ${.5+a*.5})`,r.fillRect(i*t,n-o,Math.max(1,t-1),o),r.fillRect(i*t,n,Math.max(1,t-1),o))}r.fillStyle=`rgba(255,255,255,0.07)`,r.fillRect(0,n-.5,i,1)}else{t+=.04;let e=a/2,n=6+Math.sin(t*.7)*4;r.beginPath(),r.strokeStyle=`rgba(233,30,140,0.18)`,r.lineWidth=8;for(let a=0;a<=i;a+=2){let o=e+Math.sin(a/i*Math.PI*8+t*2)*n;a===0?r.moveTo(a,o):r.lineTo(a,o)}r.stroke(),r.beginPath(),r.strokeStyle=`rgba(233,30,140,0.6)`,r.lineWidth=1.5;for(let a=0;a<=i;a+=2){let o=e+Math.sin(a/i*Math.PI*8+t*2)*n;a===0?r.moveTo(a,o):r.lineTo(a,o)}r.stroke()}p.current=requestAnimationFrame(n)};return p.current=requestAnimationFrame(n),()=>cancelAnimationFrame(p.current)},[]),(0,_.useEffect)(()=>{let e=o.current;if(!e)return;let t=()=>{v.current=e.currentTime,te(e.currentTime)},n=()=>{y.current=e.duration??0,ne(e.duration??0)},r=()=>{g.current=!0,x(!0),ie(!1)},i=()=>{g.current=!1,x(!1)},a=()=>{g.current=!1,x(!1)};return e.addEventListener(`timeupdate`,t),e.addEventListener(`durationchange`,n),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`play`,r),e.addEventListener(`pause`,i),e.addEventListener(`ended`,a),()=>{e.removeEventListener(`timeupdate`,t),e.removeEventListener(`durationchange`,n),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`play`,r),e.removeEventListener(`pause`,i),e.removeEventListener(`ended`,a)}},[]);let ae=()=>{let e=o.current;if(!(!e||l.current))try{let t=new AudioContext,n=t.createAnalyser();n.fftSize=1024,n.smoothingTimeConstant=.75;let r=t.createMediaElementSource(e);r.connect(n),n.connect(t.destination),u.current=t,l.current=n,d.current=r,m.current=new Uint8Array(n.frequencyBinCount),h.current=new Uint8Array(n.fftSize)}catch{}};if((0,_.useEffect)(()=>{let e=o.current;if(!e||(v.current=0,y.current=0,g.current=!1,te(0),ne(0),x(!1),ie(!1),!i))return;e.src=i,e.load();let t=()=>{ae(),u.current?.state===`suspended`&&u.current.resume(),e.play().catch(()=>ie(!0))};return e.addEventListener(`canplay`,t,{once:!0}),()=>{e.removeEventListener(`canplay`,t)}},[i]),(0,_.useEffect)(()=>()=>{f.current!==null&&cancelAnimationFrame(f.current),p.current!==null&&cancelAnimationFrame(p.current),u.current?.close()},[]),!e)return null;let oe=S>0?ee/S:0;return(0,T.jsxs)(`div`,{style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,T.jsx)(`canvas`,{ref:s,width:1920,height:1080,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,display:`block`}}),(0,T.jsx)(`audio`,{ref:o,crossOrigin:`anonymous`,preload:`metadata`}),(0,T.jsxs)(`div`,{style:{position:`relative`,display:`flex`,flexDirection:`row`,alignItems:`stretch`,width:`1800px`,height:`540px`,background:`rgba(12, 12, 12, 0.62)`,backdropFilter:`blur(40px)`,WebkitBackdropFilter:`blur(40px)`,borderRadius:`32px`,border:`1px solid rgba(255,255,255,0.09)`,boxShadow:`0 32px 80px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.07)`,overflow:`hidden`},children:[(0,T.jsx)(`div`,{style:{flexShrink:0,width:`540px`,height:`100%`,overflow:`hidden`,background:`#1a1a1a`},children:t?(0,T.jsx)(`img`,{src:t,alt:`Episode cover`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,T.jsx)(`div`,{style:{width:`100%`,height:`100%`,background:`linear-gradient(135deg, #2a2a2a, #111)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,T.jsxs)(`svg`,{width:`64`,height:`64`,viewBox:`0 0 64 64`,fill:`none`,children:[(0,T.jsx)(`circle`,{cx:`32`,cy:`32`,r:`24`,stroke:`rgba(255,255,255,0.15)`,strokeWidth:`2`}),(0,T.jsx)(`circle`,{cx:`32`,cy:`32`,r:`8`,fill:`rgba(255,255,255,0.1)`})]})})}),(0,T.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`54px 66px`,gap:`27px`},children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{style:{fontFamily:Et,fontSize:`78px`,fontWeight:700,color:`#fff`,lineHeight:1.1,letterSpacing:`-0.01em`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:n||`Episode Title`}),(0,T.jsx)(`div`,{style:{fontFamily:Dt,fontSize:`39px`,fontWeight:400,color:`rgba(255,255,255,0.5)`,marginTop:`9px`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:r||`Show Name`})]}),(0,T.jsx)(`div`,{style:{position:`relative`,background:`rgba(0,0,0,0.3)`,borderRadius:`8px`,overflow:`hidden`,flex:1},children:(0,T.jsx)(`canvas`,{ref:c,width:720,height:120,style:{display:`block`,width:`100%`,height:`100%`}})}),(0,T.jsxs)(`div`,{style:{position:`relative`,height:`6px`,background:`rgba(255,255,255,0.12)`,borderRadius:`3px`,cursor:`pointer`},onClick:e=>{let t=o.current;if(!t||!y.current)return;let n=e.currentTarget.getBoundingClientRect();t.currentTime=Math.max(0,Math.min(y.current,(e.clientX-n.left)/n.width*y.current))},children:[(0,T.jsx)(`div`,{style:{position:`absolute`,left:0,top:0,height:`100%`,width:`${oe*100}%`,background:Tt,borderRadius:`2px`,transition:`width 0.1s linear`}}),(0,T.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`${oe*100}%`,transform:`translate(-50%, -50%)`,width:`18px`,height:`18px`,borderRadius:`50%`,background:Tt,boxShadow:`0 0 12px ${Tt}`,pointerEvents:`none`}})]}),(0,T.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontFamily:Dt,fontSize:`30px`,fontWeight:500,color:`rgba(255,255,255,0.45)`,marginTop:`-12px`},children:[(0,T.jsx)(`span`,{children:Ot(ee)}),(0,T.jsx)(`span`,{children:Ot(S)})]}),re&&(0,T.jsx)(`div`,{style:{fontFamily:Dt,fontSize:`14px`,color:`rgba(255,255,255,0.35)`,letterSpacing:`0.05em`,textTransform:`uppercase`},children:`Waiting for interaction to start playback`})]})]})]})};function At(e){return typeof e==`string`?e:``}function jt(e){return typeof e==`string`||typeof e==`number`?e:null}function Mt(e){if(!e||typeof e!=`object`)return null;let t=e;return t.type===`song_playback_active`?{songId:At(t.songId),title:At(t.title),artist:At(t.artist),externalChartRank:jt(t.externalChartRank),externalChartSpins:jt(t.externalChartSpins)}:null}function Nt(e){return{rank:e?.externalChartRank??null,spins:e?.externalChartSpins??null}}var Pt=[`modoitaliano-podcast-player`,`modoitaliano-giorgia-podcast-player`,`earone`];function Ft(e){return Pt.includes(e)}function It(e){return e?e.layout.componentType.split(`,`).filter(Boolean):[]}function Lt(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function Rt(e){return typeof e==`string`?e:``}function zt(e){let t=Lt(e),n={show:typeof t.show==`boolean`?t.show:!0,coverUrl:Rt(t.coverUrl),episodeTitle:Rt(t.episodeTitle),showName:Rt(t.showName),audioUrl:Rt(t.audioUrl)};return typeof t.masterGain==`number`&&Number.isFinite(t.masterGain)&&(n.masterGain=t.masterGain),n}function Bt(e){return Rt(Lt(e).label)||`EARONE`}function Vt({componentTypes:e,metadata:t,activeSong:n}){return(0,T.jsx)(T.Fragment,{children:e.map(e=>e===`earone`?(0,T.jsx)(bt,{label:Bt(t[e]),...Nt(n)},e):e===`modoitaliano-podcast-player`?(0,T.jsx)(kt,{...zt(t[e])},e):e===`modoitaliano-giorgia-podcast-player`?(0,T.jsx)(wt,{...zt(t[e])},e):null)})}var Ht=()=>(0,T.jsx)(`div`,{className:`cronica-background`}),Ut=({text:e=``})=>e?(0,T.jsx)(`div`,{className:`cronica-layer`,children:(0,T.jsx)(`div`,{className:`cronica-safe-area`,children:(0,T.jsx)(`div`,{className:`cronica-chyron`,children:e.split(`
|
|
66
|
+
`,ct=new Set([`es`]),lt=new Map,ut=`__default__`;function dt(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();if(!t)return null;let n=t.split(`-`)[0];return ct.has(n)?n:null}function j(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){let e=dt(n);e&&t.add(e)}return[...t]}function ft(e){let t=e,n=dt(t.language)??dt(t.lang)??dt(t.locale);if(n)return n;for(let t of e.posts||[]){let e=t,n=dt(e.language)??dt(e.lang)??dt(e.locale);if(n)return n}return null}function pt(e,t){if(t.length===0)return e;let n=new Set(t);return e.filter(e=>{let t=ft(e);return t?n.has(t):!0})}function mt(e,t){return`${e??`any`}__${t.length>0?[...t].sort().join(`,`):`all`}`}async function ht(e={}){let t=j(e.allowedLanguages),n=dt(e.language),r=mt(n??void 0,t),i=new URL(`https://api.monitor.gaulatti.com/events`);n&&i.searchParams.set(`language`,n);let a=await fetch(i.toString());if(!a.ok)throw Error(`Failed to fetch events: ${a.status}`);let o=pt((await a.json()).events||[],t),s=lt.get(r)?.events??null,c;if(s&&s.length>0){let e=new Map;s.forEach(t=>{e.set(t.uuid,t)}),o.forEach(t=>{let n=e.get(t.uuid);if(!n){e.set(t.uuid,t);return}let r=new Map;n.posts.forEach(e=>{r.set(e.uuid,e)}),t.posts.forEach(e=>{r.set(e.uuid,e)}),e.set(t.uuid,{...n,title:t.title,summary:t.summary,status:t.status,updated_at:t.updated_at,posts_count:t.posts_count,posts:Array.from(r.values()).sort((e,t)=>t.relevance-e.relevance)})}),c=Array.from(e.values()).sort((e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime())}else c=o;let l=new Date;return lt.set(r,{events:c,lastFetchTime:l}),ut=r,c}function gt(){return lt.get(ut)?.events??null}function _t(e,t){if(e.length!==t.length)return!0;let n=new Map(e.map(e=>[e.uuid,e])),r=new Map(t.map(e=>[e.uuid,e]));for(let e of r.keys())if(!n.has(e))return!0;for(let e of n.keys())if(!r.has(e))return!0;for(let[e,t]of r.entries()){let r=n.get(e);if(r.title!==t.title||r.status!==t.status||r.posts_count!==t.posts_count||r.posts.length!==t.posts.length)return!0;let i=new Map(r.posts.map(e=>[e.uuid,e]));for(let e of t.posts)if(!i.has(e.uuid))return!0}return!1}var vt=`data:image/svg+xml,%3csvg%20width='104'%20height='20'%20viewBox='0%200%20104%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1327_9581)'%3e%3cpath%20d='M55.4628%202.66119C51.239%202.55563%2048.8707%206.32132%2048.9409%2010.035C48.967%2019.8327%2061.8386%2019.728%2061.8524%209.95667C61.899%206.3877%2059.6156%202.55963%2055.4636%202.66119M55.5526%200.0630266C66.6273%20-0.410384%2069.6364%2014.59%2060.2214%2018.9107C53.4464%2022.0382%2044.7473%2018.1078%2044.9832%2010.1534C44.8257%204.20857%2049.6691%20-0.0617235%2055.5518%200.0622269M103.861%2010.6244H88.8853C88.8176%2017.7831%2097.0718%2018.2454%20102.102%2016.2669L102.806%2018.7484C98.658%2020.4669%2091.1556%2020.6596%2087.9686%2017.2985C83.6125%2013.2969%2084.4811%204.44527%2089.8331%201.44008C97.3959%20-2.53753%20105.138%202.21257%20103.861%2010.6244ZM88.9302%208.14619H100.255C100.287%200.417285%2089.7001%200.837117%2088.9302%208.14619ZM66.5253%2019.5344C66.4714%2015.7336%2066.6763%204.02944%2066.3498%200.456469H69.7793L69.9989%203.60561C72.0675%200.50365%2076.6473%20-0.853407%2080.4026%200.713166C83.3423%201.99505%2084.6362%204.59801%2084.6656%208.17898V19.5344H80.7944V8.53564C80.8042%205.3785%2079.4556%202.91149%2075.8595%202.89629C73.226%202.90189%2070.9238%204.72996%2070.4609%207.19457C70.3173%207.05543%2070.4275%2019.2561%2070.3948%2019.5352H66.5253V19.5344Z'%20fill='%2300A3FD'/%3e%3cpath%20d='M14.5077%2016.9908C9.63975%2018%203.69666%2016.7764%203.70483%2010.6349H18.7136C19.9969%202.20228%2012.2317%20-2.55662%204.6567%201.42978C-0.709223%204.44058%20-1.58028%2013.3138%202.78806%2017.3234C5.98328%2020.6917%2013.5011%2020.4982%2017.6572%2018.7756L16.9519%2016.2886C16.2621%2016.5717%2015.4481%2016.806%2014.5085%2016.99L14.5077%2016.9908ZM4.54894%205.62171C5.89267%202.58772%2010.4602%201.58572%2013.0619%203.50655C14.5379%204.59092%2015.1428%206.51335%2015.0987%208.1487H3.74973C3.84687%207.32023%204.11382%206.47817%204.54894%205.62171Z'%20fill='%2300A3FD'/%3e%3cpath%20d='M34.3213%2014.9806C34.0054%2010.8182%2035.6903%203.80745%2031.2101%201.22369C28.1741%20-0.677954%2022.3339%20-0.0925881%2019.1395%201.70589L20.0211%204.03696C22.3143%202.65751%2026.5953%201.95219%2028.8296%203.39082C30.237%204.32644%2030.5464%205.97059%2030.4852%207.39881C24.1739%207.54756%2018.0953%208.35763%2017.6406%2014.5096C17.7174%2017.8882%2020.4424%2019.9914%2024.169%2019.9994C26.7945%2019.9914%2029.2288%2018.9886%2030.7056%2017.1581H30.8387L31.1465%2019.5643H34.6299C34.3915%2018.1289%2034.3205%2016.5128%2034.3205%2014.9806H34.3213ZM30.5742%2013.1229C30.4893%2015.7467%2027.8916%2017.4404%2025.1413%2017.4356C21.5542%2017.6179%2020.2375%2013.3572%2022.9257%2011.3268C24.9389%209.90741%2028.0304%209.77307%2030.5742%209.80425V13.1229Z'%20fill='%2300A3FD'/%3e%3cpath%20d='M46.1687%200.074947C43.2951%20-0.176952%2040.6672%201.56315%2039.6631%204.23408H39.5317L39.3554%200.445199H35.9609C36.2785%204.42681%2036.0883%2015.3904%2036.1373%2019.5655H40.0174C40.064%2018.4132%2039.8893%208.61633%2040.1489%207.75028C40.6909%204.63792%2043.5596%202.82665%2046.6822%203.40402V0.128526L46.1695%200.074947H46.1687Z'%20fill='%2300A3FD'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1327_9581'%3e%3crect%20width='104'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`;function yt(e){if(e==null)return``;if(typeof e==`number`&&Number.isFinite(e))return e.toLocaleString(`en-US`);let t=String(e).trim();return t?/^\d+$/.test(t)?Number(t).toLocaleString(`en-US`):t:``}var bt=({rank:e=``,spins:t=``,label:n=`EARONE`})=>{let r=yt(e),i=yt(t),[a,o]=_.useState(r),[s,c]=_.useState(i),[l,u]=_.useState(!1);return _.useEffect(()=>{if(r===a&&i===s)return;u(!0);let e=window.setTimeout(()=>{o(r),c(i),u(!1)},180);return()=>window.clearTimeout(e)},[r,i,a,s]),!r&&!i&&!a&&!s?null:(0,T.jsxs)(`div`,{className:`earone-box`,children:[(0,T.jsx)(`div`,{className:`earone-brand`,children:(0,T.jsx)(`img`,{src:vt,alt:n,className:`earone-brand-image`})}),(0,T.jsx)(`div`,{className:`earone-live-badge`,children:`EN TIEMPO REAL`}),(0,T.jsxs)(`div`,{className:`earone-metric${l?` earone-metric--transitioning`:``}`,children:[(0,T.jsx)(`span`,{className:`earone-metric-label`,children:`RANKING`}),(0,T.jsx)(`span`,{className:`earone-metric-value`,children:a?`#${a}`:`--`})]}),(0,T.jsx)(`div`,{className:`earone-divider`,"aria-hidden":`true`}),(0,T.jsxs)(`div`,{className:`earone-metric${l?` earone-metric--transitioning`:``}`,children:[(0,T.jsx)(`span`,{className:`earone-metric-label`,children:`REPRODUCCIONES EN RADIO HOY`}),(0,T.jsx)(`span`,{className:`earone-metric-value`,children:s||`--`})]})]})},xt=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20595.27%20206.59'%20fill='%23fff'%3e%3cpath%20d='M160.26%20103.3c0%2044.25-35.88%2080.13-80.12%2080.13S0%20147.55%200%20103.3s35.87-80.14%2080.14-80.14c44.25%200%2080.12%2035.88%2080.12%2080.14Z'/%3e%3crect%20x='211.95'%20y='23.16'%20width='160.26'%20height='160.27'/%3e%3cpath%20d='m415.46%20181.15%2089.9-155.71%2089.91%20155.71H415.46Z'/%3e%3c/svg%3e`,St={signal:`#ed0076`,navy:`#0a1234`,font:`'Barlow Condensed', 'Encode Sans', system-ui, sans-serif`};function Ct(e){let t=Number.isFinite(e)?Math.max(0,Math.floor(e)):0;return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}function wt({show:e=!0,coverUrl:t=``,episodeTitle:n=``,showName:r=``,audioUrl:i=``,masterGain:a=1}){let o=(0,_.useRef)(null),s=(0,_.useRef)(null),c=(0,_.useRef)(null),l=(0,_.useRef)(null),[u,d]=(0,_.useState)(0),[f,p]=(0,_.useState)(0),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1);async function x(){let e=o.current;if(!(!e||!i))try{if(!c.current){let t=new AudioContext,n=t.createAnalyser();n.fftSize=256,n.smoothingTimeConstant=.85,t.createMediaElementSource(e).connect(n),n.connect(t.destination),c.current=t,l.current=n}await c.current.resume(),await e.play(),h(!1)}catch{e.error?v(!0):h(!0)}}return(0,_.useEffect)(()=>{let e=o.current;e.volume=Number.isFinite(a)?Math.max(0,Math.min(1,a)):0,e.muted=a<=1e-4},[a,e]),(0,_.useEffect)(()=>{let e=o.current;return e.pause(),d(0),p(0),h(!1),v(!1),e.load(),()=>e.pause()},[i,e]),(0,_.useEffect)(()=>{if(!e)return;let t=s.current,n=t?.getContext(`2d`);if(!t||!n)return;let r=window.matchMedia(`(prefers-reduced-motion: reduce)`),i=0,a=new Uint8Array(128),c=()=>{if(n.clearRect(0,0,t.width,t.height),n.fillStyle=St.signal,o.current&&!o.current.paused&&l.current&&!r.matches){l.current.getByteFrequencyData(a);for(let e=0;e<80;e++){let t=Math.max(2,a[e]/255*100);n.globalAlpha=.5+t/200,n.fillRect(e*12,(120-t)/2,5,t)}}else n.globalAlpha=.5,n.fillRect(0,59,t.width,2);i=window.requestAnimationFrame(c)};return c(),()=>window.cancelAnimationFrame(i)},[e]),(0,_.useEffect)(()=>()=>{c.current?.close(),c.current=null,l.current=null},[]),(0,T.jsxs)(`div`,{hidden:!e,"aria-label":`Modo Italiano Giorgia podcast player`,style:{position:`absolute`,inset:0,overflow:`hidden`,color:`#fff`,fontFamily:St.font,display:e?`flex`:`none`,alignItems:`center`,justifyContent:`center`},children:[t&&(0,T.jsx)(`img`,{src:t,alt:`Episode cover`,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,objectFit:`cover`,objectPosition:`center center`,filter:`saturate(0.84) contrast(1.07)`}}),(0,T.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,inset:0,background:`linear-gradient(180deg, rgba(10,18,52,0.48), rgba(10,18,52,0.04) 30%, rgba(10,18,52,0.66) 58%, rgba(10,18,52,0.98) 100%), linear-gradient(90deg, rgba(10,18,52,0.32), transparent 70%)`}}),(0,T.jsx)(`audio`,{ref:o,src:i||void 0,crossOrigin:`anonymous`,preload:`metadata`,onCanPlay:()=>{e&&x()},onTimeUpdate:e=>d(e.currentTarget.currentTime),onDurationChange:e=>p(Number.isFinite(e.currentTarget.duration)?e.currentTarget.duration:0),onError:()=>v(!0)}),(0,T.jsxs)(`section`,{"aria-label":`Episode artwork and title`,style:{position:`absolute`,inset:0},children:[(0,T.jsx)(`img`,{src:xt,alt:`ModoItaliano`,style:{position:`absolute`,top:`69px`,left:`96px`,width:`222px`,height:`auto`,objectFit:`contain`,filter:`brightness(0) invert(1) drop-shadow(0 15px 51px rgba(0,0,0,0.72))`}}),!t&&(0,T.jsx)(`p`,{style:{position:`absolute`,top:`180px`,left:`110px`,fontSize:`32px`},children:`No cover selected`}),(0,T.jsxs)(`div`,{style:{position:`absolute`,left:`110px`,right:`110px`,bottom:`280px`,paddingLeft:`44px`,borderLeft:`10px solid ${St.signal}`},children:[(0,T.jsx)(`p`,{style:{margin:`0 0 26px`,fontFamily:St.font,fontSize:`34px`,fontWeight:600,color:`#fff`,letterSpacing:`0.12em`,textTransform:`uppercase`,overflowWrap:`anywhere`},children:r}),(0,T.jsx)(`h1`,{style:{margin:0,maxWidth:`1560px`,fontFamily:St.font,fontSize:n.length>90?`100px`:n.length>60?`124px`:`164px`,lineHeight:.92,fontWeight:700,letterSpacing:`-0.025em`,textTransform:`uppercase`,textWrap:`balance`,overflowWrap:`anywhere`,whiteSpace:`pre-wrap`,textShadow:`0 8px 36px rgba(0,0,0,0.45)`},children:n})]})]}),(0,T.jsxs)(`div`,{style:{position:`absolute`,left:`110px`,right:`110px`,bottom:`64px`,display:`flex`,flexDirection:`column`,gap:`18px`},children:[(0,T.jsx)(`canvas`,{ref:s,width:960,height:120,"aria-hidden":`true`,style:{width:`100%`,height:`70px`,display:`block`,opacity:.85}}),(0,T.jsxs)(`div`,{style:{position:`relative`,height:`20px`,display:`flex`,alignItems:`center`,outline:y?`2px solid white`:`none`,outlineOffset:`5px`},children:[(0,T.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,left:0,right:0,height:`3px`,background:`rgba(255,255,255,0.22)`},children:(0,T.jsx)(`div`,{style:{height:`100%`,width:`${f>0?Math.min(100,u/f*100):0}%`,background:St.signal}})}),(0,T.jsx)(`input`,{"aria-label":`Episode progress`,type:`range`,min:0,max:f||0,step:.1,value:Math.min(u,f),disabled:!f,onFocus:()=>b(!0),onBlur:()=>b(!1),onChange:e=>{o.current.currentTime=Number(e.target.value)},style:{position:`relative`,width:`100%`,height:`20px`,margin:0,opacity:0,cursor:`pointer`}})]}),(0,T.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontSize:`30px`,fontVariantNumeric:`tabular-nums`,color:`rgba(255,255,255,0.7)`},children:[(0,T.jsx)(`span`,{children:Ct(u)}),(0,T.jsx)(`span`,{children:Ct(f)})]}),g?(0,T.jsx)(`p`,{role:`alert`,style:{margin:0,fontSize:`28px`},children:`Unable to play this audio.`}):m?(0,T.jsx)(`button`,{type:`button`,onClick:()=>void x(),style:{alignSelf:`flex-start`,border:`1px solid ${St.signal}`,color:`#fff`,background:St.navy,padding:`8px 18px`,fontFamily:St.font,fontSize:`28px`},children:`Start playback`}):null]})]})}var Tt=`#e91e8c`,Et=`'Barlow Condensed', 'Encode Sans', system-ui, sans-serif`,Dt=`'Outfit', 'Encode Sans', system-ui, sans-serif`;function Ot(e){if(!Number.isFinite(e)||e<0)return`0:00`;let t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${String(n).padStart(2,`0`)}`}var kt=({show:e=!0,coverUrl:t=``,episodeTitle:n=``,showName:r=``,audioUrl:i=``,masterGain:a=1})=>{let o=(0,_.useRef)(null),s=(0,_.useRef)(null),c=(0,_.useRef)(null),l=(0,_.useRef)(null),u=(0,_.useRef)(null),d=(0,_.useRef)(null),f=(0,_.useRef)(null),p=(0,_.useRef)(null),m=(0,_.useRef)(null),h=(0,_.useRef)(null);(0,_.useRef)(0);let g=(0,_.useRef)(!1),v=(0,_.useRef)(0),y=(0,_.useRef)(0),[b,x]=(0,_.useState)(!1),[ee,te]=(0,_.useState)(0),[S,ne]=(0,_.useState)(0),[re,ie]=(0,_.useState)(!1);(0,_.useEffect)(()=>{o.current&&(o.current.volume=Math.max(0,Math.min(1,a)),o.current.muted=a<=1e-4)},[a,e]),(0,_.useEffect)(()=>{let e=s.current;if(!e)return;let t=[{x:.15,y:.35,r:.7,hue:82,sat:100,spd:31e-5,phase:0},{x:.8,y:.25,r:.6,hue:22,sat:100,spd:27e-5,phase:1.1},{x:.55,y:.75,r:.55,hue:330,sat:90,spd:19e-5,phase:2.3},{x:.1,y:.8,r:.5,hue:48,sat:100,spd:23e-5,phase:3.7}],n=r=>{let i=e.width,a=e.height,o=e.getContext(`2d`,{alpha:!0});if(!o)return;o.clearRect(0,0,i,a),o.globalCompositeOperation=`source-over`,o.fillStyle=`rgba(10, 18, 52, 0.55)`,o.fillRect(0,0,i,a);for(let e of t){let t=r*e.spd+e.phase,n=(e.x+Math.sin(t)*.22+Math.cos(t*.6)*.1)*i,s=(e.y+Math.cos(t*.8)*.18+Math.sin(t*.4)*.12)*a,c=e.r*Math.max(i,a),l=o.createRadialGradient(n,s,0,n,s,c);l.addColorStop(0,`hsla(${e.hue}, ${e.sat}%, 60%, 0.55)`),l.addColorStop(.5,`hsla(${e.hue}, ${e.sat}%, 40%, 0.2)`),l.addColorStop(1,`hsla(${e.hue}, ${e.sat}%, 20%, 0)`),o.globalCompositeOperation=`screen`,o.fillStyle=l,o.fillRect(0,0,i,a)}o.globalCompositeOperation=`source-over`;let s=o.createRadialGradient(i/2,a/2,a*.1,i/2,a/2,a*.85);s.addColorStop(0,`rgba(0,0,0,0)`),s.addColorStop(1,`rgba(0,0,0,0.72)`),o.fillStyle=s,o.fillRect(0,0,i,a),f.current=requestAnimationFrame(n)};return f.current=requestAnimationFrame(n),()=>cancelAnimationFrame(f.current)},[e]),(0,_.useEffect)(()=>{let e=c.current;if(!e)return;let t=0,n=()=>{let r=e.getContext(`2d`);if(!r)return;let i=e.width,a=e.height;r.clearRect(0,0,i,a);let o=l.current,s=m.current;if(h.current,o&&s&&g.current){o.getByteFrequencyData(s);let e=Math.floor(s.length*.6),t=i/e,n=a/2;for(let i=0;i<e;i++){let a=s[i]/255,o=a*n*.95;o<1||(r.fillStyle=`hsla(${310-i/e*200}, 90%, 60%, ${.5+a*.5})`,r.fillRect(i*t,n-o,Math.max(1,t-1),o),r.fillRect(i*t,n,Math.max(1,t-1),o))}r.fillStyle=`rgba(255,255,255,0.07)`,r.fillRect(0,n-.5,i,1)}else{t+=.04;let e=a/2,n=6+Math.sin(t*.7)*4;r.beginPath(),r.strokeStyle=`rgba(233,30,140,0.18)`,r.lineWidth=8;for(let a=0;a<=i;a+=2){let o=e+Math.sin(a/i*Math.PI*8+t*2)*n;a===0?r.moveTo(a,o):r.lineTo(a,o)}r.stroke(),r.beginPath(),r.strokeStyle=`rgba(233,30,140,0.6)`,r.lineWidth=1.5;for(let a=0;a<=i;a+=2){let o=e+Math.sin(a/i*Math.PI*8+t*2)*n;a===0?r.moveTo(a,o):r.lineTo(a,o)}r.stroke()}p.current=requestAnimationFrame(n)};return p.current=requestAnimationFrame(n),()=>cancelAnimationFrame(p.current)},[e]),(0,_.useEffect)(()=>{let e=o.current;if(!e)return;let t=()=>{v.current=e.currentTime,te(e.currentTime)},n=()=>{y.current=e.duration??0,ne(e.duration??0)},r=()=>{g.current=!0,x(!0),ie(!1)},i=()=>{g.current=!1,x(!1)},a=()=>{g.current=!1,x(!1)};return e.addEventListener(`timeupdate`,t),e.addEventListener(`durationchange`,n),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`play`,r),e.addEventListener(`pause`,i),e.addEventListener(`ended`,a),()=>{e.removeEventListener(`timeupdate`,t),e.removeEventListener(`durationchange`,n),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`play`,r),e.removeEventListener(`pause`,i),e.removeEventListener(`ended`,a)}},[e]);let ae=()=>{let e=o.current;if(!(!e||l.current))try{let t=new AudioContext,n=t.createAnalyser();n.fftSize=1024,n.smoothingTimeConstant=.75;let r=t.createMediaElementSource(e);r.connect(n),n.connect(t.destination),u.current=t,l.current=n,d.current=r,m.current=new Uint8Array(n.frequencyBinCount),h.current=new Uint8Array(n.fftSize)}catch{}};if((0,_.useEffect)(()=>{let e=o.current;if(!e||(v.current=0,y.current=0,g.current=!1,te(0),ne(0),x(!1),ie(!1),!i))return;e.src=i,e.load();let t=()=>{ae(),u.current?.state===`suspended`&&u.current.resume(),e.play().catch(()=>ie(!0))};return e.addEventListener(`canplay`,t,{once:!0}),()=>{e.removeEventListener(`canplay`,t)}},[i,e]),(0,_.useEffect)(()=>{if(e)return()=>{u.current?.close(),u.current=null,l.current=null,d.current=null,m.current=null,h.current=null}},[e]),(0,_.useEffect)(()=>()=>{f.current!==null&&cancelAnimationFrame(f.current),p.current!==null&&cancelAnimationFrame(p.current),u.current?.close()},[]),!e)return null;let oe=S>0?ee/S:0;return(0,T.jsxs)(`div`,{style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,T.jsx)(`canvas`,{ref:s,width:1920,height:1080,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,display:`block`}}),(0,T.jsx)(`audio`,{ref:o,crossOrigin:`anonymous`,preload:`metadata`}),(0,T.jsxs)(`div`,{style:{position:`relative`,display:`flex`,flexDirection:`row`,alignItems:`stretch`,width:`1800px`,height:`540px`,background:`rgba(12, 12, 12, 0.62)`,backdropFilter:`blur(40px)`,WebkitBackdropFilter:`blur(40px)`,borderRadius:`32px`,border:`1px solid rgba(255,255,255,0.09)`,boxShadow:`0 32px 80px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.07)`,overflow:`hidden`},children:[(0,T.jsx)(`div`,{style:{flexShrink:0,width:`540px`,height:`100%`,overflow:`hidden`,background:`#1a1a1a`},children:t?(0,T.jsx)(`img`,{src:t,alt:`Episode cover`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):(0,T.jsx)(`div`,{style:{width:`100%`,height:`100%`,background:`linear-gradient(135deg, #2a2a2a, #111)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,T.jsxs)(`svg`,{width:`64`,height:`64`,viewBox:`0 0 64 64`,fill:`none`,children:[(0,T.jsx)(`circle`,{cx:`32`,cy:`32`,r:`24`,stroke:`rgba(255,255,255,0.15)`,strokeWidth:`2`}),(0,T.jsx)(`circle`,{cx:`32`,cy:`32`,r:`8`,fill:`rgba(255,255,255,0.1)`})]})})}),(0,T.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:`54px 66px`,gap:`27px`},children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{style:{fontFamily:Et,fontSize:`78px`,fontWeight:700,color:`#fff`,lineHeight:1.1,letterSpacing:`-0.01em`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:n||`Episode Title`}),(0,T.jsx)(`div`,{style:{fontFamily:Dt,fontSize:`39px`,fontWeight:400,color:`rgba(255,255,255,0.5)`,marginTop:`9px`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:r||`Show Name`})]}),(0,T.jsx)(`div`,{style:{position:`relative`,background:`rgba(0,0,0,0.3)`,borderRadius:`8px`,overflow:`hidden`,flex:1},children:(0,T.jsx)(`canvas`,{ref:c,width:720,height:120,style:{display:`block`,width:`100%`,height:`100%`}})}),(0,T.jsxs)(`div`,{style:{position:`relative`,height:`6px`,background:`rgba(255,255,255,0.12)`,borderRadius:`3px`,cursor:`pointer`},onClick:e=>{let t=o.current;if(!t||!y.current)return;let n=e.currentTarget.getBoundingClientRect();t.currentTime=Math.max(0,Math.min(y.current,(e.clientX-n.left)/n.width*y.current))},children:[(0,T.jsx)(`div`,{style:{position:`absolute`,left:0,top:0,height:`100%`,width:`${oe*100}%`,background:Tt,borderRadius:`2px`,transition:`width 0.1s linear`}}),(0,T.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:`${oe*100}%`,transform:`translate(-50%, -50%)`,width:`18px`,height:`18px`,borderRadius:`50%`,background:Tt,boxShadow:`0 0 12px ${Tt}`,pointerEvents:`none`}})]}),(0,T.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontFamily:Dt,fontSize:`30px`,fontWeight:500,color:`rgba(255,255,255,0.45)`,marginTop:`-12px`},children:[(0,T.jsx)(`span`,{children:Ot(ee)}),(0,T.jsx)(`span`,{children:Ot(S)})]}),re&&(0,T.jsx)(`div`,{style:{fontFamily:Dt,fontSize:`14px`,color:`rgba(255,255,255,0.35)`,letterSpacing:`0.05em`,textTransform:`uppercase`},children:`Waiting for interaction to start playback`})]})]})]})};function At(e){return typeof e==`string`?e:``}function jt(e){return typeof e==`string`||typeof e==`number`?e:null}function Mt(e){if(!e||typeof e!=`object`)return null;let t=e;return t.type===`song_playback_active`?{songId:At(t.songId),title:At(t.title),artist:At(t.artist),externalChartRank:jt(t.externalChartRank),externalChartSpins:jt(t.externalChartSpins)}:null}function Nt(e){return{rank:e?.externalChartRank??null,spins:e?.externalChartSpins??null}}var Pt=[`modoitaliano-podcast-player`,`modoitaliano-giorgia-podcast-player`,`earone`];function Ft(e){return Pt.includes(e)}function It(e){return e?e.layout.componentType.split(`,`).filter(Boolean):[]}function Lt(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function Rt(e){return typeof e==`string`?e:``}function zt(e){let t=Lt(e),n={show:typeof t.show==`boolean`?t.show:!0,coverUrl:Rt(t.coverUrl),episodeTitle:Rt(t.episodeTitle),showName:Rt(t.showName),audioUrl:Rt(t.audioUrl)};return typeof t.masterGain==`number`&&Number.isFinite(t.masterGain)&&(n.masterGain=t.masterGain),n}function Bt(e){return Rt(Lt(e).label)||`EARONE`}function Vt({componentTypes:e,metadata:t,activeSong:n}){return(0,T.jsx)(T.Fragment,{children:e.map(e=>e===`earone`?(0,T.jsx)(bt,{label:Bt(t[e]),...Nt(n)},e):e===`modoitaliano-podcast-player`?(0,T.jsx)(kt,{...zt(t[e])},e):e===`modoitaliano-giorgia-podcast-player`?(0,T.jsx)(wt,{...zt(t[e])},e):null)})}var Ht=()=>(0,T.jsx)(`div`,{className:`cronica-background`}),Ut=({text:e=``})=>e?(0,T.jsx)(`div`,{className:`cronica-layer`,children:(0,T.jsx)(`div`,{className:`cronica-safe-area`,children:(0,T.jsx)(`div`,{className:`cronica-chyron`,children:e.split(`
|
|
67
67
|
`).map((e,t)=>(0,T.jsx)(`div`,{className:`cronica-chyron-line`,children:e},`cronica-line-${t}`))})})}):null,Wt=({text:e=`REITERAMOS`,show:t=!0})=>t?(0,T.jsx)(`div`,{className:`cronica-layer`,children:(0,T.jsx)(`div`,{className:`cronica-safe-area`,children:(0,T.jsx)(`div`,{className:`cronica-reiteramos`,children:e})})}):null,M={navy:`#0a1234`,signal:`#ed0076`,display:`'Barlow Condensed', system-ui, sans-serif`,text:`'Barlow', system-ui, sans-serif`,safeX:82,safeTop:68,safeBottom:70,ruleWidth:10,labelSize:31,displayShadow:`0 8px 34px rgba(0,0,0,0.66)`,labelShadow:`0 3px 16px rgba(0,0,0,0.65)`,plate:`#070d2b`,platePadding:44},Gt={fontFamily:M.display,fontSize:`${M.labelSize}px`,fontWeight:700,lineHeight:1,letterSpacing:`0.13em`,textTransform:`uppercase`,textShadow:M.labelShadow,whiteSpace:`nowrap`};function Kt(e,t,n,r,i){return Math.max(r,Math.min(n,t/(Math.max(1,e.length)*i)))}function qt(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(0);return(0,_.useLayoutEffect)(()=>{if(!e||(r(e.clientWidth),typeof ResizeObserver>`u`))return;let t=new ResizeObserver(()=>r(e.clientWidth));return t.observe(e),()=>t.disconnect()},[e]),[t,n]}function Jt(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(0);return(0,_.useLayoutEffect)(()=>{if(!e||(r(e.clientHeight),typeof ResizeObserver>`u`))return;let t=new ResizeObserver(()=>r(e.clientHeight));return t.observe(e),()=>t.disconnect()},[e]),[t,n]}function Yt({width:e=172,keySafe:t=!1}){return(0,T.jsxs)(`svg`,{"aria-label":`ModoItaliano`,role:`img`,viewBox:`0 0 595.27 206.59`,width:e,style:{display:`block`,flexShrink:0,overflow:`visible`,filter:t?void 0:`drop-shadow(0 6px 24px rgba(0,0,0,0.6))`},children:[(0,T.jsx)(`path`,{fill:`#fff`,d:`M160.26 103.3c0 44.25-35.88 80.13-80.12 80.13S0 147.55 0 103.3s35.87-80.14 80.14-80.14c44.25 0 80.12 35.88 80.12 80.14Z`}),(0,T.jsx)(`rect`,{fill:`#fff`,x:`211.95`,y:`23.16`,width:`160.26`,height:`160.27`}),(0,T.jsx)(`path`,{fill:`#fff`,d:`m415.46 181.15 89.9-155.71 89.91 155.71H415.46Z`})]})}function Xt({size:e,keySafe:t=!1}){return(0,T.jsx)(`div`,{"aria-hidden":`true`,"data-giorgia-cover-placeholder":!0,style:{position:`relative`,width:`${e}px`,height:`${e}px`,flexShrink:0,background:t?M.plate:`linear-gradient(160deg, ${M.navy} 0%, ${M.plate} 100%)`},children:(0,T.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,bottom:0,height:`${M.ruleWidth}px`,background:M.signal}})})}function Zt({left:e=0,keySafe:t=!1}){return(0,T.jsx)(`div`,{"aria-hidden":`true`,"data-giorgia-rule":!0,style:{position:`absolute`,top:0,bottom:0,left:`${e}px`,width:`${M.ruleWidth}px`,background:M.signal,boxShadow:t?void 0:`0 0 30px rgba(237,0,118,0.3)`}})}function Qt({style:e,keySafe:t=!1}){return(0,T.jsx)(`div`,{"aria-hidden":`true`,"data-giorgia-grade":!0,style:{position:`absolute`,zIndex:-1,left:`-1920px`,right:`-1920px`,top:`-150px`,bottom:`-400px`,background:`linear-gradient(0deg, rgba(7,13,43,0.94) 0%, rgba(7,13,43,0.9) 55%, rgba(7,13,43,0.5) 82%, rgba(7,13,43,0) 100%)`,pointerEvents:`none`,...e,...t?{top:`-${M.platePadding}px`,background:M.plate,transition:`none`}:null}})}var $t=8;function en(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function tn(e){return`${e}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,8)}`}function nn(e){return e===`autoplay`?`autoplay`:e===`shuffle`?`shuffle`:`manual`}function rn(e,t){return e===`text`?`text`:e===`sequence`||t?`sequence`:`text`}function an(e,t){let n=typeof e.text==`string`&&e.text.trim()?e.text:typeof e.label==`string`?e.label:``;return{id:typeof e.id==`string`&&e.id?e.id:tn(`preset`),kind:`preset`,text:n,useMarquee:t?.includeMarquee?!!e.useMarquee:void 0}}function on(e){let t=typeof e.artist==`string`&&e.artist.trim()?e.artist.trim():``,n=typeof e.title==`string`&&e.title.trim()?e.title.trim():``,r=typeof e.coverUrl==`string`&&e.coverUrl.trim()?e.coverUrl.trim():``,i=typeof e.audioUrl==`string`&&e.audioUrl.trim()?e.audioUrl.trim():``,a=typeof e.durationMs==`number`&&Number.isFinite(e.durationMs)&&e.durationMs>0?Math.round(e.durationMs):void 0;return{id:typeof e.id==`string`&&e.id?e.id:tn(`song`),kind:`preset`,songId:typeof e.songId==`number`&&Number.isInteger(e.songId)&&e.songId>0?e.songId:void 0,highRotation:e.highRotation===!0,artist:t,title:n,coverUrl:r,audioUrl:i||void 0,durationMs:a,earoneSongId:typeof e.earoneSongId==`string`&&e.earoneSongId.trim()?e.earoneSongId.trim():typeof e.earoneSongId==`number`&&Number.isFinite(e.earoneSongId)?String(e.earoneSongId):void 0,earoneRank:typeof e.earoneRank==`string`&&e.earoneRank.trim()?e.earoneRank.trim():void 0,earoneSpins:typeof e.earoneSpins==`string`&&e.earoneSpins.trim()?e.earoneSpins.trim():typeof e.earoneSpins==`number`&&Number.isFinite(e.earoneSpins)?String(e.earoneSpins):void 0}}function sn(e,t,n=`manual`){let r=e.activeItemId===null?null:typeof e.activeItemId==`string`&&t.some(t=>t.id===e.activeItemId)?e.activeItemId:t[0]?.id??null;return{mode:e.mode===void 0?n:nn(e.mode),items:t,activeItemId:r,intervalMs:typeof e.intervalMs==`number`&&Number.isFinite(e.intervalMs)&&e.intervalMs>=500?Math.floor(e.intervalMs):4e3,loop:e.loop===void 0?!0:!!e.loop,startedAt:typeof e.startedAt==`number`&&Number.isFinite(e.startedAt)?e.startedAt:Date.now()}}function cn(e,t,n){let r=en(e);if(!r)return null;if(r.kind===`sequence`){let e=gn(r.sequence,t+1,n);return e?{id:typeof r.id==`string`&&r.id?r.id:tn(`sequence`),label:typeof r.label==`string`&&r.label.trim()?r.label:`Nested Sequence`,kind:`sequence`,sequence:e}:null}return an(r,n)}function ln(e,t){let n=en(e);if(!n)return null;if(n.kind===`sequence`){let e=_n(n.sequence,t+1);return e?{id:typeof n.id==`string`&&n.id?n.id:tn(`sequence`),label:typeof n.label==`string`&&n.label.trim()?n.label:`Nested Sequence`,kind:`sequence`,sequence:e}:null}return on(n)}function un(e){return e.activeItemId===null?null:e.items.findIndex(t=>t.id===e.activeItemId)}function dn(e,t){if(e.items.length===0)return null;let n=un(e);if(n===null)return null;if(e.mode===`manual`)return e.items[n];let r=n+Math.max(0,Math.floor((t-e.startedAt)/e.intervalMs));return e.loop===!1?r>=e.items.length&&(r=e.items.length-1):r%=e.items.length,e.items[r]}function fn(e){return e.kind===`preset`&&typeof e.durationMs==`number`&&Number.isFinite(e.durationMs)&&e.durationMs>0?Math.max(1,Math.round(e.durationMs)):null}function pn(e,t){if(e.items.length===0)return null;let n=un(e);if(n===null)return null;if(e.mode===`manual`)return e.items[n];let r=Math.max(0,t-e.startedAt),i=e.items.map(e=>fn(e)),a=e.loop!==!1,o=i.filter(e=>e!==null),s=o.reduce((e,t)=>e+t,0),c=a&&o.length===i.length?r%s:r,l=a?e.items.length:e.items.length-n,u=n;for(let t=1;t<l;t+=1){let t=i[u];if(t===null||c<t)break;c-=t,u=(u+1)%e.items.length}return e.items[u]}function mn(e,t,n,r){let i=dn(e,t);if(!i)return null;if(i.kind===`sequence`){let e=[...r,i.label];return mn(i.sequence,t,n+1,e)}return{text:i.text,useMarquee:!!i.useMarquee,activePathLabels:[...r,i.text]}}function hn(e,t,n,r){let i=pn(e,t);if(!i)return null;if(i.kind===`sequence`){let e=[...r,i.label];return hn(i.sequence,t,n+1,e)}let a=[i.artist,i.title].filter(Boolean).join(` - `);return{id:i.id,songId:i.songId,highRotation:i.highRotation===!0,artist:i.artist,title:i.title,coverUrl:i.coverUrl,audioUrl:i.audioUrl,durationMs:i.durationMs,earoneSongId:i.earoneSongId,earoneRank:i.earoneRank,earoneSpins:i.earoneSpins,activePathLabels:[...r,a||`Song Preset`]}}function gn(e,t=0,n){if(t>$t)return null;let r=en(e);return r?sn(r,(Array.isArray(r.items)?r.items:[]).map(e=>cn(e,t,n)).filter(e=>e!==null)):null}function _n(e,t=0){if(t>$t)return null;let n=en(e);return n?sn(n,(Array.isArray(n.items)?n.items:[]).map(e=>ln(e,t)).filter(e=>e!==null),`autoplay`):null}function vn(e,t=Date.now(),n){let r=gn(e.sequence,0,n);return rn(e.contentMode,r)!==`sequence`||!r?null:mn(r,t,0,[])}function yn(e,t=Date.now()){let n=_n(e.sequence);return n?hn(n,t,0,[]):null}var bn=120,xn=76,Sn=96,Cn=.5,wn=M.ruleWidth+28,Tn=1920-M.safeX*2,En=({show:e=!0,textSequence:t,ctaSequence:n,inline:r=!1,keySafe:i=!1})=>{let[a,o]=(0,_.useState)(()=>Date.now()),[s,c]=qt(),l=(0,_.useMemo)(()=>gn(t,0,{includeMarquee:!0}),[t]),u=(0,_.useMemo)(()=>gn(n),[n]),d=l?.mode===`autoplay`||u?.mode===`autoplay`;(0,_.useEffect)(()=>{if(!d)return;let e=window.setInterval(()=>o(Date.now()),250);return()=>window.clearInterval(e)},[d,l?.mode,l?.startedAt,l?.intervalMs,l?.loop,l?.items.length,u?.mode,u?.startedAt,u?.intervalMs,u?.loop,u?.items.length]),(0,_.useEffect)(()=>o(Date.now()),[t,n]);let f=vn({contentMode:`sequence`,sequence:l},a,{includeMarquee:!0}),p=vn({contentMode:`sequence`,sequence:u},a),m=(f?.text.trim()??``).toUpperCase(),h=!!f?.useMarquee,g=p?.text.trim()??``;if(!e||!m)return null;let v=(c||Tn)-wn,y=m.length*Cn*xn>v,b=y?xn:Kt(m,v,bn,xn,Cn),x={margin:0,color:`#ffffff`,fontFamily:M.display,fontWeight:800,letterSpacing:`-0.03em`,textShadow:i?`none`:M.displayShadow};return(0,T.jsxs)(`div`,{ref:s,className:`modoitaliano-giorgia-chyron`,"aria-label":`Modo Italiano Giorgia chyron`,style:{paddingLeft:`${wn}px`,...r?{position:`relative`,width:`100%`}:{position:`absolute`,left:`${M.safeX}px`,right:`${M.safeX}px`,bottom:`${M.safeBottom}px`,zIndex:950}},children:[(0,T.jsx)(`style`,{children:`
|
|
68
68
|
@keyframes modoItalianoGiorgiaChyronMarquee {
|
|
69
69
|
from { transform: translateX(0); }
|
|
@@ -74,7 +74,21 @@
|
|
|
74
74
|
"properties": {
|
|
75
75
|
"url": { "type": "string", "minLength": 1 },
|
|
76
76
|
"alt": { "type": "string" },
|
|
77
|
-
"caption": { "type": "string" }
|
|
77
|
+
"caption": { "type": "string" },
|
|
78
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
79
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
80
|
+
"variants": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"properties": {
|
|
85
|
+
"url": { "type": "string", "minLength": 1 },
|
|
86
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
87
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
88
|
+
},
|
|
89
|
+
"required": ["url", "width", "height"]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
78
92
|
},
|
|
79
93
|
"required": ["url", "alt"]
|
|
80
94
|
},
|
|
@@ -374,7 +388,21 @@
|
|
|
374
388
|
"properties": {
|
|
375
389
|
"url": { "type": "string", "minLength": 1 },
|
|
376
390
|
"alt": { "type": "string" },
|
|
377
|
-
"caption": { "type": "string" }
|
|
391
|
+
"caption": { "type": "string" },
|
|
392
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
393
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
394
|
+
"variants": {
|
|
395
|
+
"type": "array",
|
|
396
|
+
"items": {
|
|
397
|
+
"type": "object",
|
|
398
|
+
"properties": {
|
|
399
|
+
"url": { "type": "string", "minLength": 1 },
|
|
400
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
401
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
402
|
+
},
|
|
403
|
+
"required": ["url", "width", "height"]
|
|
404
|
+
}
|
|
405
|
+
}
|
|
378
406
|
},
|
|
379
407
|
"required": ["url", "alt"]
|
|
380
408
|
},
|
|
@@ -627,7 +655,21 @@
|
|
|
627
655
|
"properties": {
|
|
628
656
|
"url": { "type": "string", "minLength": 1 },
|
|
629
657
|
"alt": { "type": "string" },
|
|
630
|
-
"caption": { "type": "string" }
|
|
658
|
+
"caption": { "type": "string" },
|
|
659
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
660
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
661
|
+
"variants": {
|
|
662
|
+
"type": "array",
|
|
663
|
+
"items": {
|
|
664
|
+
"type": "object",
|
|
665
|
+
"properties": {
|
|
666
|
+
"url": { "type": "string", "minLength": 1 },
|
|
667
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
668
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
669
|
+
},
|
|
670
|
+
"required": ["url", "width", "height"]
|
|
671
|
+
}
|
|
672
|
+
}
|
|
631
673
|
},
|
|
632
674
|
"required": ["url", "alt"]
|
|
633
675
|
},
|
|
@@ -927,7 +969,21 @@
|
|
|
927
969
|
"properties": {
|
|
928
970
|
"url": { "type": "string", "minLength": 1 },
|
|
929
971
|
"alt": { "type": "string" },
|
|
930
|
-
"caption": { "type": "string" }
|
|
972
|
+
"caption": { "type": "string" },
|
|
973
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
974
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
975
|
+
"variants": {
|
|
976
|
+
"type": "array",
|
|
977
|
+
"items": {
|
|
978
|
+
"type": "object",
|
|
979
|
+
"properties": {
|
|
980
|
+
"url": { "type": "string", "minLength": 1 },
|
|
981
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
982
|
+
"height": { "type": "integer", "minimum": 1 }
|
|
983
|
+
},
|
|
984
|
+
"required": ["url", "width", "height"]
|
|
985
|
+
}
|
|
986
|
+
}
|
|
931
987
|
},
|
|
932
988
|
"required": ["url", "alt"]
|
|
933
989
|
},
|
|
@@ -121,6 +121,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
121
121
|
readonly caption: {
|
|
122
122
|
readonly type: "string";
|
|
123
123
|
};
|
|
124
|
+
readonly width: {
|
|
125
|
+
readonly type: "integer";
|
|
126
|
+
readonly minimum: 1;
|
|
127
|
+
};
|
|
128
|
+
readonly height: {
|
|
129
|
+
readonly type: "integer";
|
|
130
|
+
readonly minimum: 1;
|
|
131
|
+
};
|
|
132
|
+
readonly variants: {
|
|
133
|
+
readonly type: "array";
|
|
134
|
+
readonly items: {
|
|
135
|
+
readonly type: "object";
|
|
136
|
+
readonly properties: {
|
|
137
|
+
readonly url: {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly minLength: 1;
|
|
140
|
+
};
|
|
141
|
+
readonly width: {
|
|
142
|
+
readonly type: "integer";
|
|
143
|
+
readonly minimum: 1;
|
|
144
|
+
};
|
|
145
|
+
readonly height: {
|
|
146
|
+
readonly type: "integer";
|
|
147
|
+
readonly minimum: 1;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
readonly required: readonly ["url", "width", "height"];
|
|
151
|
+
};
|
|
152
|
+
};
|
|
124
153
|
};
|
|
125
154
|
readonly required: readonly ["url", "alt"];
|
|
126
155
|
};
|
|
@@ -591,6 +620,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
591
620
|
readonly caption: {
|
|
592
621
|
readonly type: "string";
|
|
593
622
|
};
|
|
623
|
+
readonly width: {
|
|
624
|
+
readonly type: "integer";
|
|
625
|
+
readonly minimum: 1;
|
|
626
|
+
};
|
|
627
|
+
readonly height: {
|
|
628
|
+
readonly type: "integer";
|
|
629
|
+
readonly minimum: 1;
|
|
630
|
+
};
|
|
631
|
+
readonly variants: {
|
|
632
|
+
readonly type: "array";
|
|
633
|
+
readonly items: {
|
|
634
|
+
readonly type: "object";
|
|
635
|
+
readonly properties: {
|
|
636
|
+
readonly url: {
|
|
637
|
+
readonly type: "string";
|
|
638
|
+
readonly minLength: 1;
|
|
639
|
+
};
|
|
640
|
+
readonly width: {
|
|
641
|
+
readonly type: "integer";
|
|
642
|
+
readonly minimum: 1;
|
|
643
|
+
};
|
|
644
|
+
readonly height: {
|
|
645
|
+
readonly type: "integer";
|
|
646
|
+
readonly minimum: 1;
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
readonly required: readonly ["url", "width", "height"];
|
|
650
|
+
};
|
|
651
|
+
};
|
|
594
652
|
};
|
|
595
653
|
readonly required: readonly ["url", "alt"];
|
|
596
654
|
};
|
|
@@ -972,6 +1030,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
972
1030
|
readonly caption: {
|
|
973
1031
|
readonly type: "string";
|
|
974
1032
|
};
|
|
1033
|
+
readonly width: {
|
|
1034
|
+
readonly type: "integer";
|
|
1035
|
+
readonly minimum: 1;
|
|
1036
|
+
};
|
|
1037
|
+
readonly height: {
|
|
1038
|
+
readonly type: "integer";
|
|
1039
|
+
readonly minimum: 1;
|
|
1040
|
+
};
|
|
1041
|
+
readonly variants: {
|
|
1042
|
+
readonly type: "array";
|
|
1043
|
+
readonly items: {
|
|
1044
|
+
readonly type: "object";
|
|
1045
|
+
readonly properties: {
|
|
1046
|
+
readonly url: {
|
|
1047
|
+
readonly type: "string";
|
|
1048
|
+
readonly minLength: 1;
|
|
1049
|
+
};
|
|
1050
|
+
readonly width: {
|
|
1051
|
+
readonly type: "integer";
|
|
1052
|
+
readonly minimum: 1;
|
|
1053
|
+
};
|
|
1054
|
+
readonly height: {
|
|
1055
|
+
readonly type: "integer";
|
|
1056
|
+
readonly minimum: 1;
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
readonly required: readonly ["url", "width", "height"];
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
975
1062
|
};
|
|
976
1063
|
readonly required: readonly ["url", "alt"];
|
|
977
1064
|
};
|
|
@@ -1442,6 +1529,35 @@ export declare const canonicalDocumentSchema: {
|
|
|
1442
1529
|
readonly caption: {
|
|
1443
1530
|
readonly type: "string";
|
|
1444
1531
|
};
|
|
1532
|
+
readonly width: {
|
|
1533
|
+
readonly type: "integer";
|
|
1534
|
+
readonly minimum: 1;
|
|
1535
|
+
};
|
|
1536
|
+
readonly height: {
|
|
1537
|
+
readonly type: "integer";
|
|
1538
|
+
readonly minimum: 1;
|
|
1539
|
+
};
|
|
1540
|
+
readonly variants: {
|
|
1541
|
+
readonly type: "array";
|
|
1542
|
+
readonly items: {
|
|
1543
|
+
readonly type: "object";
|
|
1544
|
+
readonly properties: {
|
|
1545
|
+
readonly url: {
|
|
1546
|
+
readonly type: "string";
|
|
1547
|
+
readonly minLength: 1;
|
|
1548
|
+
};
|
|
1549
|
+
readonly width: {
|
|
1550
|
+
readonly type: "integer";
|
|
1551
|
+
readonly minimum: 1;
|
|
1552
|
+
};
|
|
1553
|
+
readonly height: {
|
|
1554
|
+
readonly type: "integer";
|
|
1555
|
+
readonly minimum: 1;
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
readonly required: readonly ["url", "width", "height"];
|
|
1559
|
+
};
|
|
1560
|
+
};
|
|
1445
1561
|
};
|
|
1446
1562
|
readonly required: readonly ["url", "alt"];
|
|
1447
1563
|
};
|
|
@@ -129,6 +129,35 @@ export const canonicalDocumentSchema = {
|
|
|
129
129
|
caption: {
|
|
130
130
|
type: "string",
|
|
131
131
|
},
|
|
132
|
+
width: {
|
|
133
|
+
type: "integer",
|
|
134
|
+
minimum: 1,
|
|
135
|
+
},
|
|
136
|
+
height: {
|
|
137
|
+
type: "integer",
|
|
138
|
+
minimum: 1,
|
|
139
|
+
},
|
|
140
|
+
variants: {
|
|
141
|
+
type: "array",
|
|
142
|
+
items: {
|
|
143
|
+
type: "object",
|
|
144
|
+
properties: {
|
|
145
|
+
url: {
|
|
146
|
+
type: "string",
|
|
147
|
+
minLength: 1,
|
|
148
|
+
},
|
|
149
|
+
width: {
|
|
150
|
+
type: "integer",
|
|
151
|
+
minimum: 1,
|
|
152
|
+
},
|
|
153
|
+
height: {
|
|
154
|
+
type: "integer",
|
|
155
|
+
minimum: 1,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ["url", "width", "height"],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
132
161
|
},
|
|
133
162
|
required: ["url", "alt"],
|
|
134
163
|
},
|
|
@@ -634,6 +663,35 @@ export const canonicalDocumentSchema = {
|
|
|
634
663
|
caption: {
|
|
635
664
|
type: "string",
|
|
636
665
|
},
|
|
666
|
+
width: {
|
|
667
|
+
type: "integer",
|
|
668
|
+
minimum: 1,
|
|
669
|
+
},
|
|
670
|
+
height: {
|
|
671
|
+
type: "integer",
|
|
672
|
+
minimum: 1,
|
|
673
|
+
},
|
|
674
|
+
variants: {
|
|
675
|
+
type: "array",
|
|
676
|
+
items: {
|
|
677
|
+
type: "object",
|
|
678
|
+
properties: {
|
|
679
|
+
url: {
|
|
680
|
+
type: "string",
|
|
681
|
+
minLength: 1,
|
|
682
|
+
},
|
|
683
|
+
width: {
|
|
684
|
+
type: "integer",
|
|
685
|
+
minimum: 1,
|
|
686
|
+
},
|
|
687
|
+
height: {
|
|
688
|
+
type: "integer",
|
|
689
|
+
minimum: 1,
|
|
690
|
+
},
|
|
691
|
+
},
|
|
692
|
+
required: ["url", "width", "height"],
|
|
693
|
+
},
|
|
694
|
+
},
|
|
637
695
|
},
|
|
638
696
|
required: ["url", "alt"],
|
|
639
697
|
},
|
|
@@ -1037,6 +1095,35 @@ export const canonicalDocumentSchema = {
|
|
|
1037
1095
|
caption: {
|
|
1038
1096
|
type: "string",
|
|
1039
1097
|
},
|
|
1098
|
+
width: {
|
|
1099
|
+
type: "integer",
|
|
1100
|
+
minimum: 1,
|
|
1101
|
+
},
|
|
1102
|
+
height: {
|
|
1103
|
+
type: "integer",
|
|
1104
|
+
minimum: 1,
|
|
1105
|
+
},
|
|
1106
|
+
variants: {
|
|
1107
|
+
type: "array",
|
|
1108
|
+
items: {
|
|
1109
|
+
type: "object",
|
|
1110
|
+
properties: {
|
|
1111
|
+
url: {
|
|
1112
|
+
type: "string",
|
|
1113
|
+
minLength: 1,
|
|
1114
|
+
},
|
|
1115
|
+
width: {
|
|
1116
|
+
type: "integer",
|
|
1117
|
+
minimum: 1,
|
|
1118
|
+
},
|
|
1119
|
+
height: {
|
|
1120
|
+
type: "integer",
|
|
1121
|
+
minimum: 1,
|
|
1122
|
+
},
|
|
1123
|
+
},
|
|
1124
|
+
required: ["url", "width", "height"],
|
|
1125
|
+
},
|
|
1126
|
+
},
|
|
1040
1127
|
},
|
|
1041
1128
|
required: ["url", "alt"],
|
|
1042
1129
|
},
|
|
@@ -1542,6 +1629,35 @@ export const canonicalDocumentSchema = {
|
|
|
1542
1629
|
caption: {
|
|
1543
1630
|
type: "string",
|
|
1544
1631
|
},
|
|
1632
|
+
width: {
|
|
1633
|
+
type: "integer",
|
|
1634
|
+
minimum: 1,
|
|
1635
|
+
},
|
|
1636
|
+
height: {
|
|
1637
|
+
type: "integer",
|
|
1638
|
+
minimum: 1,
|
|
1639
|
+
},
|
|
1640
|
+
variants: {
|
|
1641
|
+
type: "array",
|
|
1642
|
+
items: {
|
|
1643
|
+
type: "object",
|
|
1644
|
+
properties: {
|
|
1645
|
+
url: {
|
|
1646
|
+
type: "string",
|
|
1647
|
+
minLength: 1,
|
|
1648
|
+
},
|
|
1649
|
+
width: {
|
|
1650
|
+
type: "integer",
|
|
1651
|
+
minimum: 1,
|
|
1652
|
+
},
|
|
1653
|
+
height: {
|
|
1654
|
+
type: "integer",
|
|
1655
|
+
minimum: 1,
|
|
1656
|
+
},
|
|
1657
|
+
},
|
|
1658
|
+
required: ["url", "width", "height"],
|
|
1659
|
+
},
|
|
1660
|
+
},
|
|
1545
1661
|
},
|
|
1546
1662
|
required: ["url", "alt"],
|
|
1547
1663
|
},
|
|
@@ -35,6 +35,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
35
35
|
url: string;
|
|
36
36
|
alt: string;
|
|
37
37
|
caption?: string;
|
|
38
|
+
width?: number;
|
|
39
|
+
height?: number;
|
|
40
|
+
variants?: {
|
|
41
|
+
url: string;
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
[k: string]: unknown;
|
|
45
|
+
}[];
|
|
38
46
|
[k: string]: unknown;
|
|
39
47
|
};
|
|
40
48
|
media?: {
|
|
@@ -199,6 +207,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
199
207
|
url: string;
|
|
200
208
|
alt: string;
|
|
201
209
|
caption?: string;
|
|
210
|
+
width?: number;
|
|
211
|
+
height?: number;
|
|
212
|
+
variants?: {
|
|
213
|
+
url: string;
|
|
214
|
+
width: number;
|
|
215
|
+
height: number;
|
|
216
|
+
[k: string]: unknown;
|
|
217
|
+
}[];
|
|
202
218
|
[k: string]: unknown;
|
|
203
219
|
};
|
|
204
220
|
updatedAt?: string;
|
|
@@ -323,6 +339,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
323
339
|
url: string;
|
|
324
340
|
alt: string;
|
|
325
341
|
caption?: string;
|
|
342
|
+
width?: number;
|
|
343
|
+
height?: number;
|
|
344
|
+
variants?: {
|
|
345
|
+
url: string;
|
|
346
|
+
width: number;
|
|
347
|
+
height: number;
|
|
348
|
+
[k: string]: unknown;
|
|
349
|
+
}[];
|
|
326
350
|
[k: string]: unknown;
|
|
327
351
|
};
|
|
328
352
|
media?: {
|
|
@@ -487,6 +511,14 @@ export type CronkiteCanonicalDocument = {
|
|
|
487
511
|
url: string;
|
|
488
512
|
alt: string;
|
|
489
513
|
caption?: string;
|
|
514
|
+
width?: number;
|
|
515
|
+
height?: number;
|
|
516
|
+
variants?: {
|
|
517
|
+
url: string;
|
|
518
|
+
width: number;
|
|
519
|
+
height: number;
|
|
520
|
+
[k: string]: unknown;
|
|
521
|
+
}[];
|
|
490
522
|
[k: string]: unknown;
|
|
491
523
|
};
|
|
492
524
|
updatedAt?: string;
|
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
<a class='card' href='{{url}}' aria-label='Leer artículo: {{title}}'>
|
|
200
200
|
{{#if featuredImage.url}}
|
|
201
201
|
<div class='card-bg'>
|
|
202
|
-
<img src='{{featuredImage.url}}' alt='{{#if featuredImage.
|
|
202
|
+
{{#if featuredImage.alt}}<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 640px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />{{else}}<img src='{{featuredImage.url}}' alt='{{title}}'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 640px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />{{/if}}
|
|
203
203
|
</div>
|
|
204
204
|
{{/if}}
|
|
205
205
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<figure class='my-8'>
|
|
2
|
-
<img src='{{url}}' alt='{{alt}}' class='w-full h-auto object-cover' />
|
|
2
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1024px) 66vw, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
3
3
|
{{#if caption}}
|
|
4
4
|
<figcaption class='text-sm text-slate-500 dark:text-slate-400 mt-2'>{{caption}}</figcaption>
|
|
5
5
|
{{/if}}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div class='mt-3 grid grid-cols-1 sm:grid-cols-2 gap-3'>
|
|
12
12
|
{{#each media}}
|
|
13
13
|
<figure class='overflow-hidden rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900'>
|
|
14
|
-
<img src='{{url}}' alt='{{alt}}' class='w-full h-auto object-cover' loading='lazy' />
|
|
14
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1024px) 66vw, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
15
15
|
{{#if caption}}
|
|
16
16
|
<figcaption class='px-3 py-2 text-xs text-slate-500 dark:text-slate-400'>
|
|
17
17
|
{{caption}}
|
|
@@ -2,14 +2,7 @@
|
|
|
2
2
|
<div class='col-span-12 lg:col-span-4'>
|
|
3
3
|
{{#if featuredImage}}
|
|
4
4
|
<div class='mb-6 overflow-hidden aspect-video bg-slate-100'>
|
|
5
|
-
<img
|
|
6
|
-
src='{{featuredImage.url}}'
|
|
7
|
-
alt='{{featuredImage.alt}}'
|
|
8
|
-
class='w-full h-full object-cover'
|
|
9
|
-
fetchpriority='high'
|
|
10
|
-
loading='eager'
|
|
11
|
-
decoding='async'
|
|
12
|
-
/>
|
|
5
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1024px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' loading='eager' decoding='async' />
|
|
13
6
|
</div>
|
|
14
7
|
{{/if}}
|
|
15
8
|
|
|
@@ -90,6 +83,7 @@
|
|
|
90
83
|
url=url
|
|
91
84
|
title=title
|
|
92
85
|
image=featuredImage.url
|
|
86
|
+
imageSource=featuredImage
|
|
93
87
|
alt=featuredImage.alt
|
|
94
88
|
categories=categories
|
|
95
89
|
excerpt=excerpt
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{{#with (lookup articles 0)}}
|
|
4
4
|
<article class='mb-8'>
|
|
5
5
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-video bg-slate-100'>
|
|
6
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105' />
|
|
6
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1024px) 66vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} />
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
<div class='flex items-center text-xs font-bold uppercase tracking-wider text-[#8f0d00] mb-3'>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
{{#each (slice articles 1 3)}}
|
|
24
24
|
<article class='group'>
|
|
25
25
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
26
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
26
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 768px) 33vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
27
27
|
</a>
|
|
28
28
|
<div class='space-y-2'>
|
|
29
29
|
<span class='text-xs font-bold text-[#8f0d00] uppercase tracking-wider'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
url=url
|
|
45
45
|
title=title
|
|
46
46
|
image=featuredImage.url
|
|
47
|
+
imageSource=featuredImage
|
|
47
48
|
alt=featuredImage.alt
|
|
48
49
|
readTime=(formatDate updatedAt)
|
|
49
50
|
showExcerpt=false
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
{{#each (slice articles 13 25)}}
|
|
8
8
|
<article class='group flex flex-col h-full'>
|
|
9
9
|
<a href='{{url}}' class='block mb-3 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
10
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
10
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1024px) 33vw, (min-width: 768px) 50vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
11
11
|
</a>
|
|
12
12
|
<div class='flex-1 flex flex-col'>
|
|
13
13
|
<div class='flex items-center text-xs font-bold uppercase tracking-wider text-[#8f0d00] mb-2'>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{{#with homepageSlots.landing.headline1}}
|
|
4
4
|
<section class='lg:col-span-12 xl:col-span-8 flex flex-col'>
|
|
5
5
|
<a href='{{url}}' class='relative flex-shrink-0 block'>
|
|
6
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-[400px] object-cover rounded' fetchpriority='high' />
|
|
6
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-[400px] object-cover rounded'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1280px) 33vw, (min-width: 1024px) 75vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
9
|
<div class='mt-4 flex-grow flex flex-col'>
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
excerpt=excerpt
|
|
28
28
|
showExcerpt=false
|
|
29
29
|
image=featuredImage.url
|
|
30
|
+
imageSource=featuredImage
|
|
30
31
|
alt=featuredImage.alt
|
|
31
32
|
readTime=(formatDate updatedAt)
|
|
32
33
|
imageSize='w-24 h-24'
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
{{#with homepageSlots.landing.headline6}}
|
|
65
66
|
<div class='flex flex-col'>
|
|
66
67
|
<a href='{{url}}' class='mb-4 flex-shrink-0 h-[180px] block'>
|
|
67
|
-
<img src='{{featuredImage.url}}'
|
|
68
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover rounded'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1280px) 25vw, (min-width: 1024px) 40vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{else}} width='500' height='200'{{/if}} loading='lazy' />
|
|
68
69
|
</a>
|
|
69
70
|
<div class='flex items-center text-slate-500 dark:text-slate-400 text-sm mb-2'>
|
|
70
71
|
<span class='uppercase font-bold'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
url=url
|
|
95
96
|
title=title
|
|
96
97
|
image=featuredImage.url
|
|
98
|
+
imageSource=featuredImage
|
|
97
99
|
alt=featuredImage.alt
|
|
98
100
|
readTime=(formatDate updatedAt)
|
|
99
101
|
showExcerpt=false
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{{#with homepageSlots.mustRead.lead}}
|
|
9
9
|
<article class='grid grid-cols-1 md:grid-cols-2 gap-6 items-start'>
|
|
10
10
|
<a href='{{url}}' class='block aspect-video overflow-hidden bg-slate-100'>
|
|
11
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105' />
|
|
11
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 hover:scale-105'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 768px) 50vw, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
12
12
|
</a>
|
|
13
13
|
<div class='space-y-3'>
|
|
14
14
|
<div class='flex items-center text-xs font-bold uppercase tracking-wider text-[#8f0d00]'>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div class='col-span-1'>
|
|
29
29
|
<article class='group'>
|
|
30
30
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
31
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
31
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 768px) 25vw, 50vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
32
32
|
</a>
|
|
33
33
|
<div class='space-y-2'>
|
|
34
34
|
<span class='text-xs font-bold text-[#8f0d00] uppercase tracking-wider'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<div class='col-span-1'>
|
|
45
45
|
<article class='group'>
|
|
46
46
|
<a href='{{url}}' class='block mb-4 overflow-hidden aspect-[3/2] bg-slate-100'>
|
|
47
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105' />
|
|
47
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover transition-transform duration-500 group-hover:scale-105'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 768px) 25vw, 50vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
48
48
|
</a>
|
|
49
49
|
<div class='space-y-2'>
|
|
50
50
|
<span class='text-xs font-bold text-[#004d99] uppercase tracking-wider'>{{#with (lookup categories 0)}}{{name}}{{/with}}</span>
|
|
@@ -4,12 +4,7 @@
|
|
|
4
4
|
{{#if featuredImage.url}}
|
|
5
5
|
<section class='relative w-full overflow-hidden'>
|
|
6
6
|
<div class='hidden lg:block absolute inset-0 pointer-events-none' aria-hidden='true'>
|
|
7
|
-
<img
|
|
8
|
-
src='{{featuredImage.url}}'
|
|
9
|
-
alt=''
|
|
10
|
-
class='w-full h-full object-cover scale-125 opacity-90'
|
|
11
|
-
style='filter: blur(16px);'
|
|
12
|
-
/>
|
|
7
|
+
<img src='{{featuredImage.url}}' alt='' class='w-full h-full object-cover scale-125 opacity-90' style='filter: blur(16px);'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
13
8
|
</div>
|
|
14
9
|
|
|
15
10
|
<div class='relative max-w-screen-xl mx-auto px-0 lg:px-6 xl:px-8'>
|
|
@@ -20,23 +15,11 @@
|
|
|
20
15
|
{{#if media}}
|
|
21
16
|
<div data-carousel='live-story-hero' class='relative'>
|
|
22
17
|
<div class='carousel-slide active opacity-100 transition-opacity duration-700'>
|
|
23
|
-
<img
|
|
24
|
-
src='{{featuredImage.url}}'
|
|
25
|
-
alt='{{featuredImage.alt}}'
|
|
26
|
-
class='w-full h-auto object-cover object-center'
|
|
27
|
-
style='max-height:520px;'
|
|
28
|
-
fetchpriority='high'
|
|
29
|
-
/>
|
|
18
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-auto object-cover object-center' style='max-height:520px;'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1280px) 1200px, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
30
19
|
</div>
|
|
31
20
|
{{#each media}}
|
|
32
21
|
<div class='carousel-slide hidden opacity-0 transition-opacity duration-700'>
|
|
33
|
-
<img
|
|
34
|
-
src='{{url}}'
|
|
35
|
-
alt='{{alt}}'
|
|
36
|
-
class='w-full h-auto object-cover object-center'
|
|
37
|
-
style='max-height:520px;'
|
|
38
|
-
loading='lazy'
|
|
39
|
-
/>
|
|
22
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover object-center' style='max-height:520px;'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1280px) 1200px, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
40
23
|
</div>
|
|
41
24
|
{{/each}}
|
|
42
25
|
<div class='absolute inset-x-0 bottom-4 z-20 flex items-center justify-center gap-2'>
|
|
@@ -54,13 +37,7 @@
|
|
|
54
37
|
</button>
|
|
55
38
|
</div>
|
|
56
39
|
{{else}}
|
|
57
|
-
<img
|
|
58
|
-
src='{{featuredImage.url}}'
|
|
59
|
-
alt='{{featuredImage.alt}}'
|
|
60
|
-
class='w-full h-auto object-cover object-center'
|
|
61
|
-
style='max-height:520px;'
|
|
62
|
-
fetchpriority='high'
|
|
63
|
-
/>
|
|
40
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-auto object-cover object-center' style='max-height:520px;'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='(min-width: 1280px) 1200px, 100vw'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} fetchpriority='high' />
|
|
64
41
|
{{/if}}
|
|
65
42
|
</figure>
|
|
66
43
|
</div>
|
|
@@ -145,7 +122,7 @@
|
|
|
145
122
|
<div class='mt-4 grid grid-cols-1 sm:grid-cols-2 gap-3'>
|
|
146
123
|
{{#each media}}
|
|
147
124
|
<figure class='overflow-hidden rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900'>
|
|
148
|
-
<img src='{{url}}' alt='{{alt}}' class='w-full h-auto object-cover' loading='lazy' />
|
|
125
|
+
<img src='{{this.url}}' alt='{{alt}}' class='w-full h-auto object-cover'{{#if this.variants}} srcset='{{#each this.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if this.width}}, {{this.url}} {{this.width}}w{{/if}}' sizes='(min-width: 1024px) 66vw, 100vw'{{/if}}{{#if this.width}}{{#if this.height}} width='{{this.width}}' height='{{this.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
149
126
|
{{#if caption}}
|
|
150
127
|
<figcaption class='px-3 py-2 text-xs text-slate-500 dark:text-slate-400'>
|
|
151
128
|
{{caption}}
|
|
@@ -22,11 +22,15 @@
|
|
|
22
22
|
{{#unless (eq showImage false)}}
|
|
23
23
|
{{#if image}}
|
|
24
24
|
<a href='{{url}}' class='{{#if imageSize}}{{imageSize}}{{else}}w-32 h-24{{/if}} flex-shrink-0 block'>
|
|
25
|
-
|
|
25
|
+
{{#if imageSource}}
|
|
26
|
+
<img src='{{imageSource.url}}' alt='{{alt}}' class='w-full h-full object-cover rounded{{#if imageClasses}} {{imageClasses}}{{/if}}'{{#if imageSource.variants}} srcset='{{#each imageSource.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if imageSource.width}}, {{imageSource.url}} {{imageSource.width}}w{{/if}}' sizes='128px'{{/if}}{{#if imageSource.width}}{{#if imageSource.height}} width='{{imageSource.width}}' height='{{imageSource.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
27
|
+
{{else}}
|
|
28
|
+
<img src='{{image}}' alt='{{alt}}' class='w-full h-full object-cover rounded {{#if imageClasses}}{{imageClasses}}{{/if}}' loading='lazy' />
|
|
29
|
+
{{/if}}
|
|
26
30
|
</a>
|
|
27
31
|
{{else if featuredImage.url}}
|
|
28
32
|
<a href='{{url}}' class='{{#if imageSize}}{{imageSize}}{{else}}w-32 h-24{{/if}} flex-shrink-0 block'>
|
|
29
|
-
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover rounded
|
|
33
|
+
<img src='{{featuredImage.url}}' alt='{{featuredImage.alt}}' class='w-full h-full object-cover rounded{{#if imageClasses}} {{imageClasses}}{{/if}}'{{#if featuredImage.variants}} srcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' sizes='128px'{{/if}}{{#if featuredImage.width}}{{#if featuredImage.height}} width='{{featuredImage.width}}' height='{{featuredImage.height}}'{{/if}}{{/if}} loading='lazy' />
|
|
30
34
|
</a>
|
|
31
35
|
{{/if}}
|
|
32
36
|
{{/unless}}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{{/if}}
|
|
14
14
|
{{else}}
|
|
15
15
|
{{#if featuredImage.url}}
|
|
16
|
-
<link rel='preload' as='image' href='{{featuredImage.url}}' fetchpriority='high' />
|
|
16
|
+
<link rel='preload' as='image' href='{{featuredImage.url}}'{{#if featuredImage.variants}} imagesrcset='{{#each featuredImage.variants}}{{url}} {{width}}w{{#unless @last}}, {{/unless}}{{/each}}{{#if featuredImage.width}}, {{featuredImage.url}} {{featuredImage.width}}w{{/if}}' imagesizes='100vw'{{/if}} fetchpriority='high' />
|
|
17
17
|
{{/if}}
|
|
18
18
|
{{/if}}
|
|
19
19
|
<meta name='description' content='{{#if seo.metaDescription}}{{seo.metaDescription}}{{else}}{{excerpt}}{{/if}}' />
|