@syntrologie/runtime-sdk 0.2.21 → 1.0.1-canary.1

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.
@@ -282,8 +282,8 @@ var SyntrologieSDK = (() => {
282
282
  function(fulfilledValue) {
283
283
  "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
284
284
  },
285
- function(error) {
286
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
285
+ function(error2) {
286
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error2);
287
287
  }
288
288
  )), thenable.status) {
289
289
  case "fulfilled":
@@ -399,13 +399,13 @@ var SyntrologieSDK = (() => {
399
399
  void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
400
400
  }
401
401
  },
402
- function(error) {
402
+ function(error2) {
403
403
  if (0 === payload._status || -1 === payload._status) {
404
404
  payload._status = 2;
405
- payload._result = error;
405
+ payload._result = error2;
406
406
  var _ioInfo2 = payload._ioInfo;
407
407
  null != _ioInfo2 && (_ioInfo2.end = performance.now());
408
- void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
408
+ void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error2);
409
409
  }
410
410
  }
411
411
  );
@@ -476,8 +476,8 @@ var SyntrologieSDK = (() => {
476
476
  return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
477
477
  });
478
478
  return;
479
- } catch (error) {
480
- ReactSharedInternals.thrownErrors.push(error);
479
+ } catch (error2) {
480
+ ReactSharedInternals.thrownErrors.push(error2);
481
481
  }
482
482
  else ReactSharedInternals.actQueue = null;
483
483
  0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
@@ -503,8 +503,8 @@ var SyntrologieSDK = (() => {
503
503
  } while (1);
504
504
  }
505
505
  queue.length = 0;
506
- } catch (error) {
507
- queue.splice(0, i2 + 1), ReactSharedInternals.thrownErrors.push(error);
506
+ } catch (error2) {
507
+ queue.splice(0, i2 + 1), ReactSharedInternals.thrownErrors.push(error2);
508
508
  } finally {
509
509
  isFlushing = false;
510
510
  }
@@ -582,20 +582,20 @@ var SyntrologieSDK = (() => {
582
582
  UnknownOwner
583
583
  )();
584
584
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
585
- var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
585
+ var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error2) {
586
586
  if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
587
587
  var event = new window.ErrorEvent("error", {
588
588
  bubbles: true,
589
589
  cancelable: true,
590
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
591
- error
590
+ message: "object" === typeof error2 && null !== error2 && "string" === typeof error2.message ? String(error2.message) : String(error2),
591
+ error: error2
592
592
  });
593
593
  if (!window.dispatchEvent(event)) return;
594
594
  } else if ("object" === typeof process && "function" === typeof process.emit) {
595
- process.emit("uncaughtException", error);
595
+ process.emit("uncaughtException", error2);
596
596
  return;
597
597
  }
598
- console.error(error);
598
+ console.error(error2);
599
599
  }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
600
600
  queueMicrotask(function() {
601
601
  return queueMicrotask(callback);
@@ -654,8 +654,8 @@ var SyntrologieSDK = (() => {
654
654
  var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
655
655
  try {
656
656
  var result = callback();
657
- } catch (error) {
658
- ReactSharedInternals.thrownErrors.push(error);
657
+ } catch (error2) {
658
+ ReactSharedInternals.thrownErrors.push(error2);
659
659
  }
660
660
  if (0 < ReactSharedInternals.thrownErrors.length)
661
661
  throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
@@ -693,11 +693,11 @@ var SyntrologieSDK = (() => {
693
693
  }
694
694
  } else resolve(returnValue);
695
695
  },
696
- function(error) {
696
+ function(error2) {
697
697
  popActScope(prevActQueue, prevActScopeDepth);
698
- 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
698
+ 0 < ReactSharedInternals.thrownErrors.length ? (error2 = aggregateErrors(
699
699
  ReactSharedInternals.thrownErrors
700
- ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
700
+ ), ReactSharedInternals.thrownErrors.length = 0, reject(error2)) : reject(error2);
701
701
  }
702
702
  );
703
703
  }
@@ -917,8 +917,8 @@ var SyntrologieSDK = (() => {
917
917
  var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
918
918
  null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
919
919
  "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
920
- } catch (error) {
921
- reportGlobalError(error);
920
+ } catch (error2) {
921
+ reportGlobalError(error2);
922
922
  } finally {
923
923
  null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
924
924
  "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
@@ -5093,23 +5093,23 @@ var SyntrologieSDK = (() => {
5093
5093
  "disabledDepth fell below zero. This is a bug in React. Please file an issue."
5094
5094
  );
5095
5095
  }
5096
- function formatOwnerStack(error) {
5096
+ function formatOwnerStack(error2) {
5097
5097
  var prevPrepareStackTrace = Error.prepareStackTrace;
5098
5098
  Error.prepareStackTrace = void 0;
5099
- error = error.stack;
5099
+ error2 = error2.stack;
5100
5100
  Error.prepareStackTrace = prevPrepareStackTrace;
5101
- error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29));
5102
- prevPrepareStackTrace = error.indexOf("\n");
5103
- -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1));
5104
- prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
5105
- -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf(
5101
+ error2.startsWith("Error: react-stack-top-frame\n") && (error2 = error2.slice(29));
5102
+ prevPrepareStackTrace = error2.indexOf("\n");
5103
+ -1 !== prevPrepareStackTrace && (error2 = error2.slice(prevPrepareStackTrace + 1));
5104
+ prevPrepareStackTrace = error2.indexOf("react_stack_bottom_frame");
5105
+ -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error2.lastIndexOf(
5106
5106
  "\n",
5107
5107
  prevPrepareStackTrace
5108
5108
  ));
5109
5109
  if (-1 !== prevPrepareStackTrace)
5110
- error = error.slice(0, prevPrepareStackTrace);
5110
+ error2 = error2.slice(0, prevPrepareStackTrace);
5111
5111
  else return "";
5112
- return error;
5112
+ return error2;
5113
5113
  }
5114
5114
  function describeBuiltInComponentFrame(name) {
5115
5115
  if (void 0 === prefix)
@@ -7606,10 +7606,10 @@ var SyntrologieSDK = (() => {
7606
7606
  if (null !== name) {
7607
7607
  selfTime = [];
7608
7608
  for (var i2 = 0; i2 < errors.length; i2++) {
7609
- var error = errors[i2].value;
7609
+ var error2 = errors[i2].value;
7610
7610
  selfTime.push([
7611
7611
  "Error",
7612
- "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
7612
+ "object" === typeof error2 && null !== error2 && "string" === typeof error2.message ? String(error2.message) : String(error2)
7613
7613
  ]);
7614
7614
  }
7615
7615
  null !== fiber.key && addValueToProperties("key", fiber.key, selfTime, 0, "");
@@ -7723,10 +7723,10 @@ var SyntrologieSDK = (() => {
7723
7723
  if (supportsUserTiming && !(endTime <= startTime)) {
7724
7724
  lanes = [];
7725
7725
  for (var i2 = 0; i2 < recoverableErrors.length; i2++) {
7726
- var error = recoverableErrors[i2].value;
7726
+ var error2 = recoverableErrors[i2].value;
7727
7727
  lanes.push([
7728
7728
  "Recoverable Error",
7729
- "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
7729
+ "object" === typeof error2 && null !== error2 && "string" === typeof error2.message ? String(error2.message) : String(error2)
7730
7730
  ]);
7731
7731
  }
7732
7732
  startTime = {
@@ -7790,10 +7790,10 @@ var SyntrologieSDK = (() => {
7790
7790
  function logCommitErrored(startTime, endTime, errors, passive, debugTask) {
7791
7791
  if (supportsUserTiming && !(endTime <= startTime)) {
7792
7792
  for (var properties = [], i2 = 0; i2 < errors.length; i2++) {
7793
- var error = errors[i2].value;
7793
+ var error2 = errors[i2].value;
7794
7794
  properties.push([
7795
7795
  "Error",
7796
- "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
7796
+ "object" === typeof error2 && null !== error2 && "string" === typeof error2.message ? String(error2.message) : String(error2)
7797
7797
  ]);
7798
7798
  }
7799
7799
  startTime = {
@@ -8417,8 +8417,8 @@ var SyntrologieSDK = (() => {
8417
8417
  ), hydrationErrors = null);
8418
8418
  return queuedErrors;
8419
8419
  }
8420
- function queueHydrationError(error) {
8421
- null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
8420
+ function queueHydrationError(error2) {
8421
+ null === hydrationErrors ? hydrationErrors = [error2] : hydrationErrors.push(error2);
8422
8422
  }
8423
8423
  function emitPendingHydrationWarnings() {
8424
8424
  var diffRoot = hydrationDiffRootDEV;
@@ -8784,11 +8784,11 @@ var SyntrologieSDK = (() => {
8784
8784
  thenableWithOverride.value = result;
8785
8785
  for (var i2 = 0; i2 < listeners.length; i2++) (0, listeners[i2])(result);
8786
8786
  },
8787
- function(error) {
8787
+ function(error2) {
8788
8788
  thenableWithOverride.status = "rejected";
8789
- thenableWithOverride.reason = error;
8790
- for (error = 0; error < listeners.length; error++)
8791
- (0, listeners[error])(void 0);
8789
+ thenableWithOverride.reason = error2;
8790
+ for (error2 = 0; error2 < listeners.length; error2++)
8791
+ (0, listeners[error2])(void 0);
8792
8792
  }
8793
8793
  );
8794
8794
  return thenableWithOverride;
@@ -8856,11 +8856,11 @@ var SyntrologieSDK = (() => {
8856
8856
  fulfilledThenable.value = fulfilledValue;
8857
8857
  }
8858
8858
  },
8859
- function(error) {
8859
+ function(error2) {
8860
8860
  if ("pending" === thenable.status) {
8861
8861
  var rejectedThenable = thenable;
8862
8862
  rejectedThenable.status = "rejected";
8863
- rejectedThenable.reason = error;
8863
+ rejectedThenable.reason = error2;
8864
8864
  }
8865
8865
  }
8866
8866
  );
@@ -10453,7 +10453,7 @@ var SyntrologieSDK = (() => {
10453
10453
  try {
10454
10454
  var nextValue = latestGetSnapshot();
10455
10455
  return !objectIs(inst, nextValue);
10456
- } catch (error) {
10456
+ } catch (error2) {
10457
10457
  return true;
10458
10458
  }
10459
10459
  }
@@ -10564,8 +10564,8 @@ var SyntrologieSDK = (() => {
10564
10564
  var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
10565
10565
  null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
10566
10566
  handleActionReturnValue(actionQueue, node, returnValue);
10567
- } catch (error) {
10568
- onActionError(actionQueue, node, error);
10567
+ } catch (error2) {
10568
+ onActionError(actionQueue, node, error2);
10569
10569
  } finally {
10570
10570
  null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
10571
10571
  "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
@@ -10585,8 +10585,8 @@ var SyntrologieSDK = (() => {
10585
10585
  function(nextState) {
10586
10586
  onActionSuccess(actionQueue, node, nextState);
10587
10587
  },
10588
- function(error) {
10589
- return onActionError(actionQueue, node, error);
10588
+ function(error2) {
10589
+ return onActionError(actionQueue, node, error2);
10590
10590
  }
10591
10591
  ), node.isTransition || console.error(
10592
10592
  "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
@@ -10600,13 +10600,13 @@ var SyntrologieSDK = (() => {
10600
10600
  actionNode = actionQueue.pending;
10601
10601
  null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
10602
10602
  }
10603
- function onActionError(actionQueue, actionNode, error) {
10603
+ function onActionError(actionQueue, actionNode, error2) {
10604
10604
  var last = actionQueue.pending;
10605
10605
  actionQueue.pending = null;
10606
10606
  if (null !== last) {
10607
10607
  last = last.next;
10608
10608
  do
10609
- actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
10609
+ actionNode.status = "rejected", actionNode.reason = error2, notifyActionListeners(actionNode), actionNode = actionNode.next;
10610
10610
  while (actionNode !== last);
10611
10611
  }
10612
10612
  actionQueue.action = null;
@@ -10986,12 +10986,12 @@ var SyntrologieSDK = (() => {
10986
10986
  finishedState,
10987
10987
  requestUpdateLane(fiber)
10988
10988
  );
10989
- } catch (error) {
10989
+ } catch (error2) {
10990
10990
  dispatchSetStateInternal(
10991
10991
  fiber,
10992
10992
  queue,
10993
10993
  { then: function() {
10994
- }, status: "rejected", reason: error },
10994
+ }, status: "rejected", reason: error2 },
10995
10995
  requestUpdateLane(fiber)
10996
10996
  );
10997
10997
  } finally {
@@ -11181,7 +11181,7 @@ var SyntrologieSDK = (() => {
11181
11181
  update.eagerState = eagerState;
11182
11182
  if (objectIs(eagerState, currentState))
11183
11183
  return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
11184
- } catch (error) {
11184
+ } catch (error2) {
11185
11185
  } finally {
11186
11186
  ReactSharedInternals.H = prevDispatcher;
11187
11187
  }
@@ -11318,32 +11318,32 @@ var SyntrologieSDK = (() => {
11318
11318
  }
11319
11319
  return newProps;
11320
11320
  }
11321
- function defaultOnUncaughtError(error) {
11322
- reportGlobalError(error);
11321
+ function defaultOnUncaughtError(error2) {
11322
+ reportGlobalError(error2);
11323
11323
  console.warn(
11324
11324
  "%s\n\n%s\n",
11325
11325
  componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components.",
11326
11326
  "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
11327
11327
  );
11328
11328
  }
11329
- function defaultOnCaughtError(error) {
11329
+ function defaultOnCaughtError(error2) {
11330
11330
  var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component." : "The above error occurred in one of your React components.", recreateMessage = "React will try to recreate this component tree from scratch using the error boundary you provided, " + ((errorBoundaryName || "Anonymous") + ".");
11331
- if ("object" === typeof error && null !== error && "string" === typeof error.environmentName) {
11332
- var JSCompiler_inline_result = error.environmentName;
11333
- error = [
11331
+ if ("object" === typeof error2 && null !== error2 && "string" === typeof error2.environmentName) {
11332
+ var JSCompiler_inline_result = error2.environmentName;
11333
+ error2 = [
11334
11334
  "%o\n\n%s\n\n%s\n",
11335
- error,
11335
+ error2,
11336
11336
  componentNameMessage,
11337
11337
  recreateMessage
11338
11338
  ].slice(0);
11339
- "string" === typeof error[0] ? error.splice(
11339
+ "string" === typeof error2[0] ? error2.splice(
11340
11340
  0,
11341
11341
  1,
11342
- badgeFormat + " " + error[0],
11342
+ badgeFormat + " " + error2[0],
11343
11343
  badgeStyle,
11344
11344
  pad + JSCompiler_inline_result + pad,
11345
11345
  resetStyle
11346
- ) : error.splice(
11346
+ ) : error2.splice(
11347
11347
  0,
11348
11348
  0,
11349
11349
  badgeFormat,
@@ -11351,30 +11351,30 @@ var SyntrologieSDK = (() => {
11351
11351
  pad + JSCompiler_inline_result + pad,
11352
11352
  resetStyle
11353
11353
  );
11354
- error.unshift(console);
11355
- JSCompiler_inline_result = bind.apply(console.error, error);
11354
+ error2.unshift(console);
11355
+ JSCompiler_inline_result = bind.apply(console.error, error2);
11356
11356
  JSCompiler_inline_result();
11357
11357
  } else
11358
11358
  console.error(
11359
11359
  "%o\n\n%s\n\n%s\n",
11360
- error,
11360
+ error2,
11361
11361
  componentNameMessage,
11362
11362
  recreateMessage
11363
11363
  );
11364
11364
  }
11365
- function defaultOnRecoverableError(error) {
11366
- reportGlobalError(error);
11365
+ function defaultOnRecoverableError(error2) {
11366
+ reportGlobalError(error2);
11367
11367
  }
11368
11368
  function logUncaughtError(root2, errorInfo) {
11369
11369
  try {
11370
11370
  componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
11371
11371
  errorBoundaryName = null;
11372
- var error = errorInfo.value;
11372
+ var error2 = errorInfo.value;
11373
11373
  if (null !== ReactSharedInternals.actQueue)
11374
- ReactSharedInternals.thrownErrors.push(error);
11374
+ ReactSharedInternals.thrownErrors.push(error2);
11375
11375
  else {
11376
11376
  var onUncaughtError = root2.onUncaughtError;
11377
- onUncaughtError(error, { componentStack: errorInfo.stack });
11377
+ onUncaughtError(error2, { componentStack: errorInfo.stack });
11378
11378
  }
11379
11379
  } catch (e$5) {
11380
11380
  setTimeout(function() {
@@ -11414,9 +11414,9 @@ var SyntrologieSDK = (() => {
11414
11414
  function initializeClassErrorUpdate(update, root2, fiber, errorInfo) {
11415
11415
  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
11416
11416
  if ("function" === typeof getDerivedStateFromError) {
11417
- var error = errorInfo.value;
11417
+ var error2 = errorInfo.value;
11418
11418
  update.payload = function() {
11419
- return getDerivedStateFromError(error);
11419
+ return getDerivedStateFromError(error2);
11420
11420
  };
11421
11421
  update.callback = function() {
11422
11422
  markFailedErrorBoundaryForHotReloading(fiber);
@@ -11502,14 +11502,14 @@ var SyntrologieSDK = (() => {
11502
11502
  value,
11503
11503
  rootRenderLanes
11504
11504
  ), enqueueCapturedUpdate(root2, rootRenderLanes), workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored)), false;
11505
- var error = createCapturedValueAtFiber(
11505
+ var error2 = createCapturedValueAtFiber(
11506
11506
  Error(
11507
11507
  "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
11508
11508
  { cause: value }
11509
11509
  ),
11510
11510
  sourceFiber
11511
11511
  );
11512
- null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error] : workInProgressRootConcurrentErrors.push(error);
11512
+ null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error2] : workInProgressRootConcurrentErrors.push(error2);
11513
11513
  workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored);
11514
11514
  if (null === returnFiber) return true;
11515
11515
  value = createCapturedValueAtFiber(value, sourceFiber);
@@ -11523,7 +11523,7 @@ var SyntrologieSDK = (() => {
11523
11523
  root2
11524
11524
  ), enqueueCapturedUpdate(sourceFiber, root2), false;
11525
11525
  case 1:
11526
- if (returnFiber = sourceFiber.type, error = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== error && "function" === typeof error.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(error))))
11526
+ if (returnFiber = sourceFiber.type, error2 = sourceFiber.stateNode, 0 === (sourceFiber.flags & 128) && ("function" === typeof returnFiber.getDerivedStateFromError || null !== error2 && "function" === typeof error2.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(error2))))
11527
11527
  return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
11528
11528
  rootRenderLanes,
11529
11529
  root2,
@@ -13790,8 +13790,8 @@ var SyntrologieSDK = (() => {
13790
13790
  updateQueue = updateQueue.next;
13791
13791
  } while (updateQueue !== firstEffect);
13792
13792
  }
13793
- } catch (error) {
13794
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
13793
+ } catch (error2) {
13794
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
13795
13795
  }
13796
13796
  }
13797
13797
  function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
@@ -13814,8 +13814,8 @@ var SyntrologieSDK = (() => {
13814
13814
  updateQueue = updateQueue.next;
13815
13815
  } while (updateQueue !== firstEffect);
13816
13816
  }
13817
- } catch (error) {
13818
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
13817
+ } catch (error2) {
13818
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
13819
13819
  }
13820
13820
  }
13821
13821
  function commitHookPassiveMountEffects(finishedWork, hookFlags) {
@@ -13850,8 +13850,8 @@ var SyntrologieSDK = (() => {
13850
13850
  updateQueue,
13851
13851
  instance
13852
13852
  );
13853
- } catch (error) {
13854
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
13853
+ } catch (error2) {
13854
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
13855
13855
  }
13856
13856
  }
13857
13857
  }
@@ -13888,8 +13888,8 @@ var SyntrologieSDK = (() => {
13888
13888
  );
13889
13889
  }));
13890
13890
  current2.__reactInternalSnapshotBeforeUpdate = snapshot;
13891
- } catch (error) {
13892
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
13891
+ } catch (error2) {
13892
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
13893
13893
  }
13894
13894
  }
13895
13895
  function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance) {
@@ -13945,8 +13945,8 @@ var SyntrologieSDK = (() => {
13945
13945
  function safelyAttachRef(current2, nearestMountedAncestor) {
13946
13946
  try {
13947
13947
  runWithFiberInDEV(current2, commitAttachRef, current2);
13948
- } catch (error) {
13949
- captureCommitPhaseError(current2, nearestMountedAncestor, error);
13948
+ } catch (error2) {
13949
+ captureCommitPhaseError(current2, nearestMountedAncestor, error2);
13950
13950
  }
13951
13951
  }
13952
13952
  function safelyDetachRef(current2, nearestMountedAncestor) {
@@ -13961,8 +13961,8 @@ var SyntrologieSDK = (() => {
13961
13961
  recordEffectDuration(current2);
13962
13962
  }
13963
13963
  else runWithFiberInDEV(current2, refCleanup);
13964
- } catch (error) {
13965
- captureCommitPhaseError(current2, nearestMountedAncestor, error);
13964
+ } catch (error2) {
13965
+ captureCommitPhaseError(current2, nearestMountedAncestor, error2);
13966
13966
  } finally {
13967
13967
  current2.refCleanup = null, current2 = current2.alternate, null != current2 && (current2.refCleanup = null);
13968
13968
  }
@@ -14019,8 +14019,8 @@ var SyntrologieSDK = (() => {
14019
14019
  props,
14020
14020
  finishedWork
14021
14021
  );
14022
- } catch (error) {
14023
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14022
+ } catch (error2) {
14023
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14024
14024
  }
14025
14025
  }
14026
14026
  function commitHostUpdate(finishedWork, newProps, oldProps) {
@@ -14034,8 +14034,8 @@ var SyntrologieSDK = (() => {
14034
14034
  newProps,
14035
14035
  finishedWork
14036
14036
  );
14037
- } catch (error) {
14038
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14037
+ } catch (error2) {
14038
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14039
14039
  }
14040
14040
  }
14041
14041
  function isHostParent(fiber) {
@@ -14132,8 +14132,8 @@ var SyntrologieSDK = (() => {
14132
14132
  singleton,
14133
14133
  finishedWork
14134
14134
  );
14135
- } catch (error) {
14136
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14135
+ } catch (error2) {
14136
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14137
14137
  }
14138
14138
  }
14139
14139
  function isHydratingParent(current2, finishedWork) {
@@ -14336,8 +14336,8 @@ var SyntrologieSDK = (() => {
14336
14336
  flags,
14337
14337
  prevProps
14338
14338
  );
14339
- } catch (error) {
14340
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14339
+ } catch (error2) {
14340
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14341
14341
  }
14342
14342
  }
14343
14343
  finishedRoot.effectDuration += popNestedEffectDurations(current2);
@@ -14362,11 +14362,11 @@ var SyntrologieSDK = (() => {
14362
14362
  current2,
14363
14363
  finishedWork
14364
14364
  );
14365
- } catch (error) {
14365
+ } catch (error2) {
14366
14366
  captureCommitPhaseError(
14367
14367
  finishedWork,
14368
14368
  finishedWork.return,
14369
- error
14369
+ error2
14370
14370
  );
14371
14371
  }
14372
14372
  }
@@ -14388,8 +14388,8 @@ var SyntrologieSDK = (() => {
14388
14388
  commitStartTime,
14389
14389
  finishedRoot.effectDuration
14390
14390
  );
14391
- } catch (error) {
14392
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14391
+ } catch (error2) {
14392
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14393
14393
  }
14394
14394
  } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
14395
14395
  break;
@@ -14535,11 +14535,11 @@ var SyntrologieSDK = (() => {
14535
14535
  hostParent,
14536
14536
  deletedFiber.stateNode
14537
14537
  );
14538
- } catch (error) {
14538
+ } catch (error2) {
14539
14539
  captureCommitPhaseError(
14540
14540
  deletedFiber,
14541
14541
  nearestMountedAncestor,
14542
- error
14542
+ error2
14543
14543
  );
14544
14544
  }
14545
14545
  else
@@ -14550,11 +14550,11 @@ var SyntrologieSDK = (() => {
14550
14550
  hostParent,
14551
14551
  deletedFiber.stateNode
14552
14552
  );
14553
- } catch (error) {
14553
+ } catch (error2) {
14554
14554
  captureCommitPhaseError(
14555
14555
  deletedFiber,
14556
14556
  nearestMountedAncestor,
14557
- error
14557
+ error2
14558
14558
  );
14559
14559
  }
14560
14560
  break;
@@ -14653,8 +14653,8 @@ var SyntrologieSDK = (() => {
14653
14653
  commitHydratedActivityInstance,
14654
14654
  finishedRoot
14655
14655
  );
14656
- } catch (error) {
14657
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14656
+ } catch (error2) {
14657
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14658
14658
  }
14659
14659
  }
14660
14660
  }
@@ -14666,8 +14666,8 @@ var SyntrologieSDK = (() => {
14666
14666
  commitHydratedSuspenseInstance,
14667
14667
  finishedRoot
14668
14668
  );
14669
- } catch (error) {
14670
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14669
+ } catch (error2) {
14670
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14671
14671
  }
14672
14672
  }
14673
14673
  function getRetryCache(finishedWork) {
@@ -14912,8 +14912,8 @@ var SyntrologieSDK = (() => {
14912
14912
  resetTextContent,
14913
14913
  existingHiddenCallbacks
14914
14914
  );
14915
- } catch (error) {
14916
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14915
+ } catch (error2) {
14916
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14917
14917
  }
14918
14918
  }
14919
14919
  flags & 4 && null != finishedWork.stateNode && (existingHiddenCallbacks = finishedWork.memoizedProps, commitHostUpdate(
@@ -14944,8 +14944,8 @@ var SyntrologieSDK = (() => {
14944
14944
  current2,
14945
14945
  flags
14946
14946
  );
14947
- } catch (error) {
14948
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14947
+ } catch (error2) {
14948
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14949
14949
  }
14950
14950
  }
14951
14951
  break;
@@ -14964,8 +14964,8 @@ var SyntrologieSDK = (() => {
14964
14964
  commitHydratedContainer,
14965
14965
  root2.containerInfo
14966
14966
  );
14967
- } catch (error) {
14968
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
14967
+ } catch (error2) {
14968
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
14969
14969
  }
14970
14970
  needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
14971
14971
  root2.effectDuration += popNestedEffectDurations(
@@ -15033,8 +15033,8 @@ var SyntrologieSDK = (() => {
15033
15033
  wasHidden.stateNode,
15034
15034
  wasHidden.memoizedProps
15035
15035
  );
15036
- } catch (error) {
15037
- captureCommitPhaseError(wasHidden, wasHidden.return, error);
15036
+ } catch (error2) {
15037
+ captureCommitPhaseError(wasHidden, wasHidden.return, error2);
15038
15038
  }
15039
15039
  }
15040
15040
  } else if (6 === root2.tag) {
@@ -15051,8 +15051,8 @@ var SyntrologieSDK = (() => {
15051
15051
  maybeNodes,
15052
15052
  wasHidden.memoizedProps
15053
15053
  );
15054
- } catch (error) {
15055
- captureCommitPhaseError(wasHidden, wasHidden.return, error);
15054
+ } catch (error2) {
15055
+ captureCommitPhaseError(wasHidden, wasHidden.return, error2);
15056
15056
  }
15057
15057
  }
15058
15058
  } else if (18 === root2.tag) {
@@ -15068,8 +15068,8 @@ var SyntrologieSDK = (() => {
15068
15068
  unhideDehydratedBoundary,
15069
15069
  wasHidden.stateNode
15070
15070
  );
15071
- } catch (error) {
15072
- captureCommitPhaseError(wasHidden, wasHidden.return, error);
15071
+ } catch (error2) {
15072
+ captureCommitPhaseError(wasHidden, wasHidden.return, error2);
15073
15073
  }
15074
15074
  }
15075
15075
  } else if ((22 !== root2.tag && 23 !== root2.tag || null === root2.memoizedState || root2 === finishedWork) && null !== root2.child) {
@@ -15127,8 +15127,8 @@ var SyntrologieSDK = (() => {
15127
15127
  if (flags & 2) {
15128
15128
  try {
15129
15129
  runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
15130
- } catch (error) {
15131
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
15130
+ } catch (error2) {
15131
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
15132
15132
  }
15133
15133
  finishedWork.flags &= -3;
15134
15134
  }
@@ -15244,8 +15244,8 @@ var SyntrologieSDK = (() => {
15244
15244
  current2,
15245
15245
  finishedRoot
15246
15246
  );
15247
- } catch (error) {
15248
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
15247
+ } catch (error2) {
15248
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
15249
15249
  }
15250
15250
  }
15251
15251
  includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
@@ -15282,8 +15282,8 @@ var SyntrologieSDK = (() => {
15282
15282
  commitStartTime,
15283
15283
  includeWorkInProgressEffects.effectDuration
15284
15284
  );
15285
- } catch (error) {
15286
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
15285
+ } catch (error2) {
15286
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
15287
15287
  }
15288
15288
  } else
15289
15289
  recursivelyTraverseReappearLayoutEffects(
@@ -15454,8 +15454,8 @@ var SyntrologieSDK = (() => {
15454
15454
  commitStartTime,
15455
15455
  finishedRoot.passiveEffectDuration
15456
15456
  );
15457
- } catch (error) {
15458
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
15457
+ } catch (error2) {
15458
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
15459
15459
  }
15460
15460
  } else
15461
15461
  recursivelyTraversePassiveMountEffects(
@@ -16396,7 +16396,7 @@ var SyntrologieSDK = (() => {
16396
16396
  check = check.value;
16397
16397
  try {
16398
16398
  if (!objectIs(getSnapshot(), check)) return false;
16399
- } catch (error) {
16399
+ } catch (error2) {
16400
16400
  return false;
16401
16401
  }
16402
16402
  }
@@ -16991,8 +16991,8 @@ var SyntrologieSDK = (() => {
16991
16991
  workInProgress = null;
16992
16992
  return;
16993
16993
  }
16994
- } catch (error) {
16995
- if (null !== returnFiber) throw workInProgress = returnFiber, error;
16994
+ } catch (error2) {
16995
+ if (null !== returnFiber) throw workInProgress = returnFiber, error2;
16996
16996
  workInProgressRootExitStatus = RootFatalErrored;
16997
16997
  logUncaughtError(
16998
16998
  root2,
@@ -17561,36 +17561,36 @@ var SyntrologieSDK = (() => {
17561
17561
  ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = renderPriority, releaseRootPooledCache(root2, remainingLanes);
17562
17562
  }
17563
17563
  }
17564
- function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
17565
- sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
17564
+ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error2) {
17565
+ sourceFiber = createCapturedValueAtFiber(error2, sourceFiber);
17566
17566
  recordEffectError(sourceFiber);
17567
17567
  sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
17568
17568
  rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
17569
17569
  null !== rootFiber && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
17570
17570
  }
17571
- function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
17571
+ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error2) {
17572
17572
  isRunningInsertionEffect = false;
17573
17573
  if (3 === sourceFiber.tag)
17574
- captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
17574
+ captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error2);
17575
17575
  else {
17576
17576
  for (; null !== nearestMountedAncestor; ) {
17577
17577
  if (3 === nearestMountedAncestor.tag) {
17578
17578
  captureCommitPhaseErrorOnRoot(
17579
17579
  nearestMountedAncestor,
17580
17580
  sourceFiber,
17581
- error
17581
+ error2
17582
17582
  );
17583
17583
  return;
17584
17584
  }
17585
17585
  if (1 === nearestMountedAncestor.tag) {
17586
17586
  var instance = nearestMountedAncestor.stateNode;
17587
17587
  if ("function" === typeof nearestMountedAncestor.type.getDerivedStateFromError || "function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
17588
- sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
17588
+ sourceFiber = createCapturedValueAtFiber(error2, sourceFiber);
17589
17589
  recordEffectError(sourceFiber);
17590
- error = createClassErrorUpdate(2);
17591
- instance = enqueueUpdate(nearestMountedAncestor, error, 2);
17590
+ error2 = createClassErrorUpdate(2);
17591
+ instance = enqueueUpdate(nearestMountedAncestor, error2, 2);
17592
17592
  null !== instance && (initializeClassErrorUpdate(
17593
- error,
17593
+ error2,
17594
17594
  instance,
17595
17595
  nearestMountedAncestor,
17596
17596
  sourceFiber
@@ -17602,7 +17602,7 @@ var SyntrologieSDK = (() => {
17602
17602
  }
17603
17603
  console.error(
17604
17604
  "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",
17605
- error
17605
+ error2
17606
17606
  );
17607
17607
  }
17608
17608
  }
@@ -17977,8 +17977,8 @@ var SyntrologieSDK = (() => {
17977
17977
  event.currentTarget = currentTarget;
17978
17978
  try {
17979
17979
  listener(event);
17980
- } catch (error) {
17981
- reportGlobalError(error);
17980
+ } catch (error2) {
17981
+ reportGlobalError(error2);
17982
17982
  }
17983
17983
  event.currentTarget = null;
17984
17984
  }
@@ -20222,9 +20222,9 @@ var SyntrologieSDK = (() => {
20222
20222
  var event = window.event;
20223
20223
  return event && event !== schedulerEvent ? event.timeStamp : -1.1;
20224
20224
  }
20225
- function handleErrorInNextTick(error) {
20225
+ function handleErrorInNextTick(error2) {
20226
20226
  setTimeout(function() {
20227
- throw error;
20227
+ throw error2;
20228
20228
  });
20229
20229
  }
20230
20230
  function commitMount(domElement, type, newProps) {
@@ -22647,20 +22647,20 @@ var SyntrologieSDK = (() => {
22647
22647
  return localDate.now();
22648
22648
  };
22649
22649
  }
22650
- var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
22650
+ var reportGlobalError = "function" === typeof reportError ? reportError : function(error2) {
22651
22651
  if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
22652
22652
  var event = new window.ErrorEvent("error", {
22653
22653
  bubbles: true,
22654
22654
  cancelable: true,
22655
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
22656
- error
22655
+ message: "object" === typeof error2 && null !== error2 && "string" === typeof error2.message ? String(error2.message) : String(error2),
22656
+ error: error2
22657
22657
  });
22658
22658
  if (!window.dispatchEvent(event)) return;
22659
22659
  } else if ("object" === typeof process && "function" === typeof process.emit) {
22660
- process.emit("uncaughtException", error);
22660
+ process.emit("uncaughtException", error2);
22661
22661
  return;
22662
22662
  }
22663
- console.error(error);
22663
+ console.error(error2);
22664
22664
  }, OMITTED_PROP_ERROR = "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.", EMPTY_ARRAY = 0, COMPLEX_ARRAY = 1, PRIMITIVE_ARRAY = 2, ENTRIES_ARRAY = 3, REMOVED = "\u2013\xA0", ADDED = "+\xA0", UNCHANGED = "\u2007\xA0", supportsUserTiming = "undefined" !== typeof console && "function" === typeof console.timeStamp && "undefined" !== typeof performance && "function" === typeof performance.measure, COMPONENTS_TRACK = "Components \u269B", LANES_TRACK_GROUP = "Scheduler \u269B", currentTrack = "Blocking", alreadyWarnedForDeepEquality = false, reusableComponentDevToolDetails = {
22665
22665
  color: "primary",
22666
22666
  properties: null,
@@ -22882,8 +22882,8 @@ var SyntrologieSDK = (() => {
22882
22882
  react_stack_bottom_frame: function(finishedWork, instance) {
22883
22883
  try {
22884
22884
  instance.componentDidMount();
22885
- } catch (error) {
22886
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
22885
+ } catch (error2) {
22886
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
22887
22887
  }
22888
22888
  }
22889
22889
  }, callComponentDidMountInDEV = callComponentDidMount.react_stack_bottom_frame.bind(
@@ -22892,8 +22892,8 @@ var SyntrologieSDK = (() => {
22892
22892
  react_stack_bottom_frame: function(finishedWork, instance, prevProps, prevState, snapshot) {
22893
22893
  try {
22894
22894
  instance.componentDidUpdate(prevProps, prevState, snapshot);
22895
- } catch (error) {
22896
- captureCommitPhaseError(finishedWork, finishedWork.return, error);
22895
+ } catch (error2) {
22896
+ captureCommitPhaseError(finishedWork, finishedWork.return, error2);
22897
22897
  }
22898
22898
  }
22899
22899
  }, callComponentDidUpdateInDEV = callComponentDidUpdate.react_stack_bottom_frame.bind(
@@ -22911,8 +22911,8 @@ var SyntrologieSDK = (() => {
22911
22911
  react_stack_bottom_frame: function(current2, nearestMountedAncestor, instance) {
22912
22912
  try {
22913
22913
  instance.componentWillUnmount();
22914
- } catch (error) {
22915
- captureCommitPhaseError(current2, nearestMountedAncestor, error);
22914
+ } catch (error2) {
22915
+ captureCommitPhaseError(current2, nearestMountedAncestor, error2);
22916
22916
  }
22917
22917
  }
22918
22918
  }, callComponentWillUnmountInDEV = callComponentWillUnmount.react_stack_bottom_frame.bind(
@@ -22928,8 +22928,8 @@ var SyntrologieSDK = (() => {
22928
22928
  react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
22929
22929
  try {
22930
22930
  destroy();
22931
- } catch (error) {
22932
- captureCommitPhaseError(current2, nearestMountedAncestor, error);
22931
+ } catch (error2) {
22932
+ captureCommitPhaseError(current2, nearestMountedAncestor, error2);
22933
22933
  }
22934
22934
  }
22935
22935
  }, callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy), callLazyInit = {
@@ -33733,7 +33733,7 @@ var SyntrologieSDK = (() => {
33733
33733
  footerSlot,
33734
33734
  tiles,
33735
33735
  isLoading,
33736
- error,
33736
+ error: error2,
33737
33737
  canvasTitle,
33738
33738
  displayMode = "standard",
33739
33739
  theme: themeOverride,
@@ -33818,9 +33818,9 @@ var SyntrologieSDK = (() => {
33818
33818
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: wrapperStyle, children: [
33819
33819
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: containerStyle, children: [
33820
33820
  !isFocused && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("header", { style: { color: "white", padding: "1.5rem 1.5rem 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { margin: 0, fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: "0.5em", color: "rgba(255, 255, 255, 0.6)" }, children: canvasTitle ?? "Smart Canvas" }) }),
33821
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: isFocused ? "0" : "1.5rem" }, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "rgba(255, 255, 255, 0.85)", padding: isFocused ? "1rem" : "0" }, children: "Loading..." }) : error ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { color: "#fecdd3", padding: isFocused ? "1rem" : "0" }, children: [
33821
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { flex: 1, overflowY: "auto", padding: isFocused ? "0" : "1.5rem" }, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { color: "rgba(255, 255, 255, 0.85)", padding: isFocused ? "1rem" : "0" }, children: "Loading..." }) : error2 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { color: "#fecdd3", padding: isFocused ? "1rem" : "0" }, children: [
33822
33822
  "Failed to load: ",
33823
- error
33823
+ error2
33824
33824
  ] }) : isFocused ? (
33825
33825
  /* Focused Mode: Render first tile full size */
33826
33826
  tiles.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
@@ -34153,7 +34153,7 @@ var SyntrologieSDK = (() => {
34153
34153
  }
34154
34154
  const uri = resolveConfigUri({ configUri, experiments, featureKey });
34155
34155
  if (!uri) {
34156
- throw new Error("SmartCanvas: config URI missing (env + feature flag unset).");
34156
+ return { tiles: [], overlays: [] };
34157
34157
  }
34158
34158
  if (!validateConfigUri(uri)) {
34159
34159
  throw new Error(`SmartCanvas: config URI not allowed: ${uri}`);
@@ -34466,8 +34466,8 @@ var SyntrologieSDK = (() => {
34466
34466
  return issue.message;
34467
34467
  };
34468
34468
  const fieldErrors = { _errors: [] };
34469
- const processError = (error) => {
34470
- for (const issue of error.issues) {
34469
+ const processError = (error2) => {
34470
+ for (const issue of error2.issues) {
34471
34471
  if (issue.code === "invalid_union") {
34472
34472
  issue.unionErrors.map(processError);
34473
34473
  } else if (issue.code === "invalid_return_type") {
@@ -34530,8 +34530,8 @@ var SyntrologieSDK = (() => {
34530
34530
  }
34531
34531
  };
34532
34532
  ZodError.create = (issues) => {
34533
- const error = new ZodError(issues);
34534
- return error;
34533
+ const error2 = new ZodError(issues);
34534
+ return error2;
34535
34535
  };
34536
34536
 
34537
34537
  // node_modules/zod/v3/locales/en.js
@@ -34795,8 +34795,8 @@ var SyntrologieSDK = (() => {
34795
34795
  get error() {
34796
34796
  if (this._error)
34797
34797
  return this._error;
34798
- const error = new ZodError(ctx.common.issues);
34799
- this._error = error;
34798
+ const error2 = new ZodError(ctx.common.issues);
34799
+ this._error = error2;
34800
34800
  return this._error;
34801
34801
  }
34802
34802
  };
@@ -37451,25 +37451,25 @@ var SyntrologieSDK = (() => {
37451
37451
  });
37452
37452
  return INVALID;
37453
37453
  }
37454
- function makeArgsIssue(args, error) {
37454
+ function makeArgsIssue(args, error2) {
37455
37455
  return makeIssue({
37456
37456
  data: args,
37457
37457
  path: ctx.path,
37458
37458
  errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x2) => !!x2),
37459
37459
  issueData: {
37460
37460
  code: ZodIssueCode.invalid_arguments,
37461
- argumentsError: error
37461
+ argumentsError: error2
37462
37462
  }
37463
37463
  });
37464
37464
  }
37465
- function makeReturnsIssue(returns, error) {
37465
+ function makeReturnsIssue(returns, error2) {
37466
37466
  return makeIssue({
37467
37467
  data: returns,
37468
37468
  path: ctx.path,
37469
37469
  errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x2) => !!x2),
37470
37470
  issueData: {
37471
37471
  code: ZodIssueCode.invalid_return_type,
37472
- returnTypeError: error
37472
+ returnTypeError: error2
37473
37473
  }
37474
37474
  });
37475
37475
  }
@@ -37478,15 +37478,15 @@ var SyntrologieSDK = (() => {
37478
37478
  if (this._def.returns instanceof ZodPromise) {
37479
37479
  const me2 = this;
37480
37480
  return OK(async function(...args) {
37481
- const error = new ZodError([]);
37481
+ const error2 = new ZodError([]);
37482
37482
  const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e2) => {
37483
- error.addIssue(makeArgsIssue(args, e2));
37484
- throw error;
37483
+ error2.addIssue(makeArgsIssue(args, e2));
37484
+ throw error2;
37485
37485
  });
37486
37486
  const result = await Reflect.apply(fn2, this, parsedArgs);
37487
37487
  const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e2) => {
37488
- error.addIssue(makeReturnsIssue(result, e2));
37489
- throw error;
37488
+ error2.addIssue(makeReturnsIssue(result, e2));
37489
+ throw error2;
37490
37490
  });
37491
37491
  return parsedReturns;
37492
37492
  });
@@ -38810,7 +38810,15 @@ var SyntrologieSDK = (() => {
38810
38810
  root = document.createElement("div");
38811
38811
  root.id = id;
38812
38812
  root.setAttribute("data-smart-canvas-overlay", "true");
38813
- document.body.appendChild(root);
38813
+ if (document.body) {
38814
+ document.body.appendChild(root);
38815
+ } else {
38816
+ document.addEventListener("DOMContentLoaded", () => {
38817
+ if (!root.parentNode) {
38818
+ document.body.appendChild(root);
38819
+ }
38820
+ }, { once: true });
38821
+ }
38814
38822
  }
38815
38823
  return root;
38816
38824
  };
@@ -38997,8 +39005,8 @@ var SyntrologieSDK = (() => {
38997
39005
  } else {
38998
39006
  console.warn(`[SmartCanvas] Early patch failed: ${patch.id}`, result.reason);
38999
39007
  }
39000
- } catch (error) {
39001
- console.error(`[SmartCanvas] Error applying early patch: ${patch.id}`, error);
39008
+ } catch (error2) {
39009
+ console.error(`[SmartCanvas] Error applying early patch: ${patch.id}`, error2);
39002
39010
  }
39003
39011
  });
39004
39012
  console.log(`[SmartCanvas] Applied ${appliedCount}/${patches.length} patches early`);
@@ -39016,6 +39024,51 @@ var SyntrologieSDK = (() => {
39016
39024
  }));
39017
39025
  }
39018
39026
 
39027
+ // src/logger.ts
39028
+ var debugEnabled = false;
39029
+ function checkUrlParam() {
39030
+ if (typeof window === "undefined") return false;
39031
+ try {
39032
+ const params = new URLSearchParams(window.location.search);
39033
+ return params.get("syntro_debug") === "true";
39034
+ } catch {
39035
+ return false;
39036
+ }
39037
+ }
39038
+ function initLogger(tokenDebug) {
39039
+ if (checkUrlParam()) {
39040
+ debugEnabled = true;
39041
+ return;
39042
+ }
39043
+ debugEnabled = tokenDebug ?? false;
39044
+ }
39045
+ function isDebugEnabled() {
39046
+ if (checkUrlParam()) return true;
39047
+ return debugEnabled;
39048
+ }
39049
+ function debug(prefix, message, data) {
39050
+ if (!isDebugEnabled()) return;
39051
+ if (data !== void 0) {
39052
+ console.log(`[${prefix}]`, message, data);
39053
+ } else {
39054
+ console.log(`[${prefix}]`, message);
39055
+ }
39056
+ }
39057
+ function warn(prefix, message, data) {
39058
+ if (data !== void 0) {
39059
+ console.warn(`[${prefix}]`, message, data);
39060
+ } else {
39061
+ console.warn(`[${prefix}]`, message);
39062
+ }
39063
+ }
39064
+ function error(prefix, message, data) {
39065
+ if (data !== void 0) {
39066
+ console.error(`[${prefix}]`, message, data);
39067
+ } else {
39068
+ console.error(`[${prefix}]`, message);
39069
+ }
39070
+ }
39071
+
39019
39072
  // src/editorLoader.ts
39020
39073
  var DEFAULT_EDITOR_URL = "https://cdn.syntrologie.com/editor-sdk/latest/editor-sdk.js";
39021
39074
  var ALLOWED_EDITOR_HOSTS = [
@@ -39028,17 +39081,17 @@ var SyntrologieSDK = (() => {
39028
39081
  ".syntrologie.com"
39029
39082
  ];
39030
39083
  function validateEditorUrl(url) {
39031
- console.log("[Syntro Runtime] Validating editor URL:", url);
39084
+ debug("Syntro Runtime", "Validating editor URL:", url);
39032
39085
  try {
39033
39086
  const parsed = new URL(url);
39034
39087
  const isLocalhost = /^(localhost|127\.0\.0\.1)$/.test(parsed.hostname);
39035
- console.log("[Syntro Runtime] Parsed URL:", {
39088
+ debug("Syntro Runtime", "Parsed URL:", {
39036
39089
  hostname: parsed.hostname,
39037
39090
  protocol: parsed.protocol,
39038
39091
  isLocalhost
39039
39092
  });
39040
39093
  if (parsed.protocol !== "https:" && !isLocalhost) {
39041
- console.warn("[Syntro Runtime] \u274C Editor URL must use HTTPS:", url);
39094
+ warn("Syntro Runtime", "\u274C Editor URL must use HTTPS:", url);
39042
39095
  return false;
39043
39096
  }
39044
39097
  const isAllowed = ALLOWED_EDITOR_HOSTS.some((host) => {
@@ -39047,34 +39100,34 @@ var SyntrologieSDK = (() => {
39047
39100
  }
39048
39101
  return parsed.hostname === host;
39049
39102
  });
39050
- console.log("[Syntro Runtime] Host allowlist check:", {
39103
+ debug("Syntro Runtime", "Host allowlist check:", {
39051
39104
  hostname: parsed.hostname,
39052
39105
  allowedHosts: ALLOWED_EDITOR_HOSTS,
39053
39106
  isAllowed
39054
39107
  });
39055
39108
  if (!isAllowed) {
39056
- console.warn("[Syntro Runtime] \u274C Editor URL host not in allowlist:", parsed.hostname);
39109
+ warn("Syntro Runtime", "\u274C Editor URL host not in allowlist:", parsed.hostname);
39057
39110
  return false;
39058
39111
  }
39059
- console.log("[Syntro Runtime] \u2713 Editor URL validated");
39112
+ debug("Syntro Runtime", "\u2713 Editor URL validated");
39060
39113
  return true;
39061
39114
  } catch (e2) {
39062
- console.warn("[Syntro Runtime] \u274C Invalid editor URL:", url, e2);
39115
+ warn("Syntro Runtime", "\u274C Invalid editor URL: " + url, e2);
39063
39116
  return false;
39064
39117
  }
39065
39118
  }
39066
39119
  var shouldLoadEditor = () => {
39067
- console.log("[Syntro Runtime] ====== EDITOR LOAD CHECK ======");
39120
+ debug("Syntro Runtime", "====== EDITOR LOAD CHECK ======");
39068
39121
  if (typeof window === "undefined") {
39069
- console.log("[Syntro Runtime] Not in browser - skipping editor");
39122
+ debug("Syntro Runtime", "Not in browser - skipping editor");
39070
39123
  return false;
39071
39124
  }
39072
39125
  const params = new URLSearchParams(window.location.search);
39073
- console.log("[Syntro Runtime] URL:", window.location.href);
39074
- console.log("[Syntro Runtime] Search params:", window.location.search);
39126
+ debug("Syntro Runtime", "URL:", window.location.href);
39127
+ debug("Syntro Runtime", "Search params:", window.location.search);
39075
39128
  const hasEditorFlag = params.has("syntro_editor") || params.has("syntro-editor");
39076
39129
  const hasEditorToken = params.has("editor_token");
39077
- console.log("[Syntro Runtime] Editor flags:", {
39130
+ debug("Syntro Runtime", "Editor flags:", {
39078
39131
  hasEditorFlag,
39079
39132
  hasEditorToken,
39080
39133
  syntro_editor: params.get("syntro_editor"),
@@ -39082,35 +39135,35 @@ var SyntrologieSDK = (() => {
39082
39135
  editor_token: hasEditorToken ? `${params.get("editor_token")?.slice(0, 10)}...` : "none"
39083
39136
  });
39084
39137
  if (hasEditorFlag && !hasEditorToken) {
39085
- console.warn("[Syntro Runtime] \u274C Editor activation requires editor_token parameter");
39086
- console.log("[Syntro Runtime] ================================");
39138
+ warn("Syntro Runtime", "\u274C Editor activation requires editor_token parameter");
39139
+ debug("Syntro Runtime", "================================");
39087
39140
  return false;
39088
39141
  }
39089
39142
  const shouldLoad = hasEditorFlag && hasEditorToken;
39090
- console.log("[Syntro Runtime] Should load editor:", shouldLoad);
39091
- console.log("[Syntro Runtime] ================================");
39143
+ debug("Syntro Runtime", "Should load editor:", shouldLoad);
39144
+ debug("Syntro Runtime", "================================");
39092
39145
  return shouldLoad;
39093
39146
  };
39094
39147
  var isAuditMode = () => {
39095
- console.log("[Syntro Runtime] ====== AUDIT MODE CHECK ======");
39148
+ debug("Syntro Runtime", "====== AUDIT MODE CHECK ======");
39096
39149
  if (typeof window === "undefined") {
39097
- console.log("[Syntro Runtime] Not in browser - skipping audit");
39150
+ debug("Syntro Runtime", "Not in browser - skipping audit");
39098
39151
  return false;
39099
39152
  }
39100
39153
  const params = new URLSearchParams(window.location.search);
39101
39154
  const hasAuditFlag = params.has("syntro_audit");
39102
39155
  const auditSessionId = params.get("audit_session_id");
39103
- console.log("[Syntro Runtime] Audit flags:", {
39156
+ debug("Syntro Runtime", "Audit flags:", {
39104
39157
  hasAuditFlag,
39105
39158
  auditSessionId: auditSessionId ? `${auditSessionId.slice(0, 8)}...` : "none"
39106
39159
  });
39107
39160
  if (!hasAuditFlag) {
39108
- console.log("[Syntro Runtime] No syntro_audit param - not in audit mode");
39109
- console.log("[Syntro Runtime] ================================");
39161
+ debug("Syntro Runtime", "No syntro_audit param - not in audit mode");
39162
+ debug("Syntro Runtime", "================================");
39110
39163
  return false;
39111
39164
  }
39112
- console.log("[Syntro Runtime] \u2713 Audit mode active");
39113
- console.log("[Syntro Runtime] ================================");
39165
+ debug("Syntro Runtime", "\u2713 Audit mode active");
39166
+ debug("Syntro Runtime", "================================");
39114
39167
  return true;
39115
39168
  };
39116
39169
  var getActiveSdkMode = () => {
@@ -39119,28 +39172,28 @@ var SyntrologieSDK = (() => {
39119
39172
  return null;
39120
39173
  };
39121
39174
  var loadEditorSdk = async (editorUrlOrOptions) => {
39122
- console.log("[Syntro Runtime] ====== LOAD EDITOR SDK ======");
39175
+ debug("Syntro Runtime", "====== LOAD EDITOR SDK ======");
39123
39176
  if (typeof window === "undefined") {
39124
- console.log("[Syntro Runtime] Not in browser - skipping editor SDK load");
39177
+ debug("Syntro Runtime", "Not in browser - skipping editor SDK load");
39125
39178
  return;
39126
39179
  }
39127
39180
  if (window.SyntroEditor) {
39128
- console.log("[Syntro Runtime] Editor SDK already loaded (window.SyntroEditor exists)");
39181
+ debug("Syntro Runtime", "Editor SDK already loaded (window.SyntroEditor exists)");
39129
39182
  return;
39130
39183
  }
39131
39184
  const options = typeof editorUrlOrOptions === "string" ? { editorUrl: editorUrlOrOptions } : editorUrlOrOptions ?? {};
39132
39185
  const editorUrl = options.editorUrl ?? DEFAULT_EDITOR_URL;
39133
- console.log("[Syntro Runtime] Editor URL:", editorUrl);
39134
- console.log("[Syntro Runtime] Options:", {
39186
+ debug("Syntro Runtime", "Editor URL:", editorUrl);
39187
+ debug("Syntro Runtime", "Options:", {
39135
39188
  hasIntegrity: !!options.integrity,
39136
39189
  isDefault: editorUrl === DEFAULT_EDITOR_URL
39137
39190
  });
39138
39191
  if (!validateEditorUrl(editorUrl)) {
39139
39192
  console.error("[Syntro Runtime] \u274C BLOCKED: Editor from untrusted URL:", editorUrl);
39140
- console.log("[Syntro Runtime] ================================");
39193
+ debug("Syntro Runtime", "================================");
39141
39194
  return;
39142
39195
  }
39143
- console.log("[Syntro Runtime] \u2713 URL validated, injecting script tag...");
39196
+ debug("Syntro Runtime", "\u2713 URL validated, injecting script tag...");
39144
39197
  return new Promise((resolve, reject) => {
39145
39198
  const script = document.createElement("script");
39146
39199
  script.src = editorUrl;
@@ -39148,23 +39201,23 @@ var SyntrologieSDK = (() => {
39148
39201
  if (options.integrity) {
39149
39202
  script.integrity = options.integrity;
39150
39203
  script.crossOrigin = "anonymous";
39151
- console.log("[Syntro Runtime] SRI integrity check enabled");
39204
+ debug("Syntro Runtime", "SRI integrity check enabled");
39152
39205
  }
39153
39206
  script.onload = () => {
39154
- console.log("[Syntro Runtime] \u2713 Editor SDK script loaded successfully");
39155
- console.log("[Syntro Runtime] window.SyntroEditor:", !!window.SyntroEditor);
39156
- console.log("[Syntro Runtime] ================================");
39207
+ debug("Syntro Runtime", "\u2713 Editor SDK script loaded successfully");
39208
+ debug("Syntro Runtime", "window.SyntroEditor:", !!window.SyntroEditor);
39209
+ debug("Syntro Runtime", "================================");
39157
39210
  resolve();
39158
39211
  };
39159
39212
  script.onerror = (err) => {
39160
39213
  console.error("[Syntro Runtime] \u274C Failed to load Editor SDK:", err);
39161
39214
  console.error("[Syntro Runtime] URL attempted:", editorUrl);
39162
39215
  console.error("[Syntro Runtime] Check: Is the URL accessible? CORS? Network?");
39163
- console.log("[Syntro Runtime] ================================");
39216
+ debug("Syntro Runtime", "================================");
39164
39217
  reject(err);
39165
39218
  };
39166
39219
  document.head.appendChild(script);
39167
- console.log("[Syntro Runtime] Script tag appended to <head>");
39220
+ debug("Syntro Runtime", "Script tag appended to <head>");
39168
39221
  });
39169
39222
  };
39170
39223
 
@@ -39197,8 +39250,8 @@ var SyntrologieSDK = (() => {
39197
39250
  }
39198
39251
  });
39199
39252
  }
39200
- } catch (error) {
39201
- console.error("[SmartCanvas] Error applying early patches:", error);
39253
+ } catch (error2) {
39254
+ console.error("[SmartCanvas] Error applying early patches:", error2);
39202
39255
  }
39203
39256
  }
39204
39257
  if (removeAntiFlicker) {
@@ -39216,8 +39269,17 @@ var SyntrologieSDK = (() => {
39216
39269
  host.style.setProperty(key, value);
39217
39270
  }
39218
39271
  }
39219
- const target = config.target ?? document.body;
39220
- target.appendChild(host);
39272
+ const appendToTarget = () => {
39273
+ const target = config.target ?? document.body;
39274
+ if (target) {
39275
+ target.appendChild(host);
39276
+ }
39277
+ };
39278
+ if (document.body) {
39279
+ appendToTarget();
39280
+ } else {
39281
+ document.addEventListener("DOMContentLoaded", appendToTarget, { once: true });
39282
+ }
39221
39283
  const experiments = config.integrations?.experiments;
39222
39284
  const telemetry = config.integrations?.telemetry;
39223
39285
  const fetcher = config.fetcher ?? createCanvasConfigFetcher({
@@ -39263,8 +39325,8 @@ var SyntrologieSDK = (() => {
39263
39325
  const freshConfig = await currentFetcher();
39264
39326
  currentConfig = freshConfig;
39265
39327
  return freshConfig;
39266
- } catch (error) {
39267
- console.error("[SmartCanvas] Error fetching config:", error);
39328
+ } catch (error2) {
39329
+ console.error("[SmartCanvas] Error fetching config:", error2);
39268
39330
  }
39269
39331
  }
39270
39332
  return currentConfig;
@@ -41059,12 +41121,12 @@ var SyntrologieSDK = (() => {
41059
41121
  }
41060
41122
  function isEditorMode() {
41061
41123
  if (typeof window === "undefined") {
41062
- console.log("[Syntro Bootstrap] isEditorMode: not in browser");
41124
+ debug("Syntro Bootstrap", "isEditorMode: not in browser");
41063
41125
  return false;
41064
41126
  }
41065
41127
  const params = new URLSearchParams(window.location.search);
41066
41128
  const hasToken = params.has("editor_token");
41067
- console.log("[Syntro Bootstrap] isEditorMode check:", {
41129
+ debug("Syntro Bootstrap", "isEditorMode check:", {
41068
41130
  url: window.location.href,
41069
41131
  search: window.location.search,
41070
41132
  hasEditorToken: hasToken,
@@ -41074,12 +41136,12 @@ var SyntrologieSDK = (() => {
41074
41136
  }
41075
41137
  function isAuditMode3() {
41076
41138
  if (typeof window === "undefined") {
41077
- console.log("[Syntro Bootstrap] isAuditMode: not in browser");
41139
+ debug("Syntro Bootstrap", "isAuditMode: not in browser");
41078
41140
  return false;
41079
41141
  }
41080
41142
  const params = new URLSearchParams(window.location.search);
41081
41143
  const hasAuditFlag = params.has("syntro_audit");
41082
- console.log("[Syntro Bootstrap] isAuditMode check:", {
41144
+ debug("Syntro Bootstrap", "isAuditMode check:", {
41083
41145
  url: window.location.href,
41084
41146
  hasAuditFlag,
41085
41147
  auditSessionId: params.get("audit_session_id") ?? "none"
@@ -41093,11 +41155,11 @@ var SyntrologieSDK = (() => {
41093
41155
  const cached = localStorage.getItem(SEGMENT_CACHE_KEY);
41094
41156
  if (cached) {
41095
41157
  const attrs = JSON.parse(cached);
41096
- console.log("[Syntro Bootstrap] Loaded cached segment attributes:", attrs);
41158
+ debug("Syntro Bootstrap", "Loaded cached segment attributes:", attrs);
41097
41159
  return attrs;
41098
41160
  }
41099
41161
  } catch (err) {
41100
- console.warn("[Syntro Bootstrap] Failed to load cached segment attributes:", err);
41162
+ warn("Syntro Bootstrap", "Failed to load cached segment attributes:", err);
41101
41163
  }
41102
41164
  return {};
41103
41165
  }
@@ -41105,9 +41167,9 @@ var SyntrologieSDK = (() => {
41105
41167
  if (typeof window === "undefined") return;
41106
41168
  try {
41107
41169
  localStorage.setItem(SEGMENT_CACHE_KEY, JSON.stringify(attrs));
41108
- console.log("[Syntro Bootstrap] Cached segment attributes:", attrs);
41170
+ debug("Syntro Bootstrap", "Cached segment attributes:", attrs);
41109
41171
  } catch (err) {
41110
- console.warn("[Syntro Bootstrap] Failed to cache segment attributes:", err);
41172
+ warn("Syntro Bootstrap", "Failed to cache segment attributes:", err);
41111
41173
  }
41112
41174
  }
41113
41175
  function extractSegmentFlags(allFlags) {
@@ -41121,8 +41183,9 @@ var SyntrologieSDK = (() => {
41121
41183
  return segmentFlags;
41122
41184
  }
41123
41185
  async function init(options) {
41124
- console.log("[Syntro Bootstrap] ====== INIT ======");
41125
- console.log("[Syntro Bootstrap] Options:", {
41186
+ initLogger();
41187
+ debug("Syntro Bootstrap", "====== INIT ======");
41188
+ debug("Syntro Bootstrap", "Options:", {
41126
41189
  hasToken: !!options.token,
41127
41190
  tokenPrefix: options.token?.slice(0, 15) + "...",
41128
41191
  hasCanvasOptions: !!options.canvas
@@ -41130,40 +41193,41 @@ var SyntrologieSDK = (() => {
41130
41193
  const editorMode = isEditorMode();
41131
41194
  const auditMode = isAuditMode3();
41132
41195
  const sdkMode = editorMode ? "editor" : auditMode ? "audit" : null;
41133
- console.log("[Syntro Bootstrap] SDK mode:", sdkMode ?? "normal");
41196
+ debug("Syntro Bootstrap", "SDK mode:", sdkMode ?? "normal");
41134
41197
  let payload;
41135
41198
  if (options.token) {
41136
41199
  if (options.token.startsWith("syn_")) {
41137
- console.log("[Syntro Bootstrap] Token starts with syn_, decoding...");
41200
+ debug("Syntro Bootstrap", "Token starts with syn_, decoding...");
41138
41201
  payload = decodeToken(options.token);
41202
+ initLogger(payload.d);
41139
41203
  } else if (!sdkMode) {
41140
- console.error("[Syntro Bootstrap] \u274C Token does not start with syn_ and NOT in editor/audit mode!");
41141
- console.error("[Syntro Bootstrap] Token received:", options.token);
41204
+ error("Syntro Bootstrap", "\u274C Token does not start with syn_ and NOT in editor/audit mode!");
41205
+ error("Syntro Bootstrap", "Token received:", options.token);
41142
41206
  throw new Error("Invalid Syntro token: must start with 'syn_'");
41143
41207
  } else {
41144
- console.log(`[Syntro Bootstrap] \u2713 Non-syn_ token allowed (${sdkMode} mode)`);
41208
+ debug("Syntro Bootstrap", `\u2713 Non-syn_ token allowed (${sdkMode} mode)`);
41145
41209
  }
41146
41210
  } else if (!sdkMode) {
41147
- console.error("[Syntro Bootstrap] \u274C No token provided and NOT in editor/audit mode!");
41211
+ error("Syntro Bootstrap", "\u274C No token provided and NOT in editor/audit mode!");
41148
41212
  throw new Error("Syntro token is required (unless in editor or audit mode)");
41149
41213
  } else {
41150
- console.log(`[Syntro Bootstrap] \u2713 No token, but ${sdkMode} mode - proceeding`);
41214
+ debug("Syntro Bootstrap", `\u2713 No token, but ${sdkMode} mode - proceeding`);
41151
41215
  }
41152
41216
  const experimentHost = getEnvVar("NEXT_PUBLIC_SYNTRO_EXPERIMENT_HOST") || getEnvVar("VITE_SYNTRO_EXPERIMENT_HOST") || payload?.eh;
41153
41217
  const telemetryHost = getEnvVar("NEXT_PUBLIC_SYNTRO_TELEMETRY_HOST") || getEnvVar("VITE_SYNTRO_TELEMETRY_HOST") || payload?.th;
41154
41218
  const editorUrl = getEnvVar("NEXT_PUBLIC_SYNTRO_EDITOR_URL") || getEnvVar("VITE_SYNTRO_EDITOR_URL") || options.canvas?.editorUrl;
41155
41219
  const cachedSegmentAttrs = loadCachedSegmentAttributes();
41156
- console.log("[Syntro Bootstrap] Phase 1: Using cached segment attributes:", cachedSegmentAttrs);
41220
+ debug("Syntro Bootstrap", "Phase 1: Using cached segment attributes:", cachedSegmentAttrs);
41157
41221
  let experiments;
41158
41222
  const onFeatureFlagsLoaded = (allFlags) => {
41159
- console.log("[Syntro Bootstrap] Phase 2: PostHog feature flags loaded");
41223
+ debug("Syntro Bootstrap", "Phase 2: PostHog feature flags loaded");
41160
41224
  const segmentFlags = extractSegmentFlags(allFlags);
41161
- console.log("[Syntro Bootstrap] Segment flags from PostHog:", segmentFlags);
41225
+ debug("Syntro Bootstrap", "Segment flags from PostHog:", segmentFlags);
41162
41226
  cacheSegmentAttributes(segmentFlags);
41163
41227
  if (experiments) {
41164
41228
  const sessionAttrs = sessionMetrics?.getAll?.() ?? {};
41165
41229
  const updatedAttrs = { ...sessionAttrs, ...segmentFlags };
41166
- console.log("[Syntro Bootstrap] Updating GrowthBook with attributes:", updatedAttrs);
41230
+ debug("Syntro Bootstrap", "Updating GrowthBook with attributes:", updatedAttrs);
41167
41231
  experiments.setAttributes?.(updatedAttrs);
41168
41232
  }
41169
41233
  };
@@ -41212,10 +41276,10 @@ var SyntrologieSDK = (() => {
41212
41276
  sessionMetrics = createSessionMetricTracker({
41213
41277
  experiments,
41214
41278
  onMetricChange: (key, value) => {
41215
- console.log(`[Syntro Bootstrap] Session metric changed: ${key} = ${value}`);
41279
+ debug("Syntro Bootstrap", `Session metric changed: ${key} = ${value}`);
41216
41280
  }
41217
41281
  });
41218
- console.log("[Syntro Bootstrap] SessionMetricTracker created");
41282
+ debug("Syntro Bootstrap", "SessionMetricTracker created");
41219
41283
  }
41220
41284
  const canvas = await createSmartCanvas({
41221
41285
  ...options.canvas,
@@ -41232,7 +41296,7 @@ var SyntrologieSDK = (() => {
41232
41296
  sessionMetrics,
41233
41297
  mode: runtimeMode
41234
41298
  });
41235
- console.log("[Syntro Bootstrap] Runtime created:", {
41299
+ debug("Syntro Bootstrap", "Runtime created:", {
41236
41300
  version: runtime.version,
41237
41301
  mode: runtime.mode,
41238
41302
  hasContext: !!runtime.context,
@@ -41308,4 +41372,5 @@ react-dom/cjs/react-dom-client.development.js:
41308
41372
  * LICENSE file in the root directory of this source tree.
41309
41373
  *)
41310
41374
  */
41375
+ window.Syntro=SyntrologieSDK.Syntro;
41311
41376
  //# sourceMappingURL=smart-canvas.js.map