@devstgo/stgo-salta-components-react 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/config.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface Config {
8
8
  videosBaseUrl?: string;
9
9
  backgroundIframeUrl?: string;
10
10
  showcasesUrl?: string[];
11
+ showcasesWait?: number;
11
12
  controlPanelLevels?: {
12
13
  title: string;
13
14
  slug: string;
@@ -1 +1 @@
1
- export declare const useAutoModeTimer: (intervalMs?: number) => void;
1
+ export declare const useAutoModeTimer: () => void;
@@ -9,7 +9,7 @@ import { t as bd } from "i18next";
9
9
  let Ea;
10
10
  const Cy = (e) => {
11
11
  Ea = e;
12
- }, ke = () => Ea;
12
+ }, Te = () => Ea;
13
13
  var Mn = { exports: {} }, nn = {};
14
14
  var No;
15
15
  function yd() {
@@ -532,13 +532,13 @@ const Hs = {
532
532
  test: /* @__PURE__ */ Li("hsl", "hue"),
533
533
  parse: /* @__PURE__ */ Ka("hue", "saturation", "lightness"),
534
534
  transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + qe.transform(ln(t)) + ", " + qe.transform(ln(n)) + ", " + ln(mn.transform(s)) + ")"
535
- }, Se = {
535
+ }, Ne = {
536
536
  test: (e) => Ct.test(e) || Hs.test(e) || Vt.test(e),
537
537
  parse: (e) => Ct.test(e) ? Ct.parse(e) : Vt.test(e) ? Vt.parse(e) : Hs.parse(e),
538
538
  transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Ct.transform(e) : Vt.transform(e),
539
539
  getAnimatableNone: (e) => {
540
- const t = Se.parse(e);
541
- return t.alpha = 0, Se.transform(t);
540
+ const t = Ne.parse(e);
541
+ return t.alpha = 0, Ne.transform(t);
542
542
  }
543
543
  }, $d = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
544
544
  function Bd(e) {
@@ -552,7 +552,7 @@ function pn(e) {
552
552
  var: []
553
553
  }, i = [];
554
554
  let r = 0;
555
- const l = t.replace(Yd, (c) => (Se.test(c) ? (s.color.push(r), i.push(qa), n.push(Se.parse(c))) : c.startsWith(Wd) ? (s.var.push(r), i.push(zd), n.push(c)) : (s.number.push(r), i.push(Za), n.push(parseFloat(c))), ++r, Ro)).split(Ro);
555
+ const l = t.replace(Yd, (c) => (Ne.test(c) ? (s.color.push(r), i.push(qa), n.push(Ne.parse(c))) : c.startsWith(Wd) ? (s.var.push(r), i.push(zd), n.push(c)) : (s.number.push(r), i.push(Za), n.push(parseFloat(c))), ++r, Ro)).split(Ro);
556
556
  return { values: n, split: l, indexes: s, types: i };
557
557
  }
558
558
  function Ja(e) {
@@ -565,12 +565,12 @@ function Qa(e) {
565
565
  for (let o = 0; o < s; o++)
566
566
  if (r += t[o], i[o] !== void 0) {
567
567
  const l = n[o];
568
- l === Za ? r += ln(i[o]) : l === qa ? r += Se.transform(i[o]) : r += i[o];
568
+ l === Za ? r += ln(i[o]) : l === qa ? r += Ne.transform(i[o]) : r += i[o];
569
569
  }
570
570
  return r;
571
571
  };
572
572
  }
573
- const Ud = (e) => typeof e == "number" ? 0 : Se.test(e) ? Se.getAnimatableNone(e) : e;
573
+ const Ud = (e) => typeof e == "number" ? 0 : Ne.test(e) ? Ne.getAnimatableNone(e) : e;
574
574
  function Hd(e) {
575
575
  const t = Ja(e);
576
576
  return Qa(e)(t.map(Ud));
@@ -628,7 +628,7 @@ function qd(e, t) {
628
628
  return (n) => ye(e, t, n);
629
629
  }
630
630
  function Vi(e) {
631
- return typeof e == "number" ? qd : typeof e == "string" ? Ri(e) ? Kn : Se.test(e) ? Lo : eh : Array.isArray(e) ? el : typeof e == "object" ? Se.test(e) ? Lo : Jd : Kn;
631
+ return typeof e == "number" ? qd : typeof e == "string" ? Ri(e) ? Kn : Ne.test(e) ? Lo : eh : Array.isArray(e) ? el : typeof e == "object" ? Ne.test(e) ? Lo : Jd : Kn;
632
632
  }
633
633
  function el(e, t) {
634
634
  const n = [...e], s = n.length, i = e.map((r, o) => Vi(r)(r, t[o]));
@@ -2245,17 +2245,17 @@ const pf = /\b([a-z-]*)\(.*?\)/gu, ai = {
2245
2245
  }, bf = {
2246
2246
  ...Xi,
2247
2247
  // Color props
2248
- color: Se,
2249
- backgroundColor: Se,
2250
- outlineColor: Se,
2251
- fill: Se,
2252
- stroke: Se,
2248
+ color: Ne,
2249
+ backgroundColor: Ne,
2250
+ outlineColor: Ne,
2251
+ fill: Ne,
2252
+ stroke: Ne,
2253
2253
  // Border props
2254
- borderColor: Se,
2255
- borderTopColor: Se,
2256
- borderRightColor: Se,
2257
- borderBottomColor: Se,
2258
- borderLeftColor: Se,
2254
+ borderColor: Ne,
2255
+ borderTopColor: Ne,
2256
+ borderRightColor: Ne,
2257
+ borderBottomColor: Ne,
2258
+ borderLeftColor: Ne,
2259
2259
  filter: ai,
2260
2260
  WebkitFilter: ai,
2261
2261
  mask: li,
@@ -2538,7 +2538,7 @@ function Zo(e, t) {
2538
2538
  function jl(e) {
2539
2539
  return rs(e) && e.tagName === "svg";
2540
2540
  }
2541
- const $f = [...Tl, Se, Xe], Bf = (e) => $f.find(wl(e)), qo = () => ({
2541
+ const $f = [...Tl, Ne, Xe], Bf = (e) => $f.find(wl(e)), qo = () => ({
2542
2542
  translate: 0,
2543
2543
  scale: 1,
2544
2544
  origin: 0,
@@ -2546,7 +2546,7 @@ const $f = [...Tl, Se, Xe], Bf = (e) => $f.find(wl(e)), qo = () => ({
2546
2546
  }), _t = () => ({
2547
2547
  x: qo(),
2548
2548
  y: qo()
2549
- }), Jo = () => ({ min: 0, max: 0 }), Te = () => ({
2549
+ }), Jo = () => ({ min: 0, max: 0 }), Se = () => ({
2550
2550
  x: Jo(),
2551
2551
  y: Jo()
2552
2552
  }), bn = /* @__PURE__ */ new WeakMap();
@@ -2714,7 +2714,7 @@ class Ll {
2714
2714
  * removed with a re-render to work.
2715
2715
  */
2716
2716
  measureViewportBox() {
2717
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Te();
2717
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Se();
2718
2718
  }
2719
2719
  getStaticValue(t) {
2720
2720
  return this.latestValues[t];
@@ -3103,7 +3103,7 @@ class n0 extends Ll {
3103
3103
  delete n.output[t];
3104
3104
  }
3105
3105
  measureInstanceViewportBox() {
3106
- return Te();
3106
+ return Se();
3107
3107
  }
3108
3108
  build(t, n) {
3109
3109
  Object.assign(t.output, n);
@@ -3195,7 +3195,7 @@ function Hl(e, t, n) {
3195
3195
  }
3196
3196
  class Xl extends Vl {
3197
3197
  constructor() {
3198
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Te;
3198
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Se;
3199
3199
  }
3200
3200
  getBaseTargetFromProps(t, n) {
3201
3201
  return t[n];
@@ -3755,7 +3755,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3755
3755
  for (let c = 0; c < this.path.length; c++)
3756
3756
  this.path[c].updateScroll();
3757
3757
  const o = this.layout;
3758
- this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = Te(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3758
+ this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = Se(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3759
3759
  const { visualElement: l } = this.options;
3760
3760
  l && l.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0);
3761
3761
  }
@@ -3792,7 +3792,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3792
3792
  measurePageBox() {
3793
3793
  const { visualElement: o } = this.options;
3794
3794
  if (!o)
3795
- return Te();
3795
+ return Se();
3796
3796
  const l = o.measureViewportBox();
3797
3797
  if (!(this.scroll?.wasRoot || this.path.some(K0))) {
3798
3798
  const { scroll: u } = this.root;
@@ -3801,7 +3801,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3801
3801
  return l;
3802
3802
  }
3803
3803
  removeElementScroll(o) {
3804
- const l = Te();
3804
+ const l = Se();
3805
3805
  if (Ye(l, o), this.scroll?.wasRoot)
3806
3806
  return l;
3807
3807
  for (let c = 0; c < this.path.length; c++) {
@@ -3811,7 +3811,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3811
3811
  return l;
3812
3812
  }
3813
3813
  applyTransform(o, l = !1) {
3814
- const c = Te();
3814
+ const c = Se();
3815
3815
  Ye(c, o);
3816
3816
  for (let u = 0; u < this.path.length; u++) {
3817
3817
  const d = this.path[u];
@@ -3823,14 +3823,14 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3823
3823
  return Nt(this.latestValues) && $t(c, this.latestValues), c;
3824
3824
  }
3825
3825
  removeTransform(o) {
3826
- const l = Te();
3826
+ const l = Se();
3827
3827
  Ye(l, o);
3828
3828
  for (let c = 0; c < this.path.length; c++) {
3829
3829
  const u = this.path[c];
3830
3830
  if (!u.instance || !Nt(u.latestValues))
3831
3831
  continue;
3832
3832
  di(u.latestValues) && u.updateSnapshot();
3833
- const d = Te(), h = u.measurePageBox();
3833
+ const d = Se(), h = u.measurePageBox();
3834
3834
  Ye(d, h), mr(l, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, d);
3835
3835
  }
3836
3836
  return Nt(this.latestValues) && mr(l, this.latestValues), l;
@@ -3862,7 +3862,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3862
3862
  return;
3863
3863
  this.resolvedRelativeTargetAt = Me.timestamp;
3864
3864
  const f = this.getClosestProjectingParent();
3865
- f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = Te(), this.targetWithTransforms = Te()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), x0(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Ye(this.target, this.layout.layoutBox), _l(this.target, this.targetDelta)) : Ye(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
3865
+ f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = Se(), this.targetWithTransforms = Se()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), x0(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Ye(this.target, this.layout.layoutBox), _l(this.target, this.targetDelta)) : Ye(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
3866
3866
  }
3867
3867
  getClosestProjectingParent() {
3868
3868
  if (!(!this.parent || di(this.parent.latestValues) || Dl(this.parent.latestValues)))
@@ -3872,7 +3872,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3872
3872
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3873
3873
  }
3874
3874
  createRelativeTarget(o, l, c) {
3875
- this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Te(), this.relativeTargetOrigin = Te(), Qn(this.relativeTargetOrigin, l, c), Ye(this.relativeTarget, this.relativeTargetOrigin);
3875
+ this.relativeParent = o, this.linkedParentVersion = o.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Se(), this.relativeTargetOrigin = Se(), Qn(this.relativeTargetOrigin, l, c), Ye(this.relativeTarget, this.relativeTargetOrigin);
3876
3876
  }
3877
3877
  removeRelativeTarget() {
3878
3878
  this.relativeParent = this.relativeTarget = void 0;
@@ -3887,7 +3887,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3887
3887
  return;
3888
3888
  Ye(this.layoutCorrected, this.layout.layoutBox);
3889
3889
  const h = this.treeScale.x, f = this.treeScale.y;
3890
- Gf(this.layoutCorrected, this.treeScale, this.path, l), o.layout && !o.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (o.target = o.layout.layoutBox, o.targetWithTransforms = Te());
3890
+ Gf(this.layoutCorrected, this.treeScale, this.path, l), o.layout && !o.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (o.target = o.layout.layoutBox, o.targetWithTransforms = Se());
3891
3891
  const { target: m } = o;
3892
3892
  if (!m) {
3893
3893
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
@@ -3914,12 +3914,12 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3914
3914
  setAnimationOrigin(o, l = !1) {
3915
3915
  const c = this.snapshot, u = c ? c.latestValues : {}, d = { ...this.latestValues }, h = _t();
3916
3916
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !l;
3917
- const f = Te(), m = c ? c.source : void 0, p = this.layout ? this.layout.source : void 0, b = m !== p, x = this.getStack(), y = !x || x.members.length <= 1, N = !!(b && !y && this.options.crossfade === !0 && !this.path.some(H0));
3917
+ const f = Se(), m = c ? c.source : void 0, p = this.layout ? this.layout.source : void 0, b = m !== p, x = this.getStack(), y = !x || x.members.length <= 1, N = !!(b && !y && this.options.crossfade === !0 && !this.path.some(H0));
3918
3918
  this.animationProgress = 0;
3919
3919
  let k;
3920
3920
  this.mixTargetDelta = (P) => {
3921
3921
  const j = P / 1e3;
3922
- Er(h.x, o.x, j), Er(h.y, o.y, j), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Qn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), U0(this.relativeTarget, this.relativeTargetOrigin, f, j), k && S0(this.relativeTarget, k) && (this.isProjectionDirty = !1), k || (k = Te()), Ye(k, this.relativeTarget)), b && (this.animationValues = d, E0(d, u, this.latestValues, j, N, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = j;
3922
+ Er(h.x, o.x, j), Er(h.y, o.y, j), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Qn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), U0(this.relativeTarget, this.relativeTargetOrigin, f, j), k && S0(this.relativeTarget, k) && (this.isProjectionDirty = !1), k || (k = Se()), Ye(k, this.relativeTarget)), b && (this.animationValues = d, E0(d, u, this.latestValues, j, N, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = j;
3923
3923
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3924
3924
  }
3925
3925
  startAnimation(o) {
@@ -3952,7 +3952,7 @@ function ic({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
3952
3952
  let { targetWithTransforms: l, target: c, layout: u, latestValues: d } = o;
3953
3953
  if (!(!l || !c || !u)) {
3954
3954
  if (this !== o && this.layout && u && oc(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
3955
- c = this.target || Te();
3955
+ c = this.target || Se();
3956
3956
  const h = Ve(this.layout.layoutBox.x);
3957
3957
  c.x.min = o.target.x.min, c.x.max = c.x.min + h;
3958
3958
  const f = Ve(this.layout.layoutBox.y);
@@ -4082,9 +4082,9 @@ function O0(e) {
4082
4082
  if (d && !d.resumeFrom) {
4083
4083
  const { snapshot: h, layout: f } = d;
4084
4084
  if (h && f) {
4085
- const m = Te();
4085
+ const m = Se();
4086
4086
  Qn(m, t.layoutBox, h.layoutBox);
4087
- const p = Te();
4087
+ const p = Se();
4088
4088
  Qn(p, n, f.layoutBox), Ql(m, p) || (u = !0), d.options.layoutRoot && (e.relativeTarget = p, e.relativeTargetOrigin = m, e.relativeParent = d);
4089
4089
  }
4090
4090
  }
@@ -4318,7 +4318,7 @@ function Rr(e) {
4318
4318
  Ou(n) && t.push(n);
4319
4319
  }), t;
4320
4320
  }
4321
- const Ne = ({ children: e, custom: t, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: l = "left", anchorY: c = "top", root: u }) => {
4321
+ const ke = ({ children: e, custom: t, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: l = "left", anchorY: c = "top", root: u }) => {
4322
4322
  const [d, h] = ac(o), f = jt(() => Rr(e), [e]), m = o && !d ? [] : f.map(Ln), p = we(!0), b = we(f), x = os(() => /* @__PURE__ */ new Map()), y = we(/* @__PURE__ */ new Set()), [N, k] = O(f), [P, j] = O(f);
4323
4323
  Pa(() => {
4324
4324
  p.current = !1, b.current = f;
@@ -4989,7 +4989,7 @@ function zr(e, t) {
4989
4989
  const Um = /* @__PURE__ */ new WeakMap();
4990
4990
  class Hm {
4991
4991
  constructor(t) {
4992
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Te(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
4992
+ this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Se(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
4993
4993
  }
4994
4994
  start(t, { snapToCursor: n = !1, distanceThreshold: s } = {}) {
4995
4995
  const { presenceContext: i } = this.visualElement;
@@ -8785,7 +8785,7 @@ const vn = {
8785
8785
  reconnect: () => {
8786
8786
  }
8787
8787
  }), Ly = ({ children: e }) => {
8788
- const t = we(null), n = tt(), { setLastEvent: s } = Jt(), i = we(null), [r, o] = O(!1), l = ke().wsRoom, c = ke().wsUrl, u = dn(() => {
8788
+ const t = we(null), n = tt(), { setLastEvent: s } = Jt(), i = we(null), [r, o] = O(!1), l = Te().wsRoom, c = Te().wsUrl, u = dn(() => {
8789
8789
  t.current = new WebSocket(c), t.current.onopen = () => {
8790
8790
  console.log("✅ WS conectado"), t.current?.send(JSON.stringify({ type: "join", room: l })), o(!0), i.current = window.setInterval(() => {
8791
8791
  t.current?.readyState === WebSocket.OPEN && (t.current?.send(JSON.stringify({ type: "ping" })), console.log("📤 PING enviado"));
@@ -8816,7 +8816,7 @@ const vn = {
8816
8816
  function kg() {
8817
8817
  const e = Tc();
8818
8818
  if (!e) return null;
8819
- const { isMinimized: t, toggleMinimized: n, setMinimized: s } = e, { sendMessage: i } = Cn(), { lastEvent: r } = Jt(), o = ke().wsRoom;
8819
+ const { isMinimized: t, toggleMinimized: n, setMinimized: s } = e, { sendMessage: i } = Cn(), { lastEvent: r } = Jt(), o = Te().wsRoom;
8820
8820
  return ie(() => {
8821
8821
  r?.payload?.type === "browser" && r?.payload?.status === "visible" && s(!1);
8822
8822
  }, [r]), /* @__PURE__ */ a.jsx(
@@ -9098,7 +9098,7 @@ const Eg = ({ label: e, onClick: t }) => /* @__PURE__ */ a.jsxs(
9098
9098
  }
9099
9099
  );
9100
9100
  function Yt({ src: e, transparent: t = !1, onClose: n }) {
9101
- const { t: s } = Xt(), { sendMessage: i } = Cn(), { lastEvent: r } = Jt(), o = ke().wsRoom;
9101
+ const { t: s } = Xt(), { sendMessage: i } = Cn(), { lastEvent: r } = Jt(), o = Te().wsRoom;
9102
9102
  return ie(() => {
9103
9103
  const l = setTimeout(() => {
9104
9104
  i({
@@ -9185,7 +9185,7 @@ function zc({ onClose: e, cards: t }) {
9185
9185
  e(), s(!1);
9186
9186
  }, 600);
9187
9187
  }, y = (E) => {
9188
- E.webUrl?.trim() && (r(!0), l(E.webUrl.replace("https://www.navantia.es", ke().remoteUrl) + "?lightbox"));
9188
+ E.webUrl?.trim() && (r(!0), l(E.webUrl.replace("https://www.navantia.es", Te().remoteUrl) + "?lightbox"));
9189
9189
  }, N = () => {
9190
9190
  r(!1);
9191
9191
  }, k = () => {
@@ -9294,7 +9294,7 @@ function zc({ onClose: e, cards: t }) {
9294
9294
  )
9295
9295
  }
9296
9296
  ),
9297
- /* @__PURE__ */ a.jsx(Ne, { mode: "popLayout", children: j().map((E, S) => /* @__PURE__ */ a.jsx(
9297
+ /* @__PURE__ */ a.jsx(ke, { mode: "popLayout", children: j().map((E, S) => /* @__PURE__ */ a.jsx(
9298
9298
  w.div,
9299
9299
  {
9300
9300
  className: "grid justify-center grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6",
@@ -9407,7 +9407,7 @@ function zc({ onClose: e, cards: t }) {
9407
9407
  ] })
9408
9408
  }
9409
9409
  ),
9410
- /* @__PURE__ */ a.jsx(Ne, { children: i && /* @__PURE__ */ a.jsx(Yt, { onClose: N, src: o }) })
9410
+ /* @__PURE__ */ a.jsx(ke, { children: i && /* @__PURE__ */ a.jsx(Yt, { onClose: N, src: o }) })
9411
9411
  ]
9412
9412
  }
9413
9413
  )
@@ -11081,7 +11081,7 @@ function ya({
11081
11081
  children: e.description
11082
11082
  }
11083
11083
  ),
11084
- /* @__PURE__ */ a.jsx(Ne, { mode: "wait", children: t && /* @__PURE__ */ a.jsxs(
11084
+ /* @__PURE__ */ a.jsx(ke, { mode: "wait", children: t && /* @__PURE__ */ a.jsxs(
11085
11085
  w.div,
11086
11086
  {
11087
11087
  initial: { opacity: 0, y: 8 },
@@ -11231,7 +11231,7 @@ function ya({
11231
11231
  }
11232
11232
  ),
11233
11233
  typeof document < "u" && ka(
11234
- /* @__PURE__ */ a.jsx(Ne, { children: u !== null && e.images && /* @__PURE__ */ a.jsxs(
11234
+ /* @__PURE__ */ a.jsx(ke, { children: u !== null && e.images && /* @__PURE__ */ a.jsxs(
11235
11235
  w.div,
11236
11236
  {
11237
11237
  className: "absolute inset-0 z-12000 flex items-center justify-center bg-black",
@@ -11379,7 +11379,7 @@ function dy({ tab: e, tabIndex: t = 0, expandedCardId: n, setExpandedCardId: s }
11379
11379
  exit: { opacity: 0, y: -20 },
11380
11380
  transition: { duration: 0.4, ease: [0.4, 0, 0.2, 1] },
11381
11381
  className: "space-y-6",
11382
- children: /* @__PURE__ */ a.jsx(Ne, { mode: "wait", initial: !1, children: l ? /* @__PURE__ */ a.jsx(
11382
+ children: /* @__PURE__ */ a.jsx(ke, { mode: "wait", initial: !1, children: l ? /* @__PURE__ */ a.jsx(
11383
11383
  w.div,
11384
11384
  {
11385
11385
  initial: { opacity: 0, y: 14, scale: 0.995 },
@@ -11652,7 +11652,7 @@ function wu({ item: e, onClose: t }) {
11652
11652
  },
11653
11653
  e.items[n].title
11654
11654
  ),
11655
- /* @__PURE__ */ a.jsx(Ne, { mode: "popLayout", initial: !1, children: E === null && /* @__PURE__ */ a.jsx(
11655
+ /* @__PURE__ */ a.jsx(ke, { mode: "popLayout", initial: !1, children: E === null && /* @__PURE__ */ a.jsx(
11656
11656
  w.p,
11657
11657
  {
11658
11658
  layout: "position",
@@ -11764,7 +11764,7 @@ function wu({ item: e, onClose: t }) {
11764
11764
  ]
11765
11765
  }
11766
11766
  ),
11767
- /* @__PURE__ */ a.jsx(Ne, { mode: "popLayout", initial: !1, children: E !== null && typeof E == "number" && /* @__PURE__ */ a.jsx(
11767
+ /* @__PURE__ */ a.jsx(ke, { mode: "popLayout", initial: !1, children: E !== null && typeof E == "number" && /* @__PURE__ */ a.jsx(
11768
11768
  w.div,
11769
11769
  {
11770
11770
  layout: "position",
@@ -11943,7 +11943,7 @@ function hy({
11943
11943
  const s = () => {
11944
11944
  t(!1);
11945
11945
  };
11946
- return /* @__PURE__ */ a.jsx(Ne, { children: e && /* @__PURE__ */ a.jsx(Yt, { onClose: s, src: n }) });
11946
+ return /* @__PURE__ */ a.jsx(ke, { children: e && /* @__PURE__ */ a.jsx(Yt, { onClose: s, src: n }) });
11947
11947
  }
11948
11948
  function fy({ isOpen: e, onClose: t, type: n, itemName: s }) {
11949
11949
  if (!e) return null;
@@ -12396,7 +12396,7 @@ const my = `
12396
12396
  function py({ hotspot: e }) {
12397
12397
  const [t, n] = O(null), [, s] = O([]), [i, r] = O(null), [o, l] = O(null), [, c] = O(
12398
12398
  /* @__PURE__ */ new Set()
12399
- ), u = ke().remoteUrl, d = ke().hotspots.dataEs, h = ke().hotspots.dataEn, [f, m] = O(!1), [p] = O("inner"), [b] = O(""), { i18n: x } = Xt();
12399
+ ), u = Te().remoteUrl, d = Te().hotspots.dataEs, h = Te().hotspots.dataEn, [f, m] = O(!1), [p] = O("inner"), [b] = O(""), { i18n: x } = Xt();
12400
12400
  ie(() => {
12401
12401
  let L;
12402
12402
  if (x.language === "en" ? L = h ?? { globalTags: [], innerRingNodes: [], outerRingNodes: [], products: [], relationships: {} } : L = d ?? { globalTags: [], innerRingNodes: [], outerRingNodes: [], products: [], relationships: {} }, n(L), L.outerRingNodes) {
@@ -13624,7 +13624,7 @@ function yy({ isOpen: e, onClose: t, size: n, hotspot: s }) {
13624
13624
  return window.addEventListener("keydown", i), () => {
13625
13625
  window.removeEventListener("keydown", i);
13626
13626
  };
13627
- }, [t]), /* @__PURE__ */ a.jsx(Ne, { children: e && /* @__PURE__ */ a.jsxs("div", { className: "overlay-root", onClick: t, children: [
13627
+ }, [t]), /* @__PURE__ */ a.jsx(ke, { children: e && /* @__PURE__ */ a.jsxs("div", { className: "overlay-root", onClick: t, children: [
13628
13628
  /* @__PURE__ */ a.jsx(gy, { size: n }),
13629
13629
  /* @__PURE__ */ a.jsx(by, { onClose: t, hotspot: s }),
13630
13630
  /* @__PURE__ */ a.jsx("style", { children: `
@@ -13655,7 +13655,7 @@ const xa = "app-font-size", xy = "100", Vy = () => {
13655
13655
  return e;
13656
13656
  };
13657
13657
  function Nu() {
13658
- const [e, t] = O("physical"), [n, s] = O(!1), [i, r] = O(!1), [o, l] = O("Navantia Global"), [c, u] = O("high"), [d, h] = O("es"), [f, m] = O(!0), p = ke().controlPanelLevels, b = ["physical", "hybrid", "digital"], x = ["high", "medium", "low"], { t: y, i18n: N } = Xt(), k = tt(), P = wn(), { sendMessage: j } = Cn(), E = ke().wsRoom, { isAutoMode: S, toggleAutoMode: v } = Su();
13658
+ const [e, t] = O("physical"), [n, s] = O(!1), [i, r] = O(!1), [o, l] = O("Navantia Global"), [c, u] = O("high"), [d, h] = O("es"), [f, m] = O(!0), p = Te().controlPanelLevels, b = ["physical", "hybrid", "digital"], x = ["high", "medium", "low"], { t: y, i18n: N } = Xt(), k = tt(), P = wn(), { sendMessage: j } = Cn(), E = Te().wsRoom, { isAutoMode: S, toggleAutoMode: v } = Su();
13659
13659
  ie(() => {
13660
13660
  N.changeLanguage(d);
13661
13661
  }, [d]), ie(() => {
@@ -13770,7 +13770,7 @@ function Nu() {
13770
13770
  },
13771
13771
  transition: { delay: f ? 0 : 0.3, duration: 0.6, ease: [0.34, 1.56, 0.64, 1] },
13772
13772
  children: [
13773
- /* @__PURE__ */ a.jsx(Ne, { children: i && /* @__PURE__ */ a.jsx(
13773
+ /* @__PURE__ */ a.jsx(ke, { children: i && /* @__PURE__ */ a.jsx(
13774
13774
  w.div,
13775
13775
  {
13776
13776
  className: "absolute bottom-full left-0 mb-3 w-80",
@@ -14035,7 +14035,7 @@ function Nu() {
14035
14035
  ] })
14036
14036
  }
14037
14037
  ) }),
14038
- /* @__PURE__ */ a.jsx(Ne, { children: n && /* @__PURE__ */ a.jsx(
14038
+ /* @__PURE__ */ a.jsx(ke, { children: n && /* @__PURE__ */ a.jsx(
14039
14039
  w.div,
14040
14040
  {
14041
14041
  className: "absolute bottom-full left-0 mb-3 w-80",
@@ -14288,7 +14288,7 @@ function Nu() {
14288
14288
  }
14289
14289
  },
14290
14290
  children: [
14291
- /* @__PURE__ */ a.jsx(Ne, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14291
+ /* @__PURE__ */ a.jsx(ke, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14292
14292
  w.div,
14293
14293
  {
14294
14294
  initial: {
@@ -14347,7 +14347,7 @@ function Nu() {
14347
14347
  scale: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" }
14348
14348
  },
14349
14349
  children: [
14350
- /* @__PURE__ */ a.jsx(Ne, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14350
+ /* @__PURE__ */ a.jsx(ke, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14351
14351
  w.div,
14352
14352
  {
14353
14353
  initial: {
@@ -14406,7 +14406,7 @@ function Nu() {
14406
14406
  scale: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" }
14407
14407
  },
14408
14408
  children: [
14409
- /* @__PURE__ */ a.jsx(Ne, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14409
+ /* @__PURE__ */ a.jsx(ke, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14410
14410
  w.div,
14411
14411
  {
14412
14412
  initial: {
@@ -14465,7 +14465,7 @@ function Nu() {
14465
14465
  scale: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" }
14466
14466
  },
14467
14467
  children: [
14468
- /* @__PURE__ */ a.jsx(Ne, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14468
+ /* @__PURE__ */ a.jsx(ke, { mode: "wait", children: /* @__PURE__ */ a.jsx(
14469
14469
  w.div,
14470
14470
  {
14471
14471
  initial: {
@@ -14540,7 +14540,7 @@ function Nu() {
14540
14540
  ]
14541
14541
  }
14542
14542
  ),
14543
- /* @__PURE__ */ a.jsx(Ne, { children: f && /* @__PURE__ */ a.jsx(
14543
+ /* @__PURE__ */ a.jsx(ke, { children: f && /* @__PURE__ */ a.jsx(
14544
14544
  w.button,
14545
14545
  {
14546
14546
  onClick: () => m(!1),
@@ -14653,21 +14653,21 @@ function Eu({ children: e }) {
14653
14653
  /* @__PURE__ */ a.jsx(kg, {})
14654
14654
  ] });
14655
14655
  }
14656
- const Cu = (e = 15e3) => {
14657
- const { isAutoMode: t } = Su(), { pathname: n } = wn(), s = tt(), i = we(null), r = ke()?.showcasesUrl ?? [], o = () => {
14658
- const d = (r.indexOf(n) + 1) % r.length;
14659
- s(r[d]);
14656
+ const Cu = () => {
14657
+ const { isAutoMode: e } = Su(), { pathname: t } = wn(), n = tt(), s = we(null), i = Te()?.showcasesUrl ?? [], r = Te().showcasesWait ?? 12e4, o = () => {
14658
+ const d = (i.indexOf(t) + 1) % i.length;
14659
+ n(i[d]);
14660
14660
  }, l = () => {
14661
- i.current && clearInterval(i.current), i.current = setInterval(o, e);
14661
+ s.current && clearInterval(s.current), s.current = setInterval(o, r);
14662
14662
  }, c = () => {
14663
- i.current && (clearInterval(i.current), i.current = null);
14663
+ s.current && (clearInterval(s.current), s.current = null);
14664
14664
  };
14665
- ie(() => (t ? l() : c(), () => c()), [t]), ie(() => {
14666
- t && l();
14667
- }, [n, t]);
14665
+ ie(() => (e ? l() : c(), () => c()), [e]), ie(() => {
14666
+ e && l();
14667
+ }, [t, e]);
14668
14668
  };
14669
14669
  function Dy({ showControlPanel: e = !0, iframeSrc: t = "" }) {
14670
- return Cu(3e5), /* @__PURE__ */ a.jsxs("div", { className: "relative w-full h-screen overflow-hidden bg-transparent", children: [
14670
+ return Cu(), /* @__PURE__ */ a.jsxs("div", { className: "relative w-full h-screen overflow-hidden bg-transparent", children: [
14671
14671
  /* @__PURE__ */ a.jsx("div", { className: "z-1 fixed inset-0", children: /* @__PURE__ */ a.jsx("iframe", { id: "vagonFrame", allow: "microphone *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *;", className: "z-1 w-full h-screen", src: t }) }),
14672
14672
  /* @__PURE__ */ a.jsx(Eu, { children: /* @__PURE__ */ a.jsxs("div", { className: "relative z-10 h-full bg-transparent", children: [
14673
14673
  /* @__PURE__ */ a.jsx(is, {}),
@@ -14677,7 +14677,7 @@ function Dy({ showControlPanel: e = !0, iframeSrc: t = "" }) {
14677
14677
  ] });
14678
14678
  }
14679
14679
  function _y({ showControlPanel: e = !0 }) {
14680
- return Cu(3e5), /* @__PURE__ */ a.jsxs("div", { className: "relative w-full h-screen overflow-hidden bg-transparent", children: [
14680
+ return Cu(), /* @__PURE__ */ a.jsxs("div", { className: "relative w-full h-screen overflow-hidden bg-transparent", children: [
14681
14681
  /* @__PURE__ */ a.jsx(Eu, { children: /* @__PURE__ */ a.jsxs("div", { className: "relative z-10 h-full bg-transparent", children: [
14682
14682
  /* @__PURE__ */ a.jsx(is, {}),
14683
14683
  e && /* @__PURE__ */ a.jsx(Nu, {})
@@ -14686,7 +14686,7 @@ function _y({ showControlPanel: e = !0 }) {
14686
14686
  ] });
14687
14687
  }
14688
14688
  function Pu({ items: e, parent: t, selectedShip: n, onShipSelect: s }) {
14689
- const [i, r] = O(0), [o, l] = O(!1), [c, u] = O(6), [d, h] = O(!0), [f, m] = O(0), [p, b] = O("slide"), [x, y] = O(160), { t: N } = Xt(), { lastEvent: k, internalEvent: P, setInternalEvent: j } = Jt(), E = ke().cinematics ?? !1, S = ke().cinematicsOnChangeLocation ?? !1;
14689
+ const [i, r] = O(0), [o, l] = O(!1), [c, u] = O(6), [d, h] = O(!0), [f, m] = O(0), [p, b] = O("slide"), [x, y] = O(160), { t: N } = Xt(), { lastEvent: k, internalEvent: P, setInternalEvent: j } = Jt(), E = Te().cinematics ?? !1, S = Te().cinematicsOnChangeLocation ?? !1;
14690
14690
  E && (ie(() => {
14691
14691
  k?.payload?.type === "cinematics" && k?.payload?.action === "end" && h(!0);
14692
14692
  }, [k]), ie(() => {
@@ -14701,7 +14701,7 @@ function Pu({ items: e, parent: t, selectedShip: n, onShipSelect: s }) {
14701
14701
  }, I = (R) => -(R * c * x), F = (R) => {
14702
14702
  const C = Math.floor(c / 2), _ = Math.floor(R / c), M = (R - _ * c - C) * x, T = -(_ * c * x + M);
14703
14703
  return v(T);
14704
- }, B = tt(), Z = ke().baseUrl ?? "", D = e;
14704
+ }, B = tt(), Z = Te().baseUrl ?? "", D = e;
14705
14705
  ie(() => {
14706
14706
  const R = () => {
14707
14707
  let C;
@@ -14739,7 +14739,7 @@ function Pu({ items: e, parent: t, selectedShip: n, onShipSelect: s }) {
14739
14739
  const R = Math.ceil(D.length / c), C = (i - 1 + R) % R;
14740
14740
  b("slide"), r(C), m(I(C));
14741
14741
  };
14742
- return /* @__PURE__ */ a.jsxs(Ne, { children: [
14742
+ return /* @__PURE__ */ a.jsxs(ke, { children: [
14743
14743
  d && /* @__PURE__ */ a.jsxs(
14744
14744
  w.div,
14745
14745
  {
@@ -14921,7 +14921,7 @@ const Fy = ({ items: e, world: t, worldSlug: n = t }) => {
14921
14921
  initial: { opacity: 0 },
14922
14922
  animate: { opacity: 1 },
14923
14923
  exit: { opacity: 0 }
14924
- }, o = wn(), l = tt(), { t: c } = Xt(), { setInternalEvent: u } = Jt(), d = ke().cinematics ?? !1, h = ke().cinematicsOnChangeLocation ?? !1;
14924
+ }, o = wn(), l = tt(), { t: c } = Xt(), { setInternalEvent: u } = Jt(), d = Te().cinematics ?? !1, h = Te().cinematicsOnChangeLocation ?? !1;
14925
14925
  ie(() => {
14926
14926
  o.pathname === `/${n}` ? i("") : o.pathname.startsWith(n ? `/${n}/` : "/") && i(o.pathname.replace(n ? `/${n}/` : "/", ""));
14927
14927
  }, [o]), ie(() => {
@@ -15017,7 +15017,7 @@ const Fy = ({ items: e, world: t, worldSlug: n = t }) => {
15017
15017
  );
15018
15018
  }, Iu = Ke(void 0);
15019
15019
  function $y({ children: e }) {
15020
- const { isMobile: t } = Bc(), n = ke().videosBaseUrl, s = t ? "videos/movil" : "videos", [i, r] = O(""), [o, l] = O(!1), c = (u, d = !0) => {
15020
+ const { isMobile: t } = Bc(), n = Te().videosBaseUrl, s = t ? "videos/movil" : "videos", [i, r] = O(""), [o, l] = O(!1), c = (u, d = !0) => {
15021
15021
  const h = `${n.replace(/\/$/, "")}/${s}/${u}`;
15022
15022
  h !== i && (d ? (l(!0), setTimeout(() => {
15023
15023
  r(h), setTimeout(() => l(!1), 300);
@@ -15045,7 +15045,7 @@ const ju = ({ returnUrlOnEnded: e }) => {
15045
15045
  console.warn("Error al intentar autoPlay del video:", u);
15046
15046
  });
15047
15047
  }, [r]), /* @__PURE__ */ a.jsxs("div", { className: "absolute inset-0 w-full h-full", children: [
15048
- /* @__PURE__ */ a.jsx(Ne, { children: n && /* @__PURE__ */ a.jsx(
15048
+ /* @__PURE__ */ a.jsx(ke, { children: n && /* @__PURE__ */ a.jsx(
15049
15049
  w.div,
15050
15050
  {
15051
15051
  className: "absolute inset-0 bg-black z-10",
@@ -15128,7 +15128,7 @@ function zy({ x: e, y: t, dest: n }) {
15128
15128
  );
15129
15129
  }
15130
15130
  function Mu({ home: e, item: t }) {
15131
- const [n, s] = O({ width: 0, height: 0 }), [i, r] = O(!0), [o, l] = O(!1), [c, u] = O(!1), [d, h] = O(""), [f, m] = O(!1), [p, b] = O(!1), [x, y] = O(!1), [N, k] = O(!1), [P, j] = O(!1), [E, S] = O(""), [v, I] = O(!1), F = tt(), { lastEvent: B, internalEvent: Z, setInternalEvent: D } = Jt(), te = ke().cinematics ?? !1, H = ke().cinematicsOnChangeLocation ?? !1;
15131
+ const [n, s] = O({ width: 0, height: 0 }), [i, r] = O(!0), [o, l] = O(!1), [c, u] = O(!1), [d, h] = O(""), [f, m] = O(!1), [p, b] = O(!1), [x, y] = O(!1), [N, k] = O(!1), [P, j] = O(!1), [E, S] = O(""), [v, I] = O(!1), F = tt(), { lastEvent: B, internalEvent: Z, setInternalEvent: D } = Jt(), te = Te().cinematics ?? !1, H = Te().cinematicsOnChangeLocation ?? !1;
15132
15132
  te && (ie(() => {
15133
15133
  B?.payload?.type === "cinematics" && B?.payload?.action === "end" && r(!0);
15134
15134
  }, [B]), ie(() => {
@@ -15152,7 +15152,7 @@ function Mu({ home: e, item: t }) {
15152
15152
  }, C = (T) => {
15153
15153
  F(T), te && H && D({ ...vn });
15154
15154
  }, _ = (T) => !!T?.trim(), M = (T) => T.endsWith(".webm") || T.endsWith(".mp4");
15155
- return /* @__PURE__ */ a.jsxs(Ne, { children: [
15155
+ return /* @__PURE__ */ a.jsxs(ke, { children: [
15156
15156
  i && /* @__PURE__ */ a.jsx(
15157
15157
  w.div,
15158
15158
  {
@@ -15316,7 +15316,7 @@ const Wy = ({ video: e, returnUrl: t }) => {
15316
15316
  animate: { opacity: 1 },
15317
15317
  exit: { opacity: 0 }
15318
15318
  };
15319
- return /* @__PURE__ */ a.jsx(Ne, { children: /* @__PURE__ */ a.jsxs(
15319
+ return /* @__PURE__ */ a.jsx(ke, { children: /* @__PURE__ */ a.jsxs(
15320
15320
  w.div,
15321
15321
  {
15322
15322
  className: "relative w-full h-full",
@@ -15333,7 +15333,7 @@ const Wy = ({ video: e, returnUrl: t }) => {
15333
15333
  }
15334
15334
  ) });
15335
15335
  }, Xy = () => {
15336
- const e = wn(), { sendMessage: t } = Cn(), n = ke().wsRoom;
15336
+ const e = wn(), { sendMessage: t } = Cn(), n = Te().wsRoom;
15337
15337
  return ie(() => {
15338
15338
  console.log("RouteListener: " + e.pathname + e.hash), t({ type: "publish", room: n, payload: { type: "camera", target: Sg(e.pathname) } });
15339
15339
  }, [e]), null;
@@ -15373,7 +15373,7 @@ export {
15373
15373
  vn as cinematicsStartEvent,
15374
15374
  _n as cn,
15375
15375
  Ry as codigoANombre,
15376
- ke as getConfig,
15376
+ Te as getConfig,
15377
15377
  Cy as initLibConfig,
15378
15378
  Tg as nombreACodigo,
15379
15379
  Sg as toTarget,
@@ -516,4 +516,4 @@ React keys must be passed directly to JSX without using spread:
516
516
  bottom: 0;
517
517
  z-index: 999999;
518
518
  }
519
- `})]})})}const bu="app-font-size",bb="100",yb=()=>{const[e,t]=we.useSearchParams(),n=e.get("size"),s=localStorage.getItem(bu);let i=bb;return n&&!isNaN(parseInt(n))?i=n:s&&!isNaN(parseInt(s))&&(i=s),b.useEffect(()=>{document.documentElement.style.fontSize=`${i}%`,n&&localStorage.setItem(bu,n)},[i,n,e,t]),null},yu=b.createContext(void 0),xb=({children:e})=>{const[t,n]=b.useState(!1),s=()=>n(i=>!i);return a.jsx(yu.Provider,{value:{isAutoMode:t,setIsAutoMode:n,toggleAutoMode:s},children:e})},lo=()=>{const e=b.useContext(yu);if(!e)throw new Error("useShowcase debe usarse dentro de un ShowcaseProvider");return e};function co(){const[e,t]=b.useState("physical"),[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState("Navantia Global"),[c,u]=b.useState("high"),[d,f]=b.useState("es"),[h,m]=b.useState(!0),p=Se().controlPanelLevels,y=["physical","hybrid","digital"],v=["high","medium","low"],{t:x,i18n:N}=jt.useTranslation(),E=we.useNavigate(),j=we.useLocation(),{sendMessage:M}=Ut(),k=Se().wsRoom,{isAutoMode:C,toggleAutoMode:w}=lo();b.useEffect(()=>{N.changeLanguage(d)},[d]),b.useEffect(()=>{if(console.log("Location en control-panel: "+j.pathname),j.pathname!=="/"){const P=p.filter(_=>_.slug.length>1).find(_=>j.pathname.startsWith(_.slug));P&&(console.log("Se va a seleccionar "+P.title),l(P.title))}},[j]),b.useEffect(()=>{M({type:"publish",room:k,payload:{type:"layer",target:e}})},[e]);const I=()=>{t(P=>{const A=(y.indexOf(P)+1)%y.length;return y[A]})},$=()=>{f(P=>P==="es"?"en":"es")},z=()=>{w()},J=()=>{switch(e){case"physical":return F.Box;case"hybrid":return F.GitMerge;case"digital":return F.Cpu;default:return F.Layers}},R=P=>{switch(P){case"low":return F.Zap;case"medium":return F.Scale;case"high":return F.Flame;default:return F.Gauge}},se=P=>{switch(P){case"Navantia Global":return F.Globe;case"Smart Catalogue":return F.BookOpen;case"Coex":return F.Network;case"Plataformas Navales":return F.Ship;case"Desarrollos tecnológicos":return F.Zap;default:return F.Layers}},K=()=>{switch(e){case"physical":return{bg:"bg-slate-700/90 hover:bg-slate-600/90",text:"text-blue-200",border:"border-slate-400/30 hover:border-slate-400/60",shadow:"shadow-lg hover:shadow-slate-500/50",badgeBg:"bg-slate-600/20",badgeText:"text-blue-200",badgeBorder:"border-slate-400/30"};case"hybrid":return{bg:"bg-teal-900/90 hover:bg-teal-800/90",text:"text-teal-300",border:"border-teal-400/30 hover:border-teal-400/60",shadow:"shadow-lg hover:shadow-teal-500/50",badgeBg:"bg-teal-500/20",badgeText:"text-teal-300",badgeBorder:"border-teal-400/30"};case"digital":return{bg:"bg-sky-900/90 hover:bg-sky-800/90",text:"text-sky-300",border:"border-sky-400/30 hover:border-sky-400/60",shadow:"shadow-lg hover:shadow-sky-500/50",badgeBg:"bg-sky-500/20",badgeText:"text-sky-300",badgeBorder:"border-sky-400/30"};default:return{bg:"bg-slate-800/90 hover:bg-slate-700/90",text:"text-cyan-300",border:"border-cyan-400/30 hover:border-cyan-400/60",shadow:"shadow-lg hover:shadow-cyan-500/50",badgeBg:"bg-cyan-500/20",badgeText:"text-cyan-300",badgeBorder:"border-cyan-400/30"}}},te=J(),V=K();return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed bottom-8 left-8 z-40",initial:{opacity:0,y:50},animate:{opacity:h?0:1,y:0,x:h?-400:0,pointerEvents:h?"none":"auto"},transition:{delay:h?0:.3,duration:.6,ease:[.34,1.56,.64,1]},children:[a.jsx(Ne,{children:i&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-red-500/20 via-amber-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-red-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-red-400/20 bg-gradient-to-r from-red-500/10 to-amber-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-red-300 font-semibold text-sm tracking-wider",children:"MODO DE RENDERIZADO"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-red-400",animate:{boxShadow:["0 0 10px rgba(248, 113, 113, 0.5)","0 0 20px rgba(248, 113, 113, 1)","0 0 10px rgba(248, 113, 113, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsx("div",{className:"p-4 space-y-3",children:v.map((P,_)=>{const A=c===P,T=R(P),O=(()=>{switch(P){case"low":return{bg:A?"bg-gradient-to-r from-green-500/30 via-emerald-500/30 to-green-500/30":"bg-slate-800/60",border:A?"border-2 border-green-400":"border border-green-400/20 hover:border-green-400/50",shadow:A?"shadow-lg shadow-green-500/50":"",iconBg:A?"bg-green-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:A?"text-slate-900":"text-green-300 group-hover:text-green-200",text:A?"text-white":"text-green-200 group-hover:text-green-100",indicator:"bg-green-400",glowColor:"rgba(34, 197, 94, 0.5)"};case"medium":return{bg:A?"bg-gradient-to-r from-amber-500/30 via-yellow-500/30 to-amber-500/30":"bg-slate-800/60",border:A?"border-2 border-amber-400":"border border-amber-400/20 hover:border-amber-400/50",shadow:A?"shadow-lg shadow-amber-500/50":"",iconBg:A?"bg-amber-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:A?"text-slate-900":"text-amber-300 group-hover:text-amber-200",text:A?"text-white":"text-amber-200 group-hover:text-amber-100",indicator:"bg-amber-400",glowColor:"rgba(251, 191, 36, 0.5)"};case"high":return{bg:A?"bg-gradient-to-r from-red-500/30 via-orange-500/30 to-red-500/30":"bg-slate-800/60",border:A?"border-2 border-red-400":"border border-red-400/20 hover:border-red-400/50",shadow:A?"shadow-lg shadow-red-500/50":"",iconBg:A?"bg-red-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:A?"text-slate-900":"text-red-300 group-hover:text-red-200",text:A?"text-white":"text-red-200 group-hover:text-red-100",indicator:"bg-red-400",glowColor:"rgba(239, 68, 68, 0.5)"}}})();return a.jsx(S.button,{onClick:()=>{u(P),r(!1)},className:`w-full text-left relative group ${A?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${O.bg} ${O.border} ${O.shadow} hover:bg-slate-800/80`,children:[A&&a.jsx(S.div,{className:"absolute inset-0 rounded-2xl",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`},animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${O.iconBg} ${O.iconText}`,animate:A?{boxShadow:[`0 0 15px ${O.glowColor}`,`0 0 25px ${O.glowColor}`,`0 0 15px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),A&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${O.text}`,animate:A?{textShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P}),A&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:`h-full ${O.indicator}`,initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${A?O.indicator:"bg-slate-600 group-hover:bg-slate-500"}`,animate:A?{scale:[1,1.3,1],boxShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`}})]})},P)})}),a.jsx(S.div,{className:"px-6 py-3 border-t border-red-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:a.jsxs("p",{className:"text-xs text-red-300/80 text-center",children:[v.length," modos disponibles"]})})]})]})})}),a.jsx(Ne,{children:n&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-cyan-500/20 via-teal-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-cyan-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-cyan-400/20 bg-gradient-to-r from-cyan-500/10 to-teal-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-cyan-300 font-semibold text-sm tracking-wider",children:"SELECCIONAR NIVEL"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-cyan-400",animate:{boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsxs("div",{className:"p-4 space-y-3 relative",children:[a.jsx(S.div,{className:"absolute left-10 top-8 bottom-8 w-0.5 bg-gradient-to-b from-cyan-500/50 via-teal-500/50 to-cyan-500/50",initial:{scaleY:0},animate:{scaleY:1},transition:{duration:.8,ease:"easeOut"}}),p.map((P,_)=>{const A=o===P.title,T=se(P.title);return a.jsx(S.button,{onClick:()=>{E(P.slug),l(P.title),s(!1)},className:`w-full text-left relative group ${A?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${A?"bg-gradient-to-r from-cyan-500/30 via-teal-500/30 to-cyan-500/30 border-2 border-cyan-400 shadow-lg shadow-cyan-500/50":"bg-slate-800/60 border border-cyan-400/20 hover:border-cyan-400/50 hover:bg-slate-800/80"}`,children:[A&&a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-r from-cyan-500/20 via-teal-500/20 to-cyan-500/20 rounded-2xl",animate:{opacity:[.5,.8,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${A?"bg-cyan-500 text-slate-900":"bg-slate-700/80 text-cyan-300 group-hover:bg-slate-700 group-hover:text-cyan-200"}`,animate:A?{boxShadow:["0 0 15px rgba(34, 211, 238, 0.5)","0 0 25px rgba(34, 211, 238, 0.8)","0 0 15px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),A&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 border-cyan-400/50 rounded-xl",animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 border-teal-400/50 rounded-xl",animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${A?"text-white":"text-cyan-200 group-hover:text-cyan-100"}`,animate:A?{textShadow:["0 0 10px rgba(34, 211, 238, 0.3)","0 0 20px rgba(34, 211, 238, 0.6)","0 0 10px rgba(34, 211, 238, 0.3)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P.title}),A&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:"h-full bg-gradient-to-r from-cyan-400 to-teal-400",initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${A?"bg-cyan-400":"bg-slate-600 group-hover:bg-cyan-500/50"}`,animate:A?{scale:[1,1.3,1],boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(34, 211, 238, 0.1) 0%, transparent 70%)"}})]})},P.title)})]}),a.jsx(S.div,{className:"px-6 py-3 border-t border-cyan-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:a.jsxs("p",{className:"text-xs text-cyan-300/80 text-center",children:[p.length," niveles disponibles"]})})]})]})})}),a.jsxs(S.button,{onClick:()=>s(!n),className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3 w-60",whileHover:{scale:1.02},whileTap:{scale:.98},animate:{borderColor:n?["rgba(34, 211, 238, 0.3)","rgba(34, 211, 238, 0.6)","rgba(34, 211, 238, 0.3)"]:"rgba(34, 211, 238, 0.3)"},transition:{borderColor:{duration:2,repeat:n?Number.POSITIVE_INFINITY:0,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Layers,{className:"w-5 h-5"})},n?"open":"closed")}),a.jsx("span",{children:x("control-panel.nivel")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30 leading-3",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:o},`level-badge-${o}`)]}),a.jsxs(S.button,{onClick:I,className:`flex items-center gap-3 px-6 py-3 ${V.bg} ${V.text} font-medium text-sm rounded-full transition-all duration-300 ${V.shadow} border ${V.border} mb-3`,whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(te,{className:"w-5 h-5"})},e)}),a.jsx("span",{children:"Layer Switch"}),a.jsx(S.span,{className:`px-3 py-1 ${V.badgeBg} ${V.badgeText} rounded-full text-xs font-semibold border ${V.badgeBorder}`,initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:x(`control-panel.layer.${e}`)},`badge-${e}`)]}),a.jsxs(S.button,{onClick:$,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Languages,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.idioma")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:d==="es"?"Español":"English"},`language-badge-${d}`)]}),a.jsxs(S.button,{onClick:z,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Presentation,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.showcasemode")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:C?"ON":"OFF"},`showcase-badge-${C}`)]}),a.jsx(S.button,{onClick:()=>m(!h),className:"mt-3 p-2.5 bg-white/30 hover:bg-white/40 text-white rounded-full transition-all duration-300 backdrop-blur-md border-2 border-white/40 hover:border-white/60 z-[60] shadow-xl",animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},whileHover:{scale:1.15},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:h?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})})})]}),a.jsx(Ne,{children:h&&a.jsx(S.button,{onClick:()=>m(!1),className:"fixed bottom-8 left-8 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,x:-50,scale:0},animate:{opacity:.6,x:0,scale:1},exit:{opacity:0,x:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,x:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{x:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})})})]})}function uo(){const{isConnected:e,reconnect:t}=Ut(),s={connected:{color:"bg-emerald-500",ringColor:"ring-emerald-500/30",label:"Conectado",animate:!0},connecting:{color:"bg-amber-500",ringColor:"ring-amber-500/30",label:"Conectando...",animate:!0},disconnected:{color:"bg-red-500",ringColor:"ring-red-500/30",label:"Desconectado",animate:!1}}[e?"connected":"disconnected"],i=!e&&t;return a.jsxs("div",{className:bn("fixed z-50 flex items-center gap-2 rounded-full bg-background/80 backdrop-blur-sm px-3 py-2 shadow-lg","top-1 right-2",i&&"cursor-pointer hover:bg-accent transition-colors"),onClick:i?t:void 0,role:i?"button":void 0,"aria-label":i?"Reconectar WebSocket":`Estado: ${s.label}`,children:[a.jsxs("div",{className:"relative flex items-center justify-center",children:[a.jsx("div",{className:bn("w-2.5 h-2.5 rounded-full",s.color,s.animate&&"animate-pulse")}),s.animate&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:bn("absolute w-2.5 h-2.5 rounded-full ring-2",s.ringColor,"animate-ping")}),a.jsx("div",{className:bn("absolute w-4 h-4 rounded-full ring-1",s.ringColor)})]})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx("div",{className:"h-0.5 w-8 relative overflow-hidden transition-all duration-500 bg-emerald-500",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-green-300 to-transparent animate-flow-right"})})}),a.jsx("div",{className:"relative flex items-center justify-center",children:a.jsx("div",{className:"w-2.5 h-2.5"})}),!1,!1]})}function fo({children:e}){const t=Ii();if(!t)return a.jsx(a.Fragment,{children:e});const{isMinimized:n}=t;return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"relative w-full h-full",initial:!1,animate:{scaleY:n?0:1,opacity:n?0:1},transition:{duration:.6,ease:[.4,0,.2,1]},style:{transformOrigin:"bottom"},children:e}),a.jsx(Ep,{})]})}const ho=(e=15e3)=>{const{isAutoMode:t}=lo(),{pathname:n}=we.useLocation(),s=we.useNavigate(),i=b.useRef(null),r=Se()?.showcasesUrl??[],o=()=>{const d=(r.indexOf(n)+1)%r.length;s(r[d])},l=()=>{i.current&&clearInterval(i.current),i.current=setInterval(o,e)},c=()=>{i.current&&(clearInterval(i.current),i.current=null)};b.useEffect(()=>(t?l():c(),()=>c()),[t]),b.useEffect(()=>{t&&l()},[n,t])};function vb({showControlPanel:e=!0,iframeSrc:t=""}){return ho(3e5),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"z-1 fixed inset-0",children:a.jsx("iframe",{id:"vagonFrame",allow:"microphone *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *;",className:"z-1 w-full h-screen",src:t})}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(we.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function wb({showControlPanel:e=!0}){return ho(3e5),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(we.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function mo({items:e,parent:t,selectedShip:n,onShipSelect:s}){const[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(6),[d,f]=b.useState(!0),[h,m]=b.useState(0),[p,y]=b.useState("slide"),[v,x]=b.useState(160),{t:N}=jt.useTranslation(),{lastEvent:E,internalEvent:j,setInternalEvent:M}=vt(),k=Se().cinematics??!1,C=Se().cinematicsOnChangeLocation??!1;k&&(b.useEffect(()=>{E?.payload?.type==="cinematics"&&E?.payload?.action==="end"&&f(!0)},[E]),b.useEffect(()=>{if(j?.payload?.type==="cinematics"){const V=j?.payload?.action;V==="start"&&f(!1),V==="end"&&f(!0)}},[j]));const w=V=>{const _=(Math.ceil(R.length/c)-1)*c*v;return V>0?0:Math.abs(V)>_?-_:V},I=V=>-(V*c*v),$=V=>{const P=Math.floor(c/2),_=Math.floor(V/c),A=(V-_*c-P)*v,T=-(_*c*v+A);return w(T)},z=we.useNavigate(),J=Se().baseUrl??"",R=e;b.useEffect(()=>{const V=()=>{let P;window.innerWidth<640?(u(2),P=120):window.innerWidth<768?(u(3),P=140):window.innerWidth<1024?(u(4),P=160):(u(6),P=180),x(P)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[]),b.useEffect(()=>{if(!n){r(0),y("center"),m($(0));return}const V=R.findIndex(_=>_.slug===n);if(V===-1){r(0),y("center"),m($(0));return}const P=Math.floor(V/c);P!==i&&r(P),y("center"),m($(V))},[n,c,v,R]),b.useEffect(()=>{if(p==="slide")m(I(i));else{const V=R.findIndex(P=>P.slug===n);V!==-1&&m($(V))}},[c,v]);const se=V=>{s(V),y("center");const P=R.findIndex(_=>_.slug===V);P!==-1&&m($(P)),z(`${t?`/${t}/`:"/"}${V}`),k&&C&&M({...Yt})},K=()=>{const V=Math.ceil(R.length/c),P=(i+1)%V;y("slide"),r(P),m(I(P))},te=()=>{const V=Math.ceil(R.length/c),P=(i-1+V)%V;y("slide"),r(P),m(I(P))};return a.jsxs(Ne,{children:[d&&a.jsxs(S.div,{className:"absolute top-0 left-0 right-0 flex flex-col items-center justify-center z-10",initial:{opacity:0,y:-50},animate:{opacity:o?0:1,y:o?-200:0,pointerEvents:o?"none":"auto"},transition:{duration:.6,ease:[.34,1.56,.64,1]},exit:{opacity:0,y:-50,scale:.8},children:[a.jsxs(S.div,{className:"relative flex items-center justify-center w-full max-w-7xl",animate:{y:0},transition:{duration:.3,ease:"easeInOut"},children:[a.jsx(S.button,{className:"absolute left-1 sm:left-2 md:left-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:te,whileHover:{scale:1.05,x:-2},whileTap:{scale:.95},disabled:i===0,style:{opacity:i===0?.3:1,pointerEvents:i===0?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),a.jsx("div",{className:"flex p-2 sm:p-4 mx-10 sm:mx-16 overflow-hidden",children:a.jsx(S.div,{className:"flex space-x-2 sm:space-x-4 md:space-x-8",animate:{x:h},transition:{duration:.6,ease:[.25,.46,.45,.94]},children:R.map((V,P)=>a.jsxs(S.div,{className:`flex flex-col gap-1 items-center cursor-pointer group min-w-[100px] sm:min-w-[120px] md:min-w-[144px] ${n===V.slug?"scale-110":""}`,onClick:()=>se(V.slug),whileHover:{scale:1.05,y:-4},whileTap:{scale:.98},initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{delay:P*.1}},children:[a.jsxs("div",{className:`relative w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32 flex flex-col gap-1 align-bottom items-center justify-end py-2 sm:pt-4 rounded-lg transition-all duration-500 ${n===V.slug?"bg-blue-700/80 shadow-lg shadow-blue-500/30 border border-blue-400/50":"bg-zinc-500/1 hover:bg-blue-900/40 border border-transparent hover:border-blue-600/30"}`,children:[a.jsx("div",{className:"w-full h-12 sm:h-16 relative flex items-center justify-center px-4",children:a.jsx("img",{src:`${J.replace(/\/$/,"")}/images/shapes/${V.icon??V.slug}.png`,alt:V.name,width:120,height:40,className:"object-contain brightness-200 filter transition-all duration-300 group-hover:brightness-300"})}),a.jsx("div",{className:" text-center",children:a.jsx("div",{className:"text-cyan-300 text-xs sm:text-sm font-medium transition-colors duration-300 group-hover:text-cyan-200",children:N(V.name)})})]}),V.label&&a.jsx("div",{className:"mt-1",children:a.jsx("span",{className:`text-[10px] sm:text-xs px-2 sm:px-3 py-1 rounded-md transition-all duration-300 ${n===V.slug?"bg-cyan-500/80 text-blue-900 shadow-md":"bg-blue-900/60 text-cyan-300 group-hover:bg-blue-800/70 group-hover:text-cyan-200"}`,children:V.label})})]},V.slug))})}),a.jsx(S.button,{className:"absolute right-1 sm:right-2 md:right-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:K,whileHover:{scale:1.05,x:2},whileTap:{scale:.95},disabled:i===Math.ceil(R.length/c)-1,style:{opacity:i===Math.ceil(R.length/c)-1?.3:1,pointerEvents:i===Math.ceil(R.length/c)-1?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4 rotate-180"})})]}),a.jsx(S.button,{onClick:()=>l(!0),className:"p-2 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-50",initial:{opacity:0,scale:0},animate:{opacity:.6,scale:1,y:[0,5,0]},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:o?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronUp,{className:"w-5 h-5"})})})]}),o&&a.jsx(S.button,{onClick:()=>l(!1),className:"absolute top-8 left-1/2 -translate-x-1/2 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,y:-50,scale:0},animate:{opacity:.6,y:0,scale:1},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,y:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{y:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronDown,{className:"w-6 h-6"})})})]})}const Sb=({items:e,world:t,worldSlug:n=t})=>{const[s,i]=b.useState(""),r={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},o=we.useLocation(),l=we.useNavigate(),{t:c}=jt.useTranslation(),{setInternalEvent:u}=vt(),d=Se().cinematics??!1,f=Se().cinematicsOnChangeLocation??!1;b.useEffect(()=>{o.pathname===`/${n}`?i(""):o.pathname.startsWith(n?`/${n}/`:"/")&&i(o.pathname.replace(n?`/${n}/`:"/",""))},[o]),b.useEffect(()=>{const v=x=>{const N=["INPUT","TEXTAREA"].includes(x.target.tagName),E=document.querySelector(".yarl__container");N||E||(x.key==="ArrowLeft"?(x.preventDefault(),y()):x.key==="ArrowRight"&&(x.preventDefault(),p()))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[s]),b.useEffect(()=>{let v=0,x=0,N=!1;const E=k=>{const C=k.target,w=document.getElementById("ItemPage");N=C===w,N&&(v=k.changedTouches[0].screenX)},j=k=>{N&&(x=k.changedTouches[0].screenX,M())},M=()=>{const k=x-v;Math.abs(k)<50||(k>0?y():p())};return window.addEventListener("touchstart",E),window.addEventListener("touchend",j),()=>{window.removeEventListener("touchstart",E),window.removeEventListener("touchend",j)}},[s]);const h=()=>{const x=(e.findIndex(N=>N.slug===s)+1)%e.length;return e[x]},m=()=>{const x=(e.findIndex(N=>N.slug===s)-1+e.length)%e.length;return e[x]},p=()=>{const v=h();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})},y=()=>{const v=m();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})};return a.jsxs(S.div,{className:"relative w-full h-full",variants:r,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[a.jsx(mo,{parent:n,items:e,onShipSelect:i,selectedShip:s}),s&&a.jsxs(a.Fragment,{children:[a.jsxs(S.button,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:y,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute left-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.anterior")}),a.jsx("div",{className:"absolute right-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]}),a.jsxs(S.button,{className:"absolute right-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:p,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 rotate-180 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute right-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.siguiente")}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-l-4 border-transparent border-l-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]})]}),a.jsx(we.Outlet,{})]})},xu=b.createContext(void 0);function Tb({children:e}){const{isMobile:t}=Li(),n=Se().videosBaseUrl,s=t?"videos/movil":"videos",[i,r]=b.useState(""),[o,l]=b.useState(!1),c=(u,d=!0)=>{const f=`${n.replace(/\/$/,"")}/${s}/${u}`;f!==i&&(d?(l(!0),setTimeout(()=>{r(f),setTimeout(()=>l(!1),300)},150)):r(f))};return a.jsx(xu.Provider,{value:{currentVideo:i,setVideo:c,isTransitioning:o},children:e})}function vu(){const e=b.useContext(xu);return e===void 0?{currentVideo:"",setVideo:()=>{},isTransitioning:!1}:e}const po=({returnUrlOnEnded:e})=>{const{currentVideo:t,isTransitioning:n}=vu(),s=we.useNavigate(),i=b.useRef(null),[r,o]=b.useState(t),l=()=>{e&&s(e)},c=u=>u.replace(/\.mp4$/i,".webp");return b.useEffect(()=>{t!==r&&(i.current&&(i.current.pause(),i.current.removeAttribute("src"),i.current.load()),o(t))},[t,r]),b.useEffect(()=>{i.current&&r&&i.current.play().catch(u=>{console.warn("Error al intentar autoPlay del video:",u)})},[r]),a.jsxs("div",{className:"absolute inset-0 w-full h-full",children:[a.jsx(Ne,{children:n&&a.jsx(S.div,{className:"absolute inset-0 bg-black z-10",initial:{opacity:0},animate:{opacity:.3},exit:{opacity:0},transition:{duration:.15}})}),a.jsx(S.video,{ref:i,autoPlay:!0,loop:!e,muted:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover",onEnded:l,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},src:r,poster:c(r)},r)]})};function Cb({className:e}){const n=e!==void 0?e:"fixed inset-0 overflow-hidden bg-slate-900";return a.jsxs("div",{className:n,children:[a.jsx(po,{}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(we.Outlet,{})})]})}function Nb({x:e,y:t,dest:n}){const s=we.useNavigate(),i=r=>{s(`/product/${r}`)};return a.jsxs(S.button,{className:`absolute ${e} ${t} w-8 h-8 bg-gradient-to-br from-blue-500 to-indigo-700 rounded-full shadow-2xl border-2 border-blue-300/50 backdrop-blur-sm flex items-center justify-center group overflow-hidden`,initial:"initial",animate:"animate",whileHover:"hover",whileTap:"tap",onClick:()=>i(n),children:[a.jsx("div",{className:"absolute inset-1 bg-gradient-to-br from-blue-300/30 to-transparent rounded-full"}),a.jsx("div",{className:"relative w-2.5 h-2.5 bg-white rounded-full group-hover:scale-125 transition-all duration-300 shadow-lg",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-200 to-white rounded-full animate-pulse"})}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-300/60 animate-ping"}),a.jsx("div",{className:"absolute inset-1 rounded-full border border-blue-400/40 animate-pulse"}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-transparent border-t-blue-300 animate-spin",style:{animationDuration:"3s"}}),a.jsxs(S.div,{className:"absolute right-12 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg p-4 border border-blue-400/30 shadow-xl min-w-64 group-hover:opacity-100 transition-opacity duration-300",initial:{opacity:0,x:20,scale:.8},animate:{opacity:0,x:20,scale:.8},whileHover:{opacity:1,x:0,scale:1},transition:{duration:.3},style:{pointerEvents:"none"},children:[a.jsx("h3",{className:"text-blue-300 font-bold text-lg mb-1",children:"SUBMARINO S80"}),a.jsx("p",{className:"text-blue-100/80 text-sm leading-relaxed",children:"Submarino de propulsión AIP con capacidades stealth y sistemas de combate integrados de última generación."}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-8 border-b-8 border-l-8 border-transparent border-l-slate-900/95"})]})]})}function go({home:e,item:t}){const[n,s]=b.useState({width:0,height:0}),[i,r]=b.useState(!0),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(""),[h,m]=b.useState(!1),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[N,E]=b.useState(!1),[j,M]=b.useState(!1),[k,C]=b.useState(""),[w,I]=b.useState(!1),$=we.useNavigate(),{lastEvent:z,internalEvent:J,setInternalEvent:R}=vt(),se=Se().cinematics??!1,K=Se().cinematicsOnChangeLocation??!1;se&&(b.useEffect(()=>{z?.payload?.type==="cinematics"&&z?.payload?.action==="end"&&r(!0)},[z]),b.useEffect(()=>{if(J?.payload?.type==="cinematics"){const T=J?.payload?.action;T==="start"&&r(!1),T==="end"&&r(!0)}},[J])),b.useEffect(()=>{const T=()=>{s({width:window.innerWidth,height:window.innerHeight})};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]);const te=()=>{l(!0),r(!1)},V=()=>{l(!1),r(!0)},P=T=>{$(T),se&&K&&R({...Yt})},_=T=>!!T?.trim(),A=T=>T.endsWith(".webm")||T.endsWith(".mp4");return a.jsxs(Ne,{children:[i&&a.jsx(S.div,{className:"absolute bottom-4 sm:bottom-6 md:bottom-10 left-1/2 transform -translate-x-1/2 w-full max-w-[90%] sm:max-w-[85%] md:max-w-4xl px-4 sm:px-6 md:px-8 z-9999",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},exit:{opacity:0,y:50,scale:.8,transition:{delay:0,duration:.6}},children:a.jsxs("div",{className:"flex flex-col gap-6 backdrop-blur-xs rounded-xl sm:rounded-2xl border p-3 sm:p-4 md:p-6 text-center border-transparent max-w-6xl mx-auto title-section",children:[a.jsx("h1",{className:"text-xl sm:text-3xl md:text-4xl lg:text-5xl font-light text-white mb-2 sm:mb-4 tracking-wide",children:t?.title}),a.jsx("p",{className:"text-xs sm:text-sm md:text-base text-blue-100/90 font-light leading-relaxed max-w-5xl mx-auto mb-3 sm:mb-4 md:mb-6",children:t?.subtitle}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4",children:[!1,e&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:()=>{P(e)},children:a.jsx(F.Home,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),t?.simulation&&a.jsx(xc,{onClick:()=>m(!0)}),_(t?.playButton)&&a.jsx(Pi,{Icon:F.Video,onClick:()=>{f(t.playButton.trim()),u(!0)}}),t?.webUrl&&a.jsx(Pi,{Icon:F.ExternalLink,onClick:()=>x(!0)}),(t?.links?.length??0)>0&&t?.links?.map(T=>a.jsx(Un,{item:T,onClick:()=>{A(T.url)?(f(T.url.trim()),u(!0)):(C(T.url),M(T.transparent),E(!0)),T.transparent===!0&&se&&R({...Yt})}})),(t?.cards?.length??0)>0&&a.jsx(Wl,{onClick:()=>y(!0)}),(t?.nodesId??0)>0&&a.jsx(yc,{label:t?.shortName??t.title,onClick:te})]})]})]})}),o&&t?.nodesId&&a.jsx(gb,{isOpen:o,onClose:V,size:n,hotspot:t.nodesId}),c&&a.jsx(mu,{source:d,onClose:()=>u(!1)}),h&&a.jsx(gu,{item:t.simulation,onClose:()=>m(!1)},t?.slug),p&&a.jsx(vc,{cards:t.cards,onClose:()=>y(!1)}),v&&a.jsx(Ht,{src:t.webUrl,onClose:()=>x(!1)}),N&&a.jsx(Ht,{src:k,transparent:j,onClose:()=>{const T=j;E(!1),C(""),M(!1),T===!0&&se&&R({...gc})}}),w&&a.jsx(Pp,{onClose:()=>I(!1)})]})}const Eb=({video:e,returnUrl:t})=>{console.log(e);const n=we.useNavigate(),s={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},i=()=>{n(t)},{t:r}=jt.useTranslation();return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"fixed inset-0 overflow-hidden bg-slate-900",children:[a.jsx(po,{returnUrlOnEnded:t}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(S.div,{className:"relative w-full h-full",variants:s,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:a.jsx(S.div,{className:"absolute inset-0 bg-black/20 flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:a.jsx(S.button,{className:"absolute bottom-8 right-8 px-4 py-2 bg-slate-900/80 backdrop-blur-md rounded-lg text-white/90 text-sm border border-white/20 hover:border-white/40 hover:bg-slate-800/90 transition-all duration-300 hover:text-white",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:i,children:r("layout.skip")})})})})]})})},kb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=we.useParams();b.useEffect(()=>{if(o){const c=s.find(u=>u.slug===o);c&&r(c)}},[o]);const l={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:l,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(go,{home:`/${t}`,item:i})]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},Pb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=we.useParams(),l=we.useNavigate();b.useEffect(()=>{if(o){const u=s.find(d=>d.slug===o);u&&(r(u),console.log(JSON.stringify(u)))}},[o]);const c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:c,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(gu,{item:i.simulation,onClose:()=>l(`/${t}`)},o)]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},jb=({items:e,world:t,overlay:n=!1,title:s})=>{const[i,r]=b.useState(""),o={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return a.jsx(Ne,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:o,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-slate-900/20 via-transparent to-slate-900/40"}),e&&a.jsx(mo,{parent:t,items:e,onShipSelect:r,selectedShip:i}),a.jsx(go,{home:"/",item:s})]})})},Ib=()=>{const e=we.useLocation(),{sendMessage:t}=Ut(),n=Se().wsRoom;return b.useEffect(()=>{console.log("RouteListener: "+e.pathname+e.hash),t({type:"publish",room:n,payload:{type:"camera",target:pc(e.pathname)}})},[e]),null};q.CardsButton=Wl,q.ControlPanel=co,q.DynamicLucideIcon=Yl,q.EventProvider=Om,q.FontSizeManager=yb,q.FullScreenPage=Eb,q.IconButton=Pi,q.InfoCard=ao,q.ItemPage=kb,q.Layout=Cb,q.LayoutIframe=vb,q.LayoutTransparent=wb,q.LayoutWorld=Sb,q.LinkItemButton=Un,q.MinimizeProvider=Am,q.MinimizeWrapper=fo,q.NodosButton=yc,q.PointButton=Nb,q.RouteListener=Ib,q.ShipNavigation=mo,q.ShowcaseProvider=xb,q.SimulacionButton=xc,q.SlidePage=Pb,q.TabView=pu,q.TitleSection=go,q.VideoBackground=po,q.VideoProvider=Tb,q.WebSocketProvider=Np,q.WebSocketStatusWidget=uo,q.WorldPage=jb,q.cinematicsEndEvent=gc,q.cinematicsStartEvent=Yt,q.cn=bn,q.codigoANombre=Tp,q.getConfig=Se,q.initLibConfig=Su,q.nombreACodigo=mc,q.toTarget=pc,q.toVideo=Cp,q.useAutoModeTimer=ho,q.useEvent=vt,q.useMinimize=Vm,q.useOptionalMinimize=Ii,q.useScreenSize=Li,q.useShowcase=lo,q.useVideo=vu,q.useWebSocket=Ut,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
519
+ `})]})})}const bu="app-font-size",bb="100",yb=()=>{const[e,t]=we.useSearchParams(),n=e.get("size"),s=localStorage.getItem(bu);let i=bb;return n&&!isNaN(parseInt(n))?i=n:s&&!isNaN(parseInt(s))&&(i=s),b.useEffect(()=>{document.documentElement.style.fontSize=`${i}%`,n&&localStorage.setItem(bu,n)},[i,n,e,t]),null},yu=b.createContext(void 0),xb=({children:e})=>{const[t,n]=b.useState(!1),s=()=>n(i=>!i);return a.jsx(yu.Provider,{value:{isAutoMode:t,setIsAutoMode:n,toggleAutoMode:s},children:e})},lo=()=>{const e=b.useContext(yu);if(!e)throw new Error("useShowcase debe usarse dentro de un ShowcaseProvider");return e};function co(){const[e,t]=b.useState("physical"),[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState("Navantia Global"),[c,u]=b.useState("high"),[d,f]=b.useState("es"),[h,m]=b.useState(!0),p=Se().controlPanelLevels,y=["physical","hybrid","digital"],v=["high","medium","low"],{t:x,i18n:N}=jt.useTranslation(),E=we.useNavigate(),j=we.useLocation(),{sendMessage:M}=Ut(),k=Se().wsRoom,{isAutoMode:C,toggleAutoMode:w}=lo();b.useEffect(()=>{N.changeLanguage(d)},[d]),b.useEffect(()=>{if(console.log("Location en control-panel: "+j.pathname),j.pathname!=="/"){const P=p.filter(_=>_.slug.length>1).find(_=>j.pathname.startsWith(_.slug));P&&(console.log("Se va a seleccionar "+P.title),l(P.title))}},[j]),b.useEffect(()=>{M({type:"publish",room:k,payload:{type:"layer",target:e}})},[e]);const I=()=>{t(P=>{const A=(y.indexOf(P)+1)%y.length;return y[A]})},$=()=>{f(P=>P==="es"?"en":"es")},z=()=>{w()},J=()=>{switch(e){case"physical":return F.Box;case"hybrid":return F.GitMerge;case"digital":return F.Cpu;default:return F.Layers}},R=P=>{switch(P){case"low":return F.Zap;case"medium":return F.Scale;case"high":return F.Flame;default:return F.Gauge}},se=P=>{switch(P){case"Navantia Global":return F.Globe;case"Smart Catalogue":return F.BookOpen;case"Coex":return F.Network;case"Plataformas Navales":return F.Ship;case"Desarrollos tecnológicos":return F.Zap;default:return F.Layers}},K=()=>{switch(e){case"physical":return{bg:"bg-slate-700/90 hover:bg-slate-600/90",text:"text-blue-200",border:"border-slate-400/30 hover:border-slate-400/60",shadow:"shadow-lg hover:shadow-slate-500/50",badgeBg:"bg-slate-600/20",badgeText:"text-blue-200",badgeBorder:"border-slate-400/30"};case"hybrid":return{bg:"bg-teal-900/90 hover:bg-teal-800/90",text:"text-teal-300",border:"border-teal-400/30 hover:border-teal-400/60",shadow:"shadow-lg hover:shadow-teal-500/50",badgeBg:"bg-teal-500/20",badgeText:"text-teal-300",badgeBorder:"border-teal-400/30"};case"digital":return{bg:"bg-sky-900/90 hover:bg-sky-800/90",text:"text-sky-300",border:"border-sky-400/30 hover:border-sky-400/60",shadow:"shadow-lg hover:shadow-sky-500/50",badgeBg:"bg-sky-500/20",badgeText:"text-sky-300",badgeBorder:"border-sky-400/30"};default:return{bg:"bg-slate-800/90 hover:bg-slate-700/90",text:"text-cyan-300",border:"border-cyan-400/30 hover:border-cyan-400/60",shadow:"shadow-lg hover:shadow-cyan-500/50",badgeBg:"bg-cyan-500/20",badgeText:"text-cyan-300",badgeBorder:"border-cyan-400/30"}}},te=J(),V=K();return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed bottom-8 left-8 z-40",initial:{opacity:0,y:50},animate:{opacity:h?0:1,y:0,x:h?-400:0,pointerEvents:h?"none":"auto"},transition:{delay:h?0:.3,duration:.6,ease:[.34,1.56,.64,1]},children:[a.jsx(Ne,{children:i&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-red-500/20 via-amber-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-red-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-red-400/20 bg-gradient-to-r from-red-500/10 to-amber-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-red-300 font-semibold text-sm tracking-wider",children:"MODO DE RENDERIZADO"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-red-400",animate:{boxShadow:["0 0 10px rgba(248, 113, 113, 0.5)","0 0 20px rgba(248, 113, 113, 1)","0 0 10px rgba(248, 113, 113, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsx("div",{className:"p-4 space-y-3",children:v.map((P,_)=>{const A=c===P,T=R(P),O=(()=>{switch(P){case"low":return{bg:A?"bg-gradient-to-r from-green-500/30 via-emerald-500/30 to-green-500/30":"bg-slate-800/60",border:A?"border-2 border-green-400":"border border-green-400/20 hover:border-green-400/50",shadow:A?"shadow-lg shadow-green-500/50":"",iconBg:A?"bg-green-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:A?"text-slate-900":"text-green-300 group-hover:text-green-200",text:A?"text-white":"text-green-200 group-hover:text-green-100",indicator:"bg-green-400",glowColor:"rgba(34, 197, 94, 0.5)"};case"medium":return{bg:A?"bg-gradient-to-r from-amber-500/30 via-yellow-500/30 to-amber-500/30":"bg-slate-800/60",border:A?"border-2 border-amber-400":"border border-amber-400/20 hover:border-amber-400/50",shadow:A?"shadow-lg shadow-amber-500/50":"",iconBg:A?"bg-amber-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:A?"text-slate-900":"text-amber-300 group-hover:text-amber-200",text:A?"text-white":"text-amber-200 group-hover:text-amber-100",indicator:"bg-amber-400",glowColor:"rgba(251, 191, 36, 0.5)"};case"high":return{bg:A?"bg-gradient-to-r from-red-500/30 via-orange-500/30 to-red-500/30":"bg-slate-800/60",border:A?"border-2 border-red-400":"border border-red-400/20 hover:border-red-400/50",shadow:A?"shadow-lg shadow-red-500/50":"",iconBg:A?"bg-red-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:A?"text-slate-900":"text-red-300 group-hover:text-red-200",text:A?"text-white":"text-red-200 group-hover:text-red-100",indicator:"bg-red-400",glowColor:"rgba(239, 68, 68, 0.5)"}}})();return a.jsx(S.button,{onClick:()=>{u(P),r(!1)},className:`w-full text-left relative group ${A?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${O.bg} ${O.border} ${O.shadow} hover:bg-slate-800/80`,children:[A&&a.jsx(S.div,{className:"absolute inset-0 rounded-2xl",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`},animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${O.iconBg} ${O.iconText}`,animate:A?{boxShadow:[`0 0 15px ${O.glowColor}`,`0 0 25px ${O.glowColor}`,`0 0 15px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),A&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${O.text}`,animate:A?{textShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P}),A&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:`h-full ${O.indicator}`,initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${A?O.indicator:"bg-slate-600 group-hover:bg-slate-500"}`,animate:A?{scale:[1,1.3,1],boxShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`}})]})},P)})}),a.jsx(S.div,{className:"px-6 py-3 border-t border-red-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:a.jsxs("p",{className:"text-xs text-red-300/80 text-center",children:[v.length," modos disponibles"]})})]})]})})}),a.jsx(Ne,{children:n&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-cyan-500/20 via-teal-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-cyan-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-cyan-400/20 bg-gradient-to-r from-cyan-500/10 to-teal-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-cyan-300 font-semibold text-sm tracking-wider",children:"SELECCIONAR NIVEL"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-cyan-400",animate:{boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsxs("div",{className:"p-4 space-y-3 relative",children:[a.jsx(S.div,{className:"absolute left-10 top-8 bottom-8 w-0.5 bg-gradient-to-b from-cyan-500/50 via-teal-500/50 to-cyan-500/50",initial:{scaleY:0},animate:{scaleY:1},transition:{duration:.8,ease:"easeOut"}}),p.map((P,_)=>{const A=o===P.title,T=se(P.title);return a.jsx(S.button,{onClick:()=>{E(P.slug),l(P.title),s(!1)},className:`w-full text-left relative group ${A?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${A?"bg-gradient-to-r from-cyan-500/30 via-teal-500/30 to-cyan-500/30 border-2 border-cyan-400 shadow-lg shadow-cyan-500/50":"bg-slate-800/60 border border-cyan-400/20 hover:border-cyan-400/50 hover:bg-slate-800/80"}`,children:[A&&a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-r from-cyan-500/20 via-teal-500/20 to-cyan-500/20 rounded-2xl",animate:{opacity:[.5,.8,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${A?"bg-cyan-500 text-slate-900":"bg-slate-700/80 text-cyan-300 group-hover:bg-slate-700 group-hover:text-cyan-200"}`,animate:A?{boxShadow:["0 0 15px rgba(34, 211, 238, 0.5)","0 0 25px rgba(34, 211, 238, 0.8)","0 0 15px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),A&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 border-cyan-400/50 rounded-xl",animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 border-teal-400/50 rounded-xl",animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${A?"text-white":"text-cyan-200 group-hover:text-cyan-100"}`,animate:A?{textShadow:["0 0 10px rgba(34, 211, 238, 0.3)","0 0 20px rgba(34, 211, 238, 0.6)","0 0 10px rgba(34, 211, 238, 0.3)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P.title}),A&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:"h-full bg-gradient-to-r from-cyan-400 to-teal-400",initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${A?"bg-cyan-400":"bg-slate-600 group-hover:bg-cyan-500/50"}`,animate:A?{scale:[1,1.3,1],boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(34, 211, 238, 0.1) 0%, transparent 70%)"}})]})},P.title)})]}),a.jsx(S.div,{className:"px-6 py-3 border-t border-cyan-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:a.jsxs("p",{className:"text-xs text-cyan-300/80 text-center",children:[p.length," niveles disponibles"]})})]})]})})}),a.jsxs(S.button,{onClick:()=>s(!n),className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3 w-60",whileHover:{scale:1.02},whileTap:{scale:.98},animate:{borderColor:n?["rgba(34, 211, 238, 0.3)","rgba(34, 211, 238, 0.6)","rgba(34, 211, 238, 0.3)"]:"rgba(34, 211, 238, 0.3)"},transition:{borderColor:{duration:2,repeat:n?Number.POSITIVE_INFINITY:0,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Layers,{className:"w-5 h-5"})},n?"open":"closed")}),a.jsx("span",{children:x("control-panel.nivel")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30 leading-3",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:o},`level-badge-${o}`)]}),a.jsxs(S.button,{onClick:I,className:`flex items-center gap-3 px-6 py-3 ${V.bg} ${V.text} font-medium text-sm rounded-full transition-all duration-300 ${V.shadow} border ${V.border} mb-3`,whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(te,{className:"w-5 h-5"})},e)}),a.jsx("span",{children:"Layer Switch"}),a.jsx(S.span,{className:`px-3 py-1 ${V.badgeBg} ${V.badgeText} rounded-full text-xs font-semibold border ${V.badgeBorder}`,initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:x(`control-panel.layer.${e}`)},`badge-${e}`)]}),a.jsxs(S.button,{onClick:$,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Languages,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.idioma")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:d==="es"?"Español":"English"},`language-badge-${d}`)]}),a.jsxs(S.button,{onClick:z,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ne,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Presentation,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.showcasemode")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:C?"ON":"OFF"},`showcase-badge-${C}`)]}),a.jsx(S.button,{onClick:()=>m(!h),className:"mt-3 p-2.5 bg-white/30 hover:bg-white/40 text-white rounded-full transition-all duration-300 backdrop-blur-md border-2 border-white/40 hover:border-white/60 z-[60] shadow-xl",animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},whileHover:{scale:1.15},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:h?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})})})]}),a.jsx(Ne,{children:h&&a.jsx(S.button,{onClick:()=>m(!1),className:"fixed bottom-8 left-8 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,x:-50,scale:0},animate:{opacity:.6,x:0,scale:1},exit:{opacity:0,x:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,x:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{x:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})})})]})}function uo(){const{isConnected:e,reconnect:t}=Ut(),s={connected:{color:"bg-emerald-500",ringColor:"ring-emerald-500/30",label:"Conectado",animate:!0},connecting:{color:"bg-amber-500",ringColor:"ring-amber-500/30",label:"Conectando...",animate:!0},disconnected:{color:"bg-red-500",ringColor:"ring-red-500/30",label:"Desconectado",animate:!1}}[e?"connected":"disconnected"],i=!e&&t;return a.jsxs("div",{className:bn("fixed z-50 flex items-center gap-2 rounded-full bg-background/80 backdrop-blur-sm px-3 py-2 shadow-lg","top-1 right-2",i&&"cursor-pointer hover:bg-accent transition-colors"),onClick:i?t:void 0,role:i?"button":void 0,"aria-label":i?"Reconectar WebSocket":`Estado: ${s.label}`,children:[a.jsxs("div",{className:"relative flex items-center justify-center",children:[a.jsx("div",{className:bn("w-2.5 h-2.5 rounded-full",s.color,s.animate&&"animate-pulse")}),s.animate&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:bn("absolute w-2.5 h-2.5 rounded-full ring-2",s.ringColor,"animate-ping")}),a.jsx("div",{className:bn("absolute w-4 h-4 rounded-full ring-1",s.ringColor)})]})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx("div",{className:"h-0.5 w-8 relative overflow-hidden transition-all duration-500 bg-emerald-500",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-green-300 to-transparent animate-flow-right"})})}),a.jsx("div",{className:"relative flex items-center justify-center",children:a.jsx("div",{className:"w-2.5 h-2.5"})}),!1,!1]})}function fo({children:e}){const t=Ii();if(!t)return a.jsx(a.Fragment,{children:e});const{isMinimized:n}=t;return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"relative w-full h-full",initial:!1,animate:{scaleY:n?0:1,opacity:n?0:1},transition:{duration:.6,ease:[.4,0,.2,1]},style:{transformOrigin:"bottom"},children:e}),a.jsx(Ep,{})]})}const ho=()=>{const{isAutoMode:e}=lo(),{pathname:t}=we.useLocation(),n=we.useNavigate(),s=b.useRef(null),i=Se()?.showcasesUrl??[],r=Se().showcasesWait??12e4,o=()=>{const d=(i.indexOf(t)+1)%i.length;n(i[d])},l=()=>{s.current&&clearInterval(s.current),s.current=setInterval(o,r)},c=()=>{s.current&&(clearInterval(s.current),s.current=null)};b.useEffect(()=>(e?l():c(),()=>c()),[e]),b.useEffect(()=>{e&&l()},[t,e])};function vb({showControlPanel:e=!0,iframeSrc:t=""}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"z-1 fixed inset-0",children:a.jsx("iframe",{id:"vagonFrame",allow:"microphone *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *;",className:"z-1 w-full h-screen",src:t})}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(we.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function wb({showControlPanel:e=!0}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(we.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function mo({items:e,parent:t,selectedShip:n,onShipSelect:s}){const[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(6),[d,f]=b.useState(!0),[h,m]=b.useState(0),[p,y]=b.useState("slide"),[v,x]=b.useState(160),{t:N}=jt.useTranslation(),{lastEvent:E,internalEvent:j,setInternalEvent:M}=vt(),k=Se().cinematics??!1,C=Se().cinematicsOnChangeLocation??!1;k&&(b.useEffect(()=>{E?.payload?.type==="cinematics"&&E?.payload?.action==="end"&&f(!0)},[E]),b.useEffect(()=>{if(j?.payload?.type==="cinematics"){const V=j?.payload?.action;V==="start"&&f(!1),V==="end"&&f(!0)}},[j]));const w=V=>{const _=(Math.ceil(R.length/c)-1)*c*v;return V>0?0:Math.abs(V)>_?-_:V},I=V=>-(V*c*v),$=V=>{const P=Math.floor(c/2),_=Math.floor(V/c),A=(V-_*c-P)*v,T=-(_*c*v+A);return w(T)},z=we.useNavigate(),J=Se().baseUrl??"",R=e;b.useEffect(()=>{const V=()=>{let P;window.innerWidth<640?(u(2),P=120):window.innerWidth<768?(u(3),P=140):window.innerWidth<1024?(u(4),P=160):(u(6),P=180),x(P)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[]),b.useEffect(()=>{if(!n){r(0),y("center"),m($(0));return}const V=R.findIndex(_=>_.slug===n);if(V===-1){r(0),y("center"),m($(0));return}const P=Math.floor(V/c);P!==i&&r(P),y("center"),m($(V))},[n,c,v,R]),b.useEffect(()=>{if(p==="slide")m(I(i));else{const V=R.findIndex(P=>P.slug===n);V!==-1&&m($(V))}},[c,v]);const se=V=>{s(V),y("center");const P=R.findIndex(_=>_.slug===V);P!==-1&&m($(P)),z(`${t?`/${t}/`:"/"}${V}`),k&&C&&M({...Yt})},K=()=>{const V=Math.ceil(R.length/c),P=(i+1)%V;y("slide"),r(P),m(I(P))},te=()=>{const V=Math.ceil(R.length/c),P=(i-1+V)%V;y("slide"),r(P),m(I(P))};return a.jsxs(Ne,{children:[d&&a.jsxs(S.div,{className:"absolute top-0 left-0 right-0 flex flex-col items-center justify-center z-10",initial:{opacity:0,y:-50},animate:{opacity:o?0:1,y:o?-200:0,pointerEvents:o?"none":"auto"},transition:{duration:.6,ease:[.34,1.56,.64,1]},exit:{opacity:0,y:-50,scale:.8},children:[a.jsxs(S.div,{className:"relative flex items-center justify-center w-full max-w-7xl",animate:{y:0},transition:{duration:.3,ease:"easeInOut"},children:[a.jsx(S.button,{className:"absolute left-1 sm:left-2 md:left-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:te,whileHover:{scale:1.05,x:-2},whileTap:{scale:.95},disabled:i===0,style:{opacity:i===0?.3:1,pointerEvents:i===0?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),a.jsx("div",{className:"flex p-2 sm:p-4 mx-10 sm:mx-16 overflow-hidden",children:a.jsx(S.div,{className:"flex space-x-2 sm:space-x-4 md:space-x-8",animate:{x:h},transition:{duration:.6,ease:[.25,.46,.45,.94]},children:R.map((V,P)=>a.jsxs(S.div,{className:`flex flex-col gap-1 items-center cursor-pointer group min-w-[100px] sm:min-w-[120px] md:min-w-[144px] ${n===V.slug?"scale-110":""}`,onClick:()=>se(V.slug),whileHover:{scale:1.05,y:-4},whileTap:{scale:.98},initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{delay:P*.1}},children:[a.jsxs("div",{className:`relative w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32 flex flex-col gap-1 align-bottom items-center justify-end py-2 sm:pt-4 rounded-lg transition-all duration-500 ${n===V.slug?"bg-blue-700/80 shadow-lg shadow-blue-500/30 border border-blue-400/50":"bg-zinc-500/1 hover:bg-blue-900/40 border border-transparent hover:border-blue-600/30"}`,children:[a.jsx("div",{className:"w-full h-12 sm:h-16 relative flex items-center justify-center px-4",children:a.jsx("img",{src:`${J.replace(/\/$/,"")}/images/shapes/${V.icon??V.slug}.png`,alt:V.name,width:120,height:40,className:"object-contain brightness-200 filter transition-all duration-300 group-hover:brightness-300"})}),a.jsx("div",{className:" text-center",children:a.jsx("div",{className:"text-cyan-300 text-xs sm:text-sm font-medium transition-colors duration-300 group-hover:text-cyan-200",children:N(V.name)})})]}),V.label&&a.jsx("div",{className:"mt-1",children:a.jsx("span",{className:`text-[10px] sm:text-xs px-2 sm:px-3 py-1 rounded-md transition-all duration-300 ${n===V.slug?"bg-cyan-500/80 text-blue-900 shadow-md":"bg-blue-900/60 text-cyan-300 group-hover:bg-blue-800/70 group-hover:text-cyan-200"}`,children:V.label})})]},V.slug))})}),a.jsx(S.button,{className:"absolute right-1 sm:right-2 md:right-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:K,whileHover:{scale:1.05,x:2},whileTap:{scale:.95},disabled:i===Math.ceil(R.length/c)-1,style:{opacity:i===Math.ceil(R.length/c)-1?.3:1,pointerEvents:i===Math.ceil(R.length/c)-1?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4 rotate-180"})})]}),a.jsx(S.button,{onClick:()=>l(!0),className:"p-2 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-50",initial:{opacity:0,scale:0},animate:{opacity:.6,scale:1,y:[0,5,0]},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:o?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronUp,{className:"w-5 h-5"})})})]}),o&&a.jsx(S.button,{onClick:()=>l(!1),className:"absolute top-8 left-1/2 -translate-x-1/2 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,y:-50,scale:0},animate:{opacity:.6,y:0,scale:1},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,y:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{y:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronDown,{className:"w-6 h-6"})})})]})}const Sb=({items:e,world:t,worldSlug:n=t})=>{const[s,i]=b.useState(""),r={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},o=we.useLocation(),l=we.useNavigate(),{t:c}=jt.useTranslation(),{setInternalEvent:u}=vt(),d=Se().cinematics??!1,f=Se().cinematicsOnChangeLocation??!1;b.useEffect(()=>{o.pathname===`/${n}`?i(""):o.pathname.startsWith(n?`/${n}/`:"/")&&i(o.pathname.replace(n?`/${n}/`:"/",""))},[o]),b.useEffect(()=>{const v=x=>{const N=["INPUT","TEXTAREA"].includes(x.target.tagName),E=document.querySelector(".yarl__container");N||E||(x.key==="ArrowLeft"?(x.preventDefault(),y()):x.key==="ArrowRight"&&(x.preventDefault(),p()))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[s]),b.useEffect(()=>{let v=0,x=0,N=!1;const E=k=>{const C=k.target,w=document.getElementById("ItemPage");N=C===w,N&&(v=k.changedTouches[0].screenX)},j=k=>{N&&(x=k.changedTouches[0].screenX,M())},M=()=>{const k=x-v;Math.abs(k)<50||(k>0?y():p())};return window.addEventListener("touchstart",E),window.addEventListener("touchend",j),()=>{window.removeEventListener("touchstart",E),window.removeEventListener("touchend",j)}},[s]);const h=()=>{const x=(e.findIndex(N=>N.slug===s)+1)%e.length;return e[x]},m=()=>{const x=(e.findIndex(N=>N.slug===s)-1+e.length)%e.length;return e[x]},p=()=>{const v=h();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})},y=()=>{const v=m();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})};return a.jsxs(S.div,{className:"relative w-full h-full",variants:r,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[a.jsx(mo,{parent:n,items:e,onShipSelect:i,selectedShip:s}),s&&a.jsxs(a.Fragment,{children:[a.jsxs(S.button,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:y,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute left-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.anterior")}),a.jsx("div",{className:"absolute right-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]}),a.jsxs(S.button,{className:"absolute right-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:p,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 rotate-180 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute right-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.siguiente")}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-l-4 border-transparent border-l-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]})]}),a.jsx(we.Outlet,{})]})},xu=b.createContext(void 0);function Tb({children:e}){const{isMobile:t}=Li(),n=Se().videosBaseUrl,s=t?"videos/movil":"videos",[i,r]=b.useState(""),[o,l]=b.useState(!1),c=(u,d=!0)=>{const f=`${n.replace(/\/$/,"")}/${s}/${u}`;f!==i&&(d?(l(!0),setTimeout(()=>{r(f),setTimeout(()=>l(!1),300)},150)):r(f))};return a.jsx(xu.Provider,{value:{currentVideo:i,setVideo:c,isTransitioning:o},children:e})}function vu(){const e=b.useContext(xu);return e===void 0?{currentVideo:"",setVideo:()=>{},isTransitioning:!1}:e}const po=({returnUrlOnEnded:e})=>{const{currentVideo:t,isTransitioning:n}=vu(),s=we.useNavigate(),i=b.useRef(null),[r,o]=b.useState(t),l=()=>{e&&s(e)},c=u=>u.replace(/\.mp4$/i,".webp");return b.useEffect(()=>{t!==r&&(i.current&&(i.current.pause(),i.current.removeAttribute("src"),i.current.load()),o(t))},[t,r]),b.useEffect(()=>{i.current&&r&&i.current.play().catch(u=>{console.warn("Error al intentar autoPlay del video:",u)})},[r]),a.jsxs("div",{className:"absolute inset-0 w-full h-full",children:[a.jsx(Ne,{children:n&&a.jsx(S.div,{className:"absolute inset-0 bg-black z-10",initial:{opacity:0},animate:{opacity:.3},exit:{opacity:0},transition:{duration:.15}})}),a.jsx(S.video,{ref:i,autoPlay:!0,loop:!e,muted:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover",onEnded:l,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},src:r,poster:c(r)},r)]})};function Cb({className:e}){const n=e!==void 0?e:"fixed inset-0 overflow-hidden bg-slate-900";return a.jsxs("div",{className:n,children:[a.jsx(po,{}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(we.Outlet,{})})]})}function Nb({x:e,y:t,dest:n}){const s=we.useNavigate(),i=r=>{s(`/product/${r}`)};return a.jsxs(S.button,{className:`absolute ${e} ${t} w-8 h-8 bg-gradient-to-br from-blue-500 to-indigo-700 rounded-full shadow-2xl border-2 border-blue-300/50 backdrop-blur-sm flex items-center justify-center group overflow-hidden`,initial:"initial",animate:"animate",whileHover:"hover",whileTap:"tap",onClick:()=>i(n),children:[a.jsx("div",{className:"absolute inset-1 bg-gradient-to-br from-blue-300/30 to-transparent rounded-full"}),a.jsx("div",{className:"relative w-2.5 h-2.5 bg-white rounded-full group-hover:scale-125 transition-all duration-300 shadow-lg",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-200 to-white rounded-full animate-pulse"})}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-300/60 animate-ping"}),a.jsx("div",{className:"absolute inset-1 rounded-full border border-blue-400/40 animate-pulse"}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-transparent border-t-blue-300 animate-spin",style:{animationDuration:"3s"}}),a.jsxs(S.div,{className:"absolute right-12 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg p-4 border border-blue-400/30 shadow-xl min-w-64 group-hover:opacity-100 transition-opacity duration-300",initial:{opacity:0,x:20,scale:.8},animate:{opacity:0,x:20,scale:.8},whileHover:{opacity:1,x:0,scale:1},transition:{duration:.3},style:{pointerEvents:"none"},children:[a.jsx("h3",{className:"text-blue-300 font-bold text-lg mb-1",children:"SUBMARINO S80"}),a.jsx("p",{className:"text-blue-100/80 text-sm leading-relaxed",children:"Submarino de propulsión AIP con capacidades stealth y sistemas de combate integrados de última generación."}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-8 border-b-8 border-l-8 border-transparent border-l-slate-900/95"})]})]})}function go({home:e,item:t}){const[n,s]=b.useState({width:0,height:0}),[i,r]=b.useState(!0),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(""),[h,m]=b.useState(!1),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[N,E]=b.useState(!1),[j,M]=b.useState(!1),[k,C]=b.useState(""),[w,I]=b.useState(!1),$=we.useNavigate(),{lastEvent:z,internalEvent:J,setInternalEvent:R}=vt(),se=Se().cinematics??!1,K=Se().cinematicsOnChangeLocation??!1;se&&(b.useEffect(()=>{z?.payload?.type==="cinematics"&&z?.payload?.action==="end"&&r(!0)},[z]),b.useEffect(()=>{if(J?.payload?.type==="cinematics"){const T=J?.payload?.action;T==="start"&&r(!1),T==="end"&&r(!0)}},[J])),b.useEffect(()=>{const T=()=>{s({width:window.innerWidth,height:window.innerHeight})};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]);const te=()=>{l(!0),r(!1)},V=()=>{l(!1),r(!0)},P=T=>{$(T),se&&K&&R({...Yt})},_=T=>!!T?.trim(),A=T=>T.endsWith(".webm")||T.endsWith(".mp4");return a.jsxs(Ne,{children:[i&&a.jsx(S.div,{className:"absolute bottom-4 sm:bottom-6 md:bottom-10 left-1/2 transform -translate-x-1/2 w-full max-w-[90%] sm:max-w-[85%] md:max-w-4xl px-4 sm:px-6 md:px-8 z-9999",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},exit:{opacity:0,y:50,scale:.8,transition:{delay:0,duration:.6}},children:a.jsxs("div",{className:"flex flex-col gap-6 backdrop-blur-xs rounded-xl sm:rounded-2xl border p-3 sm:p-4 md:p-6 text-center border-transparent max-w-6xl mx-auto title-section",children:[a.jsx("h1",{className:"text-xl sm:text-3xl md:text-4xl lg:text-5xl font-light text-white mb-2 sm:mb-4 tracking-wide",children:t?.title}),a.jsx("p",{className:"text-xs sm:text-sm md:text-base text-blue-100/90 font-light leading-relaxed max-w-5xl mx-auto mb-3 sm:mb-4 md:mb-6",children:t?.subtitle}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4",children:[!1,e&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:()=>{P(e)},children:a.jsx(F.Home,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),t?.simulation&&a.jsx(xc,{onClick:()=>m(!0)}),_(t?.playButton)&&a.jsx(Pi,{Icon:F.Video,onClick:()=>{f(t.playButton.trim()),u(!0)}}),t?.webUrl&&a.jsx(Pi,{Icon:F.ExternalLink,onClick:()=>x(!0)}),(t?.links?.length??0)>0&&t?.links?.map(T=>a.jsx(Un,{item:T,onClick:()=>{A(T.url)?(f(T.url.trim()),u(!0)):(C(T.url),M(T.transparent),E(!0)),T.transparent===!0&&se&&R({...Yt})}})),(t?.cards?.length??0)>0&&a.jsx(Wl,{onClick:()=>y(!0)}),(t?.nodesId??0)>0&&a.jsx(yc,{label:t?.shortName??t.title,onClick:te})]})]})]})}),o&&t?.nodesId&&a.jsx(gb,{isOpen:o,onClose:V,size:n,hotspot:t.nodesId}),c&&a.jsx(mu,{source:d,onClose:()=>u(!1)}),h&&a.jsx(gu,{item:t.simulation,onClose:()=>m(!1)},t?.slug),p&&a.jsx(vc,{cards:t.cards,onClose:()=>y(!1)}),v&&a.jsx(Ht,{src:t.webUrl,onClose:()=>x(!1)}),N&&a.jsx(Ht,{src:k,transparent:j,onClose:()=>{const T=j;E(!1),C(""),M(!1),T===!0&&se&&R({...gc})}}),w&&a.jsx(Pp,{onClose:()=>I(!1)})]})}const Eb=({video:e,returnUrl:t})=>{console.log(e);const n=we.useNavigate(),s={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},i=()=>{n(t)},{t:r}=jt.useTranslation();return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"fixed inset-0 overflow-hidden bg-slate-900",children:[a.jsx(po,{returnUrlOnEnded:t}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(S.div,{className:"relative w-full h-full",variants:s,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:a.jsx(S.div,{className:"absolute inset-0 bg-black/20 flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:a.jsx(S.button,{className:"absolute bottom-8 right-8 px-4 py-2 bg-slate-900/80 backdrop-blur-md rounded-lg text-white/90 text-sm border border-white/20 hover:border-white/40 hover:bg-slate-800/90 transition-all duration-300 hover:text-white",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:i,children:r("layout.skip")})})})})]})})},kb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=we.useParams();b.useEffect(()=>{if(o){const c=s.find(u=>u.slug===o);c&&r(c)}},[o]);const l={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:l,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(go,{home:`/${t}`,item:i})]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},Pb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=we.useParams(),l=we.useNavigate();b.useEffect(()=>{if(o){const u=s.find(d=>d.slug===o);u&&(r(u),console.log(JSON.stringify(u)))}},[o]);const c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:c,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(gu,{item:i.simulation,onClose:()=>l(`/${t}`)},o)]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},jb=({items:e,world:t,overlay:n=!1,title:s})=>{const[i,r]=b.useState(""),o={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return a.jsx(Ne,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:o,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-slate-900/20 via-transparent to-slate-900/40"}),e&&a.jsx(mo,{parent:t,items:e,onShipSelect:r,selectedShip:i}),a.jsx(go,{home:"/",item:s})]})})},Ib=()=>{const e=we.useLocation(),{sendMessage:t}=Ut(),n=Se().wsRoom;return b.useEffect(()=>{console.log("RouteListener: "+e.pathname+e.hash),t({type:"publish",room:n,payload:{type:"camera",target:pc(e.pathname)}})},[e]),null};q.CardsButton=Wl,q.ControlPanel=co,q.DynamicLucideIcon=Yl,q.EventProvider=Om,q.FontSizeManager=yb,q.FullScreenPage=Eb,q.IconButton=Pi,q.InfoCard=ao,q.ItemPage=kb,q.Layout=Cb,q.LayoutIframe=vb,q.LayoutTransparent=wb,q.LayoutWorld=Sb,q.LinkItemButton=Un,q.MinimizeProvider=Am,q.MinimizeWrapper=fo,q.NodosButton=yc,q.PointButton=Nb,q.RouteListener=Ib,q.ShipNavigation=mo,q.ShowcaseProvider=xb,q.SimulacionButton=xc,q.SlidePage=Pb,q.TabView=pu,q.TitleSection=go,q.VideoBackground=po,q.VideoProvider=Tb,q.WebSocketProvider=Np,q.WebSocketStatusWidget=uo,q.WorldPage=jb,q.cinematicsEndEvent=gc,q.cinematicsStartEvent=Yt,q.cn=bn,q.codigoANombre=Tp,q.getConfig=Se,q.initLibConfig=Su,q.nombreACodigo=mc,q.toTarget=pc,q.toVideo=Cp,q.useAutoModeTimer=ho,q.useEvent=vt,q.useMinimize=Vm,q.useOptionalMinimize=Ii,q.useScreenSize=Li,q.useShowcase=lo,q.useVideo=vu,q.useWebSocket=Ut,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devstgo/stgo-salta-components-react",
3
3
  "private": false,
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "type": "module",
6
6
  "main": "./dist/stgo-salta-components-react.umd.cjs",
7
7
  "module": "./dist/stgo-salta-components-react.js",