+ {t('countdown.launchPrefix')} {dateLabel} {t('countdown.launchAt')}{' '} + {timeLabel} {t('countdown.clock')} +
+ +diff --git a/hifi-src/src/App.jsx b/hifi-src/src/App.jsx index 912bd89..6f4d15e 100644 --- a/hifi-src/src/App.jsx +++ b/hifi-src/src/App.jsx @@ -85,6 +85,7 @@ const EmailSettings = lazyPage(() => import('./pages/admin/settings/EmailSetting const DatabaseSettings = lazyPage(() => import('./pages/admin/settings/DatabaseSettings.jsx')); const ExportImportSettings = lazyPage(() => import('./pages/admin/settings/ExportImportSettings.jsx')); const MaintenanceSettings = lazyPage(() => import('./pages/admin/settings/MaintenanceSettings.jsx')); +const CountdownSettings = lazyPage(() => import('./pages/admin/settings/CountdownSettings.jsx')); const ResetSettings = lazyPage(() => import('./pages/admin/settings/ResetSettings.jsx')); const blankScreen =
; @@ -159,6 +160,7 @@ export default function App() {@@ -257,6 +263,13 @@ export default function AdminLayout() { {hasPermission('settings.manage') && Ändern}
)} + {countdownUntil && ( ++ Launch-Countdown läuft – Besucher sehen bis{' '} + {new Date(countdownUntil).toLocaleString('de-DE', { dateStyle: 'medium', timeStyle: 'short', timeZone: 'Europe/Berlin' })} Uhr nur den Countdown.{' '} + {hasPermission('settings.manage') && Ändern} +
+ )} {hiddenAreaLabels.length > 0 && (
Ausgeblendet für Besucher: {hiddenAreaLabels.join(', ')}.{' '}
diff --git a/hifi-src/src/components/CountdownTeaser.jsx b/hifi-src/src/components/CountdownTeaser.jsx
new file mode 100644
index 0000000..effacbe
--- /dev/null
+++ b/hifi-src/src/components/CountdownTeaser.jsx
@@ -0,0 +1,324 @@
+import { useEffect, useMemo, useState } from 'react';
+import { Link } from 'react-router-dom';
+import { AnimatePresence, motion, useReducedMotion } from 'framer-motion';
+import { CalendarPlus, LogIn, Phone, X } from 'lucide-react';
+import { useLanguage } from '../context/LanguageContext.jsx';
+import { telHref } from '../utils/contactLinks.js';
+import logoDark from '../assets/logo-dark.png';
+import defaultBackground from '../assets/photos/hero-trunk.webp';
+
+const EASE = [0.16, 1, 0.3, 1];
+const michroma = { fontFamily: "'Michroma', sans-serif" };
+const condensed = { fontFamily: "'Barlow Condensed', sans-serif" };
+
+// Restzeit in ms bis zum Launch - mit dem Uhr-Versatz zwischen Server und Browser, damit eine
+// falsch gehende Uhr beim Besucher den Countdown nicht verschiebt.
+export function countdownRemaining(countdown, clockOffset = 0) {
+ if (!countdown?.launch_at) return 0;
+ return new Date(countdown.launch_at).getTime() - (Date.now() + clockOffset);
+}
+
+// Versatz Server-Uhr minus Browser-Uhr zum Zeitpunkt der Antwort (_received_at setzt PublicLayout).
+export function countdownClockOffset(countdown, receivedAt) {
+ if (!countdown?.server_time || !receivedAt) return 0;
+ return new Date(countdown.server_time).getTime() - receivedAt;
+}
+
+function splitRemaining(ms) {
+ const total = Math.max(0, Math.floor(ms / 1000));
+ return {
+ days: Math.floor(total / 86400),
+ hours: Math.floor((total % 86400) / 3600),
+ minutes: Math.floor((total % 3600) / 60),
+ seconds: total % 60,
+ };
+}
+
+// Kalendereintrag (.ics) fuer "Erinnere mich" - laeuft komplett im Browser.
+function calendarHref(launchAt, title) {
+ const start = new Date(launchAt);
+ const end = new Date(start.getTime() + 60 * 60 * 1000);
+ const fmt = (d) => d.toISOString().replace(/[-:]/g, '').replace(/\.\d{3}/, '');
+ const ics = [
+ 'BEGIN:VCALENDAR',
+ 'VERSION:2.0',
+ 'PRODID:-//HifiPlanet//Countdown//DE',
+ 'BEGIN:VEVENT',
+ `UID:launch-${fmt(start)}@hifi-planet.de`,
+ `DTSTAMP:${fmt(new Date())}`,
+ `DTSTART:${fmt(start)}`,
+ `DTEND:${fmt(end)}`,
+ `SUMMARY:${title}`,
+ `URL:${window.location.origin}`,
+ 'END:VEVENT',
+ 'END:VCALENDAR',
+ ].join('\r\n');
+ return `data:text/calendar;charset=utf-8,${encodeURIComponent(ics)}`;
+}
+
+// Eine Ziffer, die beim Wechsel nach unten wegrollt - wie ein Zaehlwerk.
+function RollingDigit({ value, reduceMotion }) {
+ return (
+
+
+ {t('countdown.launchPrefix')} {dateLabel} {t('countdown.launchAt')}{' '} + {timeLabel} {t('countdown.clock')} +
+ +Lädt…
; + } + + const remaining = remainingLabel(form.launch_at); + const live = form.enabled && remaining && !remaining.past; + + return ( + + ); +} diff --git a/hifi-src/src/pages/admin/settings/SettingsLayout.jsx b/hifi-src/src/pages/admin/settings/SettingsLayout.jsx index b2943f6..98edf15 100644 --- a/hifi-src/src/pages/admin/settings/SettingsLayout.jsx +++ b/hifi-src/src/pages/admin/settings/SettingsLayout.jsx @@ -8,6 +8,7 @@ const PAGES = { design: ['Aussehen', 'Titelbild, Schriften und das Aussehen der Kacheln auf der Website.'], legal: ['Rechtstexte', 'Impressum, Datenschutzerklärung und AGB.'], maintenance: ['Wartungsmodus', 'Die ganze Website oder einzelne Bereiche vorübergehend für Besucher sperren.'], + countdown: ['Launch-Countdown', 'Vor dem Start nur einen Countdown zeigen, der neugierig macht. Danach öffnet sich die Website von selbst.'], email: ['E-Mail-Versand', 'Zugangsdaten des Mail-Servers und die Texte der automatischen E-Mails.'], google: ['Google-Dienste', 'Google Analytics und Google-Bewertungen anbinden. Nur für Techniker.'], database: ['Datenbank', 'Verbindung und Struktur der Datenbank. Nur für Techniker.'], diff --git a/hifi/api/database/migration_countdown.sql b/hifi/api/database/migration_countdown.sql new file mode 100644 index 0000000..0b1f0f6 --- /dev/null +++ b/hifi/api/database/migration_countdown.sql @@ -0,0 +1,8 @@ +-- Countdown-Teaser vor dem Launch (Einstellungen > Countdown). +-- Wird auch automatisch nachgeruestet (SchemaController::ensureCurrent). +ALTER TABLE app_settings ADD COLUMN countdown_enabled TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE app_settings ADD COLUMN countdown_launch_at DATETIME NULL; +ALTER TABLE app_settings ADD COLUMN countdown_title VARCHAR(150) NULL; +ALTER TABLE app_settings ADD COLUMN countdown_title_en VARCHAR(150) NULL; +ALTER TABLE app_settings ADD COLUMN countdown_message VARCHAR(500) NULL; +ALTER TABLE app_settings ADD COLUMN countdown_message_en VARCHAR(500) NULL; diff --git a/hifi/api/database/schema.sql b/hifi/api/database/schema.sql index adb0828..69e3f28 100644 --- a/hifi/api/database/schema.sql +++ b/hifi/api/database/schema.sql @@ -60,6 +60,12 @@ CREATE TABLE app_settings ( mail_owner_body TEXT NULL, price_note VARCHAR(150) NULL, price_note_en VARCHAR(150) NULL, + countdown_enabled TINYINT(1) NOT NULL DEFAULT 0, + countdown_launch_at DATETIME NULL, + countdown_title VARCHAR(150) NULL, + countdown_title_en VARCHAR(150) NULL, + countdown_message VARCHAR(500) NULL, + countdown_message_en VARCHAR(500) NULL, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB; diff --git a/hifi/api/public/index.php b/hifi/api/public/index.php index d688a3b..3b4117a 100644 --- a/hifi/api/public/index.php +++ b/hifi/api/public/index.php @@ -285,6 +285,7 @@ $router->get('/analytics/report', $admin(fn($p) => AnalyticsController::report() $router->get('/maintenance', fn($p) => MaintenanceController::status()); $router->post('/maintenance', $perm('settings.manage', fn($p) => MaintenanceController::update())); +$router->post('/countdown', $perm('settings.manage', fn($p) => MaintenanceController::updateCountdown())); $router->get('/site-settings', fn($p) => SiteSettingsController::show()); // Live-Bearbeiten-Modus auf der Website: Berechtigung wird je Aenderung im Controller geprueft. diff --git a/hifi/api/src/Controllers/MaintenanceController.php b/hifi/api/src/Controllers/MaintenanceController.php index 022618a..cd32862 100644 --- a/hifi/api/src/Controllers/MaintenanceController.php +++ b/hifi/api/src/Controllers/MaintenanceController.php @@ -30,9 +30,85 @@ class MaintenanceController 'global' => ['enabled' => (bool) $row['maintenance_global'], 'message' => $row['maintenance_global_message']], 'services' => ['enabled' => (bool) $row['maintenance_services'], 'message' => $row['maintenance_services_message']], 'vehicles' => ['enabled' => (bool) $row['maintenance_vehicles'], 'message' => $row['maintenance_vehicles_message']], + 'countdown' => self::countdown($row), ]; } + // Der Startzeitpunkt wird im Admin als deutsche Ortszeit eingegeben und so gespeichert. + private const COUNTDOWN_TIMEZONE = 'Europe/Berlin'; + + /** + * Countdown-Teaser vor dem Launch. "active" ist nur wahr, solange der Schalter an ist UND der + * Startzeitpunkt noch in der Zukunft liegt - danach ist die Seite automatisch offen. + * server_time erlaubt dem Browser, eine falsch gehende Uhr beim Herunterzaehlen auszugleichen. + */ + private static function countdown(array $row): array + { + $tz = new \DateTimeZone(self::COUNTDOWN_TIMEZONE); + $now = new \DateTimeImmutable('now', $tz); + $launch = null; + if (!empty($row['countdown_launch_at'])) { + try { + $launch = new \DateTimeImmutable($row['countdown_launch_at'], $tz); + } catch (\Throwable $e) { + $launch = null; + } + } + $enabled = !empty($row['countdown_enabled']); + + return [ + 'enabled' => $enabled, + 'active' => $enabled && $launch !== null && $launch > $now, + 'launch_at' => $launch ? $launch->format(DATE_ATOM) : null, + 'launch_at_local' => $launch ? $launch->format('Y-m-d\\TH:i') : null, + 'server_time' => $now->format(DATE_ATOM), + 'title' => $row['countdown_title'] ?? null, + 'title_en' => $row['countdown_title_en'] ?? null, + 'message' => $row['countdown_message'] ?? null, + 'message_en' => $row['countdown_message_en'] ?? null, + ]; + } + + public static function updateCountdown(): void + { + $body = Http::jsonBody(); + $enabled = !empty($body['enabled']); + + $launch = null; + $raw = trim((string) ($body['launch_at'] ?? '')); + if ($raw !== '') { + $parsed = \DateTimeImmutable::createFromFormat('!Y-m-d\\TH:i', substr($raw, 0, 16), new \DateTimeZone(self::COUNTDOWN_TIMEZONE)); + if (!$parsed) { + Http::error('Bitte einen gültigen Startzeitpunkt angeben.', 422); + } + $launch = $parsed->format('Y-m-d H:i:s'); + } + if ($enabled && $launch === null) { + Http::error('Zum Einschalten braucht der Countdown einen Startzeitpunkt.', 422); + } + + $text = fn(string $key, int $max) => mb_substr(trim((string) ($body[$key] ?? '')), 0, $max) ?: null; + + $db = Database::connection(); + $db->exec('INSERT IGNORE INTO app_settings (id) VALUES (1)'); + $db->prepare( + 'UPDATE app_settings SET + countdown_enabled = ?, countdown_launch_at = ?, + countdown_title = ?, countdown_title_en = ?, + countdown_message = ?, countdown_message_en = ? + WHERE id = 1' + )->execute([ + $enabled ? 1 : 0, + $launch, + $text('title', 150), + $text('title_en', 150), + $text('message', 500), + $text('message_en', 500), + ]); + + Http::send(self::current()); + } + public static function status(): void { Http::send(self::current()); diff --git a/hifi/api/src/Controllers/SettingsController.php b/hifi/api/src/Controllers/SettingsController.php index 81309a3..9cc5ca1 100644 --- a/hifi/api/src/Controllers/SettingsController.php +++ b/hifi/api/src/Controllers/SettingsController.php @@ -48,6 +48,8 @@ class SettingsController 'package_card_width', 'package_card_height', 'vehicle_tile_width', 'vehicle_tile_height', 'gallery_card_text_x', 'gallery_card_text_y', 'site_font', 'page_loader_enabled', 'hidden_areas', 'price_note', 'price_note_en', + 'countdown_enabled', 'countdown_launch_at', 'countdown_title', 'countdown_title_en', + 'countdown_message', 'countdown_message_en', 'mail_host', 'mail_port', 'mail_username', 'mail_encryption', 'mail_from_email', 'mail_from_name', 'mail_notify_email', 'mail_customer_subject', 'mail_customer_body', 'mail_owner_subject', 'mail_owner_body', diff --git a/hifi/api/src/Support/Schema.php b/hifi/api/src/Support/Schema.php index 9b55b2f..f67a0cc 100644 --- a/hifi/api/src/Support/Schema.php +++ b/hifi/api/src/Support/Schema.php @@ -77,6 +77,12 @@ class Schema mail_owner_body TEXT NULL, price_note VARCHAR(150) NULL, price_note_en VARCHAR(150) NULL, + countdown_enabled TINYINT(1) NOT NULL DEFAULT 0, + countdown_launch_at DATETIME NULL, + countdown_title VARCHAR(150) NULL, + countdown_title_en VARCHAR(150) NULL, + countdown_message VARCHAR(500) NULL, + countdown_message_en VARCHAR(500) NULL, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB", @@ -458,6 +464,12 @@ class Schema 'mail_owner_body' => 'TEXT NULL', 'price_note' => 'VARCHAR(150) NULL', 'price_note_en' => 'VARCHAR(150) NULL', + 'countdown_enabled' => 'TINYINT(1) NOT NULL DEFAULT 0', + 'countdown_launch_at' => 'DATETIME NULL', + 'countdown_title' => 'VARCHAR(150) NULL', + 'countdown_title_en' => 'VARCHAR(150) NULL', + 'countdown_message' => 'VARCHAR(500) NULL', + 'countdown_message_en' => 'VARCHAR(500) NULL', 'updated_at' => 'DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', ], 'legal_pages' => [ diff --git a/hifi/assets/AGB-B-uVHPUd.js b/hifi/assets/AGB-B-uVHPUd.js deleted file mode 100644 index 8b08edb..0000000 --- a/hifi/assets/AGB-B-uVHPUd.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-DPjtOB4k.js";import{L as i}from"./LegalPageView-CftQhY6B.js";function n(){return e.jsx(i,{slug:"agb",fallbackTitle:"AGB",description:"Allgemeine Geschäftsbedingungen von HifiPlanet Amorbach."})}export{n as default}; diff --git a/hifi/assets/AGB-D95D02hw.js b/hifi/assets/AGB-D95D02hw.js new file mode 100644 index 0000000..38f9401 --- /dev/null +++ b/hifi/assets/AGB-D95D02hw.js @@ -0,0 +1 @@ +import{j as e}from"./index-BZm7WrzT.js";import{L as i}from"./LegalPageView-BadVFDdZ.js";function n(){return e.jsx(i,{slug:"agb",fallbackTitle:"AGB",description:"Allgemeine Geschäftsbedingungen von HifiPlanet Amorbach."})}export{n as default}; diff --git a/hifi/assets/AccountSettings-D-hOTRNd.js b/hifi/assets/AccountSettings-B5Fjuk2Y.js similarity index 99% rename from hifi/assets/AccountSettings-D-hOTRNd.js rename to hifi/assets/AccountSettings-B5Fjuk2Y.js index 3227d71..a8b4bdf 100644 --- a/hifi/assets/AccountSettings-D-hOTRNd.js +++ b/hifi/assets/AccountSettings-B5Fjuk2Y.js @@ -1,4 +1,4 @@ -import{k as De,r as I,j as u,c as V}from"./index-DPjtOB4k.js";var Y={},Fe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ye={},S={};let de;const Ue=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];S.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};S.getSymbolTotalCodewords=function(t){return Ue[t]};S.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};S.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');de=t};S.isKanjiModeEnabled=function(){return typeof de<"u"};S.toSJIS=function(t){return de(t)};var W={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+s)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})(W);function xe(){this.buffer=[],this.length=0}xe.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let s=0;s${l.innerHTML.replace(/\n/g,"
")}
${l.innerHTML.replace(/\n/g,"
")}
this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Vd.current||zx(),this.shouldReduceMotion=Ua.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),St(this.notifyUpdate),St(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&bx.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:l,times:u,ease:c,duration:d}=n.accelerate,f=new vx({element:this.current,name:t,keyframes:l,times:u,ease:c,duration:dt(d)}),h=a(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=ts.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&J.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Wa){const n=Wa[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r ${n("home.heroSubtitle")} this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Td.current||Rx(),this.shouldReduceMotion=$o.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&gx.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:c,duration:d}=n.accelerate,f=new mx({element:this.current,name:t,keyframes:a,times:u,ease:c,duration:ct(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=ts.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Q.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ho){const n=Ho[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r ${n("home.heroSubtitle")}Hh&&(t.x=1),t.y>>1;FP?(M=j,j=null):M=j.sibling;var T=h(g,j,y[P],k);if(T===null){j===null&&(j=M);break}e&&j&&T.alternate===null&&t(g,j),x=i(T,x,P),E===null?S=T:E.sibling=T,E=T,j=M}if(P===y.length)return n(g,j),me&&zn(g,P),S;if(j===null){for(;Pe*1e3,yt=e=>e/1e3,id=(e,t)=>t?e*(1e3/t):0,F0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ib=1e-7,Fb=12;function Ob(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=F0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Ib&&++a=Oo?1/0:t}function bk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(fd(r),Oo);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:yt(s)}}const we={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ju(e,t){return e*Math.sqrt(1-t*t)}const kk=12;function Sk(e,t,n){let r=n;for(let s=1;sVh&&(t.x=1),t.yr